diff options
Diffstat (limited to 'src/plugins')
23 files changed, 66638 insertions, 33860 deletions
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c index 7a26c8f98..5af7576d3 100644 --- a/src/plugins/HPMHooking.c +++ b/src/plugins/HPMHooking.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2015 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,19 +17,32 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include "HPMHooking.h" + #include "common/hercules.h" #include "common/db.h" #include "common/memmgr.h" #include "common/mmo.h" #include "common/socket.h" +#include "common/packets.h" +PRAGMA_GCC5(GCC diagnostic push) +PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers") #if defined (HPMHOOKING_LOGIN) #define HPM_SERVER_TYPE SERVER_TYPE_LOGIN #define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_login.HPMHooksCore.inc" #define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_login.Hooks.inc" #define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_login.HookingPoints.inc" #define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_login.sources.inc" +#include "login/account.h" +#include "login/ipban.h" +#include "login/lclif.h" +#include "login/lclif.p.h" #include "login/login.h" +#include "login/loginlog.h" +#include "login/packets_ac_struct.h" +#include "login/packets_ca_struct.h" #elif defined (HPMHOOKING_CHAR) #define HPM_SERVER_TYPE SERVER_TYPE_CHAR #define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_char.HPMHooksCore.inc" @@ -38,7 +51,9 @@ #define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_char.sources.inc" #include "char/char.h" #include "char/geoip.h" +#include "char/int_achievement.h" #include "char/int_auction.h" +#include "char/int_clan.h" #include "char/int_elemental.h" #include "char/int_guild.h" #include "char/int_homun.h" @@ -47,6 +62,7 @@ #include "char/int_party.h" #include "char/int_pet.h" #include "char/int_quest.h" +#include "char/int_rodex.h" #include "char/int_storage.h" #include "char/inter.h" #include "char/loginif.h" @@ -59,12 +75,14 @@ #define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_map.Hooks.inc" #define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_map.HookingPoints.inc" #define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_map.sources.inc" +#include "map/achievement.h" #include "map/atcommand.h" #include "map/battle.h" #include "map/battleground.h" #include "map/channel.h" #include "map/chat.h" #include "map/chrif.h" +#include "map/clan.h" #include "map/clif.h" #include "map/duel.h" #include "map/elemental.h" @@ -79,6 +97,7 @@ #include "map/map.h" #include "map/mapreg.h" #include "map/mercenary.h" +#include "map/messages.h" #include "map/mob.h" #include "map/npc.h" #include "map/party.h" @@ -86,12 +105,17 @@ #include "map/pc.h" #include "map/pet.h" #include "map/quest.h" +#include "map/rodex.h" +#include "map/refine.h" +#include "map/refine.p.h" #include "map/script.h" #include "map/skill.h" #include "map/status.h" #include "map/storage.h" +#include "map/stylist.h" #include "map/trade.h" #include "map/unit.h" +#include "common/grfio.h" #include "common/mapindex.h" #else #define HPM_SERVER_TYPE SERVER_TYPE_UNKNOWN @@ -101,16 +125,22 @@ #define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking.sources.inc" #error HPMHooking plugin needs to be compiled for a specific server type. Please make sure your Makefiles are up to date. #endif +PRAGMA_GCC5(GCC diagnostic pop) #include "common/conf.h" #include "common/console.h" #include "common/db.h" +#include "common/des.h" +#include "common/md5calc.h" #include "common/memmgr.h" +#include "common/mutex.h" #include "common/nullpo.h" +#include "common/random.h" #include "common/showmsg.h" #include "common/socket.h" #include "common/sql.h" #include "common/strlib.h" #include "common/sysinfo.h" +#include "common/thread.h" #include "common/timer.h" #include "common/utils.h" @@ -199,7 +229,10 @@ HPExport bool HPM_Plugin_AddHook(enum HPluginHookType type, const char *target, return false; } +PRAGMA_GCC5(GCC diagnostic push) +PRAGMA_GCC5(GCC diagnostic ignored "-Wdiscarded-qualifiers") #include HPM_HOOKS_INCLUDE +PRAGMA_GCC5(GCC diagnostic pop) void HPM_HP_final(void) { int i, len = HPMHooks.data.total * 2; diff --git a/src/plugins/HPMHooking.h b/src/plugins/HPMHooking.h new file mode 100644 index 000000000..76f12dbad --- /dev/null +++ b/src/plugins/HPMHooking.h @@ -0,0 +1,79 @@ +/** + * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules + * + * Copyright (C) 2016-2020 Hercules Dev Team + * + * Hercules is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#ifndef PLUGINS_HPMHOOKING_H +#define PLUGINS_HPMHOOKING_H + +#include "common/hercules.h" + +enum HPluginHookType { + HOOK_TYPE_PRE, + HOOK_TYPE_POST, +}; + +struct HPMHooking_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); +}; + +#ifdef HERCULES_CORE +struct HPMHooking_core_interface { + bool enabled; + bool force_return; + bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); + const char *(*Hooked)(bool *fr); +}; +#else // ! HERCULES_CORE +#ifdef HERCULES_CORE_HPMI_SKIP +extern struct HPMHooking_interface HPMHooking_s; +#else +HPExport struct HPMHooking_interface HPMHooking_s; +#endif + +#include "HPMHooking/HPMHooking.Defs.inc" + +#define addHookPre(ifname, funcname, hook) ( \ + (void)((HPMHOOK_pre_ ## ifname ## _ ## funcname)0 == (hook)), \ + HPMi->hooking->AddHook(HOOK_TYPE_PRE, #ifname "->" #funcname, (hook), HPMi->pid) \ + ) + +#define addHookPrePriv(ifname, funcname, hook) ( \ + (void)((HPMHOOK_pre_PRIV__ ## ifname ## _ ## funcname)0 == (hook)), \ + HPMi->hooking->AddHook(HOOK_TYPE_PRE, #ifname "->p->" #funcname, (hook), HPMi->pid) \ + ) + +#define addHookPost(ifname, funcname, hook) ( \ + (void)((HPMHOOK_post_ ## ifname ## _ ## funcname)0 == (hook)), \ + HPMi->hooking->AddHook(HOOK_TYPE_POST, #ifname "->" #funcname, (hook), HPMi->pid) \ + ) + +#define addHookPostPriv(ifname, funcname, hook) ( \ + (void)((HPMHOOK_post_PRIV__ ## ifname ## _ ## funcname)0 == (hook)), \ + HPMi->hooking->AddHook(HOOK_TYPE_POST, #ifname "->p->" #funcname, (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->hooking->HookStop(__func__,HPMi->pid)) +#define hookStopped() (HPMi->hooking->HookStopped()) + +#endif // ! HERCULES_CORE + +#endif // PLUGINS_HPMHOOKING_H diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc new file mode 100644 index 000000000..80ba50d73 --- /dev/null +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -0,0 +1,8429 @@ +/** + * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules + * + * Copyright (C) 2013-2020 Hercules Dev Team + * + * Hercules is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* + * NOTE: This file was auto-generated and should never be manually edited, + * as it will get overwritten. + */ + +/* GENERATED FILE DO NOT EDIT */ + +#ifdef COMMON_UTILS_H /* HCache */ +typedef void (*HPMHOOK_pre_HCache_init) (void); +typedef void (*HPMHOOK_post_HCache_init) (void); +typedef bool (*HPMHOOK_pre_HCache_check) (const char **file); +typedef bool (*HPMHOOK_post_HCache_check) (bool retVal___, const char *file); +typedef FILE* (*HPMHOOK_pre_HCache_open) (const char **file, const char **opt); +typedef FILE* (*HPMHOOK_post_HCache_open) (FILE* retVal___, const char *file, const char *opt); +#endif // COMMON_UTILS_H +#ifdef LOGIN_ACCOUNT_H /* account */ +typedef struct Sql* (*HPMHOOK_pre_account_db_sql_up) (AccountDB **self); +typedef struct Sql* (*HPMHOOK_post_account_db_sql_up) (struct Sql* retVal___, AccountDB *self); +typedef void (*HPMHOOK_pre_account_mmo_send_accreg2) (AccountDB **self, int *fd, int *account_id, int *char_id); +typedef void (*HPMHOOK_post_account_mmo_send_accreg2) (AccountDB *self, int fd, int account_id, int char_id); +typedef void (*HPMHOOK_pre_account_mmo_save_accreg2) (AccountDB **self, int *fd, int *account_id, int *char_id); +typedef void (*HPMHOOK_post_account_mmo_save_accreg2) (AccountDB *self, int fd, int account_id, int char_id); +typedef bool (*HPMHOOK_pre_account_mmo_auth_fromsql) (AccountDB_SQL **db, struct mmo_account **acc, int *account_id); +typedef bool (*HPMHOOK_post_account_mmo_auth_fromsql) (bool retVal___, AccountDB_SQL *db, struct mmo_account *acc, int account_id); +typedef bool (*HPMHOOK_pre_account_mmo_auth_tosql) (AccountDB_SQL **db, const struct mmo_account **acc, bool *is_new); +typedef bool (*HPMHOOK_post_account_mmo_auth_tosql) (bool retVal___, AccountDB_SQL *db, const struct mmo_account *acc, bool is_new); +typedef AccountDB* (*HPMHOOK_pre_account_db_sql) (void); +typedef AccountDB* (*HPMHOOK_post_account_db_sql) (AccountDB* retVal___); +typedef bool (*HPMHOOK_pre_account_db_sql_init) (AccountDB **self); +typedef bool (*HPMHOOK_post_account_db_sql_init) (bool retVal___, AccountDB *self); +typedef void (*HPMHOOK_pre_account_db_sql_destroy) (AccountDB **self); +typedef void (*HPMHOOK_post_account_db_sql_destroy) (AccountDB *self); +typedef bool (*HPMHOOK_pre_account_db_sql_get_property) (AccountDB **self, const char **key, char **buf, size_t *buflen); +typedef bool (*HPMHOOK_post_account_db_sql_get_property) (bool retVal___, AccountDB *self, const char *key, char *buf, size_t buflen); +typedef bool (*HPMHOOK_pre_account_db_sql_set_property) (AccountDB **self, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_account_db_sql_set_property) (bool retVal___, AccountDB *self, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_account_db_sql_create) (AccountDB **self, struct mmo_account **acc); +typedef bool (*HPMHOOK_post_account_db_sql_create) (bool retVal___, AccountDB *self, struct mmo_account *acc); +typedef bool (*HPMHOOK_pre_account_db_sql_remove) (AccountDB **self, const int *account_id); +typedef bool (*HPMHOOK_post_account_db_sql_remove) (bool retVal___, AccountDB *self, const int account_id); +typedef bool (*HPMHOOK_pre_account_db_sql_save) (AccountDB **self, const struct mmo_account **acc); +typedef bool (*HPMHOOK_post_account_db_sql_save) (bool retVal___, AccountDB *self, const struct mmo_account *acc); +typedef bool (*HPMHOOK_pre_account_db_sql_load_num) (AccountDB **self, struct mmo_account **acc, const int *account_id); +typedef bool (*HPMHOOK_post_account_db_sql_load_num) (bool retVal___, AccountDB *self, struct mmo_account *acc, const int account_id); +typedef bool (*HPMHOOK_pre_account_db_sql_load_str) (AccountDB **self, struct mmo_account **acc, const char **userid); +typedef bool (*HPMHOOK_post_account_db_sql_load_str) (bool retVal___, AccountDB *self, struct mmo_account *acc, const char *userid); +typedef AccountDBIterator* (*HPMHOOK_pre_account_db_sql_iterator) (AccountDB **self); +typedef AccountDBIterator* (*HPMHOOK_post_account_db_sql_iterator) (AccountDBIterator* retVal___, AccountDB *self); +typedef void (*HPMHOOK_pre_account_db_sql_iter_destroy) (AccountDBIterator **self); +typedef void (*HPMHOOK_post_account_db_sql_iter_destroy) (AccountDBIterator *self); +typedef bool (*HPMHOOK_pre_account_db_sql_iter_next) (AccountDBIterator **self, struct mmo_account **acc); +typedef bool (*HPMHOOK_post_account_db_sql_iter_next) (bool retVal___, AccountDBIterator *self, struct mmo_account *acc); +typedef bool (*HPMHOOK_pre_account_db_read_inter) (AccountDB_SQL **db, const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_account_db_read_inter) (bool retVal___, AccountDB_SQL *db, const char *filename, bool imported); +#endif // LOGIN_ACCOUNT_H +#ifdef MAP_ACHIEVEMENT_H /* achievement */ +typedef void (*HPMHOOK_pre_achievement_init) (bool *minimal); +typedef void (*HPMHOOK_post_achievement_init) (bool minimal); +typedef void (*HPMHOOK_pre_achievement_final) (void); +typedef void (*HPMHOOK_post_achievement_final) (void); +typedef int (*HPMHOOK_pre_achievement_db_finalize) (union DBKey *key, struct DBData **data, va_list args); +typedef int (*HPMHOOK_post_achievement_db_finalize) (int retVal___, union DBKey key, struct DBData *data, va_list args); +typedef void (*HPMHOOK_pre_achievement_readdb) (void); +typedef void (*HPMHOOK_post_achievement_readdb) (void); +typedef bool (*HPMHOOK_pre_achievement_readdb_objectives_sub) (const struct config_setting_t **conf, int *index, struct achievement_data **entry); +typedef bool (*HPMHOOK_post_achievement_readdb_objectives_sub) (bool retVal___, const struct config_setting_t *conf, int index, struct achievement_data *entry); +typedef bool (*HPMHOOK_pre_achievement_readdb_objectives) (const struct config_setting_t **conf, struct achievement_data **entry); +typedef bool (*HPMHOOK_post_achievement_readdb_objectives) (bool retVal___, const struct config_setting_t *conf, struct achievement_data *entry); +typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_mobid) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); +typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_mobid) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); +typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_jobid) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); +typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_jobid) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); +typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_itemid) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); +typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_itemid) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); +typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_statustype) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); +typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_statustype) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); +typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_itemtype) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); +typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_itemtype) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); +typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_weaponlv) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); +typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_weaponlv) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); +typedef bool (*HPMHOOK_pre_achievement_readdb_validate_criteria_achievement) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); +typedef bool (*HPMHOOK_post_achievement_readdb_validate_criteria_achievement) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); +typedef bool (*HPMHOOK_pre_achievement_readdb_rewards) (const struct config_setting_t **conf, struct achievement_data **entry, const char **source); +typedef bool (*HPMHOOK_post_achievement_readdb_rewards) (bool retVal___, const struct config_setting_t *conf, struct achievement_data *entry, const char *source); +typedef void (*HPMHOOK_pre_achievement_readdb_validate_reward_items) (const struct config_setting_t **t, struct achievement_data **entry); +typedef void (*HPMHOOK_post_achievement_readdb_validate_reward_items) (const struct config_setting_t *t, struct achievement_data *entry); +typedef bool (*HPMHOOK_pre_achievement_readdb_validate_reward_item_sub) (const struct config_setting_t **t, int *element, struct achievement_data **entry); +typedef bool (*HPMHOOK_post_achievement_readdb_validate_reward_item_sub) (bool retVal___, const struct config_setting_t *t, int element, struct achievement_data *entry); +typedef void (*HPMHOOK_pre_achievement_readdb_validate_reward_bonus) (const struct config_setting_t **t, struct achievement_data **entry, const char **source); +typedef void (*HPMHOOK_post_achievement_readdb_validate_reward_bonus) (const struct config_setting_t *t, struct achievement_data *entry, const char *source); +typedef void (*HPMHOOK_pre_achievement_readdb_validate_reward_titleid) (const struct config_setting_t **t, struct achievement_data **entry); +typedef void (*HPMHOOK_post_achievement_readdb_validate_reward_titleid) (const struct config_setting_t *t, struct achievement_data *entry); +typedef void (*HPMHOOK_pre_achievement_readdb_additional_fields) (const struct config_setting_t **conf, struct achievement_data **entry, const char **source); +typedef void (*HPMHOOK_post_achievement_readdb_additional_fields) (const struct config_setting_t *conf, struct achievement_data *entry, const char *source); +typedef void (*HPMHOOK_pre_achievement_readdb_ranks) (void); +typedef void (*HPMHOOK_post_achievement_readdb_ranks) (void); +typedef const struct achievement_data* (*HPMHOOK_pre_achievement_get) (int *aid); +typedef const struct achievement_data* (*HPMHOOK_post_achievement_get) (const struct achievement_data* retVal___, int aid); +typedef struct achievement* (*HPMHOOK_pre_achievement_ensure) (struct map_session_data **sd, const struct achievement_data **ad); +typedef struct achievement* (*HPMHOOK_post_achievement_ensure) (struct achievement* retVal___, struct map_session_data *sd, const struct achievement_data *ad); +typedef void (*HPMHOOK_pre_achievement_calculate_totals) (const struct map_session_data **sd, int **points, int **completed, int **rank, int **curr_rank_points); +typedef void (*HPMHOOK_post_achievement_calculate_totals) (const struct map_session_data *sd, int *points, int *completed, int *rank, int *curr_rank_points); +typedef bool (*HPMHOOK_pre_achievement_check_complete) (struct map_session_data **sd, const struct achievement_data **ad); +typedef bool (*HPMHOOK_post_achievement_check_complete) (bool retVal___, struct map_session_data *sd, const struct achievement_data *ad); +typedef void (*HPMHOOK_pre_achievement_progress_add) (struct map_session_data **sd, const struct achievement_data **ad, unsigned int *obj_idx, int *progress); +typedef void (*HPMHOOK_post_achievement_progress_add) (struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress); +typedef void (*HPMHOOK_pre_achievement_progress_set) (struct map_session_data **sd, const struct achievement_data **ad, unsigned int *obj_idx, int *progress); +typedef void (*HPMHOOK_post_achievement_progress_set) (struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress); +typedef bool (*HPMHOOK_pre_achievement_check_criteria) (const struct achievement_objective **objective, const struct achievement_objective **criteria); +typedef bool (*HPMHOOK_post_achievement_check_criteria) (bool retVal___, const struct achievement_objective *objective, const struct achievement_objective *criteria); +typedef bool (*HPMHOOK_pre_achievement_validate) (struct map_session_data **sd, int *aid, unsigned int *obj_idx, int *progress, bool *additive); +typedef bool (*HPMHOOK_post_achievement_validate) (bool retVal___, struct map_session_data *sd, int aid, unsigned int obj_idx, int progress, bool additive); +typedef int (*HPMHOOK_pre_achievement_validate_type) (struct map_session_data **sd, enum achievement_types *type, const struct achievement_objective **criteria, bool *additive); +typedef int (*HPMHOOK_post_achievement_validate_type) (int retVal___, struct map_session_data *sd, enum achievement_types type, const struct achievement_objective *criteria, bool additive); +typedef void (*HPMHOOK_pre_achievement_validate_mob_kill) (struct map_session_data **sd, int *mob_id); +typedef void (*HPMHOOK_post_achievement_validate_mob_kill) (struct map_session_data *sd, int mob_id); +typedef void (*HPMHOOK_pre_achievement_validate_mob_damage) (struct map_session_data **sd, unsigned int *damage, bool *received); +typedef void (*HPMHOOK_post_achievement_validate_mob_damage) (struct map_session_data *sd, unsigned int damage, bool received); +typedef void (*HPMHOOK_pre_achievement_validate_pc_kill) (struct map_session_data **sd, struct map_session_data **dstsd); +typedef void (*HPMHOOK_post_achievement_validate_pc_kill) (struct map_session_data *sd, struct map_session_data *dstsd); +typedef void (*HPMHOOK_pre_achievement_validate_pc_damage) (struct map_session_data **sd, struct map_session_data **dstsd, unsigned int *damage); +typedef void (*HPMHOOK_post_achievement_validate_pc_damage) (struct map_session_data *sd, struct map_session_data *dstsd, unsigned int damage); +typedef void (*HPMHOOK_pre_achievement_validate_jobchange) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_achievement_validate_jobchange) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_achievement_validate_stats) (struct map_session_data **sd, enum status_point_types *stat_type, int *progress); +typedef void (*HPMHOOK_post_achievement_validate_stats) (struct map_session_data *sd, enum status_point_types stat_type, int progress); +typedef void (*HPMHOOK_pre_achievement_validate_chatroom_create) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_achievement_validate_chatroom_create) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_achievement_validate_chatroom_members) (struct map_session_data **sd, int *progress); +typedef void (*HPMHOOK_post_achievement_validate_chatroom_members) (struct map_session_data *sd, int progress); +typedef void (*HPMHOOK_pre_achievement_validate_friend_add) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_achievement_validate_friend_add) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_achievement_validate_party_create) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_achievement_validate_party_create) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_achievement_validate_marry) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_achievement_validate_marry) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_achievement_validate_adopt) (struct map_session_data **sd, bool *parent); +typedef void (*HPMHOOK_post_achievement_validate_adopt) (struct map_session_data *sd, bool parent); +typedef void (*HPMHOOK_pre_achievement_validate_zeny) (struct map_session_data **sd, int *amount); +typedef void (*HPMHOOK_post_achievement_validate_zeny) (struct map_session_data *sd, int amount); +typedef void (*HPMHOOK_pre_achievement_validate_refine) (struct map_session_data **sd, unsigned int *idx, bool *success); +typedef void (*HPMHOOK_post_achievement_validate_refine) (struct map_session_data *sd, unsigned int idx, bool success); +typedef void (*HPMHOOK_pre_achievement_validate_item_get) (struct map_session_data **sd, int *nameid, int *amount); +typedef void (*HPMHOOK_post_achievement_validate_item_get) (struct map_session_data *sd, int nameid, int amount); +typedef void (*HPMHOOK_pre_achievement_validate_item_sell) (struct map_session_data **sd, int *nameid, int *amount); +typedef void (*HPMHOOK_post_achievement_validate_item_sell) (struct map_session_data *sd, int nameid, int amount); +typedef void (*HPMHOOK_pre_achievement_validate_achieve) (struct map_session_data **sd, int *achid); +typedef void (*HPMHOOK_post_achievement_validate_achieve) (struct map_session_data *sd, int achid); +typedef void (*HPMHOOK_pre_achievement_validate_taming) (struct map_session_data **sd, int *class); +typedef void (*HPMHOOK_post_achievement_validate_taming) (struct map_session_data *sd, int class); +typedef void (*HPMHOOK_pre_achievement_validate_achievement_rank) (struct map_session_data **sd, int *rank); +typedef void (*HPMHOOK_post_achievement_validate_achievement_rank) (struct map_session_data *sd, int rank); +typedef bool (*HPMHOOK_pre_achievement_type_requires_criteria) (enum achievement_types *type); +typedef bool (*HPMHOOK_post_achievement_type_requires_criteria) (bool retVal___, enum achievement_types type); +typedef void (*HPMHOOK_pre_achievement_init_titles) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_achievement_init_titles) (struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_achievement_check_title) (struct map_session_data **sd, int *title_id); +typedef bool (*HPMHOOK_post_achievement_check_title) (bool retVal___, struct map_session_data *sd, int title_id); +typedef bool (*HPMHOOK_pre_achievement_get_rewards) (struct map_session_data **sd, const struct achievement_data **ad); +typedef bool (*HPMHOOK_post_achievement_get_rewards) (bool retVal___, struct map_session_data *sd, const struct achievement_data *ad); +typedef void (*HPMHOOK_pre_achievement_get_rewards_buffs) (struct map_session_data **sd, const struct achievement_data **ad); +typedef void (*HPMHOOK_post_achievement_get_rewards_buffs) (struct map_session_data *sd, const struct achievement_data *ad); +typedef void (*HPMHOOK_pre_achievement_get_rewards_items) (struct map_session_data **sd, const struct achievement_data **ad); +typedef void (*HPMHOOK_post_achievement_get_rewards_items) (struct map_session_data *sd, const struct achievement_data *ad); +#endif // MAP_ACHIEVEMENT_H +#ifdef MAP_ATCOMMAND_H /* atcommand */ +typedef void (*HPMHOOK_pre_atcommand_init) (bool *minimal); +typedef void (*HPMHOOK_post_atcommand_init) (bool minimal); +typedef void (*HPMHOOK_pre_atcommand_final) (void); +typedef void (*HPMHOOK_post_atcommand_final) (void); +typedef bool (*HPMHOOK_pre_atcommand_exec) (const int *fd, struct map_session_data **sd, const char **message, bool *player_invoked); +typedef bool (*HPMHOOK_post_atcommand_exec) (bool retVal___, const int fd, struct map_session_data *sd, const char *message, bool player_invoked); +typedef bool (*HPMHOOK_pre_atcommand_create) (char **name, AtCommandFunc *func); +typedef bool (*HPMHOOK_post_atcommand_create) (bool retVal___, char *name, AtCommandFunc func); +typedef bool (*HPMHOOK_pre_atcommand_can_use) (struct map_session_data **sd, const char **command); +typedef bool (*HPMHOOK_post_atcommand_can_use) (bool retVal___, struct map_session_data *sd, const char *command); +typedef bool (*HPMHOOK_pre_atcommand_can_use2) (struct map_session_data **sd, const char **command, AtCommandType *type); +typedef bool (*HPMHOOK_post_atcommand_can_use2) (bool retVal___, struct map_session_data *sd, const char *command, AtCommandType type); +typedef void (*HPMHOOK_pre_atcommand_load_groups) (GroupSettings ***groups, struct config_setting_t ***commands_, size_t *sz); +typedef void (*HPMHOOK_post_atcommand_load_groups) (GroupSettings **groups, struct config_setting_t **commands_, size_t sz); +typedef AtCommandInfo* (*HPMHOOK_pre_atcommand_exists) (const char **name); +typedef AtCommandInfo* (*HPMHOOK_post_atcommand_exists) (AtCommandInfo* retVal___, const char *name); +typedef bool (*HPMHOOK_pre_atcommand_msg_read) (const char **cfg_name, bool *allow_override); +typedef bool (*HPMHOOK_post_atcommand_msg_read) (bool retVal___, const char *cfg_name, bool allow_override); +typedef void (*HPMHOOK_pre_atcommand_final_msg) (void); +typedef void (*HPMHOOK_post_atcommand_final_msg) (void); +typedef struct atcmd_binding_data* (*HPMHOOK_pre_atcommand_get_bind_byname) (const char **name); +typedef struct atcmd_binding_data* (*HPMHOOK_post_atcommand_get_bind_byname) (struct atcmd_binding_data* retVal___, const char *name); +typedef AtCommandInfo* (*HPMHOOK_pre_atcommand_get_info_byname) (const char **name); +typedef AtCommandInfo* (*HPMHOOK_post_atcommand_get_info_byname) (AtCommandInfo* retVal___, const char *name); +typedef const char* (*HPMHOOK_pre_atcommand_check_alias) (const char **aliasname); +typedef const char* (*HPMHOOK_post_atcommand_check_alias) (const char* retVal___, const char *aliasname); +typedef void (*HPMHOOK_pre_atcommand_get_suggestions) (struct map_session_data **sd, const char **name, bool *is_atcmd_cmd); +typedef void (*HPMHOOK_post_atcommand_get_suggestions) (struct map_session_data *sd, const char *name, bool is_atcmd_cmd); +typedef void (*HPMHOOK_pre_atcommand_config_read) (const char **config_filename); +typedef void (*HPMHOOK_post_atcommand_config_read) (const char *config_filename); +typedef int (*HPMHOOK_pre_atcommand_stopattack) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_atcommand_stopattack) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_atcommand_pvpoff_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_atcommand_pvpoff_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_atcommand_pvpon_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_atcommand_pvpon_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_atcommand_atkillmonster_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_atcommand_atkillmonster_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_atcommand_raise_sub) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_atcommand_raise_sub) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_atcommand_get_jail_time) (int *jailtime, int **year, int **month, int **day, int **hour, int **minute); +typedef void (*HPMHOOK_post_atcommand_get_jail_time) (int jailtime, int *year, int *month, int *day, int *hour, int *minute); +typedef int (*HPMHOOK_pre_atcommand_cleanfloor_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_atcommand_cleanfloor_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_atcommand_mutearea_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_atcommand_mutearea_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_atcommand_getring) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_atcommand_getring) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_atcommand_channel_help) (int *fd, const char **command, bool *can_create); +typedef void (*HPMHOOK_post_atcommand_channel_help) (int fd, const char *command, bool can_create); +typedef void (*HPMHOOK_pre_atcommand_commands_sub) (struct map_session_data **sd, const int *fd, AtCommandType *type); +typedef void (*HPMHOOK_post_atcommand_commands_sub) (struct map_session_data *sd, const int fd, AtCommandType type); +typedef void (*HPMHOOK_pre_atcommand_cmd_db_clear) (void); +typedef void (*HPMHOOK_post_atcommand_cmd_db_clear) (void); +typedef int (*HPMHOOK_pre_atcommand_cmd_db_clear_sub) (union DBKey *key, struct DBData **data, va_list args); +typedef int (*HPMHOOK_post_atcommand_cmd_db_clear_sub) (int retVal___, union DBKey key, struct DBData *data, va_list args); +typedef void (*HPMHOOK_pre_atcommand_doload) (void); +typedef void (*HPMHOOK_post_atcommand_doload) (void); +typedef void (*HPMHOOK_pre_atcommand_base_commands) (void); +typedef void (*HPMHOOK_post_atcommand_base_commands) (void); +typedef bool (*HPMHOOK_pre_atcommand_add) (char **name, AtCommandFunc *func, bool *replace); +typedef bool (*HPMHOOK_post_atcommand_add) (bool retVal___, char *name, AtCommandFunc func, bool replace); +typedef const char* (*HPMHOOK_pre_atcommand_msg) (int *msg_number); +typedef const char* (*HPMHOOK_post_atcommand_msg) (const char* retVal___, int msg_number); +typedef void (*HPMHOOK_pre_atcommand_expand_message_table) (void); +typedef void (*HPMHOOK_post_atcommand_expand_message_table) (void); +typedef const char* (*HPMHOOK_pre_atcommand_msgfd) (int *fd, int *msg_number); +typedef const char* (*HPMHOOK_post_atcommand_msgfd) (const char* retVal___, int fd, int msg_number); +typedef const char* (*HPMHOOK_pre_atcommand_msgsd) (struct map_session_data **sd, int *msg_number); +typedef const char* (*HPMHOOK_post_atcommand_msgsd) (const char* retVal___, struct map_session_data *sd, int msg_number); +#endif // MAP_ATCOMMAND_H +#ifdef MAP_BATTLE_H /* battle */ +typedef void (*HPMHOOK_pre_battle_init) (bool *minimal); +typedef void (*HPMHOOK_post_battle_init) (bool minimal); +typedef void (*HPMHOOK_pre_battle_final) (void); +typedef void (*HPMHOOK_post_battle_final) (void); +typedef struct Damage (*HPMHOOK_pre_battle_calc_attack) (int *attack_type, struct block_list **bl, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *count); +typedef struct Damage (*HPMHOOK_post_battle_calc_attack) (struct Damage retVal___, int attack_type, struct block_list *bl, struct block_list *target, uint16 skill_id, uint16 skill_lv, int count); +typedef int64 (*HPMHOOK_pre_battle_calc_damage) (struct block_list **src, struct block_list **bl, struct Damage **d, int64 *damage, uint16 *skill_id, uint16 *skill_lv); +typedef int64 (*HPMHOOK_post_battle_calc_damage) (int64 retVal___, struct block_list *src, struct block_list *bl, struct Damage *d, int64 damage, uint16 skill_id, uint16 skill_lv); +typedef int64 (*HPMHOOK_pre_battle_calc_pc_damage) (struct block_list **src, struct block_list **bl, struct Damage **d, int64 *damage, uint16 *skill_id, uint16 *skill_lv); +typedef int64 (*HPMHOOK_post_battle_calc_pc_damage) (int64 retVal___, struct block_list *src, struct block_list *bl, struct Damage *d, int64 damage, uint16 skill_id, uint16 skill_lv); +typedef int64 (*HPMHOOK_pre_battle_calc_gvg_damage) (struct block_list **src, struct block_list **bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag); +typedef int64 (*HPMHOOK_post_battle_calc_gvg_damage) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 damage, int div_, uint16 skill_id, uint16 skill_lv, int flag); +typedef int64 (*HPMHOOK_pre_battle_calc_bg_damage) (struct block_list **src, struct block_list **bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag); +typedef int64 (*HPMHOOK_post_battle_calc_bg_damage) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 damage, int div_, uint16 skill_id, uint16 skill_lv, int flag); +typedef enum damage_lv (*HPMHOOK_pre_battle_weapon_attack) (struct block_list **bl, struct block_list **target, int64 *tick, int *flag); +typedef enum damage_lv (*HPMHOOK_post_battle_weapon_attack) (enum damage_lv retVal___, struct block_list *bl, struct block_list *target, int64 tick, int flag); +typedef bool (*HPMHOOK_pre_battle_check_arrows) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_battle_check_arrows) (bool retVal___, struct map_session_data *sd); +typedef struct Damage (*HPMHOOK_pre_battle_calc_weapon_attack) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *wflag); +typedef struct Damage (*HPMHOOK_post_battle_calc_weapon_attack) (struct Damage retVal___, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int wflag); +typedef int (*HPMHOOK_pre_battle_delay_damage) (int64 *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); +typedef int (*HPMHOOK_post_battle_delay_damage) (int retVal___, int64 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); +typedef void (*HPMHOOK_pre_battle_drain) (struct map_session_data **sd, struct block_list **tbl, int64 *rdamage, int64 *ldamage, int *race, int *boss); +typedef void (*HPMHOOK_post_battle_drain) (struct map_session_data *sd, struct block_list *tbl, int64 rdamage, int64 ldamage, int race, int boss); +typedef void (*HPMHOOK_pre_battle_reflect_damage) (struct block_list **target, struct block_list **src, struct Damage **wd, uint16 *skill_id); +typedef void (*HPMHOOK_post_battle_reflect_damage) (struct block_list *target, struct block_list *src, struct Damage *wd, uint16 skill_id); +typedef void (*HPMHOOK_pre_battle_reflect_trap) (struct block_list **target, struct block_list **src, struct Damage **md, uint16 *skill_id); +typedef void (*HPMHOOK_post_battle_reflect_trap) (struct block_list *target, struct block_list *src, struct Damage *md, uint16 skill_id); +typedef int (*HPMHOOK_pre_battle_attr_ratio) (int *atk_elem, int *def_type, int *def_lv); +typedef int (*HPMHOOK_post_battle_attr_ratio) (int retVal___, int atk_elem, int def_type, int def_lv); +typedef int64 (*HPMHOOK_pre_battle_attr_fix) (struct block_list **src, struct block_list **target, int64 *damage, int *atk_elem, int *def_type, int *def_lv); +typedef int64 (*HPMHOOK_post_battle_attr_fix) (int64 retVal___, struct block_list *src, struct block_list *target, int64 damage, int atk_elem, int def_type, int def_lv); +typedef int64 (*HPMHOOK_pre_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); +typedef int64 (*HPMHOOK_post_battle_calc_cardfix) (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); +typedef int64 (*HPMHOOK_pre_battle_calc_cardfix2) (struct block_list **src, struct block_list **bl, int64 *damage, int *s_ele, int *nk, int *flag); +typedef int64 (*HPMHOOK_post_battle_calc_cardfix2) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 damage, int s_ele, int nk, int flag); +typedef int64 (*HPMHOOK_pre_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); +typedef int64 (*HPMHOOK_post_battle_calc_elefix) (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); +typedef int64 (*HPMHOOK_pre_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); +typedef int64 (*HPMHOOK_post_battle_calc_masteryfix) (int64 retVal___, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 damage, int div, bool left, bool weapon); +typedef int (*HPMHOOK_pre_battle_calc_chorusbonus) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_battle_calc_chorusbonus) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_battle_calc_skillratio) (int *attack_type, struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag); +typedef int (*HPMHOOK_post_battle_calc_skillratio) (int retVal___, int attack_type, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int skillratio, int flag); +typedef int64 (*HPMHOOK_pre_battle_calc_sizefix) (struct map_session_data **sd, int64 *damage, int *type, int *size, bool *ignore); +typedef int64 (*HPMHOOK_post_battle_calc_sizefix) (int64 retVal___, struct map_session_data *sd, int64 damage, int type, int size, bool ignore); +typedef int64 (*HPMHOOK_pre_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); +typedef int64 (*HPMHOOK_post_battle_calc_weapon_damage) (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); +typedef int64 (*HPMHOOK_pre_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); +typedef int64 (*HPMHOOK_post_battle_calc_defense) (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); +typedef struct block_list* (*HPMHOOK_pre_battle_get_master) (struct block_list **src); +typedef struct block_list* (*HPMHOOK_post_battle_get_master) (struct block_list* retVal___, struct block_list *src); +typedef struct block_list* (*HPMHOOK_pre_battle_get_targeted) (struct block_list **target); +typedef struct block_list* (*HPMHOOK_post_battle_get_targeted) (struct block_list* retVal___, struct block_list *target); +typedef struct block_list* (*HPMHOOK_pre_battle_get_enemy) (struct block_list **target, int *type, int *range); +typedef struct block_list* (*HPMHOOK_post_battle_get_enemy) (struct block_list* retVal___, struct block_list *target, int type, int range); +typedef int (*HPMHOOK_pre_battle_get_target) (struct block_list **bl); +typedef int (*HPMHOOK_post_battle_get_target) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_battle_get_current_skill) (struct block_list **bl); +typedef int (*HPMHOOK_post_battle_get_current_skill) (int retVal___, struct block_list *bl); +typedef bool (*HPMHOOK_pre_battle_check_undead) (int *race, int *element); +typedef bool (*HPMHOOK_post_battle_check_undead) (bool retVal___, int race, int element); +typedef int (*HPMHOOK_pre_battle_check_target) (struct block_list **src, struct block_list **target, int *flag); +typedef int (*HPMHOOK_post_battle_check_target) (int retVal___, struct block_list *src, struct block_list *target, int flag); +typedef bool (*HPMHOOK_pre_battle_check_range) (struct block_list **src, struct block_list **bl, int *range); +typedef bool (*HPMHOOK_post_battle_check_range) (bool retVal___, struct block_list *src, struct block_list *bl, int range); +typedef void (*HPMHOOK_pre_battle_consume_ammo) (struct map_session_data **sd, int *skill_id, int *lv); +typedef void (*HPMHOOK_post_battle_consume_ammo) (struct map_session_data *sd, int skill_id, int lv); +typedef int (*HPMHOOK_pre_battle_get_targeted_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_battle_get_targeted_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_battle_get_enemy_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_battle_get_enemy_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_battle_get_enemy_area_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_battle_get_enemy_area_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_battle_delay_damage_sub) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_battle_delay_damage_sub) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_battle_blewcount_bonus) (struct map_session_data **sd, uint16 *skill_id); +typedef int (*HPMHOOK_post_battle_blewcount_bonus) (int retVal___, struct map_session_data *sd, uint16 skill_id); +typedef int (*HPMHOOK_pre_battle_range_type) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_battle_range_type) (int retVal___, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv); +typedef int64 (*HPMHOOK_pre_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); +typedef int64 (*HPMHOOK_post_battle_calc_base_damage) (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); +typedef int64 (*HPMHOOK_pre_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); +typedef int64 (*HPMHOOK_post_battle_calc_base_damage2) (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); +typedef struct Damage (*HPMHOOK_pre_battle_calc_misc_attack) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *mflag); +typedef struct Damage (*HPMHOOK_post_battle_calc_misc_attack) (struct Damage retVal___, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int mflag); +typedef struct Damage (*HPMHOOK_pre_battle_calc_magic_attack) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *mflag); +typedef struct Damage (*HPMHOOK_post_battle_calc_magic_attack) (struct Damage retVal___, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int mflag); +typedef int (*HPMHOOK_pre_battle_adjust_skill_damage) (int *m, unsigned short *skill_id); +typedef int (*HPMHOOK_post_battle_adjust_skill_damage) (int retVal___, int m, unsigned short skill_id); +typedef int64 (*HPMHOOK_pre_battle_add_mastery) (struct map_session_data **sd, struct block_list **target, int64 *dmg, int *type); +typedef int64 (*HPMHOOK_post_battle_add_mastery) (int64 retVal___, struct map_session_data *sd, struct block_list *target, int64 dmg, int type); +typedef int (*HPMHOOK_pre_battle_calc_drain) (int64 *damage, int *rate, int *per); +typedef int (*HPMHOOK_post_battle_calc_drain) (int retVal___, int64 damage, int rate, int per); +typedef bool (*HPMHOOK_pre_battle_config_read) (const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_battle_config_read) (bool retVal___, const char *filename, bool imported); +typedef void (*HPMHOOK_pre_battle_config_set_defaults) (void); +typedef void (*HPMHOOK_post_battle_config_set_defaults) (void); +typedef bool (*HPMHOOK_pre_battle_config_set_value_sub) (int *index, int *value); +typedef bool (*HPMHOOK_post_battle_config_set_value_sub) (bool retVal___, int index, int value); +typedef bool (*HPMHOOK_pre_battle_config_set_value) (const char **param, const char **value); +typedef bool (*HPMHOOK_post_battle_config_set_value) (bool retVal___, const char *param, const char *value); +typedef bool (*HPMHOOK_pre_battle_config_get_value) (const char **w1, int **value); +typedef bool (*HPMHOOK_post_battle_config_get_value) (bool retVal___, const char *w1, int *value); +typedef void (*HPMHOOK_pre_battle_config_adjust) (void); +typedef void (*HPMHOOK_post_battle_config_adjust) (void); +typedef struct block_list* (*HPMHOOK_pre_battle_get_enemy_area) (struct block_list **src, int *x, int *y, int *range, int *type, int *ignore_id); +typedef struct block_list* (*HPMHOOK_post_battle_get_enemy_area) (struct block_list* retVal___, struct block_list *src, int x, int y, int range, int type, int ignore_id); +typedef int (*HPMHOOK_pre_battle_damage_area) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_battle_damage_area) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_battle_calc_masteryfix_unknown) (struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int64 **damage, int **div, bool **left, bool **weapon); +typedef void (*HPMHOOK_post_battle_calc_masteryfix_unknown) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *div, bool *left, bool *weapon); +typedef void (*HPMHOOK_pre_battle_calc_skillratio_magic_unknown) (int **attack_type, struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int **skillratio, int **flag); +typedef void (*HPMHOOK_post_battle_calc_skillratio_magic_unknown) (int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag); +typedef void (*HPMHOOK_pre_battle_calc_skillratio_weapon_unknown) (int **attack_type, struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int **skillratio, int **flag); +typedef void (*HPMHOOK_post_battle_calc_skillratio_weapon_unknown) (int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag); +typedef void (*HPMHOOK_pre_battle_calc_misc_attack_unknown) (struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int **mflag, struct Damage **md); +typedef void (*HPMHOOK_post_battle_calc_misc_attack_unknown) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag, struct Damage *md); +#endif // MAP_BATTLE_H +#ifdef MAP_BATTLEGROUND_H /* bg */ +typedef void (*HPMHOOK_pre_bg_init) (bool *minimal); +typedef void (*HPMHOOK_post_bg_init) (bool minimal); +typedef void (*HPMHOOK_pre_bg_final) (void); +typedef void (*HPMHOOK_post_bg_final) (void); +typedef struct bg_arena* (*HPMHOOK_pre_bg_name2arena) (const char **name); +typedef struct bg_arena* (*HPMHOOK_post_bg_name2arena) (struct bg_arena* retVal___, const char *name); +typedef void (*HPMHOOK_pre_bg_queue_add) (struct map_session_data **sd, struct bg_arena **arena, enum bg_queue_types *type); +typedef void (*HPMHOOK_post_bg_queue_add) (struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types type); +typedef enum BATTLEGROUNDS_QUEUE_ACK (*HPMHOOK_pre_bg_can_queue) (struct map_session_data **sd, struct bg_arena **arena, enum bg_queue_types *type); +typedef enum BATTLEGROUNDS_QUEUE_ACK (*HPMHOOK_post_bg_can_queue) (enum BATTLEGROUNDS_QUEUE_ACK retVal___, struct map_session_data *sd, struct bg_arena *arena, enum bg_queue_types type); +typedef int (*HPMHOOK_pre_bg_id2pos) (int *queue_id, int *account_id); +typedef int (*HPMHOOK_post_bg_id2pos) (int retVal___, int queue_id, int account_id); +typedef void (*HPMHOOK_pre_bg_queue_pc_cleanup) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_bg_queue_pc_cleanup) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_bg_begin) (struct bg_arena **arena); +typedef void (*HPMHOOK_post_bg_begin) (struct bg_arena *arena); +typedef int (*HPMHOOK_pre_bg_begin_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_bg_begin_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_bg_queue_pregame) (struct bg_arena **arena); +typedef void (*HPMHOOK_post_bg_queue_pregame) (struct bg_arena *arena); +typedef int (*HPMHOOK_pre_bg_fillup_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_bg_fillup_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_bg_queue_ready_ack) (struct bg_arena **arena, struct map_session_data **sd, bool *response); +typedef void (*HPMHOOK_post_bg_queue_ready_ack) (struct bg_arena *arena, struct map_session_data *sd, bool response); +typedef void (*HPMHOOK_pre_bg_match_over) (struct bg_arena **arena, bool *canceled); +typedef void (*HPMHOOK_post_bg_match_over) (struct bg_arena *arena, bool canceled); +typedef void (*HPMHOOK_pre_bg_queue_check) (struct bg_arena **arena); +typedef void (*HPMHOOK_post_bg_queue_check) (struct bg_arena *arena); +typedef struct battleground_data* (*HPMHOOK_pre_bg_team_search) (int *bg_id); +typedef struct battleground_data* (*HPMHOOK_post_bg_team_search) (struct battleground_data* retVal___, int bg_id); +typedef struct map_session_data* (*HPMHOOK_pre_bg_getavailablesd) (struct battleground_data **bgd); +typedef struct map_session_data* (*HPMHOOK_post_bg_getavailablesd) (struct map_session_data* retVal___, struct battleground_data *bgd); +typedef bool (*HPMHOOK_pre_bg_team_delete) (int *bg_id); +typedef bool (*HPMHOOK_post_bg_team_delete) (bool retVal___, int bg_id); +typedef bool (*HPMHOOK_pre_bg_team_warp) (int *bg_id, unsigned short *map_index, short *x, short *y); +typedef bool (*HPMHOOK_post_bg_team_warp) (bool retVal___, int bg_id, unsigned short map_index, short x, short y); +typedef void (*HPMHOOK_pre_bg_send_dot_remove) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_bg_send_dot_remove) (struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_bg_team_join) (int *bg_id, struct map_session_data **sd); +typedef bool (*HPMHOOK_post_bg_team_join) (bool retVal___, int bg_id, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_bg_team_leave) (struct map_session_data **sd, enum bg_team_leave_type *flag); +typedef int (*HPMHOOK_post_bg_team_leave) (int retVal___, struct map_session_data *sd, enum bg_team_leave_type flag); +typedef bool (*HPMHOOK_pre_bg_member_respawn) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_bg_member_respawn) (bool retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_bg_create) (unsigned short *map_index, short *rx, short *ry, const char **ev, const char **dev); +typedef int (*HPMHOOK_post_bg_create) (int retVal___, unsigned short map_index, short rx, short ry, const char *ev, const char *dev); +typedef int (*HPMHOOK_pre_bg_team_get_id) (struct block_list **bl); +typedef int (*HPMHOOK_post_bg_team_get_id) (int retVal___, struct block_list *bl); +typedef bool (*HPMHOOK_pre_bg_send_message) (struct map_session_data **sd, const char **mes); +typedef bool (*HPMHOOK_post_bg_send_message) (bool retVal___, struct map_session_data *sd, const char *mes); +typedef int (*HPMHOOK_pre_bg_send_xy_timer_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_bg_send_xy_timer_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_bg_send_xy_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_bg_send_xy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_bg_afk_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_bg_afk_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_bg_team_db_final) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_bg_team_db_final) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef enum bg_queue_types (*HPMHOOK_pre_bg_str2teamtype) (const char **str); +typedef enum bg_queue_types (*HPMHOOK_post_bg_str2teamtype) (enum bg_queue_types retVal___, const char *str); +typedef void (*HPMHOOK_pre_bg_config_read) (void); +typedef void (*HPMHOOK_post_bg_config_read) (void); +#endif // MAP_BATTLEGROUND_H +#ifdef MAP_BUYINGSTORE_H /* buyingstore */ +typedef bool (*HPMHOOK_pre_buyingstore_setup) (struct map_session_data **sd, unsigned char *slots); +typedef bool (*HPMHOOK_post_buyingstore_setup) (bool retVal___, struct map_session_data *sd, unsigned char slots); +typedef void (*HPMHOOK_pre_buyingstore_create) (struct map_session_data **sd, int *zenylimit, unsigned char *result, const char **storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub **itemlist, unsigned int *count); +typedef void (*HPMHOOK_post_buyingstore_create) (struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub *itemlist, unsigned int count); +typedef void (*HPMHOOK_pre_buyingstore_close) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_buyingstore_close) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_buyingstore_open) (struct map_session_data **sd, int *account_id); +typedef void (*HPMHOOK_post_buyingstore_open) (struct map_session_data *sd, int account_id); +typedef void (*HPMHOOK_pre_buyingstore_trade) (struct map_session_data **sd, int *account_id, unsigned int *buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub **itemlist, unsigned int *count); +typedef void (*HPMHOOK_post_buyingstore_trade) (struct map_session_data *sd, int account_id, unsigned int buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub *itemlist, unsigned int count); +typedef bool (*HPMHOOK_pre_buyingstore_search) (struct map_session_data **sd, int *nameid); +typedef bool (*HPMHOOK_post_buyingstore_search) (bool retVal___, struct map_session_data *sd, int nameid); +typedef bool (*HPMHOOK_pre_buyingstore_searchall) (struct map_session_data **sd, const struct s_search_store_search **s); +typedef bool (*HPMHOOK_post_buyingstore_searchall) (bool retVal___, struct map_session_data *sd, const struct s_search_store_search *s); +typedef unsigned int (*HPMHOOK_pre_buyingstore_getuid) (void); +typedef unsigned int (*HPMHOOK_post_buyingstore_getuid) (unsigned int retVal___); +#endif // MAP_BUYINGSTORE_H +#ifdef MAP_CHANNEL_H /* channel */ +typedef int (*HPMHOOK_pre_channel_init) (bool *minimal); +typedef int (*HPMHOOK_post_channel_init) (int retVal___, bool minimal); +typedef void (*HPMHOOK_pre_channel_final) (void); +typedef void (*HPMHOOK_post_channel_final) (void); +typedef struct channel_data* (*HPMHOOK_pre_channel_search) (const char **name, struct map_session_data **sd); +typedef struct channel_data* (*HPMHOOK_post_channel_search) (struct channel_data* retVal___, const char *name, struct map_session_data *sd); +typedef struct channel_data* (*HPMHOOK_pre_channel_create) (enum channel_types *type, const char **name, unsigned char *color); +typedef struct channel_data* (*HPMHOOK_post_channel_create) (struct channel_data* retVal___, enum channel_types type, const char *name, unsigned char color); +typedef void (*HPMHOOK_pre_channel_delete) (struct channel_data **chan); +typedef void (*HPMHOOK_post_channel_delete) (struct channel_data *chan); +typedef void (*HPMHOOK_pre_channel_set_password) (struct channel_data **chan, const char **password); +typedef void (*HPMHOOK_post_channel_set_password) (struct channel_data *chan, const char *password); +typedef enum channel_operation_status (*HPMHOOK_pre_channel_ban) (struct channel_data **chan, const struct map_session_data **ssd, struct map_session_data **tsd); +typedef enum channel_operation_status (*HPMHOOK_post_channel_ban) (enum channel_operation_status retVal___, struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd); +typedef enum channel_operation_status (*HPMHOOK_pre_channel_unban) (struct channel_data **chan, const struct map_session_data **ssd, struct map_session_data **tsd); +typedef enum channel_operation_status (*HPMHOOK_post_channel_unban) (enum channel_operation_status retVal___, struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd); +typedef void (*HPMHOOK_pre_channel_set_options) (struct channel_data **chan, unsigned int *options); +typedef void (*HPMHOOK_post_channel_set_options) (struct channel_data *chan, unsigned int options); +typedef void (*HPMHOOK_pre_channel_send) (struct channel_data **chan, struct map_session_data **sd, const char **msg); +typedef void (*HPMHOOK_post_channel_send) (struct channel_data *chan, struct map_session_data *sd, const char *msg); +typedef void (*HPMHOOK_pre_channel_join_sub) (struct channel_data **chan, struct map_session_data **sd, bool *stealth); +typedef void (*HPMHOOK_post_channel_join_sub) (struct channel_data *chan, struct map_session_data *sd, bool stealth); +typedef enum channel_operation_status (*HPMHOOK_pre_channel_join) (struct channel_data **chan, struct map_session_data **sd, const char **password, bool *silent); +typedef enum channel_operation_status (*HPMHOOK_post_channel_join) (enum channel_operation_status retVal___, struct channel_data *chan, struct map_session_data *sd, const char *password, bool silent); +typedef void (*HPMHOOK_pre_channel_leave) (struct channel_data **chan, struct map_session_data **sd); +typedef void (*HPMHOOK_post_channel_leave) (struct channel_data *chan, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_channel_leave_sub) (struct channel_data **chan, struct map_session_data **sd); +typedef void (*HPMHOOK_post_channel_leave_sub) (struct channel_data *chan, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_channel_quit) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_channel_quit) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_channel_map_join) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_channel_map_join) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_channel_guild_join_alliance) (const struct guild **g_source, const struct guild **g_ally); +typedef void (*HPMHOOK_post_channel_guild_join_alliance) (const struct guild *g_source, const struct guild *g_ally); +typedef void (*HPMHOOK_pre_channel_guild_leave_alliance) (const struct guild **g_source, const struct guild **g_ally); +typedef void (*HPMHOOK_post_channel_guild_leave_alliance) (const struct guild *g_source, const struct guild *g_ally); +typedef void (*HPMHOOK_pre_channel_quit_guild) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_channel_quit_guild) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_channel_irc_join) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_channel_irc_join) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_channel_config_read) (void); +typedef void (*HPMHOOK_post_channel_config_read) (void); +#endif // MAP_CHANNEL_H +#ifdef CHAR_CHAR_H /* chr */ +typedef int (*HPMHOOK_pre_chr_waiting_disconnect) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_chr_waiting_disconnect) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_chr_delete_char_sql) (int *char_id); +typedef int (*HPMHOOK_post_chr_delete_char_sql) (int retVal___, int char_id); +typedef struct DBData (*HPMHOOK_pre_chr_create_online_char_data) (union DBKey *key, va_list args); +typedef struct DBData (*HPMHOOK_post_chr_create_online_char_data) (struct DBData retVal___, union DBKey key, va_list args); +typedef void (*HPMHOOK_pre_chr_set_account_online) (int *account_id); +typedef void (*HPMHOOK_post_chr_set_account_online) (int account_id); +typedef void (*HPMHOOK_pre_chr_set_account_offline) (int *account_id); +typedef void (*HPMHOOK_post_chr_set_account_offline) (int account_id); +typedef void (*HPMHOOK_pre_chr_set_char_charselect) (int *account_id); +typedef void (*HPMHOOK_post_chr_set_char_charselect) (int account_id); +typedef void (*HPMHOOK_pre_chr_set_char_online) (int *map_id, int *char_id, int *account_id); +typedef void (*HPMHOOK_post_chr_set_char_online) (int map_id, int char_id, int account_id); +typedef void (*HPMHOOK_pre_chr_set_char_offline) (int *char_id, int *account_id); +typedef void (*HPMHOOK_post_chr_set_char_offline) (int char_id, int account_id); +typedef int (*HPMHOOK_pre_chr_db_setoffline) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_chr_db_setoffline) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_chr_db_kickoffline) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_chr_db_kickoffline) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef void (*HPMHOOK_pre_chr_set_login_all_offline) (void); +typedef void (*HPMHOOK_post_chr_set_login_all_offline) (void); +typedef void (*HPMHOOK_pre_chr_set_all_offline) (int *id); +typedef void (*HPMHOOK_post_chr_set_all_offline) (int id); +typedef void (*HPMHOOK_pre_chr_set_all_offline_sql) (void); +typedef void (*HPMHOOK_post_chr_set_all_offline_sql) (void); +typedef struct DBData (*HPMHOOK_pre_chr_create_charstatus) (union DBKey *key, va_list args); +typedef struct DBData (*HPMHOOK_post_chr_create_charstatus) (struct DBData retVal___, union DBKey key, va_list args); +typedef int (*HPMHOOK_pre_chr_mmo_char_tosql) (int *char_id, struct mmo_charstatus **p); +typedef int (*HPMHOOK_post_chr_mmo_char_tosql) (int retVal___, int char_id, struct mmo_charstatus *p); +typedef int (*HPMHOOK_pre_chr_getitemdata_from_sql) (struct item **items, int *max, int *guid, enum inventory_table_type *table); +typedef int (*HPMHOOK_post_chr_getitemdata_from_sql) (int retVal___, struct item *items, int max, int guid, enum inventory_table_type table); +typedef int (*HPMHOOK_pre_chr_memitemdata_to_sql) (const struct item *items[], int *id, enum inventory_table_type *table); +typedef int (*HPMHOOK_post_chr_memitemdata_to_sql) (int retVal___, const struct item items[], int id, enum inventory_table_type table); +typedef int (*HPMHOOK_pre_chr_mmo_gender) (const struct char_session_data **sd, const struct mmo_charstatus **p, char *sex); +typedef int (*HPMHOOK_post_chr_mmo_gender) (int retVal___, const struct char_session_data *sd, const struct mmo_charstatus *p, char sex); +typedef int (*HPMHOOK_pre_chr_mmo_chars_fromsql) (struct char_session_data **sd, uint8 **buf, int **count); +typedef int (*HPMHOOK_post_chr_mmo_chars_fromsql) (int retVal___, struct char_session_data *sd, uint8 *buf, int *count); +typedef int (*HPMHOOK_pre_chr_mmo_char_fromsql) (int *char_id, struct mmo_charstatus **p, bool *load_everything); +typedef int (*HPMHOOK_post_chr_mmo_char_fromsql) (int retVal___, int char_id, struct mmo_charstatus *p, bool load_everything); +typedef int (*HPMHOOK_pre_chr_mmo_char_sql_init) (void); +typedef int (*HPMHOOK_post_chr_mmo_char_sql_init) (int retVal___); +typedef bool (*HPMHOOK_pre_chr_char_slotchange) (struct char_session_data **sd, int *fd, unsigned short *from, unsigned short *to); +typedef bool (*HPMHOOK_post_chr_char_slotchange) (bool retVal___, struct char_session_data *sd, int fd, unsigned short from, unsigned short to); +typedef int (*HPMHOOK_pre_chr_rename_char_sql) (struct char_session_data **sd, int *char_id); +typedef int (*HPMHOOK_post_chr_rename_char_sql) (int retVal___, struct char_session_data *sd, int char_id); +typedef bool (*HPMHOOK_pre_chr_name_exists) (const char **name, const char **esc_name); +typedef bool (*HPMHOOK_post_chr_name_exists) (bool retVal___, const char *name, const char *esc_name); +typedef int (*HPMHOOK_pre_chr_check_char_name) (const char **name, const char **esc_name); +typedef int (*HPMHOOK_post_chr_check_char_name) (int retVal___, const char *name, const char *esc_name); +typedef int (*HPMHOOK_pre_chr_make_new_char_sql) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, int *starting_job, uint8 *sex); +typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex); +typedef int (*HPMHOOK_pre_chr_divorce_char_sql) (int *partner_id1, int *partner_id2); +typedef int (*HPMHOOK_post_chr_divorce_char_sql) (int retVal___, int partner_id1, int partner_id2); +typedef int (*HPMHOOK_pre_chr_count_users) (void); +typedef int (*HPMHOOK_post_chr_count_users) (int retVal___); +typedef int (*HPMHOOK_pre_chr_mmo_char_tobuf) (uint8 **buffer, struct mmo_charstatus **p); +typedef int (*HPMHOOK_post_chr_mmo_char_tobuf) (int retVal___, uint8 *buffer, struct mmo_charstatus *p); +typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_mmo_char_send_ban_list) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_mmo_char_send_ban_list) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_mmo_char_send_slots_info) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_mmo_char_send_slots_info) (int fd, struct char_session_data *sd); +typedef int (*HPMHOOK_pre_chr_mmo_char_send_characters) (int *fd, struct char_session_data **sd); +typedef int (*HPMHOOK_post_chr_mmo_char_send_characters) (int retVal___, int fd, struct char_session_data *sd); +typedef int (*HPMHOOK_pre_chr_char_married) (int *pl1, int *pl2); +typedef int (*HPMHOOK_post_chr_char_married) (int retVal___, int pl1, int pl2); +typedef int (*HPMHOOK_pre_chr_char_child) (int *parent_id, int *child_id); +typedef int (*HPMHOOK_post_chr_char_child) (int retVal___, int parent_id, int child_id); +typedef int (*HPMHOOK_pre_chr_char_family) (int *cid1, int *cid2, int *cid3); +typedef int (*HPMHOOK_post_chr_char_family) (int retVal___, int cid1, int cid2, int cid3); +typedef void (*HPMHOOK_pre_chr_disconnect_player) (int *account_id); +typedef void (*HPMHOOK_post_chr_disconnect_player) (int account_id); +typedef void (*HPMHOOK_pre_chr_authfail_fd) (int *fd, int *type); +typedef void (*HPMHOOK_post_chr_authfail_fd) (int fd, int type); +typedef void (*HPMHOOK_pre_chr_request_account_data) (int *account_id); +typedef void (*HPMHOOK_post_chr_request_account_data) (int account_id); +typedef void (*HPMHOOK_pre_chr_auth_ok) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_auth_ok) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_ping_login_server) (int *fd); +typedef void (*HPMHOOK_post_chr_ping_login_server) (int fd); +typedef int (*HPMHOOK_pre_chr_parse_fromlogin_connection_state) (int *fd); +typedef int (*HPMHOOK_post_chr_parse_fromlogin_connection_state) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_chr_auth_error) (int *fd, unsigned char *flag); +typedef void (*HPMHOOK_post_chr_auth_error) (int fd, unsigned char flag); +typedef void (*HPMHOOK_pre_chr_parse_fromlogin_auth_state) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_fromlogin_auth_state) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_fromlogin_account_data) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_fromlogin_account_data) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_fromlogin_login_pong) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_fromlogin_login_pong) (int fd); +typedef void (*HPMHOOK_pre_chr_changesex) (int *account_id, int *sex); +typedef void (*HPMHOOK_post_chr_changesex) (int account_id, int sex); +typedef int (*HPMHOOK_pre_chr_parse_fromlogin_changesex_reply) (int *fd); +typedef int (*HPMHOOK_post_chr_parse_fromlogin_changesex_reply) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_chr_parse_fromlogin_account_reg2) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_fromlogin_account_reg2) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_fromlogin_ban) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_fromlogin_ban) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_fromlogin_kick) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_fromlogin_kick) (int fd); +typedef void (*HPMHOOK_pre_chr_update_ip) (int *fd); +typedef void (*HPMHOOK_post_chr_update_ip) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_fromlogin_update_ip) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_fromlogin_update_ip) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_fromlogin_accinfo2_failed) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_fromlogin_accinfo2_failed) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_fromlogin_accinfo2_ok) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_fromlogin_accinfo2_ok) (int fd); +typedef int (*HPMHOOK_pre_chr_parse_fromlogin) (int *fd); +typedef int (*HPMHOOK_post_chr_parse_fromlogin) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_chr_request_accreg2) (int *account_id, int *char_id); +typedef int (*HPMHOOK_post_chr_request_accreg2) (int retVal___, int account_id, int char_id); +typedef void (*HPMHOOK_pre_chr_global_accreg_to_login_start) (int *account_id, int *char_id); +typedef void (*HPMHOOK_post_chr_global_accreg_to_login_start) (int account_id, int char_id); +typedef void (*HPMHOOK_pre_chr_global_accreg_to_login_send) (void); +typedef void (*HPMHOOK_post_chr_global_accreg_to_login_send) (void); +typedef void (*HPMHOOK_pre_chr_global_accreg_to_login_add) (const char **key, unsigned int *index, intptr_t *val, bool *is_string); +typedef void (*HPMHOOK_post_chr_global_accreg_to_login_add) (const char *key, unsigned int index, intptr_t val, bool is_string); +typedef void (*HPMHOOK_pre_chr_read_fame_list) (void); +typedef void (*HPMHOOK_post_chr_read_fame_list) (void); +typedef int (*HPMHOOK_pre_chr_send_fame_list) (int *fd); +typedef int (*HPMHOOK_post_chr_send_fame_list) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_chr_update_fame_list) (int *type, int *index, int *fame); +typedef void (*HPMHOOK_post_chr_update_fame_list) (int type, int index, int fame); +typedef int (*HPMHOOK_pre_chr_loadName) (int *char_id, char **name); +typedef int (*HPMHOOK_post_chr_loadName) (int retVal___, int char_id, char *name); +typedef void (*HPMHOOK_pre_chr_parse_frommap_datasync) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_datasync) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_skillid2idx) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_skillid2idx) (int fd); +typedef void (*HPMHOOK_pre_chr_map_received_ok) (int *fd); +typedef void (*HPMHOOK_post_chr_map_received_ok) (int fd); +typedef void (*HPMHOOK_pre_chr_send_maps) (int *fd, int *id, int *j); +typedef void (*HPMHOOK_post_chr_send_maps) (int fd, int id, int j); +typedef void (*HPMHOOK_pre_chr_parse_frommap_map_names) (int *fd, int *id); +typedef void (*HPMHOOK_post_chr_parse_frommap_map_names) (int fd, int id); +typedef void (*HPMHOOK_pre_chr_send_scdata) (int *fd, int *aid, int *cid); +typedef void (*HPMHOOK_post_chr_send_scdata) (int fd, int aid, int cid); +typedef void (*HPMHOOK_pre_chr_parse_frommap_request_scdata) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_request_scdata) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_set_users_count) (int *fd, int *id); +typedef void (*HPMHOOK_post_chr_parse_frommap_set_users_count) (int fd, int id); +typedef void (*HPMHOOK_pre_chr_parse_frommap_set_users) (int *fd, int *id); +typedef void (*HPMHOOK_post_chr_parse_frommap_set_users) (int fd, int id); +typedef void (*HPMHOOK_pre_chr_save_character_ack) (int *fd, int *aid, int *cid); +typedef void (*HPMHOOK_post_chr_save_character_ack) (int fd, int aid, int cid); +typedef void (*HPMHOOK_pre_chr_parse_frommap_save_character) (int *fd, int *id); +typedef void (*HPMHOOK_post_chr_parse_frommap_save_character) (int fd, int id); +typedef void (*HPMHOOK_pre_chr_select_ack) (int *fd, int *account_id, uint8 *flag); +typedef void (*HPMHOOK_post_chr_select_ack) (int fd, int account_id, uint8 flag); +typedef void (*HPMHOOK_pre_chr_parse_frommap_char_select_req) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_char_select_req) (int fd); +typedef void (*HPMHOOK_pre_chr_change_map_server_ack) (int *fd, const uint8 **data, bool *ok); +typedef void (*HPMHOOK_post_chr_change_map_server_ack) (int fd, const uint8 *data, bool ok); +typedef void (*HPMHOOK_pre_chr_parse_frommap_change_map_server) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_change_map_server) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_remove_friend) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_remove_friend) (int fd); +typedef void (*HPMHOOK_pre_chr_char_name_ack) (int *fd, int *char_id); +typedef void (*HPMHOOK_post_chr_char_name_ack) (int fd, int char_id); +typedef void (*HPMHOOK_pre_chr_parse_frommap_char_name_request) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_char_name_request) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_change_email) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_change_email) (int fd); +typedef void (*HPMHOOK_pre_chr_ban) (int *account_id, int *char_id, time_t **unban_time, short *year, short *month, short *day, short *hour, short *minute, short *second); +typedef void (*HPMHOOK_post_chr_ban) (int account_id, int char_id, time_t *unban_time, short year, short month, short day, short hour, short minute, short second); +typedef void (*HPMHOOK_pre_chr_unban) (int *char_id, int **result); +typedef void (*HPMHOOK_post_chr_unban) (int char_id, int *result); +typedef void (*HPMHOOK_pre_chr_ask_name_ack) (int *fd, int *acc, const char **name, int *type, int *result); +typedef void (*HPMHOOK_post_chr_ask_name_ack) (int fd, int acc, const char *name, int type, int result); +typedef int (*HPMHOOK_pre_chr_changecharsex) (int *char_id, int *sex); +typedef int (*HPMHOOK_post_chr_changecharsex) (int retVal___, int char_id, int sex); +typedef void (*HPMHOOK_pre_chr_parse_frommap_change_account) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_change_account) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_fame_list) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_fame_list) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_divorce_char) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_divorce_char) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_ragsrvinfo) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_ragsrvinfo) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_set_char_offline) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_set_char_offline) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_set_all_offline) (int *fd, int *id); +typedef void (*HPMHOOK_post_chr_parse_frommap_set_all_offline) (int fd, int id); +typedef void (*HPMHOOK_pre_chr_parse_frommap_set_char_online) (int *fd, int *id); +typedef void (*HPMHOOK_post_chr_parse_frommap_set_char_online) (int fd, int id); +typedef void (*HPMHOOK_pre_chr_parse_frommap_build_fame_list) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_build_fame_list) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_save_status_change_data) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_save_status_change_data) (int fd); +typedef void (*HPMHOOK_pre_chr_send_pong) (int *fd); +typedef void (*HPMHOOK_post_chr_send_pong) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_ping) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_ping) (int fd); +typedef void (*HPMHOOK_pre_chr_map_auth_ok) (int *fd, int *account_id, struct char_auth_node **node, struct mmo_charstatus **cd); +typedef void (*HPMHOOK_post_chr_map_auth_ok) (int fd, int account_id, struct char_auth_node *node, struct mmo_charstatus *cd); +typedef void (*HPMHOOK_pre_chr_map_auth_failed) (int *fd, int *account_id, int *char_id, int *login_id1, char *sex, uint32 *ip); +typedef void (*HPMHOOK_post_chr_map_auth_failed) (int fd, int account_id, int char_id, int login_id1, char sex, uint32 ip); +typedef void (*HPMHOOK_pre_chr_parse_frommap_auth_request) (int *fd, int *id); +typedef void (*HPMHOOK_post_chr_parse_frommap_auth_request) (int fd, int id); +typedef void (*HPMHOOK_pre_chr_parse_frommap_update_ip) (int *fd, int *id); +typedef void (*HPMHOOK_post_chr_parse_frommap_update_ip) (int fd, int id); +typedef void (*HPMHOOK_pre_chr_parse_frommap_scdata_update) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_scdata_update) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_frommap_scdata_delete) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_frommap_scdata_delete) (int fd); +typedef int (*HPMHOOK_pre_chr_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_chr_parse_frommap) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_chr_search_mapserver) (unsigned short *map, uint32 *ip, uint16 *port); +typedef int (*HPMHOOK_post_chr_search_mapserver) (int retVal___, unsigned short map, uint32 ip, uint16 port); +typedef int (*HPMHOOK_pre_chr_mapif_init) (int *fd); +typedef int (*HPMHOOK_post_chr_mapif_init) (int retVal___, int fd); +typedef uint32 (*HPMHOOK_pre_chr_lan_subnet_check) (uint32 *ip); +typedef uint32 (*HPMHOOK_post_chr_lan_subnet_check) (uint32 retVal___, uint32 ip); +typedef void (*HPMHOOK_pre_chr_delete2_ack) (int *fd, int *char_id, uint32 *result, time_t *delete_date); +typedef void (*HPMHOOK_post_chr_delete2_ack) (int fd, int char_id, uint32 result, time_t delete_date); +typedef void (*HPMHOOK_pre_chr_delete2_accept_actual_ack) (int *fd, int *char_id, uint32 *result); +typedef void (*HPMHOOK_post_chr_delete2_accept_actual_ack) (int fd, int char_id, uint32 result); +typedef void (*HPMHOOK_pre_chr_delete2_accept_ack) (int *fd, int *char_id, uint32 *result); +typedef void (*HPMHOOK_post_chr_delete2_accept_ack) (int fd, int char_id, uint32 result); +typedef void (*HPMHOOK_pre_chr_delete2_cancel_ack) (int *fd, int *char_id, uint32 *result); +typedef void (*HPMHOOK_post_chr_delete2_cancel_ack) (int fd, int char_id, uint32 result); +typedef void (*HPMHOOK_pre_chr_delete2_req) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_delete2_req) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_delete2_accept) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_delete2_accept) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_delete2_cancel) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_delete2_cancel) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_send_account_id) (int *fd, int *account_id); +typedef void (*HPMHOOK_post_chr_send_account_id) (int fd, int account_id); +typedef void (*HPMHOOK_pre_chr_parse_char_connect) (int *fd, struct char_session_data **sd, uint32 *ipl); +typedef void (*HPMHOOK_post_chr_parse_char_connect) (int fd, struct char_session_data *sd, uint32 ipl); +typedef void (*HPMHOOK_pre_chr_send_map_info) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus **cd, char **dnsHost); +typedef void (*HPMHOOK_post_chr_send_map_info) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd, char *dnsHost); +typedef void (*HPMHOOK_pre_chr_send_wait_char_server) (int *fd); +typedef void (*HPMHOOK_post_chr_send_wait_char_server) (int fd); +typedef int (*HPMHOOK_pre_chr_search_default_maps_mapserver) (struct mmo_charstatus **cd); +typedef int (*HPMHOOK_post_chr_search_default_maps_mapserver) (int retVal___, struct mmo_charstatus *cd); +typedef void (*HPMHOOK_pre_chr_parse_char_select) (int *fd, struct char_session_data **sd, uint32 *ipl); +typedef void (*HPMHOOK_post_chr_parse_char_select) (int fd, struct char_session_data *sd, uint32 ipl); +typedef void (*HPMHOOK_pre_chr_creation_failed) (int *fd, int *result); +typedef void (*HPMHOOK_post_chr_creation_failed) (int fd, int result); +typedef void (*HPMHOOK_pre_chr_creation_ok) (int *fd, struct mmo_charstatus **char_dat); +typedef void (*HPMHOOK_post_chr_creation_ok) (int fd, struct mmo_charstatus *char_dat); +typedef void (*HPMHOOK_pre_chr_parse_char_create_new_char) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_create_new_char) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_delete_char_failed) (int *fd, int *flag); +typedef void (*HPMHOOK_post_chr_delete_char_failed) (int fd, int flag); +typedef void (*HPMHOOK_pre_chr_delete_char_ok) (int *fd); +typedef void (*HPMHOOK_post_chr_delete_char_ok) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_char_delete_char) (int *fd, struct char_session_data **sd, unsigned short *cmd); +typedef void (*HPMHOOK_post_chr_parse_char_delete_char) (int fd, struct char_session_data *sd, unsigned short cmd); +typedef void (*HPMHOOK_pre_chr_parse_char_ping) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_char_ping) (int fd); +typedef void (*HPMHOOK_pre_chr_allow_rename) (int *fd, int *flag); +typedef void (*HPMHOOK_post_chr_allow_rename) (int fd, int flag); +typedef void (*HPMHOOK_pre_chr_parse_char_rename_char) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_rename_char) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_parse_char_rename_char2) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_rename_char2) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_rename_char_ack) (int *fd, int *flag); +typedef void (*HPMHOOK_post_chr_rename_char_ack) (int fd, int flag); +typedef void (*HPMHOOK_pre_chr_parse_char_rename_char_confirm) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_rename_char_confirm) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_captcha_notsupported) (int *fd); +typedef void (*HPMHOOK_post_chr_captcha_notsupported) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_char_request_captcha) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_char_request_captcha) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_char_check_captcha) (int *fd); +typedef void (*HPMHOOK_post_chr_parse_char_check_captcha) (int fd); +typedef void (*HPMHOOK_pre_chr_parse_char_delete2_req) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_delete2_req) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_parse_char_delete2_accept) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_delete2_accept) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_parse_char_delete2_cancel) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_delete2_cancel) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_login_map_server_ack) (int *fd, uint8 *flag); +typedef void (*HPMHOOK_post_chr_login_map_server_ack) (int fd, uint8 flag); +typedef void (*HPMHOOK_pre_chr_parse_char_login_map_server) (int *fd, uint32 *ipl); +typedef void (*HPMHOOK_post_chr_parse_char_login_map_server) (int fd, uint32 ipl); +typedef void (*HPMHOOK_pre_chr_parse_char_pincode_check) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_pincode_check) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_parse_char_pincode_window) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_pincode_window) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_parse_char_pincode_change) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_pincode_change) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_parse_char_pincode_first_pin) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_pincode_first_pin) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_parse_char_request_chars) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_request_chars) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_chr_change_character_slot_ack) (int *fd, bool *ret); +typedef void (*HPMHOOK_post_chr_change_character_slot_ack) (int fd, bool ret); +typedef void (*HPMHOOK_pre_chr_parse_char_move_character) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_chr_parse_char_move_character) (int fd, struct char_session_data *sd); +typedef int (*HPMHOOK_pre_chr_parse_char_unknown_packet) (int *fd, uint32 *ipl); +typedef int (*HPMHOOK_post_chr_parse_char_unknown_packet) (int retVal___, int fd, uint32 ipl); +typedef int (*HPMHOOK_pre_chr_parse_char) (int *fd); +typedef int (*HPMHOOK_post_chr_parse_char) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_chr_broadcast_user_count) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_chr_broadcast_user_count) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_chr_send_accounts_tologin_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_chr_send_accounts_tologin_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_chr_send_accounts_tologin) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_chr_send_accounts_tologin) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_chr_check_connect_login_server) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_chr_check_connect_login_server) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_chr_online_data_cleanup_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_chr_online_data_cleanup_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_chr_online_data_cleanup) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_chr_online_data_cleanup) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef bool (*HPMHOOK_pre_chr_sql_config_read) (const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_chr_sql_config_read) (bool retVal___, const char *filename, bool imported); +typedef bool (*HPMHOOK_pre_chr_sql_config_read_registry) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_sql_config_read_registry) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_chr_sql_config_read_pc) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_sql_config_read_pc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_chr_sql_config_read_guild) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_sql_config_read_guild) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_chr_config_read) (const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_chr_config_read) (bool retVal___, const char *filename, bool imported); +typedef bool (*HPMHOOK_pre_chr_config_read_database) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_config_read_database) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_chr_config_read_console) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_config_read_console) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_chr_config_read_player_fame) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_config_read_player_fame) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_chr_config_read_player_deletion) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_config_read_player_deletion) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_chr_config_read_player_name) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_config_read_player_name) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef void (*HPMHOOK_pre_chr_config_set_start_item) (const struct config_setting_t **setting); +typedef void (*HPMHOOK_post_chr_config_set_start_item) (const struct config_setting_t *setting); +typedef bool (*HPMHOOK_pre_chr_config_read_player_new) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_config_read_player_new) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_chr_config_read_player) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_config_read_player) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_chr_config_read_permission) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_config_read_permission) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_chr_config_set_ip) (const char **type, const char **value, uint32 **out_ip, char **out_ip_str); +typedef bool (*HPMHOOK_post_chr_config_set_ip) (bool retVal___, const char *type, const char *value, uint32 *out_ip, char *out_ip_str); +typedef bool (*HPMHOOK_pre_chr_config_read_inter) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_config_read_inter) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_chr_config_read_top) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_chr_config_read_top) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +#endif // CHAR_CHAR_H +#ifdef MAP_CHAT_H /* chat */ +typedef bool (*HPMHOOK_pre_chat_create_pc_chat) (struct map_session_data **sd, const char **title, const char **pass, int *limit, bool *pub); +typedef bool (*HPMHOOK_post_chat_create_pc_chat) (bool retVal___, struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub); +typedef bool (*HPMHOOK_pre_chat_join) (struct map_session_data **sd, int *chatid, const char **pass); +typedef bool (*HPMHOOK_post_chat_join) (bool retVal___, struct map_session_data *sd, int chatid, const char *pass); +typedef int (*HPMHOOK_pre_chat_leave) (struct map_session_data **sd, bool *kicked); +typedef int (*HPMHOOK_post_chat_leave) (int retVal___, struct map_session_data *sd, bool kicked); +typedef bool (*HPMHOOK_pre_chat_change_owner) (struct map_session_data **sd, const char **nextownername); +typedef bool (*HPMHOOK_post_chat_change_owner) (bool retVal___, struct map_session_data *sd, const char *nextownername); +typedef bool (*HPMHOOK_pre_chat_change_status) (struct map_session_data **sd, const char **title, const char **pass, int *limit, bool *pub); +typedef bool (*HPMHOOK_post_chat_change_status) (bool retVal___, struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub); +typedef bool (*HPMHOOK_pre_chat_kick) (struct map_session_data **sd, const char **kickusername); +typedef bool (*HPMHOOK_post_chat_kick) (bool retVal___, struct map_session_data *sd, const char *kickusername); +typedef bool (*HPMHOOK_pre_chat_create_npc_chat) (struct npc_data **nd, const char **title, int *limit, bool *pub, int *trigger, const char **ev, int *zeny, int *min_level, int *max_level); +typedef bool (*HPMHOOK_post_chat_create_npc_chat) (bool retVal___, struct npc_data *nd, const char *title, int limit, bool pub, int trigger, const char *ev, int zeny, int min_level, int max_level); +typedef bool (*HPMHOOK_pre_chat_delete_npc_chat) (struct npc_data **nd); +typedef bool (*HPMHOOK_post_chat_delete_npc_chat) (bool retVal___, struct npc_data *nd); +typedef bool (*HPMHOOK_pre_chat_enable_event) (struct chat_data **cd); +typedef bool (*HPMHOOK_post_chat_enable_event) (bool retVal___, struct chat_data *cd); +typedef bool (*HPMHOOK_pre_chat_disable_event) (struct chat_data **cd); +typedef bool (*HPMHOOK_post_chat_disable_event) (bool retVal___, struct chat_data *cd); +typedef bool (*HPMHOOK_pre_chat_npc_kick_all) (struct chat_data **cd); +typedef bool (*HPMHOOK_post_chat_npc_kick_all) (bool retVal___, struct chat_data *cd); +typedef bool (*HPMHOOK_pre_chat_trigger_event) (struct chat_data **cd); +typedef bool (*HPMHOOK_post_chat_trigger_event) (bool retVal___, struct chat_data *cd); +typedef struct chat_data* (*HPMHOOK_pre_chat_create) (struct block_list **bl, const char **title, const char **pass, int *limit, bool *pub, int *trigger, const char **ev, int *zeny, int *min_level, int *max_level); +typedef struct chat_data* (*HPMHOOK_post_chat_create) (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 min_level, int max_level); +#endif // MAP_CHAT_H +#ifdef MAP_CHRIF_H /* chrif */ +typedef void (*HPMHOOK_pre_chrif_init) (bool *minimal); +typedef void (*HPMHOOK_post_chrif_init) (bool minimal); +typedef void (*HPMHOOK_pre_chrif_final) (void); +typedef void (*HPMHOOK_post_chrif_final) (void); +typedef void (*HPMHOOK_pre_chrif_setuserid) (char **id); +typedef void (*HPMHOOK_post_chrif_setuserid) (char *id); +typedef void (*HPMHOOK_pre_chrif_setpasswd) (char **pwd); +typedef void (*HPMHOOK_post_chrif_setpasswd) (char *pwd); +typedef void (*HPMHOOK_pre_chrif_checkdefaultlogin) (void); +typedef void (*HPMHOOK_post_chrif_checkdefaultlogin) (void); +typedef bool (*HPMHOOK_pre_chrif_setip) (const char **ip); +typedef bool (*HPMHOOK_post_chrif_setip) (bool retVal___, const char *ip); +typedef void (*HPMHOOK_pre_chrif_setport) (uint16 *port); +typedef void (*HPMHOOK_post_chrif_setport) (uint16 port); +typedef int (*HPMHOOK_pre_chrif_isconnected) (void); +typedef int (*HPMHOOK_post_chrif_isconnected) (int retVal___); +typedef void (*HPMHOOK_pre_chrif_check_shutdown) (void); +typedef void (*HPMHOOK_post_chrif_check_shutdown) (void); +typedef struct auth_node* (*HPMHOOK_pre_chrif_search) (int *account_id); +typedef struct auth_node* (*HPMHOOK_post_chrif_search) (struct auth_node* retVal___, int account_id); +typedef struct auth_node* (*HPMHOOK_pre_chrif_auth_check) (int *account_id, int *char_id, enum sd_state *state); +typedef struct auth_node* (*HPMHOOK_post_chrif_auth_check) (struct auth_node* retVal___, int account_id, int char_id, enum sd_state state); +typedef bool (*HPMHOOK_pre_chrif_auth_delete) (int *account_id, int *char_id, enum sd_state *state); +typedef bool (*HPMHOOK_post_chrif_auth_delete) (bool retVal___, int account_id, int char_id, enum sd_state state); +typedef bool (*HPMHOOK_pre_chrif_auth_finished) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_chrif_auth_finished) (bool retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_chrif_authreq) (struct map_session_data **sd, bool *hstandalone); +typedef void (*HPMHOOK_post_chrif_authreq) (struct map_session_data *sd, bool hstandalone); +typedef void (*HPMHOOK_pre_chrif_authok) (int *fd); +typedef void (*HPMHOOK_post_chrif_authok) (int fd); +typedef bool (*HPMHOOK_pre_chrif_scdata_request) (int *account_id, int *char_id); +typedef bool (*HPMHOOK_post_chrif_scdata_request) (bool retVal___, int account_id, int char_id); +typedef bool (*HPMHOOK_pre_chrif_save) (struct map_session_data **sd, int *flag); +typedef bool (*HPMHOOK_post_chrif_save) (bool retVal___, struct map_session_data *sd, int flag); +typedef bool (*HPMHOOK_pre_chrif_charselectreq) (struct map_session_data **sd, uint32 *s_ip); +typedef bool (*HPMHOOK_post_chrif_charselectreq) (bool retVal___, struct map_session_data *sd, uint32 s_ip); +typedef bool (*HPMHOOK_pre_chrif_changemapserver) (struct map_session_data **sd, uint32 *ip, uint16 *port); +typedef bool (*HPMHOOK_post_chrif_changemapserver) (bool retVal___, struct map_session_data *sd, uint32 ip, uint16 port); +typedef bool (*HPMHOOK_pre_chrif_searchcharid) (int *char_id); +typedef bool (*HPMHOOK_post_chrif_searchcharid) (bool retVal___, int char_id); +typedef bool (*HPMHOOK_pre_chrif_changeemail) (int *id, const char **actual_email, const char **new_email); +typedef bool (*HPMHOOK_post_chrif_changeemail) (bool retVal___, int id, const char *actual_email, const char *new_email); +typedef bool (*HPMHOOK_pre_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); +typedef bool (*HPMHOOK_post_chrif_char_ask_name) (bool retVal___, int acc, const char *character_name, unsigned short operation_type, int year, int month, int day, int hour, int minute, int second); +typedef int (*HPMHOOK_pre_chrif_updatefamelist) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_chrif_updatefamelist) (int retVal___, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_chrif_buildfamelist) (void); +typedef bool (*HPMHOOK_post_chrif_buildfamelist) (bool retVal___); +typedef bool (*HPMHOOK_pre_chrif_save_scdata) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_chrif_save_scdata) (bool retVal___, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_chrif_ragsrvinfo) (int *base_rate, int *job_rate, int *drop_rate); +typedef bool (*HPMHOOK_post_chrif_ragsrvinfo) (bool retVal___, int base_rate, int job_rate, int drop_rate); +typedef bool (*HPMHOOK_pre_chrif_char_offline_nsd) (int *account_id, int *char_id); +typedef bool (*HPMHOOK_post_chrif_char_offline_nsd) (bool retVal___, int account_id, int char_id); +typedef bool (*HPMHOOK_pre_chrif_char_reset_offline) (void); +typedef bool (*HPMHOOK_post_chrif_char_reset_offline) (bool retVal___); +typedef bool (*HPMHOOK_pre_chrif_send_users_tochar) (void); +typedef bool (*HPMHOOK_post_chrif_send_users_tochar) (bool retVal___); +typedef bool (*HPMHOOK_pre_chrif_char_online) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_chrif_char_online) (bool retVal___, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_chrif_changesex) (struct map_session_data **sd, bool *change_account); +typedef bool (*HPMHOOK_post_chrif_changesex) (bool retVal___, struct map_session_data *sd, bool change_account); +typedef bool (*HPMHOOK_pre_chrif_divorce) (int *partner_id1, int *partner_id2); +typedef bool (*HPMHOOK_post_chrif_divorce) (bool retVal___, int partner_id1, int partner_id2); +typedef bool (*HPMHOOK_pre_chrif_removefriend) (int *char_id, int *friend_id); +typedef bool (*HPMHOOK_post_chrif_removefriend) (bool retVal___, int char_id, int friend_id); +typedef bool (*HPMHOOK_pre_chrif_flush) (void); +typedef bool (*HPMHOOK_post_chrif_flush) (bool retVal___); +typedef void (*HPMHOOK_pre_chrif_skillid2idx) (int *fd); +typedef void (*HPMHOOK_post_chrif_skillid2idx) (int fd); +typedef bool (*HPMHOOK_pre_chrif_sd_to_auth) (struct map_session_data **sd, enum sd_state *state); +typedef bool (*HPMHOOK_post_chrif_sd_to_auth) (bool retVal___, struct map_session_data *sd, enum sd_state state); +typedef int (*HPMHOOK_pre_chrif_check_connect_char_server) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_chrif_check_connect_char_server) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef bool (*HPMHOOK_pre_chrif_auth_logout) (struct map_session_data **sd, enum sd_state *state); +typedef bool (*HPMHOOK_post_chrif_auth_logout) (bool retVal___, struct map_session_data *sd, enum sd_state state); +typedef void (*HPMHOOK_pre_chrif_save_ack) (int *fd); +typedef void (*HPMHOOK_post_chrif_save_ack) (int fd); +typedef int (*HPMHOOK_pre_chrif_reconnect) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_chrif_reconnect) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_chrif_auth_db_cleanup_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_chrif_auth_db_cleanup_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef bool (*HPMHOOK_pre_chrif_char_ask_name_answer) (int *acc, const char **player_name, uint16 *type, uint16 *answer); +typedef bool (*HPMHOOK_post_chrif_char_ask_name_answer) (bool retVal___, int acc, const char *player_name, uint16 type, uint16 answer); +typedef int (*HPMHOOK_pre_chrif_auth_db_final) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_chrif_auth_db_final) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_chrif_send_usercount_tochar) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_chrif_send_usercount_tochar) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_chrif_auth_db_cleanup) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_chrif_auth_db_cleanup) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_chrif_connect) (int *fd); +typedef void (*HPMHOOK_post_chrif_connect) (int fd); +typedef void (*HPMHOOK_pre_chrif_connectack) (int *fd); +typedef void (*HPMHOOK_post_chrif_connectack) (int fd); +typedef void (*HPMHOOK_pre_chrif_sendmap) (int *fd); +typedef void (*HPMHOOK_post_chrif_sendmap) (int fd); +typedef void (*HPMHOOK_pre_chrif_sendmapack) (int *fd); +typedef void (*HPMHOOK_post_chrif_sendmapack) (int fd); +typedef void (*HPMHOOK_pre_chrif_recvmap) (int *fd); +typedef void (*HPMHOOK_post_chrif_recvmap) (int fd); +typedef bool (*HPMHOOK_pre_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); +typedef bool (*HPMHOOK_post_chrif_changemapserverack) (bool retVal___, int account_id, int login_id1, int login_id2, int char_id, short map_index, short x, short y, uint32 ip, uint16 port); +typedef void (*HPMHOOK_pre_chrif_changedsex) (int *fd); +typedef void (*HPMHOOK_post_chrif_changedsex) (int fd); +typedef bool (*HPMHOOK_pre_chrif_divorceack) (int *char_id, int *partner_id); +typedef bool (*HPMHOOK_post_chrif_divorceack) (bool retVal___, int char_id, int partner_id); +typedef void (*HPMHOOK_pre_chrif_idbanned) (int *fd); +typedef void (*HPMHOOK_post_chrif_idbanned) (int fd); +typedef void (*HPMHOOK_pre_chrif_recvfamelist) (int *fd); +typedef void (*HPMHOOK_post_chrif_recvfamelist) (int fd); +typedef bool (*HPMHOOK_pre_chrif_load_scdata) (int *fd); +typedef bool (*HPMHOOK_post_chrif_load_scdata) (bool retVal___, int fd); +typedef void (*HPMHOOK_pre_chrif_update_ip) (int *fd); +typedef void (*HPMHOOK_post_chrif_update_ip) (int fd); +typedef int (*HPMHOOK_pre_chrif_disconnectplayer) (int *fd); +typedef int (*HPMHOOK_post_chrif_disconnectplayer) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_chrif_removemap) (int *fd); +typedef void (*HPMHOOK_post_chrif_removemap) (int fd); +typedef int (*HPMHOOK_pre_chrif_updatefamelist_ack) (int *fd); +typedef int (*HPMHOOK_post_chrif_updatefamelist_ack) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_chrif_keepalive) (int *fd); +typedef void (*HPMHOOK_post_chrif_keepalive) (int fd); +typedef void (*HPMHOOK_pre_chrif_keepalive_ack) (int *fd); +typedef void (*HPMHOOK_post_chrif_keepalive_ack) (int fd); +typedef void (*HPMHOOK_pre_chrif_deadopt) (int *father_id, int *mother_id, int *child_id); +typedef void (*HPMHOOK_post_chrif_deadopt) (int father_id, int mother_id, int child_id); +typedef void (*HPMHOOK_pre_chrif_authfail) (int *fd); +typedef void (*HPMHOOK_post_chrif_authfail) (int fd); +typedef void (*HPMHOOK_pre_chrif_on_ready) (void); +typedef void (*HPMHOOK_post_chrif_on_ready) (void); +typedef void (*HPMHOOK_pre_chrif_on_disconnect) (void); +typedef void (*HPMHOOK_post_chrif_on_disconnect) (void); +typedef int (*HPMHOOK_pre_chrif_parse) (int *fd); +typedef int (*HPMHOOK_post_chrif_parse) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_chrif_save_scdata_single) (int *account_id, int *char_id, short *type, struct status_change_entry **sce); +typedef void (*HPMHOOK_post_chrif_save_scdata_single) (int account_id, int char_id, short type, struct status_change_entry *sce); +typedef void (*HPMHOOK_pre_chrif_del_scdata_single) (int *account_id, int *char_id, short *type); +typedef void (*HPMHOOK_post_chrif_del_scdata_single) (int account_id, int char_id, short type); +#endif // MAP_CHRIF_H +#ifdef MAP_CLAN_H /* clan */ +typedef void (*HPMHOOK_pre_clan_init) (bool *minimal); +typedef void (*HPMHOOK_post_clan_init) (bool minimal); +typedef void (*HPMHOOK_pre_clan_final) (void); +typedef void (*HPMHOOK_post_clan_final) (void); +typedef bool (*HPMHOOK_pre_clan_config_read) (bool *reload); +typedef bool (*HPMHOOK_post_clan_config_read) (bool retVal___, bool reload); +typedef void (*HPMHOOK_pre_clan_config_read_additional_settings) (struct config_setting_t **settings, const char **source); +typedef void (*HPMHOOK_post_clan_config_read_additional_settings) (struct config_setting_t *settings, const char *source); +typedef void (*HPMHOOK_pre_clan_read_db) (struct config_setting_t **settings, const char **source, bool *reload); +typedef void (*HPMHOOK_post_clan_read_db) (struct config_setting_t *settings, const char *source, bool reload); +typedef int (*HPMHOOK_pre_clan_read_db_sub) (struct config_setting_t **settings, const char **source, bool *reload); +typedef int (*HPMHOOK_post_clan_read_db_sub) (int retVal___, struct config_setting_t *settings, const char *source, bool reload); +typedef void (*HPMHOOK_pre_clan_read_db_additional_fields) (struct clan **entry, struct config_setting_t **t, int *n, const char **source); +typedef void (*HPMHOOK_post_clan_read_db_additional_fields) (struct clan *entry, struct config_setting_t *t, int n, const char *source); +typedef void (*HPMHOOK_pre_clan_read_buffs) (struct clan **c, struct config_setting_t **buff, const char **source); +typedef void (*HPMHOOK_post_clan_read_buffs) (struct clan *c, struct config_setting_t *buff, const char *source); +typedef struct clan* (*HPMHOOK_pre_clan_search) (int *clan_id); +typedef struct clan* (*HPMHOOK_post_clan_search) (struct clan* retVal___, int clan_id); +typedef struct clan* (*HPMHOOK_pre_clan_searchname) (const char **name); +typedef struct clan* (*HPMHOOK_post_clan_searchname) (struct clan* retVal___, const char *name); +typedef struct map_session_data* (*HPMHOOK_pre_clan_getonlinesd) (struct clan **c); +typedef struct map_session_data* (*HPMHOOK_post_clan_getonlinesd) (struct map_session_data* retVal___, struct clan *c); +typedef int (*HPMHOOK_pre_clan_getindex) (const struct clan **c, int *char_id); +typedef int (*HPMHOOK_post_clan_getindex) (int retVal___, const struct clan *c, int char_id); +typedef bool (*HPMHOOK_pre_clan_join) (struct map_session_data **sd, int *clan_id); +typedef bool (*HPMHOOK_post_clan_join) (bool retVal___, struct map_session_data *sd, int clan_id); +typedef void (*HPMHOOK_pre_clan_member_online) (struct map_session_data **sd, bool *first); +typedef void (*HPMHOOK_post_clan_member_online) (struct map_session_data *sd, bool first); +typedef bool (*HPMHOOK_pre_clan_leave) (struct map_session_data **sd, bool *first); +typedef bool (*HPMHOOK_post_clan_leave) (bool retVal___, struct map_session_data *sd, bool first); +typedef bool (*HPMHOOK_pre_clan_send_message) (struct map_session_data **sd, const char **mes); +typedef bool (*HPMHOOK_post_clan_send_message) (bool retVal___, struct map_session_data *sd, const char *mes); +typedef void (*HPMHOOK_pre_clan_recv_message) (struct clan **c, const char **mes, int *len); +typedef void (*HPMHOOK_post_clan_recv_message) (struct clan *c, const char *mes, int len); +typedef void (*HPMHOOK_pre_clan_member_offline) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clan_member_offline) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clan_set_constants) (void); +typedef void (*HPMHOOK_post_clan_set_constants) (void); +typedef int (*HPMHOOK_pre_clan_get_id) (const struct block_list **bl); +typedef int (*HPMHOOK_post_clan_get_id) (int retVal___, const struct block_list *bl); +typedef void (*HPMHOOK_pre_clan_buff_start) (struct map_session_data **sd, struct clan **c); +typedef void (*HPMHOOK_post_clan_buff_start) (struct map_session_data *sd, struct clan *c); +typedef void (*HPMHOOK_pre_clan_buff_end) (struct map_session_data **sd, struct clan **c); +typedef void (*HPMHOOK_post_clan_buff_end) (struct map_session_data *sd, struct clan *c); +typedef void (*HPMHOOK_pre_clan_reload) (void); +typedef void (*HPMHOOK_post_clan_reload) (void); +typedef int (*HPMHOOK_pre_clan_rejoin) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_clan_rejoin) (int retVal___, struct map_session_data *sd, va_list ap); +typedef int (*HPMHOOK_pre_clan_inactivity_kick) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_clan_inactivity_kick) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_clan_request_kickoffline) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_clan_request_kickoffline) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_clan_request_membercount) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_clan_request_membercount) (int retVal___, int tid, int64 tick, int id, intptr_t data); +#endif // MAP_CLAN_H +#ifdef MAP_CLIF_H /* clif */ +typedef int (*HPMHOOK_pre_clif_init) (bool *minimal); +typedef int (*HPMHOOK_post_clif_init) (int retVal___, bool minimal); +typedef void (*HPMHOOK_pre_clif_final) (void); +typedef void (*HPMHOOK_post_clif_final) (void); +typedef bool (*HPMHOOK_pre_clif_setip) (const char **ip); +typedef bool (*HPMHOOK_post_clif_setip) (bool retVal___, const char *ip); +typedef bool (*HPMHOOK_pre_clif_setbindip) (const char **ip); +typedef bool (*HPMHOOK_post_clif_setbindip) (bool retVal___, const char *ip); +typedef void (*HPMHOOK_pre_clif_setport) (uint16 *port); +typedef void (*HPMHOOK_post_clif_setport) (uint16 port); +typedef uint32 (*HPMHOOK_pre_clif_refresh_ip) (void); +typedef uint32 (*HPMHOOK_post_clif_refresh_ip) (uint32 retVal___); +typedef bool (*HPMHOOK_pre_clif_send) (const void **buf, int *len, struct block_list **bl, enum send_target *type); +typedef bool (*HPMHOOK_post_clif_send) (bool retVal___, const void *buf, int len, struct block_list *bl, enum send_target type); +typedef int (*HPMHOOK_pre_clif_send_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_clif_send_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_clif_send_actual) (int *fd, void **buf, int *len); +typedef int (*HPMHOOK_post_clif_send_actual) (int retVal___, int fd, void *buf, int len); +typedef int (*HPMHOOK_pre_clif_parse) (int *fd); +typedef int (*HPMHOOK_post_clif_parse) (int retVal___, int fd); +typedef const struct s_packet_db* (*HPMHOOK_pre_clif_packet) (int *packet_id); +typedef const struct s_packet_db* (*HPMHOOK_post_clif_packet) (const struct s_packet_db* retVal___, int packet_id); +typedef unsigned short (*HPMHOOK_pre_clif_parse_cmd) (int *fd, struct map_session_data **sd); +typedef unsigned short (*HPMHOOK_post_clif_parse_cmd) (unsigned short retVal___, int fd, struct map_session_data *sd); +typedef unsigned short (*HPMHOOK_pre_clif_decrypt_cmd) (int *cmd, struct map_session_data **sd); +typedef unsigned short (*HPMHOOK_post_clif_decrypt_cmd) (unsigned short retVal___, int cmd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_authok) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_authok) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_auth_error) (int *fd, int *errorCode); +typedef void (*HPMHOOK_post_clif_auth_error) (int fd, int errorCode); +typedef void (*HPMHOOK_pre_clif_authrefuse) (int *fd, uint8 *error_code); +typedef void (*HPMHOOK_post_clif_authrefuse) (int fd, uint8 error_code); +typedef void (*HPMHOOK_pre_clif_authfail_fd) (int *fd, int *type); +typedef void (*HPMHOOK_post_clif_authfail_fd) (int fd, int type); +typedef void (*HPMHOOK_pre_clif_charselectok) (int *id, uint8 *ok); +typedef void (*HPMHOOK_post_clif_charselectok) (int id, uint8 ok); +typedef void (*HPMHOOK_pre_clif_dropflooritem) (struct flooritem_data **fitem); +typedef void (*HPMHOOK_post_clif_dropflooritem) (struct flooritem_data *fitem); +typedef void (*HPMHOOK_pre_clif_clearflooritem) (struct flooritem_data **fitem, int *fd); +typedef void (*HPMHOOK_post_clif_clearflooritem) (struct flooritem_data *fitem, int fd); +typedef void (*HPMHOOK_pre_clif_additem) (struct map_session_data **sd, int *n, int *amount, int *fail); +typedef void (*HPMHOOK_post_clif_additem) (struct map_session_data *sd, int n, int amount, int fail); +typedef void (*HPMHOOK_pre_clif_dropitem) (struct map_session_data **sd, int *n, int *amount); +typedef void (*HPMHOOK_post_clif_dropitem) (struct map_session_data *sd, int n, int amount); +typedef void (*HPMHOOK_pre_clif_delitem) (struct map_session_data **sd, int *n, int *amount, short *reason); +typedef void (*HPMHOOK_post_clif_delitem) (struct map_session_data *sd, int n, int amount, short reason); +typedef void (*HPMHOOK_pre_clif_takeitem) (struct block_list **src, struct block_list **dst); +typedef void (*HPMHOOK_post_clif_takeitem) (struct block_list *src, struct block_list *dst); +typedef void (*HPMHOOK_pre_clif_item_movefailed) (struct map_session_data **sd, int *n); +typedef void (*HPMHOOK_post_clif_item_movefailed) (struct map_session_data *sd, int n); +typedef void (*HPMHOOK_pre_clif_item_equip) (short *idx, struct EQUIPITEM_INFO **p, struct item **i, struct item_data **id, int *eqp_pos); +typedef void (*HPMHOOK_post_clif_item_equip) (short idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int eqp_pos); +typedef void (*HPMHOOK_pre_clif_item_normal) (short *idx, struct NORMALITEM_INFO **p, struct item **i, struct item_data **id); +typedef void (*HPMHOOK_post_clif_item_normal) (short idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id); +typedef void (*HPMHOOK_pre_clif_arrowequip) (struct map_session_data **sd, int *val); +typedef void (*HPMHOOK_post_clif_arrowequip) (struct map_session_data *sd, int val); +typedef void (*HPMHOOK_pre_clif_arrow_fail) (struct map_session_data **sd, int *type); +typedef void (*HPMHOOK_post_clif_arrow_fail) (struct map_session_data *sd, int type); +typedef void (*HPMHOOK_pre_clif_use_card) (struct map_session_data **sd, int *idx); +typedef void (*HPMHOOK_post_clif_use_card) (struct map_session_data *sd, int idx); +typedef void (*HPMHOOK_pre_clif_cart_additem) (struct map_session_data **sd, int *n, int *amount, int *fail); +typedef void (*HPMHOOK_post_clif_cart_additem) (struct map_session_data *sd, int n, int amount, int fail); +typedef void (*HPMHOOK_pre_clif_cart_delitem) (struct map_session_data **sd, int *n, int *amount); +typedef void (*HPMHOOK_post_clif_cart_delitem) (struct map_session_data *sd, int n, int amount); +typedef void (*HPMHOOK_pre_clif_equipitemack) (struct map_session_data **sd, int *n, int *pos, enum e_EQUIP_ITEM_ACK *result); +typedef void (*HPMHOOK_post_clif_equipitemack) (struct map_session_data *sd, int n, int pos, enum e_EQUIP_ITEM_ACK result); +typedef void (*HPMHOOK_pre_clif_unequipitemack) (struct map_session_data **sd, int *n, int *pos, enum e_UNEQUIP_ITEM_ACK *result); +typedef void (*HPMHOOK_post_clif_unequipitemack) (struct map_session_data *sd, int n, int pos, enum e_UNEQUIP_ITEM_ACK result); +typedef void (*HPMHOOK_pre_clif_useitemack) (struct map_session_data **sd, int *index, int *amount, bool *ok); +typedef void (*HPMHOOK_post_clif_useitemack) (struct map_session_data *sd, int index, int amount, bool ok); +typedef void (*HPMHOOK_pre_clif_addcards) (struct EQUIPSLOTINFO **buf, struct item **item); +typedef void (*HPMHOOK_post_clif_addcards) (struct EQUIPSLOTINFO *buf, struct item *item); +typedef void (*HPMHOOK_pre_clif_item_sub) (unsigned char **buf, int *n, struct item **i, struct item_data **id, int *equip); +typedef void (*HPMHOOK_post_clif_item_sub) (unsigned char *buf, int n, struct item *i, struct item_data *id, int equip); +typedef void (*HPMHOOK_pre_clif_getareachar_item) (struct map_session_data **sd, struct flooritem_data **fitem); +typedef void (*HPMHOOK_post_clif_getareachar_item) (struct map_session_data *sd, struct flooritem_data *fitem); +typedef void (*HPMHOOK_pre_clif_cart_additem_ack) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_cart_additem_ack) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_cashshop_load) (void); +typedef void (*HPMHOOK_post_clif_cashshop_load) (void); +typedef void (*HPMHOOK_pre_clif_cashShopSchedule) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_cashShopSchedule) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_package_announce) (struct map_session_data **sd, int *nameid, int *containerid); +typedef void (*HPMHOOK_post_clif_package_announce) (struct map_session_data *sd, int nameid, int containerid); +typedef void (*HPMHOOK_pre_clif_item_drop_announce) (struct map_session_data **sd, int *nameid, char **monsterName); +typedef void (*HPMHOOK_post_clif_item_drop_announce) (struct map_session_data *sd, int nameid, char *monsterName); +typedef void (*HPMHOOK_pre_clif_clearunit_single) (int *id, enum clr_type *type, int *fd); +typedef void (*HPMHOOK_post_clif_clearunit_single) (int id, enum clr_type type, int fd); +typedef void (*HPMHOOK_pre_clif_clearunit_area) (struct block_list **bl, enum clr_type *type); +typedef void (*HPMHOOK_post_clif_clearunit_area) (struct block_list *bl, enum clr_type type); +typedef void (*HPMHOOK_pre_clif_clearunit_delayed) (struct block_list **bl, enum clr_type *type, int64 *tick); +typedef void (*HPMHOOK_post_clif_clearunit_delayed) (struct block_list *bl, enum clr_type type, int64 tick); +typedef void (*HPMHOOK_pre_clif_walkok) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_walkok) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_move) (struct unit_data **ud); +typedef void (*HPMHOOK_post_clif_move) (struct unit_data *ud); +typedef void (*HPMHOOK_pre_clif_move2) (struct block_list **bl, struct view_data **vd, struct unit_data **ud); +typedef void (*HPMHOOK_post_clif_move2) (struct block_list *bl, struct view_data *vd, struct unit_data *ud); +typedef void (*HPMHOOK_pre_clif_blown) (struct block_list **bl); +typedef void (*HPMHOOK_post_clif_blown) (struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_slide) (struct block_list **bl, int *x, int *y); +typedef void (*HPMHOOK_post_clif_slide) (struct block_list *bl, int x, int y); +typedef void (*HPMHOOK_pre_clif_fixpos) (struct block_list **bl); +typedef void (*HPMHOOK_post_clif_fixpos) (struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_changelook) (struct block_list **bl, int *type, int *val); +typedef void (*HPMHOOK_post_clif_changelook) (struct block_list *bl, int type, int val); +typedef void (*HPMHOOK_pre_clif_changetraplook) (struct block_list **bl, int *val); +typedef void (*HPMHOOK_post_clif_changetraplook) (struct block_list *bl, int val); +typedef void (*HPMHOOK_pre_clif_refreshlook) (struct block_list **bl, int *id, int *type, int *val, enum send_target *target); +typedef void (*HPMHOOK_post_clif_refreshlook) (struct block_list *bl, int id, int type, int val, enum send_target target); +typedef void (*HPMHOOK_pre_clif_sendlook) (struct block_list **bl, int *id, int *type, int *val, int *val2, enum send_target *target); +typedef void (*HPMHOOK_post_clif_sendlook) (struct block_list *bl, int id, int type, int val, int val2, enum send_target target); +typedef void (*HPMHOOK_pre_clif_class_change) (struct block_list **bl, int *class_, int *type, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_class_change) (struct block_list *bl, int class_, int type, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_skill_delunit) (struct skill_unit **su); +typedef void (*HPMHOOK_post_clif_skill_delunit) (struct skill_unit *su); +typedef void (*HPMHOOK_pre_clif_skillunit_update) (struct block_list **bl); +typedef void (*HPMHOOK_post_clif_skillunit_update) (struct block_list *bl); +typedef int (*HPMHOOK_pre_clif_clearunit_delayed_sub) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_clif_clearunit_delayed_sub) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_clif_set_unit_idle) (struct block_list **bl, struct map_session_data **tsd, enum send_target *target); +typedef void (*HPMHOOK_post_clif_set_unit_idle) (struct block_list *bl, struct map_session_data *tsd, enum send_target target); +typedef void (*HPMHOOK_pre_clif_spawn_unit) (struct block_list **bl, enum send_target *target); +typedef void (*HPMHOOK_post_clif_spawn_unit) (struct block_list *bl, enum send_target target); +typedef void (*HPMHOOK_pre_clif_spawn_unit2) (struct block_list **bl, enum send_target *target); +typedef void (*HPMHOOK_post_clif_spawn_unit2) (struct block_list *bl, enum send_target target); +typedef void (*HPMHOOK_pre_clif_set_unit_idle2) (struct block_list **bl, struct map_session_data **tsd, enum send_target *target); +typedef void (*HPMHOOK_post_clif_set_unit_idle2) (struct block_list *bl, struct map_session_data *tsd, enum send_target target); +typedef void (*HPMHOOK_pre_clif_set_unit_walking) (struct block_list **bl, struct map_session_data **tsd, struct unit_data **ud, enum send_target *target); +typedef void (*HPMHOOK_post_clif_set_unit_walking) (struct block_list *bl, struct map_session_data *tsd, struct unit_data *ud, enum send_target target); +typedef int (*HPMHOOK_pre_clif_calc_walkdelay) (struct block_list **bl, int *delay, int *type, int *damage, int *div_); +typedef int (*HPMHOOK_post_clif_calc_walkdelay) (int retVal___, struct block_list *bl, int delay, int type, int damage, int div_); +typedef void (*HPMHOOK_pre_clif_getareachar_skillunit) (struct block_list **bl, struct skill_unit **su, enum send_target *target); +typedef void (*HPMHOOK_post_clif_getareachar_skillunit) (struct block_list *bl, struct skill_unit *su, enum send_target target); +typedef void (*HPMHOOK_pre_clif_getareachar_unit) (struct map_session_data **sd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_getareachar_unit) (struct map_session_data *sd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_clearchar_skillunit) (struct skill_unit **su, int *fd); +typedef void (*HPMHOOK_post_clif_clearchar_skillunit) (struct skill_unit *su, int fd); +typedef int (*HPMHOOK_pre_clif_getareachar) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_clif_getareachar) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_clif_graffiti_entry) (struct block_list **bl, struct skill_unit **su, enum send_target *target); +typedef void (*HPMHOOK_post_clif_graffiti_entry) (struct block_list *bl, struct skill_unit *su, enum send_target target); +typedef bool (*HPMHOOK_pre_clif_spawn) (struct block_list **bl); +typedef bool (*HPMHOOK_post_clif_spawn) (bool retVal___, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_changemap) (struct map_session_data **sd, short *m, int *x, int *y); +typedef void (*HPMHOOK_post_clif_changemap) (struct map_session_data *sd, short m, int x, int y); +typedef void (*HPMHOOK_pre_clif_changemap_airship) (struct map_session_data **sd, short *m, int *x, int *y); +typedef void (*HPMHOOK_post_clif_changemap_airship) (struct map_session_data *sd, short m, int x, int y); +typedef void (*HPMHOOK_pre_clif_changemapcell) (int *fd, int16 *m, int *x, int *y, int *type, enum send_target *target); +typedef void (*HPMHOOK_post_clif_changemapcell) (int fd, int16 m, int x, int y, int type, enum send_target target); +typedef void (*HPMHOOK_pre_clif_map_property) (struct map_session_data **sd, enum map_property *property); +typedef void (*HPMHOOK_post_clif_map_property) (struct map_session_data *sd, enum map_property property); +typedef void (*HPMHOOK_pre_clif_pvpset) (struct map_session_data **sd, int *pvprank, int *pvpnum, int *type); +typedef void (*HPMHOOK_post_clif_pvpset) (struct map_session_data *sd, int pvprank, int pvpnum, int type); +typedef void (*HPMHOOK_pre_clif_map_property_mapall) (int *mapid, enum map_property *property); +typedef void (*HPMHOOK_post_clif_map_property_mapall) (int mapid, enum map_property property); +typedef void (*HPMHOOK_pre_clif_bossmapinfo) (int *fd, struct mob_data **md, short *flag); +typedef void (*HPMHOOK_post_clif_bossmapinfo) (int fd, struct mob_data *md, short flag); +typedef void (*HPMHOOK_pre_clif_map_type) (struct map_session_data **sd, enum map_type *type); +typedef void (*HPMHOOK_post_clif_map_type) (struct map_session_data *sd, enum map_type type); +typedef void (*HPMHOOK_pre_clif_maptypeproperty2) (struct block_list **bl, enum send_target *t); +typedef void (*HPMHOOK_post_clif_maptypeproperty2) (struct block_list *bl, enum send_target t); +typedef void (*HPMHOOK_pre_clif_changemapserver) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port, char **dnsHost); +typedef void (*HPMHOOK_post_clif_changemapserver) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port, char *dnsHost); +typedef void (*HPMHOOK_pre_clif_changemapserver_airship) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port); +typedef void (*HPMHOOK_post_clif_changemapserver_airship) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port); +typedef void (*HPMHOOK_pre_clif_npcbuysell) (struct map_session_data **sd, int *id); +typedef void (*HPMHOOK_post_clif_npcbuysell) (struct map_session_data *sd, int id); +typedef void (*HPMHOOK_pre_clif_buylist) (struct map_session_data **sd, struct npc_data **nd); +typedef void (*HPMHOOK_post_clif_buylist) (struct map_session_data *sd, struct npc_data *nd); +typedef void (*HPMHOOK_pre_clif_selllist) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_selllist) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_cashshop_show) (struct map_session_data **sd, struct npc_data **nd); +typedef void (*HPMHOOK_post_clif_cashshop_show) (struct map_session_data *sd, struct npc_data *nd); +typedef void (*HPMHOOK_pre_clif_npc_buy_result) (struct map_session_data **sd, unsigned char *result); +typedef void (*HPMHOOK_post_clif_npc_buy_result) (struct map_session_data *sd, unsigned char result); +typedef void (*HPMHOOK_pre_clif_npc_sell_result) (struct map_session_data **sd, unsigned char *result); +typedef void (*HPMHOOK_post_clif_npc_sell_result) (struct map_session_data *sd, unsigned char result); +typedef void (*HPMHOOK_pre_clif_cashshop_ack) (struct map_session_data **sd, int *error); +typedef void (*HPMHOOK_post_clif_cashshop_ack) (struct map_session_data *sd, int error); +typedef void (*HPMHOOK_pre_clif_scriptmes) (struct map_session_data **sd, int *npcid, const char **mes); +typedef void (*HPMHOOK_post_clif_scriptmes) (struct map_session_data *sd, int npcid, const char *mes); +typedef void (*HPMHOOK_pre_clif_scriptnext) (struct map_session_data **sd, int *npcid); +typedef void (*HPMHOOK_post_clif_scriptnext) (struct map_session_data *sd, int npcid); +typedef void (*HPMHOOK_pre_clif_scriptclose) (struct map_session_data **sd, int *npcid); +typedef void (*HPMHOOK_post_clif_scriptclose) (struct map_session_data *sd, int npcid); +typedef void (*HPMHOOK_pre_clif_scriptmenu) (struct map_session_data **sd, int *npcid, const char **mes); +typedef void (*HPMHOOK_post_clif_scriptmenu) (struct map_session_data *sd, int npcid, const char *mes); +typedef void (*HPMHOOK_pre_clif_scriptinput) (struct map_session_data **sd, int *npcid); +typedef void (*HPMHOOK_post_clif_scriptinput) (struct map_session_data *sd, int npcid); +typedef void (*HPMHOOK_pre_clif_scriptinputstr) (struct map_session_data **sd, int *npcid); +typedef void (*HPMHOOK_post_clif_scriptinputstr) (struct map_session_data *sd, int npcid); +typedef void (*HPMHOOK_pre_clif_cutin) (struct map_session_data **sd, const char **image, int *type); +typedef void (*HPMHOOK_post_clif_cutin) (struct map_session_data *sd, const char *image, int type); +typedef void (*HPMHOOK_pre_clif_sendfakenpc) (struct map_session_data **sd, int *npcid); +typedef void (*HPMHOOK_post_clif_sendfakenpc) (struct map_session_data *sd, int npcid); +typedef void (*HPMHOOK_pre_clif_scriptclear) (struct map_session_data **sd, int *npcid); +typedef void (*HPMHOOK_post_clif_scriptclear) (struct map_session_data *sd, int npcid); +typedef void (*HPMHOOK_pre_clif_viewpoint) (struct map_session_data **sd, int *npc_id, int *type, int *x, int *y, int *id, int *color); +typedef void (*HPMHOOK_post_clif_viewpoint) (struct map_session_data *sd, int npc_id, int type, int x, int y, int id, int color); +typedef int (*HPMHOOK_pre_clif_damage) (struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *damage, short *div, enum battle_dmg_type *type, int64 *damage2); +typedef int (*HPMHOOK_post_clif_damage) (int retVal___, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, enum battle_dmg_type type, int64 damage2); +typedef void (*HPMHOOK_pre_clif_sitting) (struct block_list **bl); +typedef void (*HPMHOOK_post_clif_sitting) (struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_standing) (struct block_list **bl); +typedef void (*HPMHOOK_post_clif_standing) (struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_arrow_create_list) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_arrow_create_list) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_refresh_storagewindow) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_refresh_storagewindow) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_refresh) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_refresh) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_fame_blacksmith) (struct map_session_data **sd, int *points); +typedef void (*HPMHOOK_post_clif_fame_blacksmith) (struct map_session_data *sd, int points); +typedef void (*HPMHOOK_pre_clif_fame_alchemist) (struct map_session_data **sd, int *points); +typedef void (*HPMHOOK_post_clif_fame_alchemist) (struct map_session_data *sd, int points); +typedef void (*HPMHOOK_pre_clif_fame_taekwon) (struct map_session_data **sd, int *points); +typedef void (*HPMHOOK_post_clif_fame_taekwon) (struct map_session_data *sd, int points); +typedef void (*HPMHOOK_pre_clif_ranklist) (struct map_session_data **sd, enum fame_list_type *type); +typedef void (*HPMHOOK_post_clif_ranklist) (struct map_session_data *sd, enum fame_list_type type); +typedef void (*HPMHOOK_pre_clif_ranklist_sub) (struct PACKET_ZC_ACK_RANKING_sub **ranks, enum fame_list_type *type); +typedef void (*HPMHOOK_post_clif_ranklist_sub) (struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type); +typedef void (*HPMHOOK_pre_clif_ranklist_sub2) (uint32 **chars, uint32 **points, enum fame_list_type *type); +typedef void (*HPMHOOK_post_clif_ranklist_sub2) (uint32 *chars, uint32 *points, enum fame_list_type type); +typedef void (*HPMHOOK_pre_clif_update_rankingpoint) (struct map_session_data **sd, enum fame_list_type *type, int *points); +typedef void (*HPMHOOK_post_clif_update_rankingpoint) (struct map_session_data *sd, enum fame_list_type type, int points); +typedef void (*HPMHOOK_pre_clif_pRanklist) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRanklist) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_hotkeys) (struct map_session_data **sd, int *tab); +typedef void (*HPMHOOK_post_clif_hotkeys) (struct map_session_data *sd, int tab); +typedef void (*HPMHOOK_pre_clif_hotkeysAll) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_hotkeysAll) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_clif_insight) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_clif_insight) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_clif_outsight) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_clif_outsight) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_clif_skillcastcancel) (struct block_list **bl); +typedef void (*HPMHOOK_post_clif_skillcastcancel) (struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_skill_fail) (struct map_session_data **sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype, int32 *item_id); +typedef void (*HPMHOOK_post_clif_skill_fail) (struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype, int32 item_id); +typedef void (*HPMHOOK_pre_clif_skill_cooldown) (struct map_session_data **sd, uint16 *skill_id, unsigned int *duration); +typedef void (*HPMHOOK_post_clif_skill_cooldown) (struct map_session_data *sd, uint16 skill_id, unsigned int duration); +typedef void (*HPMHOOK_pre_clif_skill_memomessage) (struct map_session_data **sd, int *type); +typedef void (*HPMHOOK_post_clif_skill_memomessage) (struct map_session_data *sd, int type); +typedef void (*HPMHOOK_pre_clif_skill_mapinfomessage) (struct map_session_data **sd, int *type); +typedef void (*HPMHOOK_post_clif_skill_mapinfomessage) (struct map_session_data *sd, int type); +typedef void (*HPMHOOK_pre_clif_skill_produce_mix_list) (struct map_session_data **sd, int *skill_id, int *trigger); +typedef void (*HPMHOOK_post_clif_skill_produce_mix_list) (struct map_session_data *sd, int skill_id, int trigger); +typedef void (*HPMHOOK_pre_clif_cooking_list) (struct map_session_data **sd, int *trigger, uint16 *skill_id, int *qty, int *list_type); +typedef void (*HPMHOOK_post_clif_cooking_list) (struct map_session_data *sd, int trigger, uint16 skill_id, int qty, int list_type); +typedef void (*HPMHOOK_pre_clif_autospell) (struct map_session_data **sd, uint16 *skill_lv); +typedef void (*HPMHOOK_post_clif_autospell) (struct map_session_data *sd, uint16 skill_lv); +typedef void (*HPMHOOK_pre_clif_combo_delay) (struct block_list **bl, int *wait); +typedef void (*HPMHOOK_post_clif_combo_delay) (struct block_list *bl, int wait); +typedef void (*HPMHOOK_pre_clif_status_change) (struct block_list **bl, int *relevant_bl, int *type, int *flag, int *total_tick, int *val1, int *val2, int *val3); +typedef void (*HPMHOOK_post_clif_status_change) (struct block_list *bl, int relevant_bl, int type, int flag, int total_tick, int val1, int val2, int val3); +typedef void (*HPMHOOK_pre_clif_status_change_sub) (struct block_list **bl, int *type, int *relevant_bl, int *flag, int *tick, int *total_tick, int *val1, int *val2, int *val3); +typedef void (*HPMHOOK_post_clif_status_change_sub) (struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3); +typedef void (*HPMHOOK_pre_clif_insert_card) (struct map_session_data **sd, int *idx_equip, int *idx_card, int *flag); +typedef void (*HPMHOOK_post_clif_insert_card) (struct map_session_data *sd, int idx_equip, int idx_card, int flag); +typedef void (*HPMHOOK_pre_clif_inventoryList) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_inventoryList) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_inventoryItems) (struct map_session_data **sd, enum inventory_type *type); +typedef void (*HPMHOOK_post_clif_inventoryItems) (struct map_session_data *sd, enum inventory_type type); +typedef void (*HPMHOOK_pre_clif_equipList) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_equipList) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_equipItems) (struct map_session_data **sd, enum inventory_type *type); +typedef void (*HPMHOOK_post_clif_equipItems) (struct map_session_data *sd, enum inventory_type type); +typedef void (*HPMHOOK_pre_clif_cartList) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_cartList) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_cartItems) (struct map_session_data **sd, enum inventory_type *type); +typedef void (*HPMHOOK_post_clif_cartItems) (struct map_session_data *sd, enum inventory_type type); +typedef void (*HPMHOOK_pre_clif_inventoryExpansionInfo) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_inventoryExpansionInfo) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_inventoryExpandAck) (struct map_session_data **sd, enum expand_inventory *result, int *itemId); +typedef void (*HPMHOOK_post_clif_inventoryExpandAck) (struct map_session_data *sd, enum expand_inventory result, int itemId); +typedef void (*HPMHOOK_pre_clif_inventoryExpandResult) (struct map_session_data **sd, enum expand_inventory_result *result); +typedef void (*HPMHOOK_post_clif_inventoryExpandResult) (struct map_session_data *sd, enum expand_inventory_result result); +typedef void (*HPMHOOK_pre_clif_pInventoryExpansion) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pInventoryExpansion) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pInventoryExpansionConfirmed) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pInventoryExpansionConfirmed) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pInventoryExpansionRejected) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pInventoryExpansionRejected) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_favorite_item) (struct map_session_data **sd, unsigned short *index); +typedef void (*HPMHOOK_post_clif_favorite_item) (struct map_session_data *sd, unsigned short index); +typedef void (*HPMHOOK_pre_clif_clearcart) (int *fd); +typedef void (*HPMHOOK_post_clif_clearcart) (int fd); +typedef void (*HPMHOOK_pre_clif_item_identify_list) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_item_identify_list) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_item_identified) (struct map_session_data **sd, int *idx, int *flag); +typedef void (*HPMHOOK_post_clif_item_identified) (struct map_session_data *sd, int idx, int flag); +typedef void (*HPMHOOK_pre_clif_item_repair_list) (struct map_session_data **sd, struct map_session_data **dstsd, int *lv); +typedef void (*HPMHOOK_post_clif_item_repair_list) (struct map_session_data *sd, struct map_session_data *dstsd, int lv); +typedef void (*HPMHOOK_pre_clif_item_repaireffect) (struct map_session_data **sd, int *idx, int *flag); +typedef void (*HPMHOOK_post_clif_item_repaireffect) (struct map_session_data *sd, int idx, int flag); +typedef void (*HPMHOOK_pre_clif_item_damaged) (struct map_session_data **sd, unsigned short *position); +typedef void (*HPMHOOK_post_clif_item_damaged) (struct map_session_data *sd, unsigned short position); +typedef void (*HPMHOOK_pre_clif_item_refine_list) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_item_refine_list) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_item_skill) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); +typedef void (*HPMHOOK_post_clif_item_skill) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); +typedef void (*HPMHOOK_pre_clif_mvp_item) (struct map_session_data **sd, int *nameid); +typedef void (*HPMHOOK_post_clif_mvp_item) (struct map_session_data *sd, int nameid); +typedef void (*HPMHOOK_pre_clif_mvp_exp) (struct map_session_data **sd, unsigned int *exp); +typedef void (*HPMHOOK_post_clif_mvp_exp) (struct map_session_data *sd, unsigned int exp); +typedef void (*HPMHOOK_pre_clif_mvp_noitem) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_mvp_noitem) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_changed_dir) (struct block_list **bl, enum send_target *target); +typedef void (*HPMHOOK_post_clif_changed_dir) (struct block_list *bl, enum send_target target); +typedef void (*HPMHOOK_pre_clif_blname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_blname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_pcname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_pcname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_homname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_homname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mername_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mername_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_petname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_petname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_npcname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_npcname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_guardian_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_guardian_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_additional_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_additional_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_mobname_normal_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_mobname_normal_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_chatname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_chatname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_elemname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_elemname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_skillname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_skillname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_itemname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_itemname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_unknownname_ack) (int *fd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_unknownname_ack) (int fd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_monster_hp_bar) (struct mob_data **md, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_monster_hp_bar) (struct mob_data *md, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_clif_hpmeter) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_clif_hpmeter) (int retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_hpmeter_single) (int *fd, int *id, unsigned int *hp, unsigned int *maxhp); +typedef void (*HPMHOOK_post_clif_hpmeter_single) (int fd, int id, unsigned int hp, unsigned int maxhp); +typedef int (*HPMHOOK_pre_clif_hpmeter_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_clif_hpmeter_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_clif_upgrademessage) (int *fd, int *result, int *item_id); +typedef void (*HPMHOOK_post_clif_upgrademessage) (int fd, int result, int item_id); +typedef void (*HPMHOOK_pre_clif_get_weapon_view) (struct map_session_data **sd, int **rhand, int **lhand); +typedef void (*HPMHOOK_post_clif_get_weapon_view) (struct map_session_data *sd, int *rhand, int *lhand); +typedef void (*HPMHOOK_pre_clif_gospel_info) (struct map_session_data **sd, int *type); +typedef void (*HPMHOOK_post_clif_gospel_info) (struct map_session_data *sd, int type); +typedef void (*HPMHOOK_pre_clif_feel_req) (int *fd, struct map_session_data **sd, uint16 *skill_lv); +typedef void (*HPMHOOK_post_clif_feel_req) (int fd, struct map_session_data *sd, uint16 skill_lv); +typedef void (*HPMHOOK_pre_clif_starskill) (struct map_session_data **sd, const char **mapname, int *monster_id, unsigned char *star, unsigned char *result); +typedef void (*HPMHOOK_post_clif_starskill) (struct map_session_data *sd, const char *mapname, int monster_id, unsigned char star, unsigned char result); +typedef void (*HPMHOOK_pre_clif_feel_info) (struct map_session_data **sd, unsigned char *feel_level, unsigned char *type); +typedef void (*HPMHOOK_post_clif_feel_info) (struct map_session_data *sd, unsigned char feel_level, unsigned char type); +typedef void (*HPMHOOK_pre_clif_hate_info) (struct map_session_data **sd, unsigned char *hate_level, int *class_, unsigned char *type); +typedef void (*HPMHOOK_post_clif_hate_info) (struct map_session_data *sd, unsigned char hate_level, int class_, unsigned char type); +typedef void (*HPMHOOK_pre_clif_mission_info) (struct map_session_data **sd, int *mob_id, unsigned char *progress); +typedef void (*HPMHOOK_post_clif_mission_info) (struct map_session_data *sd, int mob_id, unsigned char progress); +typedef void (*HPMHOOK_pre_clif_feel_hate_reset) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_feel_hate_reset) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_partytickack) (struct map_session_data **sd, bool *flag); +typedef void (*HPMHOOK_post_clif_partytickack) (struct map_session_data *sd, bool flag); +typedef void (*HPMHOOK_pre_clif_zc_config) (struct map_session_data **sd, enum CZ_CONFIG *type, int *flag); +typedef void (*HPMHOOK_post_clif_zc_config) (struct map_session_data *sd, enum CZ_CONFIG type, int flag); +typedef void (*HPMHOOK_pre_clif_viewequip_ack) (struct map_session_data **sd, struct map_session_data **tsd); +typedef void (*HPMHOOK_post_clif_viewequip_ack) (struct map_session_data *sd, struct map_session_data *tsd); +typedef void (*HPMHOOK_pre_clif_equpcheckbox) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_equpcheckbox) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_displayexp) (struct map_session_data **sd, uint64 *exp, char *type, bool *is_quest); +typedef void (*HPMHOOK_post_clif_displayexp) (struct map_session_data *sd, uint64 exp, char type, bool is_quest); +typedef void (*HPMHOOK_pre_clif_font) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_font) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_progressbar) (struct map_session_data **sd, unsigned int *color, unsigned int *second); +typedef void (*HPMHOOK_post_clif_progressbar) (struct map_session_data *sd, unsigned int color, unsigned int second); +typedef void (*HPMHOOK_pre_clif_progressbar_abort) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_progressbar_abort) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_progressbar_unit) (struct block_list **bl, uint32 *color, uint32 *time); +typedef void (*HPMHOOK_post_clif_progressbar_unit) (struct block_list *bl, uint32 color, uint32 time); +typedef void (*HPMHOOK_pre_clif_showdigit) (struct map_session_data **sd, unsigned char *type, int *value); +typedef void (*HPMHOOK_post_clif_showdigit) (struct map_session_data *sd, unsigned char type, int value); +typedef int (*HPMHOOK_pre_clif_elementalconverter_list) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_clif_elementalconverter_list) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_clif_spellbook_list) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_clif_spellbook_list) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_clif_magicdecoy_list) (struct map_session_data **sd, uint16 *skill_lv, short *x, short *y); +typedef int (*HPMHOOK_post_clif_magicdecoy_list) (int retVal___, struct map_session_data *sd, uint16 skill_lv, short x, short y); +typedef int (*HPMHOOK_pre_clif_poison_list) (struct map_session_data **sd, uint16 *skill_lv); +typedef int (*HPMHOOK_post_clif_poison_list) (int retVal___, struct map_session_data *sd, uint16 skill_lv); +typedef int (*HPMHOOK_pre_clif_autoshadowspell_list) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_clif_autoshadowspell_list) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_clif_skill_itemlistwindow) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_clif_skill_itemlistwindow) (int retVal___, struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); +typedef void (*HPMHOOK_pre_clif_sc_load) (struct block_list **bl, int *tid, enum send_target *target, int *type, int *val1, int *val2, int *val3); +typedef void (*HPMHOOK_post_clif_sc_load) (struct block_list *bl, int tid, enum send_target target, int type, int val1, int val2, int val3); +typedef void (*HPMHOOK_pre_clif_sc_continue) (struct block_list **bl, int *tid, enum send_target *target, int *type, int *val1, int *val2, int *val3); +typedef void (*HPMHOOK_post_clif_sc_continue) (struct block_list *bl, int tid, enum send_target target, int type, int val1, int val2, int val3); +typedef void (*HPMHOOK_pre_clif_sc_end) (struct block_list **bl, int *tid, enum send_target *target, int *type); +typedef void (*HPMHOOK_post_clif_sc_end) (struct block_list *bl, int tid, enum send_target target, int type); +typedef void (*HPMHOOK_pre_clif_initialstatus) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_initialstatus) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_cooldown_list) (int *fd, struct skill_cd **cd); +typedef void (*HPMHOOK_post_clif_cooldown_list) (int fd, struct skill_cd *cd); +typedef void (*HPMHOOK_pre_clif_updatestatus) (struct map_session_data **sd, int *type); +typedef void (*HPMHOOK_post_clif_updatestatus) (struct map_session_data *sd, int type); +typedef void (*HPMHOOK_pre_clif_changestatus) (struct map_session_data **sd, int *type, int *val); +typedef void (*HPMHOOK_post_clif_changestatus) (struct map_session_data *sd, int type, int val); +typedef void (*HPMHOOK_pre_clif_statusupack) (struct map_session_data **sd, int *type, int *ok, int *val); +typedef void (*HPMHOOK_post_clif_statusupack) (struct map_session_data *sd, int type, int ok, int val); +typedef void (*HPMHOOK_pre_clif_movetoattack) (struct map_session_data **sd, struct block_list **bl); +typedef void (*HPMHOOK_post_clif_movetoattack) (struct map_session_data *sd, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_solved_charname) (int *fd, int *charid, const char **name); +typedef void (*HPMHOOK_post_clif_solved_charname) (int fd, int charid, const char *name); +typedef void (*HPMHOOK_pre_clif_charnameupdate) (struct map_session_data **ssd); +typedef void (*HPMHOOK_post_clif_charnameupdate) (struct map_session_data *ssd); +typedef int (*HPMHOOK_pre_clif_delayquit) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_clif_delayquit) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_clif_getareachar_pc) (struct map_session_data **sd, struct map_session_data **dstsd); +typedef void (*HPMHOOK_post_clif_getareachar_pc) (struct map_session_data *sd, struct map_session_data *dstsd); +typedef void (*HPMHOOK_pre_clif_disconnect_ack) (struct map_session_data **sd, short *result); +typedef void (*HPMHOOK_post_clif_disconnect_ack) (struct map_session_data *sd, short result); +typedef void (*HPMHOOK_pre_clif_PVPInfo) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_PVPInfo) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_blacksmith) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_blacksmith) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_alchemist) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_alchemist) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_taekwon) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_taekwon) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_ranking_pk) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_ranking_pk) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_quitsave) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_quitsave) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_misceffect) (struct block_list **bl, int *type); +typedef void (*HPMHOOK_post_clif_misceffect) (struct block_list *bl, int type); +typedef void (*HPMHOOK_pre_clif_changeoption) (struct block_list **bl); +typedef void (*HPMHOOK_post_clif_changeoption) (struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_changeoption_target) (struct block_list **bl, struct block_list **target_bl, enum send_target *target); +typedef void (*HPMHOOK_post_clif_changeoption_target) (struct block_list *bl, struct block_list *target_bl, enum send_target target); +typedef void (*HPMHOOK_pre_clif_changeoption2) (struct block_list **bl); +typedef void (*HPMHOOK_post_clif_changeoption2) (struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_emotion) (struct block_list **bl, int *type); +typedef void (*HPMHOOK_post_clif_emotion) (struct block_list *bl, int type); +typedef void (*HPMHOOK_pre_clif_talkiebox) (struct block_list **bl, const char **talkie); +typedef void (*HPMHOOK_post_clif_talkiebox) (struct block_list *bl, const char *talkie); +typedef void (*HPMHOOK_pre_clif_wedding_effect) (struct block_list **bl); +typedef void (*HPMHOOK_post_clif_wedding_effect) (struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_divorced) (struct map_session_data **sd, const char **name); +typedef void (*HPMHOOK_post_clif_divorced) (struct map_session_data *sd, const char *name); +typedef void (*HPMHOOK_pre_clif_callpartner) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_callpartner) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_clif_skill_damage) (struct block_list **src, struct block_list **dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, enum battle_dmg_type *type); +typedef int (*HPMHOOK_post_clif_skill_damage) (int retVal___, struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, enum battle_dmg_type type); +typedef int (*HPMHOOK_pre_clif_skill_nodamage) (struct block_list **src, struct block_list **dst, uint16 *skill_id, int *heal, int *fail); +typedef int (*HPMHOOK_post_clif_skill_nodamage) (int retVal___, struct block_list *src, struct block_list *dst, uint16 skill_id, int heal, int fail); +typedef void (*HPMHOOK_pre_clif_skill_poseffect) (struct block_list **src, uint16 *skill_id, int *val, int *x, int *y, int64 *tick); +typedef void (*HPMHOOK_post_clif_skill_poseffect) (struct block_list *src, uint16 skill_id, int val, int x, int y, int64 tick); +typedef void (*HPMHOOK_pre_clif_skill_estimation) (struct map_session_data **sd, struct block_list **dst); +typedef void (*HPMHOOK_post_clif_skill_estimation) (struct map_session_data *sd, struct block_list *dst); +typedef void (*HPMHOOK_pre_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); +typedef void (*HPMHOOK_post_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); +typedef void (*HPMHOOK_pre_clif_useskill) (struct block_list **bl, int *src_id, int *dst_id, int *dst_x, int *dst_y, uint16 *skill_id, uint16 *skill_lv, int *casttime); +typedef void (*HPMHOOK_post_clif_useskill) (struct block_list *bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, uint16 skill_lv, int casttime); +typedef void (*HPMHOOK_pre_clif_produce_effect) (struct map_session_data **sd, int *flag, int *nameid); +typedef void (*HPMHOOK_post_clif_produce_effect) (struct map_session_data *sd, int flag, int nameid); +typedef void (*HPMHOOK_pre_clif_devotion) (struct block_list **src, struct map_session_data **tsd); +typedef void (*HPMHOOK_post_clif_devotion) (struct block_list *src, struct map_session_data *tsd); +typedef void (*HPMHOOK_pre_clif_spiritball) (struct block_list **bl); +typedef void (*HPMHOOK_post_clif_spiritball) (struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_spiritball_single) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_spiritball_single) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_bladestop) (struct block_list **src, int *dst_id, int *active); +typedef void (*HPMHOOK_post_clif_bladestop) (struct block_list *src, int dst_id, int active); +typedef void (*HPMHOOK_pre_clif_mvp_effect) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_mvp_effect) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_heal) (int *fd, int *type, int *val); +typedef void (*HPMHOOK_post_clif_heal) (int fd, int type, int val); +typedef void (*HPMHOOK_pre_clif_resurrection) (struct block_list **bl, int *type); +typedef void (*HPMHOOK_post_clif_resurrection) (struct block_list *bl, int type); +typedef void (*HPMHOOK_pre_clif_refine) (int *fd, int *fail, int *index, int *val); +typedef void (*HPMHOOK_post_clif_refine) (int fd, int fail, int index, int val); +typedef void (*HPMHOOK_pre_clif_weather) (int16 *m); +typedef void (*HPMHOOK_post_clif_weather) (int16 m); +typedef void (*HPMHOOK_pre_clif_specialeffect) (struct block_list **bl, int *type, enum send_target *target); +typedef void (*HPMHOOK_post_clif_specialeffect) (struct block_list *bl, int type, enum send_target target); +typedef void (*HPMHOOK_pre_clif_specialeffect_single) (struct block_list **bl, int *type, int *fd); +typedef void (*HPMHOOK_post_clif_specialeffect_single) (struct block_list *bl, int type, int fd); +typedef void (*HPMHOOK_pre_clif_specialeffect_value) (struct block_list **bl, int *effect_id, uint64 *num, send_target *target); +typedef void (*HPMHOOK_post_clif_specialeffect_value) (struct block_list *bl, int effect_id, uint64 num, send_target target); +typedef void (*HPMHOOK_pre_clif_specialeffect_value_single) (struct block_list **bl, int *effect_id, uint64 *num, int *fd); +typedef void (*HPMHOOK_post_clif_specialeffect_value_single) (struct block_list *bl, int effect_id, uint64 num, int fd); +typedef void (*HPMHOOK_pre_clif_removeSpecialEffect) (struct block_list **bl, int *effectId, enum send_target *target); +typedef void (*HPMHOOK_post_clif_removeSpecialEffect) (struct block_list *bl, int effectId, enum send_target target); +typedef void (*HPMHOOK_pre_clif_removeSpecialEffect_single) (struct block_list **bl, int *effectId, struct block_list **targetBl); +typedef void (*HPMHOOK_post_clif_removeSpecialEffect_single) (struct block_list *bl, int effectId, struct block_list *targetBl); +typedef void (*HPMHOOK_pre_clif_millenniumshield) (struct block_list **bl, short *shields); +typedef void (*HPMHOOK_post_clif_millenniumshield) (struct block_list *bl, short shields); +typedef void (*HPMHOOK_pre_clif_spiritcharm) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_spiritcharm) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_charm_single) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_charm_single) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_snap) (struct block_list **bl, short *x, short *y); +typedef void (*HPMHOOK_post_clif_snap) (struct block_list *bl, short x, short y); +typedef void (*HPMHOOK_pre_clif_weather_check) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_weather_check) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_playBGM) (struct map_session_data **sd, const char **name); +typedef void (*HPMHOOK_post_clif_playBGM) (struct map_session_data *sd, const char *name); +typedef void (*HPMHOOK_pre_clif_soundeffect) (struct map_session_data **sd, struct block_list **bl, const char **name, int *type); +typedef void (*HPMHOOK_post_clif_soundeffect) (struct map_session_data *sd, struct block_list *bl, const char *name, int type); +typedef void (*HPMHOOK_pre_clif_soundeffectall) (struct block_list **bl, const char **name, int *type, enum send_target *coverage); +typedef void (*HPMHOOK_post_clif_soundeffectall) (struct block_list *bl, const char *name, int type, enum send_target coverage); +typedef void (*HPMHOOK_pre_clif_GlobalMessage) (struct block_list **bl, const char **message); +typedef void (*HPMHOOK_post_clif_GlobalMessage) (struct block_list *bl, const char *message); +typedef void (*HPMHOOK_pre_clif_createchat) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_createchat) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_dispchat) (struct chat_data **cd, int *fd); +typedef void (*HPMHOOK_post_clif_dispchat) (struct chat_data *cd, int fd); +typedef void (*HPMHOOK_pre_clif_joinchatfail) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_joinchatfail) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_joinchatok) (struct map_session_data **sd, struct chat_data **cd); +typedef void (*HPMHOOK_post_clif_joinchatok) (struct map_session_data *sd, struct chat_data *cd); +typedef void (*HPMHOOK_pre_clif_addchat) (struct chat_data **cd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_addchat) (struct chat_data *cd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_changechatowner) (struct chat_data **cd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_changechatowner) (struct chat_data *cd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_chatRoleChange) (struct chat_data **cd, struct map_session_data **sd, struct block_list **bl, int *isNotOwner); +typedef void (*HPMHOOK_post_clif_chatRoleChange) (struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner); +typedef void (*HPMHOOK_pre_clif_clearchat) (struct chat_data **cd, int *fd); +typedef void (*HPMHOOK_post_clif_clearchat) (struct chat_data *cd, int fd); +typedef void (*HPMHOOK_pre_clif_leavechat) (struct chat_data **cd, struct map_session_data **sd, bool *flag); +typedef void (*HPMHOOK_post_clif_leavechat) (struct chat_data *cd, struct map_session_data *sd, bool flag); +typedef void (*HPMHOOK_pre_clif_changechatstatus) (struct chat_data **cd); +typedef void (*HPMHOOK_post_clif_changechatstatus) (struct chat_data *cd); +typedef void (*HPMHOOK_pre_clif_wis_message) (int *fd, const char **nick, const char **mes, int *mes_len); +typedef void (*HPMHOOK_post_clif_wis_message) (int fd, const char *nick, const char *mes, int mes_len); +typedef void (*HPMHOOK_pre_clif_wis_end) (int *fd, int *flag); +typedef void (*HPMHOOK_post_clif_wis_end) (int fd, int flag); +typedef void (*HPMHOOK_pre_clif_disp_message) (struct block_list **src, const char **mes, enum send_target *target); +typedef void (*HPMHOOK_post_clif_disp_message) (struct block_list *src, const char *mes, enum send_target target); +typedef void (*HPMHOOK_pre_clif_broadcast) (struct block_list **bl, const char **mes, int *len, int *type, enum send_target *target); +typedef void (*HPMHOOK_post_clif_broadcast) (struct block_list *bl, const char *mes, int len, int type, enum send_target target); +typedef void (*HPMHOOK_pre_clif_broadcast2) (struct block_list **bl, const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target); +typedef void (*HPMHOOK_post_clif_broadcast2) (struct block_list *bl, const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target); +typedef void (*HPMHOOK_pre_clif_messagecolor_self) (int *fd, uint32 *color, const char **msg); +typedef void (*HPMHOOK_post_clif_messagecolor_self) (int fd, uint32 color, const char *msg); +typedef void (*HPMHOOK_pre_clif_messagecolor) (struct block_list **bl, uint32 *color, const char **msg); +typedef void (*HPMHOOK_post_clif_messagecolor) (struct block_list *bl, uint32 color, const char *msg); +typedef void (*HPMHOOK_pre_clif_serviceMessageColor) (struct map_session_data **sd, uint32 *color, const char **msg); +typedef void (*HPMHOOK_post_clif_serviceMessageColor) (struct map_session_data *sd, uint32 color, const char *msg); +typedef void (*HPMHOOK_pre_clif_disp_overhead) (struct block_list **bl, const char **mes, enum send_target *target, struct block_list **target_bl); +typedef void (*HPMHOOK_post_clif_disp_overhead) (struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl); +typedef void (*HPMHOOK_pre_clif_notify_playerchat) (struct block_list **bl, const char **mes); +typedef void (*HPMHOOK_post_clif_notify_playerchat) (struct block_list *bl, const char *mes); +typedef void (*HPMHOOK_pre_clif_msgtable) (struct map_session_data **sd, enum clif_messages *msg_id); +typedef void (*HPMHOOK_post_clif_msgtable) (struct map_session_data *sd, enum clif_messages msg_id); +typedef void (*HPMHOOK_pre_clif_msgtable_num) (struct map_session_data **sd, enum clif_messages *msg_id, int *value); +typedef void (*HPMHOOK_post_clif_msgtable_num) (struct map_session_data *sd, enum clif_messages msg_id, int value); +typedef void (*HPMHOOK_pre_clif_msgtable_skill) (struct map_session_data **sd, uint16 *skill_id, enum clif_messages *msg_id); +typedef void (*HPMHOOK_post_clif_msgtable_skill) (struct map_session_data *sd, uint16 skill_id, enum clif_messages msg_id); +typedef void (*HPMHOOK_pre_clif_msgtable_str) (struct map_session_data **sd, enum clif_messages *p1, const char **value); +typedef void (*HPMHOOK_post_clif_msgtable_str) (struct map_session_data *sd, enum clif_messages p1, const char *value); +typedef void (*HPMHOOK_pre_clif_msgtable_str_color) (struct map_session_data **sd, enum clif_messages *p1, const char **value, uint32 *color); +typedef void (*HPMHOOK_post_clif_msgtable_str_color) (struct map_session_data *sd, enum clif_messages p1, const char *value, uint32 color); +typedef void (*HPMHOOK_pre_clif_msgtable_color) (struct map_session_data **sd, enum clif_messages *p1, uint32 *color); +typedef void (*HPMHOOK_post_clif_msgtable_color) (struct map_session_data *sd, enum clif_messages p1, uint32 color); +typedef void (*HPMHOOK_pre_clif_message) (const int *fd, const char **mes); +typedef void (*HPMHOOK_post_clif_message) (const int fd, const char *mes); +typedef void (*HPMHOOK_pre_clif_messageln) (const int *fd, const char **mes); +typedef void (*HPMHOOK_post_clif_messageln) (const int fd, const char *mes); +typedef const char* (*HPMHOOK_pre_clif_process_chat_message) (struct map_session_data **sd, const struct packet_chat_message **packet, char **out_buf, int *out_buflen); +typedef const char* (*HPMHOOK_post_clif_process_chat_message) (const char* retVal___, struct map_session_data *sd, const struct packet_chat_message *packet, char *out_buf, int out_buflen); +typedef bool (*HPMHOOK_pre_clif_process_whisper_message) (struct map_session_data **sd, const struct packet_whisper_message **packet, char **out_name, char **out_message, int *out_messagelen); +typedef bool (*HPMHOOK_post_clif_process_whisper_message) (bool retVal___, struct map_session_data *sd, const struct packet_whisper_message *packet, char *out_name, char *out_message, int out_messagelen); +typedef void (*HPMHOOK_pre_clif_wisexin) (struct map_session_data **sd, int *type, int *flag); +typedef void (*HPMHOOK_post_clif_wisexin) (struct map_session_data *sd, int type, int flag); +typedef void (*HPMHOOK_pre_clif_wisall) (struct map_session_data **sd, int *type, int *flag); +typedef void (*HPMHOOK_post_clif_wisall) (struct map_session_data *sd, int type, int flag); +typedef void (*HPMHOOK_pre_clif_PMIgnoreList) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_PMIgnoreList) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_ShowScript) (struct block_list **bl, const char **message, enum send_target *target); +typedef void (*HPMHOOK_post_clif_ShowScript) (struct block_list *bl, const char *message, enum send_target target); +typedef void (*HPMHOOK_pre_clif_traderequest) (struct map_session_data **sd, const char **name); +typedef void (*HPMHOOK_post_clif_traderequest) (struct map_session_data *sd, const char *name); +typedef void (*HPMHOOK_pre_clif_tradestart) (struct map_session_data **sd, uint8 *type); +typedef void (*HPMHOOK_post_clif_tradestart) (struct map_session_data *sd, uint8 type); +typedef void (*HPMHOOK_pre_clif_tradeadditem) (struct map_session_data **sd, struct map_session_data **tsd, int *index, int *amount); +typedef void (*HPMHOOK_post_clif_tradeadditem) (struct map_session_data *sd, struct map_session_data *tsd, int index, int amount); +typedef void (*HPMHOOK_pre_clif_tradeitemok) (struct map_session_data **sd, int *index, int *fail); +typedef void (*HPMHOOK_post_clif_tradeitemok) (struct map_session_data *sd, int index, int fail); +typedef void (*HPMHOOK_pre_clif_tradedeal_lock) (struct map_session_data **sd, int *fail); +typedef void (*HPMHOOK_post_clif_tradedeal_lock) (struct map_session_data *sd, int fail); +typedef void (*HPMHOOK_pre_clif_tradecancelled) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_tradecancelled) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_tradecompleted) (struct map_session_data **sd, int *fail); +typedef void (*HPMHOOK_post_clif_tradecompleted) (struct map_session_data *sd, int fail); +typedef void (*HPMHOOK_pre_clif_tradeundo) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_tradeundo) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_openvendingreq) (struct map_session_data **sd, int *num); +typedef void (*HPMHOOK_post_clif_openvendingreq) (struct map_session_data *sd, int num); +typedef void (*HPMHOOK_pre_clif_showvendingboard) (struct block_list **bl, const char **message, int *fd); +typedef void (*HPMHOOK_post_clif_showvendingboard) (struct block_list *bl, const char *message, int fd); +typedef void (*HPMHOOK_pre_clif_closevendingboard) (struct block_list **bl, int *fd); +typedef void (*HPMHOOK_post_clif_closevendingboard) (struct block_list *bl, int fd); +typedef void (*HPMHOOK_pre_clif_vendinglist) (struct map_session_data **sd, unsigned int *id, struct s_vending **vending_list); +typedef void (*HPMHOOK_post_clif_vendinglist) (struct map_session_data *sd, unsigned int id, struct s_vending *vending_list); +typedef void (*HPMHOOK_pre_clif_buyvending) (struct map_session_data **sd, int *index, int *amount, int *fail); +typedef void (*HPMHOOK_post_clif_buyvending) (struct map_session_data *sd, int index, int amount, int fail); +typedef void (*HPMHOOK_pre_clif_openvending) (struct map_session_data **sd, int *id, struct s_vending **vending_list); +typedef void (*HPMHOOK_post_clif_openvending) (struct map_session_data *sd, int id, struct s_vending *vending_list); +typedef void (*HPMHOOK_pre_clif_openvendingAck) (int *fd, int *result); +typedef void (*HPMHOOK_post_clif_openvendingAck) (int fd, int result); +typedef void (*HPMHOOK_pre_clif_vendingreport) (struct map_session_data **sd, int *index, int *amount, uint32 *char_id, int *zeny); +typedef void (*HPMHOOK_post_clif_vendingreport) (struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny); +typedef void (*HPMHOOK_pre_clif_storageList) (struct map_session_data **sd, struct item **items, int *items_length); +typedef void (*HPMHOOK_post_clif_storageList) (struct map_session_data *sd, struct item *items, int items_length); +typedef void (*HPMHOOK_pre_clif_guildStorageList) (struct map_session_data **sd, struct item **items, int *items_length); +typedef void (*HPMHOOK_post_clif_guildStorageList) (struct map_session_data *sd, struct item *items, int items_length); +typedef void (*HPMHOOK_pre_clif_storageItems) (struct map_session_data **sd, enum inventory_type *type, struct item **items, int *items_length); +typedef void (*HPMHOOK_post_clif_storageItems) (struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length); +typedef void (*HPMHOOK_pre_clif_inventoryStart) (struct map_session_data **sd, enum inventory_type *type, const char **name); +typedef void (*HPMHOOK_post_clif_inventoryStart) (struct map_session_data *sd, enum inventory_type type, const char *name); +typedef void (*HPMHOOK_pre_clif_inventoryEnd) (struct map_session_data **sd, enum inventory_type *type); +typedef void (*HPMHOOK_post_clif_inventoryEnd) (struct map_session_data *sd, enum inventory_type type); +typedef void (*HPMHOOK_pre_clif_updatestorageamount) (struct map_session_data **sd, int *amount, int *max_amount); +typedef void (*HPMHOOK_post_clif_updatestorageamount) (struct map_session_data *sd, int amount, int max_amount); +typedef void (*HPMHOOK_pre_clif_storageitemadded) (struct map_session_data **sd, struct item **i, int *index, int *amount); +typedef void (*HPMHOOK_post_clif_storageitemadded) (struct map_session_data *sd, struct item *i, int index, int amount); +typedef void (*HPMHOOK_pre_clif_storageitemremoved) (struct map_session_data **sd, int *index, int *amount); +typedef void (*HPMHOOK_post_clif_storageitemremoved) (struct map_session_data *sd, int index, int amount); +typedef void (*HPMHOOK_pre_clif_storageclose) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_storageclose) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_skillinfoblock) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_skillinfoblock) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_skillup) (struct map_session_data **sd, uint16 *skill_id, int *skill_lv, int *flag); +typedef void (*HPMHOOK_post_clif_skillup) (struct map_session_data *sd, uint16 skill_id, int skill_lv, int flag); +typedef void (*HPMHOOK_pre_clif_skillinfo) (struct map_session_data **sd, int *skill_id, int *inf); +typedef void (*HPMHOOK_post_clif_skillinfo) (struct map_session_data *sd, int skill_id, int inf); +typedef void (*HPMHOOK_pre_clif_addskill) (struct map_session_data **sd, int *id); +typedef void (*HPMHOOK_post_clif_addskill) (struct map_session_data *sd, int id); +typedef void (*HPMHOOK_pre_clif_deleteskill) (struct map_session_data **sd, int *id); +typedef void (*HPMHOOK_post_clif_deleteskill) (struct map_session_data *sd, int id); +typedef void (*HPMHOOK_pre_clif_playerSkillToPacket) (struct map_session_data **sd, struct SKILLDATA **skillData, int *skillId, int *idx, bool *newSkill); +typedef void (*HPMHOOK_post_clif_playerSkillToPacket) (struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill); +typedef void (*HPMHOOK_pre_clif_party_created) (struct map_session_data **sd, int *result); +typedef void (*HPMHOOK_post_clif_party_created) (struct map_session_data *sd, int result); +typedef void (*HPMHOOK_pre_clif_party_member_info) (struct party_data **p, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_party_member_info) (struct party_data *p, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_party_info) (struct party_data **p, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_party_info) (struct party_data *p, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_party_job_and_level) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_party_job_and_level) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_party_invite) (struct map_session_data **sd, struct map_session_data **tsd); +typedef void (*HPMHOOK_post_clif_party_invite) (struct map_session_data *sd, struct map_session_data *tsd); +typedef void (*HPMHOOK_pre_clif_party_inviteack) (struct map_session_data **sd, const char **nick, int *result); +typedef void (*HPMHOOK_post_clif_party_inviteack) (struct map_session_data *sd, const char *nick, int result); +typedef void (*HPMHOOK_pre_clif_party_option) (struct party_data **p, struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_party_option) (struct party_data *p, struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_party_withdraw) (struct party_data **p, struct map_session_data **sd, int *account_id, const char **name, int *flag); +typedef void (*HPMHOOK_post_clif_party_withdraw) (struct party_data *p, struct map_session_data *sd, int account_id, const char *name, int flag); +typedef void (*HPMHOOK_pre_clif_party_message) (struct party_data **p, int *account_id, const char **mes, int *len); +typedef void (*HPMHOOK_post_clif_party_message) (struct party_data *p, int account_id, const char *mes, int len); +typedef void (*HPMHOOK_pre_clif_party_xy) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_party_xy) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_party_xy_single) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_party_xy_single) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_party_hp) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_party_hp) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_party_xy_remove) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_party_xy_remove) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_party_show_picker) (struct map_session_data **sd, struct item **item_data); +typedef void (*HPMHOOK_post_clif_party_show_picker) (struct map_session_data *sd, struct item *item_data); +typedef void (*HPMHOOK_pre_clif_partyinvitationstate) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_partyinvitationstate) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_PartyLeaderChanged) (struct map_session_data **sd, int *prev_leader_aid, int *new_leader_aid); +typedef void (*HPMHOOK_post_clif_PartyLeaderChanged) (struct map_session_data *sd, int prev_leader_aid, int new_leader_aid); +typedef void (*HPMHOOK_pre_clif_guild_created) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_guild_created) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_guild_belonginfo) (struct map_session_data **sd, struct guild **g); +typedef void (*HPMHOOK_post_clif_guild_belonginfo) (struct map_session_data *sd, struct guild *g); +typedef void (*HPMHOOK_pre_clif_guild_masterormember) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_masterormember) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_basicinfo) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_basicinfo) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_allianceinfo) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_allianceinfo) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_castlelist) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_castlelist) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_castleinfo) (struct map_session_data **sd, struct guild_castle **gc); +typedef void (*HPMHOOK_post_clif_guild_castleinfo) (struct map_session_data *sd, struct guild_castle *gc); +typedef void (*HPMHOOK_pre_clif_guild_memberlist) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_memberlist) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_skillinfo) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_skillinfo) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_send_onlineinfo) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_send_onlineinfo) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_memberlogin_notice) (struct guild **g, int *idx, int *flag); +typedef void (*HPMHOOK_post_clif_guild_memberlogin_notice) (struct guild *g, int idx, int flag); +typedef void (*HPMHOOK_pre_clif_guild_invite) (struct map_session_data **sd, struct guild **g); +typedef void (*HPMHOOK_post_clif_guild_invite) (struct map_session_data *sd, struct guild *g); +typedef void (*HPMHOOK_pre_clif_guild_inviteack) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_guild_inviteack) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_guild_leave) (struct map_session_data **sd, const char **name, int *char_id, const char **mes); +typedef void (*HPMHOOK_post_clif_guild_leave) (struct map_session_data *sd, const char *name, int char_id, const char *mes); +typedef void (*HPMHOOK_pre_clif_guild_expulsion) (struct map_session_data **sd, const char **name, int *char_id, const char **mes, int *account_id); +typedef void (*HPMHOOK_post_clif_guild_expulsion) (struct map_session_data *sd, const char *name, int char_id, const char *mes, int account_id); +typedef void (*HPMHOOK_pre_clif_guild_positionchanged) (struct guild **g, int *idx); +typedef void (*HPMHOOK_post_clif_guild_positionchanged) (struct guild *g, int idx); +typedef void (*HPMHOOK_pre_clif_guild_memberpositionchanged) (struct guild **g, int *idx); +typedef void (*HPMHOOK_post_clif_guild_memberpositionchanged) (struct guild *g, int idx); +typedef void (*HPMHOOK_pre_clif_guild_emblem) (struct map_session_data **sd, struct guild **g); +typedef void (*HPMHOOK_post_clif_guild_emblem) (struct map_session_data *sd, struct guild *g); +typedef void (*HPMHOOK_pre_clif_guild_emblem_area) (struct block_list **bl); +typedef void (*HPMHOOK_post_clif_guild_emblem_area) (struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_guild_notice) (struct map_session_data **sd, struct guild **g); +typedef void (*HPMHOOK_post_clif_guild_notice) (struct map_session_data *sd, struct guild *g); +typedef void (*HPMHOOK_pre_clif_guild_message) (struct guild **g, int *account_id, const char **mes, int *len); +typedef void (*HPMHOOK_post_clif_guild_message) (struct guild *g, int account_id, const char *mes, int len); +typedef void (*HPMHOOK_pre_clif_guild_reqalliance) (struct map_session_data **sd, int *account_id, const char **name); +typedef void (*HPMHOOK_post_clif_guild_reqalliance) (struct map_session_data *sd, int account_id, const char *name); +typedef void (*HPMHOOK_pre_clif_guild_allianceack) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_guild_allianceack) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_guild_delalliance) (struct map_session_data **sd, int *guild_id, int *flag); +typedef void (*HPMHOOK_post_clif_guild_delalliance) (struct map_session_data *sd, int guild_id, int flag); +typedef void (*HPMHOOK_pre_clif_guild_oppositionack) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_guild_oppositionack) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_guild_broken) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_guild_broken) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_guild_xy) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_xy) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_xy_single) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_xy_single) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_xy_remove) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_xy_remove) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_positionnamelist) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_positionnamelist) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_positioninfolist) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_positioninfolist) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_expulsionlist) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_expulsionlist) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_set_position) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_set_position) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_position_selected) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_guild_position_selected) (struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_clif_validate_emblem) (const uint8 **emblem, unsigned long *emblem_len); +typedef bool (*HPMHOOK_post_clif_validate_emblem) (bool retVal___, const uint8 *emblem, unsigned long emblem_len); +typedef void (*HPMHOOK_pre_clif_bg_hp) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_bg_hp) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_bg_xy) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_bg_xy) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_bg_xy_remove) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_bg_xy_remove) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_bg_message) (struct battleground_data **bgd, int *src_id, const char **name, const char **mes); +typedef void (*HPMHOOK_post_clif_bg_message) (struct battleground_data *bgd, int src_id, const char *name, const char *mes); +typedef void (*HPMHOOK_pre_clif_bg_updatescore) (int16 *m); +typedef void (*HPMHOOK_post_clif_bg_updatescore) (int16 m); +typedef void (*HPMHOOK_pre_clif_bg_updatescore_single) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_bg_updatescore_single) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_sendbgemblem_area) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_sendbgemblem_area) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_sendbgemblem_single) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_sendbgemblem_single) (int fd, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_clif_instance) (int *instance_id, int *type, int *flag); +typedef int (*HPMHOOK_post_clif_instance) (int retVal___, int instance_id, int type, int flag); +typedef void (*HPMHOOK_pre_clif_instance_join) (int *fd, int *instance_id); +typedef void (*HPMHOOK_post_clif_instance_join) (int fd, int instance_id); +typedef void (*HPMHOOK_pre_clif_instance_leave) (int *fd); +typedef void (*HPMHOOK_post_clif_instance_leave) (int fd); +typedef void (*HPMHOOK_pre_clif_catch_process) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_catch_process) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pet_roulette) (struct map_session_data **sd, int *data); +typedef void (*HPMHOOK_post_clif_pet_roulette) (struct map_session_data *sd, int data); +typedef void (*HPMHOOK_pre_clif_sendegg) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_sendegg) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_send_petstatus) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_send_petstatus) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_send_petdata) (struct map_session_data **sd, struct pet_data **pd, int *type, int *param); +typedef void (*HPMHOOK_post_clif_send_petdata) (struct map_session_data *sd, struct pet_data *pd, int type, int param); +typedef void (*HPMHOOK_pre_clif_pet_emotion) (struct pet_data **pd, int *param); +typedef void (*HPMHOOK_post_clif_pet_emotion) (struct pet_data *pd, int param); +typedef void (*HPMHOOK_pre_clif_pet_food) (struct map_session_data **sd, int *foodid, int *fail); +typedef void (*HPMHOOK_post_clif_pet_food) (struct map_session_data *sd, int foodid, int fail); +typedef int (*HPMHOOK_pre_clif_friendslist_toggle_sub) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_clif_friendslist_toggle_sub) (int retVal___, struct map_session_data *sd, va_list ap); +typedef void (*HPMHOOK_pre_clif_friendslist_send) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_friendslist_send) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_friendslist_reqack) (struct map_session_data **sd, struct map_session_data **f_sd, int *type); +typedef void (*HPMHOOK_post_clif_friendslist_reqack) (struct map_session_data *sd, struct map_session_data *f_sd, int type); +typedef void (*HPMHOOK_pre_clif_friendslist_toggle) (struct map_session_data **sd, int *account_id, int *char_id, int *online); +typedef void (*HPMHOOK_post_clif_friendslist_toggle) (struct map_session_data *sd, int account_id, int char_id, int online); +typedef void (*HPMHOOK_pre_clif_friendlist_req) (struct map_session_data **sd, int *account_id, int *char_id, const char **name); +typedef void (*HPMHOOK_post_clif_friendlist_req) (struct map_session_data *sd, int account_id, int char_id, const char *name); +typedef void (*HPMHOOK_pre_clif_GM_kickack) (struct map_session_data **sd, int *result); +typedef void (*HPMHOOK_post_clif_GM_kickack) (struct map_session_data *sd, int result); +typedef void (*HPMHOOK_pre_clif_GM_kick) (struct map_session_data **sd, struct map_session_data **tsd); +typedef void (*HPMHOOK_post_clif_GM_kick) (struct map_session_data *sd, struct map_session_data *tsd); +typedef void (*HPMHOOK_pre_clif_manner_message) (struct map_session_data **sd, uint32 *type); +typedef void (*HPMHOOK_post_clif_manner_message) (struct map_session_data *sd, uint32 type); +typedef void (*HPMHOOK_pre_clif_GM_silence) (struct map_session_data **sd, struct map_session_data **tsd, uint8 *type); +typedef void (*HPMHOOK_post_clif_GM_silence) (struct map_session_data *sd, struct map_session_data *tsd, uint8 type); +typedef void (*HPMHOOK_pre_clif_account_name) (struct map_session_data **sd, int *account_id, const char **accname); +typedef void (*HPMHOOK_post_clif_account_name) (struct map_session_data *sd, int account_id, const char *accname); +typedef void (*HPMHOOK_pre_clif_check) (int *fd, struct map_session_data **pl_sd); +typedef void (*HPMHOOK_post_clif_check) (int fd, struct map_session_data *pl_sd); +typedef void (*HPMHOOK_pre_clif_hominfo) (struct map_session_data **sd, struct homun_data **hd, int *flag); +typedef void (*HPMHOOK_post_clif_hominfo) (struct map_session_data *sd, struct homun_data *hd, int flag); +typedef void (*HPMHOOK_pre_clif_homskillinfoblock) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_homskillinfoblock) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_homskillup) (struct map_session_data **sd, uint16 *skill_id); +typedef void (*HPMHOOK_post_clif_homskillup) (struct map_session_data *sd, uint16 skill_id); +typedef void (*HPMHOOK_pre_clif_hom_food) (struct map_session_data **sd, int *foodid, int *fail); +typedef void (*HPMHOOK_post_clif_hom_food) (struct map_session_data *sd, int foodid, int fail); +typedef void (*HPMHOOK_pre_clif_send_homdata) (struct map_session_data **sd, int *state, int *param); +typedef void (*HPMHOOK_post_clif_send_homdata) (struct map_session_data *sd, int state, int param); +typedef void (*HPMHOOK_pre_clif_quest_send_list) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_quest_send_list) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_quest_send_mission) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_quest_send_mission) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_quest_add) (struct map_session_data **sd, struct quest **qd); +typedef void (*HPMHOOK_post_clif_quest_add) (struct map_session_data *sd, struct quest *qd); +typedef void (*HPMHOOK_pre_clif_quest_delete) (struct map_session_data **sd, int *quest_id); +typedef void (*HPMHOOK_post_clif_quest_delete) (struct map_session_data *sd, int quest_id); +typedef void (*HPMHOOK_pre_clif_quest_update_status) (struct map_session_data **sd, int *quest_id, bool *active); +typedef void (*HPMHOOK_post_clif_quest_update_status) (struct map_session_data *sd, int quest_id, bool active); +typedef void (*HPMHOOK_pre_clif_quest_update_objective) (struct map_session_data **sd, struct quest **qd); +typedef void (*HPMHOOK_post_clif_quest_update_objective) (struct map_session_data *sd, struct quest *qd); +typedef void (*HPMHOOK_pre_clif_quest_notify_objective) (struct map_session_data **sd, struct quest **qd); +typedef void (*HPMHOOK_post_clif_quest_notify_objective) (struct map_session_data *sd, struct quest *qd); +typedef void (*HPMHOOK_pre_clif_quest_show_event) (struct map_session_data **sd, struct block_list **bl, short *state, short *color); +typedef void (*HPMHOOK_post_clif_quest_show_event) (struct map_session_data *sd, struct block_list *bl, short state, short color); +typedef void (*HPMHOOK_pre_clif_mail_window) (int *fd, int *flag); +typedef void (*HPMHOOK_post_clif_mail_window) (int fd, int flag); +typedef void (*HPMHOOK_pre_clif_mail_read) (struct map_session_data **sd, int *mail_id); +typedef void (*HPMHOOK_post_clif_mail_read) (struct map_session_data *sd, int mail_id); +typedef void (*HPMHOOK_pre_clif_mail_delete) (int *fd, int *mail_id, short *fail); +typedef void (*HPMHOOK_post_clif_mail_delete) (int fd, int mail_id, short fail); +typedef void (*HPMHOOK_pre_clif_mail_return) (int *fd, int *mail_id, short *fail); +typedef void (*HPMHOOK_post_clif_mail_return) (int fd, int mail_id, short fail); +typedef void (*HPMHOOK_pre_clif_mail_send) (int *fd, bool *fail); +typedef void (*HPMHOOK_post_clif_mail_send) (int fd, bool fail); +typedef void (*HPMHOOK_pre_clif_mail_new) (int *fd, int *mail_id, const char **sender, const char **title); +typedef void (*HPMHOOK_post_clif_mail_new) (int fd, int mail_id, const char *sender, const char *title); +typedef void (*HPMHOOK_pre_clif_mail_refreshinbox) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_mail_refreshinbox) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_mail_getattachment) (int *fd, uint8 *flag); +typedef void (*HPMHOOK_post_clif_mail_getattachment) (int fd, uint8 flag); +typedef void (*HPMHOOK_pre_clif_mail_setattachment) (int *fd, int *index, uint8 *flag); +typedef void (*HPMHOOK_post_clif_mail_setattachment) (int fd, int index, uint8 flag); +typedef void (*HPMHOOK_pre_clif_auction_openwindow) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_auction_openwindow) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_auction_results) (struct map_session_data **sd, short *count, short *pages, const uint8 **buf); +typedef void (*HPMHOOK_post_clif_auction_results) (struct map_session_data *sd, short count, short pages, const uint8 *buf); +typedef void (*HPMHOOK_pre_clif_auction_message) (int *fd, unsigned char *flag); +typedef void (*HPMHOOK_post_clif_auction_message) (int fd, unsigned char flag); +typedef void (*HPMHOOK_pre_clif_auction_close) (int *fd, unsigned char *flag); +typedef void (*HPMHOOK_post_clif_auction_close) (int fd, unsigned char flag); +typedef void (*HPMHOOK_pre_clif_auction_setitem) (int *fd, int *index, bool *fail); +typedef void (*HPMHOOK_post_clif_auction_setitem) (int fd, int index, bool fail); +typedef void (*HPMHOOK_pre_clif_mercenary_info) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_mercenary_info) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_mercenary_skillblock) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_mercenary_skillblock) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_mercenary_message) (struct map_session_data **sd, int *message); +typedef void (*HPMHOOK_post_clif_mercenary_message) (struct map_session_data *sd, int message); +typedef void (*HPMHOOK_pre_clif_mercenary_updatestatus) (struct map_session_data **sd, int *type); +typedef void (*HPMHOOK_post_clif_mercenary_updatestatus) (struct map_session_data *sd, int type); +typedef void (*HPMHOOK_pre_clif_rental_time) (int *fd, int *nameid, int *seconds); +typedef void (*HPMHOOK_post_clif_rental_time) (int fd, int nameid, int seconds); +typedef void (*HPMHOOK_pre_clif_rental_expired) (int *fd, int *index, int *nameid); +typedef void (*HPMHOOK_post_clif_rental_expired) (int fd, int index, int nameid); +typedef void (*HPMHOOK_pre_clif_PartyBookingRegisterAck) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_PartyBookingRegisterAck) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_PartyBookingDeleteAck) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_PartyBookingDeleteAck) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_PartyBookingSearchAck) (int *fd, struct party_booking_ad_info ***results, int *count, bool *more_result); +typedef void (*HPMHOOK_post_clif_PartyBookingSearchAck) (int fd, struct party_booking_ad_info **results, int count, bool more_result); +typedef void (*HPMHOOK_pre_clif_PartyBookingUpdateNotify) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); +typedef void (*HPMHOOK_post_clif_PartyBookingUpdateNotify) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); +typedef void (*HPMHOOK_pre_clif_PartyBookingDeleteNotify) (struct map_session_data **sd, int *index); +typedef void (*HPMHOOK_post_clif_PartyBookingDeleteNotify) (struct map_session_data *sd, int index); +typedef void (*HPMHOOK_pre_clif_PartyBookingInsertNotify) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); +typedef void (*HPMHOOK_post_clif_PartyBookingInsertNotify) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); +typedef void (*HPMHOOK_pre_clif_PartyRecruitRegisterAck) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_PartyRecruitRegisterAck) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_PartyRecruitDeleteAck) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_clif_PartyRecruitDeleteAck) (struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_clif_PartyRecruitSearchAck) (int *fd, struct party_booking_ad_info ***results, int *count, bool *more_result); +typedef void (*HPMHOOK_post_clif_PartyRecruitSearchAck) (int fd, struct party_booking_ad_info **results, int count, bool more_result); +typedef void (*HPMHOOK_pre_clif_PartyRecruitUpdateNotify) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); +typedef void (*HPMHOOK_post_clif_PartyRecruitUpdateNotify) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); +typedef void (*HPMHOOK_pre_clif_PartyRecruitDeleteNotify) (struct map_session_data **sd, int *index); +typedef void (*HPMHOOK_post_clif_PartyRecruitDeleteNotify) (struct map_session_data *sd, int index); +typedef void (*HPMHOOK_pre_clif_PartyRecruitInsertNotify) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); +typedef void (*HPMHOOK_post_clif_PartyRecruitInsertNotify) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); +typedef void (*HPMHOOK_pre_clif_PartyBookingVolunteerInfo) (int *index, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_PartyBookingVolunteerInfo) (int index, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_PartyBookingRefuseVolunteer) (unsigned int *aid, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_PartyBookingRefuseVolunteer) (unsigned int aid, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_PartyBookingCancelVolunteer) (int *index, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_PartyBookingCancelVolunteer) (int index, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_PartyBookingAddFilteringList) (int *index, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_PartyBookingAddFilteringList) (int index, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_PartyBookingSubFilteringList) (int *gid, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_PartyBookingSubFilteringList) (int gid, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_buyingstore_open) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_buyingstore_open) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_buyingstore_open_failed) (struct map_session_data **sd, unsigned short *result, unsigned int *weight); +typedef void (*HPMHOOK_post_clif_buyingstore_open_failed) (struct map_session_data *sd, unsigned short result, unsigned int weight); +typedef void (*HPMHOOK_pre_clif_buyingstore_myitemlist) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_buyingstore_myitemlist) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_buyingstore_entry) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_buyingstore_entry) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_buyingstore_entry_single) (struct map_session_data **sd, struct map_session_data **pl_sd); +typedef void (*HPMHOOK_post_clif_buyingstore_entry_single) (struct map_session_data *sd, struct map_session_data *pl_sd); +typedef void (*HPMHOOK_pre_clif_buyingstore_disappear_entry) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_buyingstore_disappear_entry) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_buyingstore_disappear_entry_single) (struct map_session_data **sd, struct map_session_data **pl_sd); +typedef void (*HPMHOOK_post_clif_buyingstore_disappear_entry_single) (struct map_session_data *sd, struct map_session_data *pl_sd); +typedef void (*HPMHOOK_pre_clif_buyingstore_itemlist) (struct map_session_data **sd, struct map_session_data **pl_sd); +typedef void (*HPMHOOK_post_clif_buyingstore_itemlist) (struct map_session_data *sd, struct map_session_data *pl_sd); +typedef void (*HPMHOOK_pre_clif_buyingstore_trade_failed_buyer) (struct map_session_data **sd, short *result); +typedef void (*HPMHOOK_post_clif_buyingstore_trade_failed_buyer) (struct map_session_data *sd, short result); +typedef void (*HPMHOOK_pre_clif_buyingstore_update_item) (struct map_session_data **sd, int *nameid, unsigned short *amount, uint32 *char_id, int *zeny); +typedef void (*HPMHOOK_post_clif_buyingstore_update_item) (struct map_session_data *sd, int nameid, unsigned short amount, uint32 char_id, int zeny); +typedef void (*HPMHOOK_pre_clif_buyingstore_delete_item) (struct map_session_data **sd, short *index, unsigned short *amount, int *price); +typedef void (*HPMHOOK_post_clif_buyingstore_delete_item) (struct map_session_data *sd, short index, unsigned short amount, int price); +typedef void (*HPMHOOK_pre_clif_buyingstore_trade_failed_seller) (struct map_session_data **sd, short *result, int *nameid); +typedef void (*HPMHOOK_post_clif_buyingstore_trade_failed_seller) (struct map_session_data *sd, short result, int nameid); +typedef void (*HPMHOOK_pre_clif_search_store_info_ack) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_search_store_info_ack) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_search_store_info_failed) (struct map_session_data **sd, unsigned char *reason); +typedef void (*HPMHOOK_post_clif_search_store_info_failed) (struct map_session_data *sd, unsigned char reason); +typedef void (*HPMHOOK_pre_clif_open_search_store_info) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_open_search_store_info) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_search_store_info_click_ack) (struct map_session_data **sd, short *x, short *y); +typedef void (*HPMHOOK_post_clif_search_store_info_click_ack) (struct map_session_data *sd, short x, short y); +typedef void (*HPMHOOK_pre_clif_elemental_info) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_elemental_info) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_elemental_updatestatus) (struct map_session_data **sd, int *type); +typedef void (*HPMHOOK_post_clif_elemental_updatestatus) (struct map_session_data *sd, int type); +typedef void (*HPMHOOK_pre_clif_bgqueue_ack) (struct map_session_data **sd, enum BATTLEGROUNDS_QUEUE_ACK *response, unsigned char *arena_id); +typedef void (*HPMHOOK_post_clif_bgqueue_ack) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_ACK response, unsigned char arena_id); +typedef void (*HPMHOOK_pre_clif_bgqueue_notice_delete) (struct map_session_data **sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, const char **name); +typedef void (*HPMHOOK_post_clif_bgqueue_notice_delete) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, const char *name); +typedef void (*HPMHOOK_pre_clif_bgqueue_update_info) (struct map_session_data **sd, unsigned char *arena_id, int *position); +typedef void (*HPMHOOK_post_clif_bgqueue_update_info) (struct map_session_data *sd, unsigned char arena_id, int position); +typedef void (*HPMHOOK_pre_clif_bgqueue_joined) (struct map_session_data **sd, int *pos); +typedef void (*HPMHOOK_post_clif_bgqueue_joined) (struct map_session_data *sd, int pos); +typedef void (*HPMHOOK_pre_clif_bgqueue_pcleft) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_bgqueue_pcleft) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_bgqueue_battlebegins) (struct map_session_data **sd, unsigned char *arena_id, enum send_target *target); +typedef void (*HPMHOOK_post_clif_bgqueue_battlebegins) (struct map_session_data *sd, unsigned char arena_id, enum send_target target); +typedef void (*HPMHOOK_pre_clif_adopt_reply) (struct map_session_data **sd, int *type); +typedef void (*HPMHOOK_post_clif_adopt_reply) (struct map_session_data *sd, int type); +typedef void (*HPMHOOK_pre_clif_adopt_request) (struct map_session_data **sd, struct map_session_data **src, int *p_id); +typedef void (*HPMHOOK_post_clif_adopt_request) (struct map_session_data *sd, struct map_session_data *src, int p_id); +typedef void (*HPMHOOK_pre_clif_readbook) (int *fd, int *book_id, int *page); +typedef void (*HPMHOOK_post_clif_readbook) (int fd, int book_id, int page); +typedef void (*HPMHOOK_pre_clif_notify_time) (struct map_session_data **sd, int64 *time); +typedef void (*HPMHOOK_post_clif_notify_time) (struct map_session_data *sd, int64 time); +typedef void (*HPMHOOK_pre_clif_user_count) (struct map_session_data **sd, int *count); +typedef void (*HPMHOOK_post_clif_user_count) (struct map_session_data *sd, int count); +typedef void (*HPMHOOK_pre_clif_noask_sub) (struct map_session_data **src, struct map_session_data **target, int *type); +typedef void (*HPMHOOK_post_clif_noask_sub) (struct map_session_data *src, struct map_session_data *target, int type); +typedef void (*HPMHOOK_pre_clif_bc_ready) (void); +typedef void (*HPMHOOK_post_clif_bc_ready) (void); +typedef void (*HPMHOOK_pre_clif_channel_msg) (struct channel_data **chan, struct map_session_data **sd, char **msg); +typedef void (*HPMHOOK_post_clif_channel_msg) (struct channel_data *chan, struct map_session_data *sd, char *msg); +typedef void (*HPMHOOK_pre_clif_channel_msg2) (struct channel_data **chan, char **msg); +typedef void (*HPMHOOK_post_clif_channel_msg2) (struct channel_data *chan, char *msg); +typedef int (*HPMHOOK_pre_clif_undisguise_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_clif_undisguise_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_clif_bank_deposit) (struct map_session_data **sd, enum e_BANKING_DEPOSIT_ACK *reason); +typedef void (*HPMHOOK_post_clif_bank_deposit) (struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK reason); +typedef void (*HPMHOOK_pre_clif_bank_withdraw) (struct map_session_data **sd, enum e_BANKING_WITHDRAW_ACK *reason); +typedef void (*HPMHOOK_post_clif_bank_withdraw) (struct map_session_data *sd, enum e_BANKING_WITHDRAW_ACK reason); +typedef void (*HPMHOOK_pre_clif_show_modifiers) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_show_modifiers) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_notify_bounditem) (struct map_session_data **sd, unsigned short *index); +typedef void (*HPMHOOK_post_clif_notify_bounditem) (struct map_session_data *sd, unsigned short index); +typedef int (*HPMHOOK_pre_clif_delay_damage) (int64 *tick, struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, enum battle_dmg_type *type); +typedef int (*HPMHOOK_post_clif_delay_damage) (int retVal___, int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, enum battle_dmg_type type); +typedef int (*HPMHOOK_pre_clif_delay_damage_sub) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_clif_delay_damage_sub) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_clif_npc_market_open) (struct map_session_data **sd, struct npc_data **nd); +typedef void (*HPMHOOK_post_clif_npc_market_open) (struct map_session_data *sd, struct npc_data *nd); +typedef void (*HPMHOOK_pre_clif_npc_market_purchase_ack) (struct map_session_data **sd, const struct itemlist **item_list, enum market_buy_result *response); +typedef void (*HPMHOOK_post_clif_npc_market_purchase_ack) (struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response); +typedef bool (*HPMHOOK_pre_clif_parse_roulette_db) (void); +typedef bool (*HPMHOOK_post_clif_parse_roulette_db) (bool retVal___); +typedef void (*HPMHOOK_pre_clif_roulette_generate_ack) (struct map_session_data **sd, enum GENERATE_ROULETTE_ACK *result, short *stage, short *prizeIdx, int *bonusItemID); +typedef void (*HPMHOOK_post_clif_roulette_generate_ack) (struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID); +typedef void (*HPMHOOK_pre_clif_roulette_close) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_roulette_close) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_openmergeitem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_openmergeitem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_cancelmergeitem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_cancelmergeitem) (int fd, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_clif_comparemergeitem) (const void **a, const void **b); +typedef int (*HPMHOOK_post_clif_comparemergeitem) (int retVal___, const void *a, const void *b); +typedef void (*HPMHOOK_pre_clif_ackmergeitems) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_ackmergeitems) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_mergeitems) (int *fd, struct map_session_data **sd, int *index, int *amount, enum mergeitem_reason *reason); +typedef void (*HPMHOOK_post_clif_mergeitems) (int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason); +typedef bool (*HPMHOOK_pre_clif_isdisguised) (struct block_list **bl); +typedef bool (*HPMHOOK_post_clif_isdisguised) (bool retVal___, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_navigate_to) (struct map_session_data **sd, const char **mapname, uint16 *x, uint16 *y, uint8 *flag, bool *hideWindow, uint16 *mob_id); +typedef void (*HPMHOOK_post_clif_navigate_to) (struct map_session_data *sd, const char *mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id); +typedef unsigned char (*HPMHOOK_pre_clif_bl_type) (struct block_list **bl); +typedef unsigned char (*HPMHOOK_post_clif_bl_type) (unsigned char retVal___, struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_achievement_send_list) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_achievement_send_list) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_achievement_send_update) (int *fd, struct map_session_data **sd, const struct achievement_data **ad); +typedef void (*HPMHOOK_post_clif_achievement_send_update) (int fd, struct map_session_data *sd, const struct achievement_data *ad); +typedef void (*HPMHOOK_pre_clif_pAchievementGetReward) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAchievementGetReward) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_achievement_reward_ack) (int *fd, struct map_session_data **sd, const struct achievement_data **ad); +typedef void (*HPMHOOK_post_clif_achievement_reward_ack) (int fd, struct map_session_data *sd, const struct achievement_data *ad); +typedef void (*HPMHOOK_pre_clif_change_title_ack) (int *fd, struct map_session_data **sd, int *title_id); +typedef void (*HPMHOOK_post_clif_change_title_ack) (int fd, struct map_session_data *sd, int title_id); +typedef void (*HPMHOOK_pre_clif_pChangeTitle) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pChangeTitle) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pWantToConnection) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pWantToConnection) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pLoadEndAck) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pLoadEndAck) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pTickSend) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pTickSend) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHotkey1) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHotkey1) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHotkey2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHotkey2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pProgressbar) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pProgressbar) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pWalkToXY) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pWalkToXY) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pQuitGame) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pQuitGame) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGetCharNameRequest) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGetCharNameRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGlobalMessage) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGlobalMessage) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMapMove) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMapMove) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pChangeDir) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pChangeDir) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pEmotion) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pEmotion) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHowManyConnections) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHowManyConnections) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pActionRequest) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pActionRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pActionRequest_sub) (struct map_session_data **sd, int *action_type, int *target_id, int64 *tick); +typedef void (*HPMHOOK_post_clif_pActionRequest_sub) (struct map_session_data *sd, int action_type, int target_id, int64 tick); +typedef void (*HPMHOOK_pre_clif_pRestart) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRestart) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pWisMessage) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pWisMessage) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBroadcast) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBroadcast) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pTakeItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pTakeItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pDropItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pDropItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pUseItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pUseItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pEquipItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pEquipItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pUnequipItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pUnequipItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNpcClicked) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNpcClicked) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNpcBuySellSelected) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNpcBuySellSelected) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNpcBuyListSend) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNpcBuyListSend) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNpcSellListSend) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNpcSellListSend) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCreateChatRoom) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCreateChatRoom) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pChatAddMember) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pChatAddMember) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pChatRoomStatusChange) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pChatRoomStatusChange) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pChangeChatOwner) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pChangeChatOwner) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pKickFromChat) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pKickFromChat) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pChatLeave) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pChatLeave) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pTradeRequest) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pTradeRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pTradeAck) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pTradeAck) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pTradeAddItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pTradeAddItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pTradeOk) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pTradeOk) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pTradeCancel) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pTradeCancel) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pTradeCommit) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pTradeCommit) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pStopAttack) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pStopAttack) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPutItemToCart) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPutItemToCart) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGetItemFromCart) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGetItemFromCart) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRemoveOption) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRemoveOption) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pChangeCart) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pChangeCart) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pStatusUp) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pStatusUp) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pSkillUp) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pSkillUp) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_useSkillToIdReal) (int *fd, struct map_session_data **sd, int *skill_id, int *skill_lv, int *target_id); +typedef void (*HPMHOOK_post_clif_useSkillToIdReal) (int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id); +typedef void (*HPMHOOK_pre_clif_pUseSkillToId) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pUseSkillToId) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pStartUseSkillToId) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pStartUseSkillToId) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pStopUseSkillToId) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pStopUseSkillToId) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pUseSkillToId_homun) (struct homun_data **hd, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); +typedef void (*HPMHOOK_post_clif_pUseSkillToId_homun) (struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id); +typedef void (*HPMHOOK_pre_clif_pUseSkillToId_mercenary) (struct mercenary_data **md, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); +typedef void (*HPMHOOK_post_clif_pUseSkillToId_mercenary) (struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, int target_id); +typedef void (*HPMHOOK_pre_clif_pUseSkillToPos) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pUseSkillToPos) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pUseSkillToPosSub) (int *fd, struct map_session_data **sd, uint16 *skill_lv, uint16 *skill_id, short *x, short *y, int *skillmoreinfo); +typedef void (*HPMHOOK_post_clif_pUseSkillToPosSub) (int fd, struct map_session_data *sd, uint16 skill_lv, uint16 skill_id, short x, short y, int skillmoreinfo); +typedef void (*HPMHOOK_pre_clif_pUseSkillToPos_homun) (struct homun_data **hd, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); +typedef void (*HPMHOOK_post_clif_pUseSkillToPos_homun) (struct homun_data *hd, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo); +typedef void (*HPMHOOK_pre_clif_pUseSkillToPos_mercenary) (struct mercenary_data **md, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); +typedef void (*HPMHOOK_post_clif_pUseSkillToPos_mercenary) (struct mercenary_data *md, struct map_session_data *sd, int64 tick, uint16 skill_id, uint16 skill_lv, short x, short y, int skillmoreinfo); +typedef void (*HPMHOOK_pre_clif_pUseSkillToPosMoreInfo) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pUseSkillToPosMoreInfo) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pUseSkillMap) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pUseSkillMap) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRequestMemo) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRequestMemo) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pProduceMix) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pProduceMix) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCooking) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCooking) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRepairItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRepairItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pWeaponRefine) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pWeaponRefine) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNpcSelectMenu) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNpcSelectMenu) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNpcNextClicked) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNpcNextClicked) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNpcAmountInput) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNpcAmountInput) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNpcStringInput) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNpcStringInput) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNpcCloseClicked) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNpcCloseClicked) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pItemIdentify) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pItemIdentify) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pSelectArrow) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pSelectArrow) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAutoSpell) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAutoSpell) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pUseCard) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pUseCard) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pInsertCard) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pInsertCard) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pSolveCharName) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pSolveCharName) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pResetChar) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pResetChar) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pLocalBroadcast) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pLocalBroadcast) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMoveToKafra) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMoveToKafra) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMoveFromKafra) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMoveFromKafra) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMoveToKafraFromCart) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMoveToKafraFromCart) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMoveFromKafraToCart) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMoveFromKafraToCart) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCloseKafra) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCloseKafra) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pStoragePassword) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pStoragePassword) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCreateParty) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCreateParty) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCreateParty2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCreateParty2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyInvite) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyInvite) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyInvite2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyInvite2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pReplyPartyInvite) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReplyPartyInvite) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pReplyPartyInvite2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReplyPartyInvite2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pLeaveParty) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pLeaveParty) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRemovePartyMember) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRemovePartyMember) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyChangeOption) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyChangeOption) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyMessage) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyMessage) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyChangeLeader) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyChangeLeader) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyBookingRegisterReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyBookingRegisterReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyBookingSearchReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyBookingSearchReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyBookingDeleteReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyBookingDeleteReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyBookingUpdateReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyBookingUpdateReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyRecruitRegisterReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyRecruitRegisterReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyRecruitSearchReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyRecruitSearchReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyRecruitDeleteReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyRecruitDeleteReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyRecruitUpdateReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyRecruitUpdateReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCloseVending) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCloseVending) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pVendingListReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pVendingListReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPurchaseReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPurchaseReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPurchaseReq2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPurchaseReq2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pOpenVending) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pOpenVending) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCreateGuild) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCreateGuild) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildCheckMaster) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildCheckMaster) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildRequestInfo) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildRequestInfo) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildChangePositionInfo) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildChangePositionInfo) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildChangeMemberPosition) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildChangeMemberPosition) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildRequestEmblem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildRequestEmblem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildChangeEmblem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildChangeEmblem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildChangeNotice) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildChangeNotice) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildInvite) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildInvite) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildReplyInvite) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildReplyInvite) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildLeave) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildLeave) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildExpulsion) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildExpulsion) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildMessage) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildMessage) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildRequestAlliance) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildRequestAlliance) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildReplyAlliance) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildReplyAlliance) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildDelAlliance) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildDelAlliance) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildOpposition) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildOpposition) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildBreak) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildBreak) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPetMenu) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPetMenu) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCatchPet) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCatchPet) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pSelectEgg) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pSelectEgg) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pSendEmotion) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pSendEmotion) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pChangePetName) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pChangePetName) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMKick) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMKick) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMKickAll) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMKickAll) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMShift) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMShift) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMRemove2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMRemove2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMRecall) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMRecall) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMRecall2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMRecall2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGM_Monster_Item) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGM_Monster_Item) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMHide) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMHide) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMReqNoChat) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMReqNoChat) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMRc) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMRc) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMReqAccountName) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMReqAccountName) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMChangeMapType) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMChangeMapType) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGMFullStrip) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGMFullStrip) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPMIgnore) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPMIgnore) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPMIgnoreAll) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPMIgnoreAll) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPMIgnoreList) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPMIgnoreList) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNoviceDoriDori) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNoviceDoriDori) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNoviceExplosionSpirits) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNoviceExplosionSpirits) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pFriendsListAdd) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pFriendsListAdd) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pFriendsListReply) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pFriendsListReply) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pFriendsListRemove) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pFriendsListRemove) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPVPInfo) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPVPInfo) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBlacksmith) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBlacksmith) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAlchemist) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAlchemist) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pTaekwon) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pTaekwon) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRankingPk) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRankingPk) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pFeelSaveOk) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pFeelSaveOk) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pChangeHomunculusName) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pChangeHomunculusName) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHomMoveToMaster) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHomMoveToMaster) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHomMoveTo) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHomMoveTo) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHomAttack) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHomAttack) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHomMenu) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHomMenu) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAutoRevive) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAutoRevive) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCheck) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCheck) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMail_refreshinbox) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMail_refreshinbox) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMail_read) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMail_read) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMail_getattach) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMail_getattach) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMail_delete) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMail_delete) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMail_return) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMail_return) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMail_setattach) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMail_setattach) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMail_winopen) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMail_winopen) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMail_send) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMail_send) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAuction_cancelreg) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAuction_cancelreg) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAuction_setitem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAuction_setitem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAuction_register) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAuction_register) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAuction_cancel) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAuction_cancel) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAuction_close) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAuction_close) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAuction_bid) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAuction_bid) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAuction_search) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAuction_search) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAuction_buysell) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAuction_buysell) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pcashshop_buy) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pcashshop_buy) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAdopt_request) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAdopt_request) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAdopt_reply) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAdopt_reply) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pViewPlayerEquip) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pViewPlayerEquip) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_p_cz_config) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_p_cz_config) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pquestStateAck) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pquestStateAck) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pmercenary_action) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pmercenary_action) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBattleChat) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBattleChat) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pLessEffect) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pLessEffect) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pItemListWindowSelected) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pItemListWindowSelected) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pReqOpenBuyingStore) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqOpenBuyingStore) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pReqCloseBuyingStore) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqCloseBuyingStore) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pReqClickBuyingStore) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqClickBuyingStore) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pReqTradeBuyingStore) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqTradeBuyingStore) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pSearchStoreInfo) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pSearchStoreInfo) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pSearchStoreInfoNextPage) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pSearchStoreInfoNextPage) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCloseSearchStoreInfo) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCloseSearchStoreInfo) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pSearchStoreInfoListItemClick) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pSearchStoreInfoListItemClick) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pDebug) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pDebug) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pSkillSelectMenu) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pSkillSelectMenu) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMoveItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMoveItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pDull) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pDull) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_p_cz_blocking_play_cancel) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_p_cz_blocking_play_cancel) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBGQueueRegister) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBGQueueRegister) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBGQueueCheckState) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBGQueueCheckState) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBGQueueRevokeReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBGQueueRevokeReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBGQueueBattleBeginAck) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBGQueueBattleBeginAck) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCashShopOpen1) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCashShopOpen1) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCashShopOpen2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCashShopOpen2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCashShopLimitedReq) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCashShopLimitedReq) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCashShopClose) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCashShopClose) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCashShopReqTab) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCashShopReqTab) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCashShopSchedule) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCashShopSchedule) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pCashShopBuy) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCashShopBuy) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyTick) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyTick) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildInvite2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildInvite2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_cashShopBuyAck) (int *fd, struct map_session_data **sd, int *itemId, enum CASH_SHOP_BUY_RESULT *result); +typedef void (*HPMHOOK_post_clif_cashShopBuyAck) (int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result); +typedef void (*HPMHOOK_pre_clif_cashShopOpen) (int *fd, struct map_session_data **sd, int *tab); +typedef void (*HPMHOOK_post_clif_cashShopOpen) (int fd, struct map_session_data *sd, int tab); +typedef void (*HPMHOOK_pre_clif_pPartyBookingAddFilter) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyBookingAddFilter) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyBookingSubFilter) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyBookingSubFilter) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyBookingReqVolunteer) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyBookingReqVolunteer) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyBookingRefuseVolunteer) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyBookingRefuseVolunteer) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPartyBookingCancelVolunteer) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPartyBookingCancelVolunteer) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBankDeposit) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBankDeposit) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBankWithdraw) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBankWithdraw) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBankCheck) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBankCheck) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBankOpen) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBankOpen) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pBankClose) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pBankClose) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRouletteOpen) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRouletteOpen) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRouletteInfo) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRouletteInfo) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRouletteClose) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRouletteClose) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRouletteGenerate) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRouletteGenerate) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRouletteRecvItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRouletteRecvItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNPCShopClosed) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNPCShopClosed) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNPCMarketClosed) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNPCMarketClosed) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNPCMarketPurchase) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNPCMarketPurchase) (int fd, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_clif_add_item_options) (struct ItemOptions **buf, const struct item **it); +typedef int (*HPMHOOK_post_clif_add_item_options) (int retVal___, struct ItemOptions *buf, const struct item *it); +typedef void (*HPMHOOK_pre_clif_pHotkeyRowShift1) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHotkeyRowShift1) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pHotkeyRowShift2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pHotkeyRowShift2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_dressroom_open) (struct map_session_data **sd, int *view); +typedef void (*HPMHOOK_post_clif_dressroom_open) (struct map_session_data *sd, int view); +typedef void (*HPMHOOK_pre_clif_pOneClick_ItemIdentify) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pOneClick_ItemIdentify) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_selectcart) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_selectcart) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pSelectCart) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pSelectCart) (int fd, struct map_session_data *sd); +typedef const char* (*HPMHOOK_pre_clif_get_bl_name) (const struct block_list **bl); +typedef const char* (*HPMHOOK_post_clif_get_bl_name) (const char* retVal___, const struct block_list *bl); +typedef void (*HPMHOOK_pre_clif_pRodexOpenWriteMail) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexOpenWriteMail) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_open_write_mail) (int *fd, const char **receiver_name, int8 *result); +typedef void (*HPMHOOK_post_clif_rodex_open_write_mail) (int fd, const char *receiver_name, int8 result); +typedef void (*HPMHOOK_pre_clif_pRodexAddItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexAddItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_add_item_result) (struct map_session_data **sd, int16 *idx, int16 *amount, enum rodex_add_item *result); +typedef void (*HPMHOOK_post_clif_rodex_add_item_result) (struct map_session_data *sd, int16 idx, int16 amount, enum rodex_add_item result); +typedef void (*HPMHOOK_pre_clif_pRodexRemoveItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexRemoveItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_remove_item_result) (struct map_session_data **sd, int16 *idx, int16 *amount); +typedef void (*HPMHOOK_post_clif_rodex_remove_item_result) (struct map_session_data *sd, int16 idx, int16 amount); +typedef void (*HPMHOOK_pre_clif_pRodexSendMail) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexSendMail) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_send_mail_result) (int *fd, struct map_session_data **sd, int8 *result); +typedef void (*HPMHOOK_post_clif_rodex_send_mail_result) (int fd, struct map_session_data *sd, int8 result); +typedef void (*HPMHOOK_pre_clif_rodex_send_maillist) (int *fd, struct map_session_data **sd, int8 *open_type, int64 *page_start); +typedef void (*HPMHOOK_post_clif_rodex_send_maillist) (int fd, struct map_session_data *sd, int8 open_type, int64 page_start); +typedef void (*HPMHOOK_pre_clif_rodex_send_refresh) (int *fd, struct map_session_data **sd, int8 *open_type, int *count); +typedef void (*HPMHOOK_post_clif_rodex_send_refresh) (int fd, struct map_session_data *sd, int8 open_type, int count); +typedef void (*HPMHOOK_pre_clif_rodex_send_mails_all) (int *fd, struct map_session_data **sd, int64 *mail_id); +typedef void (*HPMHOOK_post_clif_rodex_send_mails_all) (int fd, struct map_session_data *sd, int64 mail_id); +typedef void (*HPMHOOK_pre_clif_pRodexReadMail) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexReadMail) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_read_mail) (struct map_session_data **sd, int8 *opentype, struct rodex_message **msg); +typedef void (*HPMHOOK_post_clif_rodex_read_mail) (struct map_session_data *sd, int8 opentype, struct rodex_message *msg); +typedef void (*HPMHOOK_pre_clif_pRodexNextMaillist) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexNextMaillist) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRodexCloseMailbox) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexCloseMailbox) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRodexCancelWriteMail) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexCancelWriteMail) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRodexOpenMailbox) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexOpenMailbox) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRodexCheckName) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexCheckName) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, int *class_, int *base_level, const char **name); +typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name); +typedef void (*HPMHOOK_pre_clif_pRodexDeleteMail) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexDeleteMail) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_delete_mail) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); +typedef void (*HPMHOOK_post_clif_rodex_delete_mail) (struct map_session_data *sd, int8 opentype, int64 mail_id); +typedef void (*HPMHOOK_pre_clif_pRodexRefreshMaillist) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexRefreshMaillist) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRodexRequestZeny) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexRequestZeny) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_request_zeny) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_zeny *result); +typedef void (*HPMHOOK_post_clif_rodex_request_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_zeny result); +typedef void (*HPMHOOK_pre_clif_pRodexRequestItems) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRodexRequestItems) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_rodex_request_items) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_items *result); +typedef void (*HPMHOOK_post_clif_rodex_request_items) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_items result); +typedef void (*HPMHOOK_pre_clif_rodex_icon) (int *fd, bool *show); +typedef void (*HPMHOOK_post_clif_rodex_icon) (int fd, bool show); +typedef void (*HPMHOOK_pre_clif_skill_scale) (struct block_list **bl, int *src_id, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *casttime); +typedef void (*HPMHOOK_post_clif_skill_scale) (struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime); +typedef void (*HPMHOOK_pre_clif_clan_basicinfo) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_clan_basicinfo) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_clan_onlinecount) (struct clan **c); +typedef void (*HPMHOOK_post_clif_clan_onlinecount) (struct clan *c); +typedef void (*HPMHOOK_pre_clif_clan_leave) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_clan_leave) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_clan_message) (struct clan **c, const char **mes, int *len); +typedef void (*HPMHOOK_post_clif_clan_message) (struct clan *c, const char *mes, int len); +typedef void (*HPMHOOK_pre_clif_pClanMessage) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pClanMessage) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_hat_effect) (struct block_list **bl, struct block_list **tbl, enum send_target *target); +typedef void (*HPMHOOK_post_clif_hat_effect) (struct block_list *bl, struct block_list *tbl, enum send_target target); +typedef void (*HPMHOOK_pre_clif_hat_effect_single) (struct block_list **bl, uint16 *effectId, bool *enable); +typedef void (*HPMHOOK_post_clif_hat_effect_single) (struct block_list *bl, uint16 effectId, bool enable); +typedef void (*HPMHOOK_pre_clif_overweight_percent) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_overweight_percent) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pChangeDress) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pChangeDress) (int fd, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_clif_pAttendanceDB) (void); +typedef bool (*HPMHOOK_post_clif_pAttendanceDB) (bool retVal___); +typedef bool (*HPMHOOK_pre_clif_attendancedb_libconfig_sub) (struct config_setting_t **it, int *n, const char **source); +typedef bool (*HPMHOOK_post_clif_attendancedb_libconfig_sub) (bool retVal___, struct config_setting_t *it, int n, const char *source); +typedef bool (*HPMHOOK_pre_clif_attendance_timediff) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_clif_attendance_timediff) (bool retVal___, struct map_session_data *sd); +typedef time_t (*HPMHOOK_pre_clif_attendance_getendtime) (void); +typedef time_t (*HPMHOOK_post_clif_attendance_getendtime) (time_t retVal___); +typedef void (*HPMHOOK_pre_clif_pOpenUIRequest) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pOpenUIRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_open_ui) (struct map_session_data **sd, enum cz_ui_types *uiType); +typedef void (*HPMHOOK_post_clif_open_ui) (struct map_session_data *sd, enum cz_ui_types uiType); +typedef void (*HPMHOOK_pre_clif_pAttendanceRewardRequest) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAttendanceRewardRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_ui_action) (struct map_session_data **sd, int32 *UIType, int32 *data); +typedef void (*HPMHOOK_post_clif_ui_action) (struct map_session_data *sd, int32 UIType, int32 data); +typedef void (*HPMHOOK_pre_clif_pPrivateAirshipRequest) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPrivateAirshipRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_PrivateAirshipResponse) (struct map_session_data **sd, uint32 *flag); +typedef void (*HPMHOOK_post_clif_PrivateAirshipResponse) (struct map_session_data *sd, uint32 flag); +typedef void (*HPMHOOK_pre_clif_pReqStyleChange) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqStyleChange) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pReqStyleChange2) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqStyleChange2) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pStyleClose) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pStyleClose) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_style_change_response) (struct map_session_data **sd, enum stylist_shop *flag); +typedef void (*HPMHOOK_post_clif_style_change_response) (struct map_session_data *sd, enum stylist_shop flag); +typedef void (*HPMHOOK_pre_clif_pPetEvolution) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPetEvolution) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_petEvolutionResult) (int *fd, enum pet_evolution_result *result); +typedef void (*HPMHOOK_post_clif_petEvolutionResult) (int fd, enum pet_evolution_result result); +typedef void (*HPMHOOK_pre_clif_party_dead_notification) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_party_dead_notification) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pMemorialDungeonCommand) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pMemorialDungeonCommand) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_camera_showWindow) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_camera_showWindow) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_camera_change) (struct map_session_data **sd, float *range, float *rotation, float *latitude, enum send_target *target); +typedef void (*HPMHOOK_post_clif_camera_change) (struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target); +typedef void (*HPMHOOK_pre_clif_pCameraInfo) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pCameraInfo) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_item_preview) (struct map_session_data **sd, int *n); +typedef void (*HPMHOOK_post_clif_item_preview) (struct map_session_data *sd, int n); +typedef bool (*HPMHOOK_pre_clif_enchant_equipment) (struct map_session_data **sd, enum equip_pos *pos, int *cardSlot, int *cardId); +typedef bool (*HPMHOOK_post_clif_enchant_equipment) (bool retVal___, struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId); +typedef void (*HPMHOOK_pre_clif_pReqRemainTime) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqRemainTime) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_npc_barter_open) (struct map_session_data **sd, struct npc_data **nd); +typedef void (*HPMHOOK_post_clif_npc_barter_open) (struct map_session_data *sd, struct npc_data *nd); +typedef void (*HPMHOOK_pre_clif_pNPCBarterClosed) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNPCBarterClosed) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNPCBarterPurchase) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNPCBarterPurchase) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNPCExpandedBarterClosed) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNPCExpandedBarterClosed) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pNPCExpandedBarterPurchase) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pNPCExpandedBarterPurchase) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_npc_expanded_barter_open) (struct map_session_data **sd, struct npc_data **nd); +typedef void (*HPMHOOK_post_clif_npc_expanded_barter_open) (struct map_session_data *sd, struct npc_data *nd); +typedef void (*HPMHOOK_pre_clif_pClientVersion) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pClientVersion) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pPing) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pPing) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_ping) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_ping) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_clif_pingTimer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_clif_pingTimer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_clif_pingTimerSub) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_clif_pingTimerSub) (int retVal___, struct map_session_data *sd, va_list ap); +typedef void (*HPMHOOK_pre_clif_pResetCooldown) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pResetCooldown) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_loadConfirm) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_loadConfirm) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_send_selforarea) (int *fd, struct block_list **bl, const void **buf, int *len); +typedef void (*HPMHOOK_post_clif_send_selforarea) (int fd, struct block_list *bl, const void *buf, int len); +typedef void (*HPMHOOK_pre_clif_OpenRefineryUI) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_OpenRefineryUI) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pAddItemRefineryUI) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pAddItemRefineryUI) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_AddItemRefineryUIAck) (struct map_session_data **sd, int *item_index, struct s_refine_requirement **req); +typedef void (*HPMHOOK_post_clif_AddItemRefineryUIAck) (struct map_session_data *sd, int item_index, struct s_refine_requirement *req); +typedef void (*HPMHOOK_pre_clif_pRefineryUIClose) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRefineryUIClose) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pRefineryUIRefine) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pRefineryUIRefine) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_announce_refine_status) (struct map_session_data **sd, int *item_id, int *refine_level, bool *success, enum send_target *target); +typedef void (*HPMHOOK_post_clif_announce_refine_status) (struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target); +typedef void (*HPMHOOK_pre_clif_pGuildCastleTeleportRequest) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildCastleTeleportRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pGuildCastleInfoRequest) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pGuildCastleInfoRequest) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_guild_castleteleport_res) (struct map_session_data **sd, enum siege_teleport_result *result); +typedef void (*HPMHOOK_post_clif_guild_castleteleport_res) (struct map_session_data *sd, enum siege_teleport_result result); +typedef bool (*HPMHOOK_pre_clif_lapineDdukDdak_open) (struct map_session_data **sd, int *item_id); +typedef bool (*HPMHOOK_post_clif_lapineDdukDdak_open) (bool retVal___, struct map_session_data *sd, int item_id); +typedef bool (*HPMHOOK_pre_clif_lapineDdukDdak_result) (struct map_session_data **sd, enum lapineddukddak_result *result); +typedef bool (*HPMHOOK_post_clif_lapineDdukDdak_result) (bool retVal___, struct map_session_data *sd, enum lapineddukddak_result result); +typedef void (*HPMHOOK_pre_clif_plapineDdukDdak_ack) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_plapineDdukDdak_ack) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_plapineDdukDdak_close) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_plapineDdukDdak_close) (int fd, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_clif_lapineUpgrade_open) (struct map_session_data **sd, int *item_id); +typedef bool (*HPMHOOK_post_clif_lapineUpgrade_open) (bool retVal___, struct map_session_data *sd, int item_id); +typedef bool (*HPMHOOK_pre_clif_lapineUpgrade_result) (struct map_session_data **sd, enum lapineUpgrade_result *result); +typedef bool (*HPMHOOK_post_clif_lapineUpgrade_result) (bool retVal___, struct map_session_data *sd, enum lapineUpgrade_result result); +typedef void (*HPMHOOK_pre_clif_pLapineUpgrade_close) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pLapineUpgrade_close) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pLapineUpgrade_makeItem) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pLapineUpgrade_makeItem) (int fd, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_clif_pReqGearOff) (int *fd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_clif_pReqGearOff) (int fd, struct map_session_data *sd); +#endif // MAP_CLIF_H +#ifdef COMMON_CORE_H /* cmdline */ +typedef void (*HPMHOOK_pre_cmdline_init) (void); +typedef void (*HPMHOOK_post_cmdline_init) (void); +typedef void (*HPMHOOK_pre_cmdline_final) (void); +typedef void (*HPMHOOK_post_cmdline_final) (void); +typedef bool (*HPMHOOK_pre_cmdline_arg_add) (unsigned int *pluginID, const char **name, char *shortname, CmdlineExecFunc *func, const char **help, unsigned int *options); +typedef bool (*HPMHOOK_post_cmdline_arg_add) (bool retVal___, unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options); +typedef int (*HPMHOOK_pre_cmdline_exec) (int *argc, char ***argv, unsigned int *options); +typedef int (*HPMHOOK_post_cmdline_exec) (int retVal___, int argc, char **argv, unsigned int options); +typedef bool (*HPMHOOK_pre_cmdline_arg_next_value) (const char **name, int *current_arg, int *argc); +typedef bool (*HPMHOOK_post_cmdline_arg_next_value) (bool retVal___, const char *name, int current_arg, int argc); +typedef const char* (*HPMHOOK_pre_cmdline_arg_source) (struct CmdlineArgData **arg); +typedef const char* (*HPMHOOK_post_cmdline_arg_source) (const char* retVal___, struct CmdlineArgData *arg); +#endif // COMMON_CORE_H +#ifdef COMMON_CONSOLE_H /* console */ +typedef void (*HPMHOOK_pre_console_init) (void); +typedef void (*HPMHOOK_post_console_init) (void); +typedef void (*HPMHOOK_pre_console_final) (void); +typedef void (*HPMHOOK_post_console_final) (void); +typedef void (*HPMHOOK_pre_console_display_title) (void); +typedef void (*HPMHOOK_post_console_display_title) (void); +typedef void (*HPMHOOK_pre_console_display_gplnotice) (void); +typedef void (*HPMHOOK_post_console_display_gplnotice) (void); +#endif // COMMON_CONSOLE_H +#ifdef COMMON_CORE_H /* core */ +typedef void (*HPMHOOK_pre_core_shutdown_callback) (void); +typedef void (*HPMHOOK_post_core_shutdown_callback) (void); +#endif // COMMON_CORE_H +#ifdef COMMON_DB_H /* DB */ +typedef enum DBOptions (*HPMHOOK_pre_DB_fix_options) (enum DBType *type, enum DBOptions *options); +typedef enum DBOptions (*HPMHOOK_post_DB_fix_options) (enum DBOptions retVal___, enum DBType type, enum DBOptions options); +typedef DBComparator (*HPMHOOK_pre_DB_default_cmp) (enum DBType *type); +typedef DBComparator (*HPMHOOK_post_DB_default_cmp) (DBComparator retVal___, enum DBType type); +typedef DBHasher (*HPMHOOK_pre_DB_default_hash) (enum DBType *type); +typedef DBHasher (*HPMHOOK_post_DB_default_hash) (DBHasher retVal___, enum DBType type); +typedef DBReleaser (*HPMHOOK_pre_DB_default_release) (enum DBType *type, enum DBOptions *options); +typedef DBReleaser (*HPMHOOK_post_DB_default_release) (DBReleaser retVal___, enum DBType type, enum DBOptions options); +typedef DBReleaser (*HPMHOOK_pre_DB_custom_release) (enum DBReleaseOption *which); +typedef DBReleaser (*HPMHOOK_post_DB_custom_release) (DBReleaser retVal___, enum DBReleaseOption which); +typedef struct DBMap* (*HPMHOOK_pre_DB_alloc) (const char **file, const char **func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); +typedef struct DBMap* (*HPMHOOK_post_DB_alloc) (struct DBMap* retVal___, const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen); +typedef union DBKey (*HPMHOOK_pre_DB_i2key) (int *key); +typedef union DBKey (*HPMHOOK_post_DB_i2key) (union DBKey retVal___, int key); +typedef union DBKey (*HPMHOOK_pre_DB_ui2key) (unsigned int *key); +typedef union DBKey (*HPMHOOK_post_DB_ui2key) (union DBKey retVal___, unsigned int key); +typedef union DBKey (*HPMHOOK_pre_DB_str2key) (const char **key); +typedef union DBKey (*HPMHOOK_post_DB_str2key) (union DBKey retVal___, const char *key); +typedef union DBKey (*HPMHOOK_pre_DB_i642key) (int64 *key); +typedef union DBKey (*HPMHOOK_post_DB_i642key) (union DBKey retVal___, int64 key); +typedef union DBKey (*HPMHOOK_pre_DB_ui642key) (uint64 *key); +typedef union DBKey (*HPMHOOK_post_DB_ui642key) (union DBKey retVal___, uint64 key); +typedef struct DBData (*HPMHOOK_pre_DB_i2data) (int *data); +typedef struct DBData (*HPMHOOK_post_DB_i2data) (struct DBData retVal___, int data); +typedef struct DBData (*HPMHOOK_pre_DB_ui2data) (unsigned int *data); +typedef struct DBData (*HPMHOOK_post_DB_ui2data) (struct DBData retVal___, unsigned int data); +typedef struct DBData (*HPMHOOK_pre_DB_ptr2data) (void **data); +typedef struct DBData (*HPMHOOK_post_DB_ptr2data) (struct DBData retVal___, void *data); +typedef int (*HPMHOOK_pre_DB_data2i) (struct DBData **data); +typedef int (*HPMHOOK_post_DB_data2i) (int retVal___, struct DBData *data); +typedef unsigned int (*HPMHOOK_pre_DB_data2ui) (struct DBData **data); +typedef unsigned int (*HPMHOOK_post_DB_data2ui) (unsigned int retVal___, struct DBData *data); +typedef void* (*HPMHOOK_pre_DB_data2ptr) (struct DBData **data); +typedef void* (*HPMHOOK_post_DB_data2ptr) (void* retVal___, struct DBData *data); +typedef void (*HPMHOOK_pre_DB_init) (void); +typedef void (*HPMHOOK_post_DB_init) (void); +typedef void (*HPMHOOK_pre_DB_final) (void); +typedef void (*HPMHOOK_post_DB_final) (void); +#endif // COMMON_DB_H +#ifdef COMMON_DES_H /* des */ +typedef void (*HPMHOOK_pre_des_decrypt_block) (struct des_bit64 **block); +typedef void (*HPMHOOK_post_des_decrypt_block) (struct des_bit64 *block); +typedef void (*HPMHOOK_pre_des_decrypt) (unsigned char **data, size_t *size); +typedef void (*HPMHOOK_post_des_decrypt) (unsigned char *data, size_t size); +#endif // COMMON_DES_H +#ifdef MAP_DUEL_H /* duel */ +typedef int (*HPMHOOK_pre_duel_create) (struct map_session_data **sd, const unsigned int *maxpl); +typedef int (*HPMHOOK_post_duel_create) (int retVal___, struct map_session_data *sd, const unsigned int maxpl); +typedef void (*HPMHOOK_pre_duel_invite) (const unsigned int *did, struct map_session_data **sd, struct map_session_data **target_sd); +typedef void (*HPMHOOK_post_duel_invite) (const unsigned int did, struct map_session_data *sd, struct map_session_data *target_sd); +typedef void (*HPMHOOK_pre_duel_accept) (const unsigned int *did, struct map_session_data **sd); +typedef void (*HPMHOOK_post_duel_accept) (const unsigned int did, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_duel_reject) (const unsigned int *did, struct map_session_data **sd); +typedef void (*HPMHOOK_post_duel_reject) (const unsigned int did, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_duel_leave) (const unsigned int *did, struct map_session_data **sd); +typedef void (*HPMHOOK_post_duel_leave) (const unsigned int did, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_duel_showinfo) (const unsigned int *did, struct map_session_data **sd); +typedef void (*HPMHOOK_post_duel_showinfo) (const unsigned int did, struct map_session_data *sd); +typedef int64 (*HPMHOOK_pre_duel_difftime) (struct map_session_data **sd); +typedef int64 (*HPMHOOK_post_duel_difftime) (int64 retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_duel_init) (bool *minimal); +typedef void (*HPMHOOK_post_duel_init) (bool minimal); +typedef void (*HPMHOOK_pre_duel_final) (void); +typedef void (*HPMHOOK_post_duel_final) (void); +#endif // MAP_DUEL_H +#ifdef MAP_ELEMENTAL_H /* elemental */ +typedef int (*HPMHOOK_pre_elemental_init) (bool *minimal); +typedef int (*HPMHOOK_post_elemental_init) (int retVal___, bool minimal); +typedef void (*HPMHOOK_pre_elemental_final) (void); +typedef void (*HPMHOOK_post_elemental_final) (void); +typedef bool (*HPMHOOK_pre_elemental_class) (int *class_); +typedef bool (*HPMHOOK_post_elemental_class) (bool retVal___, int class_); +typedef struct view_data* (*HPMHOOK_pre_elemental_get_viewdata) (int *class_); +typedef struct view_data* (*HPMHOOK_post_elemental_get_viewdata) (struct view_data* retVal___, int class_); +typedef int (*HPMHOOK_pre_elemental_create) (struct map_session_data **sd, int *class_, unsigned int *lifetime); +typedef int (*HPMHOOK_post_elemental_create) (int retVal___, struct map_session_data *sd, int class_, unsigned int lifetime); +typedef int (*HPMHOOK_pre_elemental_data_received) (const struct s_elemental **ele, bool *flag); +typedef int (*HPMHOOK_post_elemental_data_received) (int retVal___, const struct s_elemental *ele, bool flag); +typedef int (*HPMHOOK_pre_elemental_save) (struct elemental_data **ed); +typedef int (*HPMHOOK_post_elemental_save) (int retVal___, struct elemental_data *ed); +typedef int (*HPMHOOK_pre_elemental_change_mode_ack) (struct elemental_data **ed, int *mode); +typedef int (*HPMHOOK_post_elemental_change_mode_ack) (int retVal___, struct elemental_data *ed, int mode); +typedef int (*HPMHOOK_pre_elemental_change_mode) (struct elemental_data **ed, uint32 *mode); +typedef int (*HPMHOOK_post_elemental_change_mode) (int retVal___, struct elemental_data *ed, uint32 mode); +typedef void (*HPMHOOK_pre_elemental_heal) (struct elemental_data **ed, int *hp, int *sp); +typedef void (*HPMHOOK_post_elemental_heal) (struct elemental_data *ed, int hp, int sp); +typedef int (*HPMHOOK_pre_elemental_dead) (struct elemental_data **ed); +typedef int (*HPMHOOK_post_elemental_dead) (int retVal___, struct elemental_data *ed); +typedef int (*HPMHOOK_pre_elemental_delete) (struct elemental_data **ed, int *reply); +typedef int (*HPMHOOK_post_elemental_delete) (int retVal___, struct elemental_data *ed, int reply); +typedef void (*HPMHOOK_pre_elemental_summon_stop) (struct elemental_data **ed); +typedef void (*HPMHOOK_post_elemental_summon_stop) (struct elemental_data *ed); +typedef int (*HPMHOOK_pre_elemental_get_lifetime) (struct elemental_data **ed); +typedef int (*HPMHOOK_post_elemental_get_lifetime) (int retVal___, struct elemental_data *ed); +typedef int (*HPMHOOK_pre_elemental_unlocktarget) (struct elemental_data **ed); +typedef int (*HPMHOOK_post_elemental_unlocktarget) (int retVal___, struct elemental_data *ed); +typedef int (*HPMHOOK_pre_elemental_skillnotok) (uint16 *skill_id, struct elemental_data **ed); +typedef int (*HPMHOOK_post_elemental_skillnotok) (int retVal___, uint16 skill_id, struct elemental_data *ed); +typedef int (*HPMHOOK_pre_elemental_set_target) (struct map_session_data **sd, struct block_list **bl); +typedef int (*HPMHOOK_post_elemental_set_target) (int retVal___, struct map_session_data *sd, struct block_list *bl); +typedef int (*HPMHOOK_pre_elemental_clean_single_effect) (struct elemental_data **ed, uint16 *skill_id); +typedef int (*HPMHOOK_post_elemental_clean_single_effect) (int retVal___, struct elemental_data *ed, uint16 skill_id); +typedef int (*HPMHOOK_pre_elemental_clean_effect) (struct elemental_data **ed); +typedef int (*HPMHOOK_post_elemental_clean_effect) (int retVal___, struct elemental_data *ed); +typedef int (*HPMHOOK_pre_elemental_action) (struct elemental_data **ed, struct block_list **bl, int64 *tick); +typedef int (*HPMHOOK_post_elemental_action) (int retVal___, struct elemental_data *ed, struct block_list *bl, int64 tick); +typedef struct skill_condition (*HPMHOOK_pre_elemental_skill_get_requirements) (uint16 *skill_id, uint16 *skill_lv); +typedef struct skill_condition (*HPMHOOK_post_elemental_skill_get_requirements) (struct skill_condition retVal___, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_elemental_read_skilldb) (void); +typedef int (*HPMHOOK_post_elemental_read_skilldb) (int retVal___); +typedef void (*HPMHOOK_pre_elemental_reload_db) (void); +typedef void (*HPMHOOK_post_elemental_reload_db) (void); +typedef void (*HPMHOOK_pre_elemental_reload_skilldb) (void); +typedef void (*HPMHOOK_post_elemental_reload_skilldb) (void); +typedef int (*HPMHOOK_pre_elemental_search_index) (int *class_); +typedef int (*HPMHOOK_post_elemental_search_index) (int retVal___, int class_); +typedef void (*HPMHOOK_pre_elemental_summon_init) (struct elemental_data **ed); +typedef void (*HPMHOOK_post_elemental_summon_init) (struct elemental_data *ed); +typedef int (*HPMHOOK_pre_elemental_summon_end_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_elemental_summon_end_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_elemental_ai_sub_timer_activesearch) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_elemental_ai_sub_timer_activesearch) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_elemental_ai_sub_timer) (struct elemental_data **ed, struct map_session_data **sd, int64 *tick); +typedef int (*HPMHOOK_post_elemental_ai_sub_timer) (int retVal___, struct elemental_data *ed, struct map_session_data *sd, int64 tick); +typedef int (*HPMHOOK_pre_elemental_ai_sub_foreachclient) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_elemental_ai_sub_foreachclient) (int retVal___, struct map_session_data *sd, va_list ap); +typedef int (*HPMHOOK_pre_elemental_ai_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_elemental_ai_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_elemental_read_db) (void); +typedef int (*HPMHOOK_post_elemental_read_db) (int retVal___); +#endif // MAP_ELEMENTAL_H +#ifdef CHAR_GEOIP_H /* geoip */ +typedef const char* (*HPMHOOK_pre_geoip_getcountry) (uint32 *ipnum); +typedef const char* (*HPMHOOK_post_geoip_getcountry) (const char* retVal___, uint32 ipnum); +typedef void (*HPMHOOK_pre_geoip_final) (bool *shutdown); +typedef void (*HPMHOOK_post_geoip_final) (bool shutdown); +typedef void (*HPMHOOK_pre_geoip_init) (void); +typedef void (*HPMHOOK_post_geoip_init) (void); +#endif // CHAR_GEOIP_H +#ifdef COMMON_GRFIO_H /* grfio */ +typedef void (*HPMHOOK_pre_grfio_init) (const char **fname); +typedef void (*HPMHOOK_post_grfio_init) (const char *fname); +typedef void (*HPMHOOK_pre_grfio_final) (void); +typedef void (*HPMHOOK_post_grfio_final) (void); +typedef void* (*HPMHOOK_pre_grfio_reads) (const char **fname, int **size); +typedef void* (*HPMHOOK_post_grfio_reads) (void* retVal___, const char *fname, int *size); +typedef const char* (*HPMHOOK_pre_grfio_find_file) (const char **fname); +typedef const char* (*HPMHOOK_post_grfio_find_file) (const char* retVal___, const char *fname); +typedef unsigned long (*HPMHOOK_pre_grfio_crc32) (const unsigned char **buf, unsigned int *len); +typedef unsigned long (*HPMHOOK_post_grfio_crc32) (unsigned long retVal___, const unsigned char *buf, unsigned int len); +typedef int (*HPMHOOK_pre_grfio_decode_zip) (void **dest, unsigned long **dest_len, const void **source, unsigned long *source_len); +typedef int (*HPMHOOK_post_grfio_decode_zip) (int retVal___, void *dest, unsigned long *dest_len, const void *source, unsigned long source_len); +typedef int (*HPMHOOK_pre_grfio_encode_zip) (void **dest, unsigned long **dest_len, const void **source, unsigned long *source_len); +typedef int (*HPMHOOK_post_grfio_encode_zip) (int retVal___, void *dest, unsigned long *dest_len, const void *source, unsigned long source_len); +#endif // COMMON_GRFIO_H +#ifdef MAP_GUILD_H /* guild */ +typedef void (*HPMHOOK_pre_guild_init) (bool *minimal); +typedef void (*HPMHOOK_post_guild_init) (bool minimal); +typedef void (*HPMHOOK_pre_guild_final) (void); +typedef void (*HPMHOOK_post_guild_final) (void); +typedef int (*HPMHOOK_pre_guild_skill_get_max) (int *id); +typedef int (*HPMHOOK_post_guild_skill_get_max) (int retVal___, int id); +typedef int (*HPMHOOK_pre_guild_checkskill) (struct guild **g, int *id); +typedef int (*HPMHOOK_post_guild_checkskill) (int retVal___, struct guild *g, int id); +typedef int (*HPMHOOK_pre_guild_check_skill_require) (struct guild **g, int *id); +typedef int (*HPMHOOK_post_guild_check_skill_require) (int retVal___, struct guild *g, int id); +typedef int (*HPMHOOK_pre_guild_checkcastles) (struct guild **g); +typedef int (*HPMHOOK_post_guild_checkcastles) (int retVal___, struct guild *g); +typedef bool (*HPMHOOK_pre_guild_isallied) (int *guild_id, int *guild_id2); +typedef bool (*HPMHOOK_post_guild_isallied) (bool retVal___, int guild_id, int guild_id2); +typedef struct guild* (*HPMHOOK_pre_guild_search) (int *guild_id); +typedef struct guild* (*HPMHOOK_post_guild_search) (struct guild* retVal___, int guild_id); +typedef struct guild* (*HPMHOOK_pre_guild_searchname) (const char **str); +typedef struct guild* (*HPMHOOK_post_guild_searchname) (struct guild* retVal___, const char *str); +typedef struct guild_castle* (*HPMHOOK_pre_guild_castle_search) (int *gcid); +typedef struct guild_castle* (*HPMHOOK_post_guild_castle_search) (struct guild_castle* retVal___, int gcid); +typedef struct guild_castle* (*HPMHOOK_pre_guild_mapname2gc) (const char **mapname); +typedef struct guild_castle* (*HPMHOOK_post_guild_mapname2gc) (struct guild_castle* retVal___, const char *mapname); +typedef struct guild_castle* (*HPMHOOK_pre_guild_mapindex2gc) (short *map_index); +typedef struct guild_castle* (*HPMHOOK_post_guild_mapindex2gc) (struct guild_castle* retVal___, short map_index); +typedef struct map_session_data* (*HPMHOOK_pre_guild_getavailablesd) (struct guild **g); +typedef struct map_session_data* (*HPMHOOK_post_guild_getavailablesd) (struct map_session_data* retVal___, struct guild *g); +typedef int (*HPMHOOK_pre_guild_getindex) (const struct guild **g, int *account_id, int *char_id); +typedef int (*HPMHOOK_post_guild_getindex) (int retVal___, const struct guild *g, int account_id, int char_id); +typedef int (*HPMHOOK_pre_guild_getposition) (struct guild **g, struct map_session_data **sd); +typedef int (*HPMHOOK_post_guild_getposition) (int retVal___, struct guild *g, struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_guild_payexp) (struct map_session_data **sd, uint64 *exp); +typedef uint64 (*HPMHOOK_post_guild_payexp) (uint64 retVal___, struct map_session_data *sd, uint64 exp); +typedef int (*HPMHOOK_pre_guild_getexp) (struct map_session_data **sd, int *exp); +typedef int (*HPMHOOK_post_guild_getexp) (int retVal___, struct map_session_data *sd, int exp); +typedef int (*HPMHOOK_pre_guild_create) (struct map_session_data **sd, const char **name); +typedef int (*HPMHOOK_post_guild_create) (int retVal___, struct map_session_data *sd, const char *name); +typedef int (*HPMHOOK_pre_guild_created) (int *account_id, int *guild_id); +typedef int (*HPMHOOK_post_guild_created) (int retVal___, int account_id, int guild_id); +typedef int (*HPMHOOK_pre_guild_request_info) (int *guild_id); +typedef int (*HPMHOOK_post_guild_request_info) (int retVal___, int guild_id); +typedef int (*HPMHOOK_pre_guild_recv_noinfo) (int *guild_id); +typedef int (*HPMHOOK_post_guild_recv_noinfo) (int retVal___, int guild_id); +typedef int (*HPMHOOK_pre_guild_recv_info) (const struct guild **sg); +typedef int (*HPMHOOK_post_guild_recv_info) (int retVal___, const struct guild *sg); +typedef int (*HPMHOOK_pre_guild_npc_request_info) (int *guild_id, const char **ev); +typedef int (*HPMHOOK_post_guild_npc_request_info) (int retVal___, int guild_id, const char *ev); +typedef int (*HPMHOOK_pre_guild_invite) (struct map_session_data **sd, struct map_session_data **tsd); +typedef int (*HPMHOOK_post_guild_invite) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); +typedef int (*HPMHOOK_pre_guild_reply_invite) (struct map_session_data **sd, int *guild_id, int *flag); +typedef int (*HPMHOOK_post_guild_reply_invite) (int retVal___, struct map_session_data *sd, int guild_id, int flag); +typedef void (*HPMHOOK_pre_guild_member_joined) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_guild_member_joined) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_guild_member_added) (int *guild_id, int *account_id, int *char_id, int *flag); +typedef int (*HPMHOOK_post_guild_member_added) (int retVal___, int guild_id, int account_id, int char_id, int flag); +typedef int (*HPMHOOK_pre_guild_leave) (struct map_session_data **sd, int *guild_id, int *account_id, int *char_id, const char **mes); +typedef int (*HPMHOOK_post_guild_leave) (int retVal___, struct map_session_data *sd, int guild_id, int account_id, int char_id, const char *mes); +typedef int (*HPMHOOK_pre_guild_member_withdraw) (int *guild_id, int *account_id, int *char_id, int *flag, const char **name, const char **mes); +typedef int (*HPMHOOK_post_guild_member_withdraw) (int retVal___, int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes); +typedef int (*HPMHOOK_pre_guild_expulsion) (struct map_session_data **sd, int *guild_id, int *account_id, int *char_id, const char **mes); +typedef int (*HPMHOOK_post_guild_expulsion) (int retVal___, struct map_session_data *sd, int guild_id, int account_id, int char_id, const char *mes); +typedef int (*HPMHOOK_pre_guild_skillup) (struct map_session_data **sd, uint16 *skill_id); +typedef int (*HPMHOOK_post_guild_skillup) (int retVal___, struct map_session_data *sd, uint16 skill_id); +typedef void (*HPMHOOK_pre_guild_block_skill) (struct map_session_data **sd, int *time); +typedef void (*HPMHOOK_post_guild_block_skill) (struct map_session_data *sd, int time); +typedef int (*HPMHOOK_pre_guild_reqalliance) (struct map_session_data **sd, struct map_session_data **tsd); +typedef int (*HPMHOOK_post_guild_reqalliance) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); +typedef int (*HPMHOOK_pre_guild_reply_reqalliance) (struct map_session_data **sd, int *account_id, int *flag); +typedef int (*HPMHOOK_post_guild_reply_reqalliance) (int retVal___, struct map_session_data *sd, int account_id, int flag); +typedef int (*HPMHOOK_pre_guild_allianceack) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char **name1, const char **name2); +typedef int (*HPMHOOK_post_guild_allianceack) (int retVal___, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag, const char *name1, const char *name2); +typedef int (*HPMHOOK_pre_guild_delalliance) (struct map_session_data **sd, int *guild_id, int *flag); +typedef int (*HPMHOOK_post_guild_delalliance) (int retVal___, struct map_session_data *sd, int guild_id, int flag); +typedef int (*HPMHOOK_pre_guild_opposition) (struct map_session_data **sd, struct map_session_data **tsd); +typedef int (*HPMHOOK_post_guild_opposition) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); +typedef int (*HPMHOOK_pre_guild_check_alliance) (int *guild_id1, int *guild_id2, int *flag); +typedef int (*HPMHOOK_post_guild_check_alliance) (int retVal___, int guild_id1, int guild_id2, int flag); +typedef int (*HPMHOOK_pre_guild_send_memberinfoshort) (struct map_session_data **sd, int *online); +typedef int (*HPMHOOK_post_guild_send_memberinfoshort) (int retVal___, struct map_session_data *sd, int online); +typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class, uint32 *last_login); +typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login); +typedef int (*HPMHOOK_pre_guild_change_memberposition) (int *guild_id, int *account_id, int *char_id, short *idx); +typedef int (*HPMHOOK_post_guild_change_memberposition) (int retVal___, int guild_id, int account_id, int char_id, short idx); +typedef int (*HPMHOOK_pre_guild_memberposition_changed) (struct guild **g, int *idx, int *pos); +typedef int (*HPMHOOK_post_guild_memberposition_changed) (int retVal___, struct guild *g, int idx, int pos); +typedef int (*HPMHOOK_pre_guild_change_position) (int *guild_id, int *idx, int *mode, int *exp_mode, const char **name); +typedef int (*HPMHOOK_post_guild_change_position) (int retVal___, int guild_id, int idx, int mode, int exp_mode, const char *name); +typedef int (*HPMHOOK_pre_guild_position_changed) (int *guild_id, int *idx, const struct guild_position **p); +typedef int (*HPMHOOK_post_guild_position_changed) (int retVal___, int guild_id, int idx, const struct guild_position *p); +typedef int (*HPMHOOK_pre_guild_change_notice) (struct map_session_data **sd, int *guild_id, const char **mes1, const char **mes2); +typedef int (*HPMHOOK_post_guild_change_notice) (int retVal___, struct map_session_data *sd, int guild_id, const char *mes1, const char *mes2); +typedef int (*HPMHOOK_pre_guild_notice_changed) (int *guild_id, const char **mes1, const char **mes2); +typedef int (*HPMHOOK_post_guild_notice_changed) (int retVal___, int guild_id, const char *mes1, const char *mes2); +typedef int (*HPMHOOK_pre_guild_change_emblem) (struct map_session_data **sd, int *len, const char **data); +typedef int (*HPMHOOK_post_guild_change_emblem) (int retVal___, struct map_session_data *sd, int len, const char *data); +typedef int (*HPMHOOK_pre_guild_emblem_changed) (int *len, int *guild_id, int *emblem_id, const char **data); +typedef int (*HPMHOOK_post_guild_emblem_changed) (int retVal___, int len, int guild_id, int emblem_id, const char *data); +typedef int (*HPMHOOK_pre_guild_send_message) (struct map_session_data **sd, const char **mes); +typedef int (*HPMHOOK_post_guild_send_message) (int retVal___, struct map_session_data *sd, const char *mes); +typedef int (*HPMHOOK_pre_guild_send_dot_remove) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_guild_send_dot_remove) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_guild_skillupack) (int *guild_id, uint16 *skill_id, int *account_id); +typedef int (*HPMHOOK_post_guild_skillupack) (int retVal___, int guild_id, uint16 skill_id, int account_id); +typedef int (*HPMHOOK_pre_guild_dobreak) (struct map_session_data **sd, const char **name); +typedef int (*HPMHOOK_post_guild_dobreak) (int retVal___, struct map_session_data *sd, const char *name); +typedef int (*HPMHOOK_pre_guild_broken) (int *guild_id, int *flag); +typedef int (*HPMHOOK_post_guild_broken) (int retVal___, int guild_id, int flag); +typedef int (*HPMHOOK_pre_guild_gm_change) (int *guild_id, int *char_id); +typedef int (*HPMHOOK_post_guild_gm_change) (int retVal___, int guild_id, int char_id); +typedef int (*HPMHOOK_pre_guild_gm_changed) (int *guild_id, int *account_id, int *char_id); +typedef int (*HPMHOOK_post_guild_gm_changed) (int retVal___, int guild_id, int account_id, int char_id); +typedef void (*HPMHOOK_pre_guild_castle_map_init) (void); +typedef void (*HPMHOOK_post_guild_castle_map_init) (void); +typedef int (*HPMHOOK_pre_guild_castledatasave) (int *castle_id, int *index, int *value); +typedef int (*HPMHOOK_post_guild_castledatasave) (int retVal___, int castle_id, int index, int value); +typedef int (*HPMHOOK_pre_guild_castledataloadack) (int *len, const struct guild_castle **gc); +typedef int (*HPMHOOK_post_guild_castledataloadack) (int retVal___, int len, const struct guild_castle *gc); +typedef void (*HPMHOOK_pre_guild_castle_reconnect) (int *castle_id, int *index, int *value); +typedef void (*HPMHOOK_post_guild_castle_reconnect) (int castle_id, int index, int value); +typedef void (*HPMHOOK_pre_guild_agit_start) (void); +typedef void (*HPMHOOK_post_guild_agit_start) (void); +typedef void (*HPMHOOK_pre_guild_agit_end) (void); +typedef void (*HPMHOOK_post_guild_agit_end) (void); +typedef void (*HPMHOOK_pre_guild_agit2_start) (void); +typedef void (*HPMHOOK_post_guild_agit2_start) (void); +typedef void (*HPMHOOK_pre_guild_agit2_end) (void); +typedef void (*HPMHOOK_post_guild_agit2_end) (void); +typedef void (*HPMHOOK_pre_guild_flag_add) (struct npc_data **nd); +typedef void (*HPMHOOK_post_guild_flag_add) (struct npc_data *nd); +typedef void (*HPMHOOK_pre_guild_flag_remove) (struct npc_data **nd); +typedef void (*HPMHOOK_post_guild_flag_remove) (struct npc_data *nd); +typedef void (*HPMHOOK_pre_guild_flags_clear) (void); +typedef void (*HPMHOOK_post_guild_flags_clear) (void); +typedef void (*HPMHOOK_pre_guild_aura_refresh) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); +typedef void (*HPMHOOK_post_guild_aura_refresh) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); +typedef void (*HPMHOOK_pre_guild_retrieveitembound) (int *char_id, int *aid, int *guild_id); +typedef void (*HPMHOOK_post_guild_retrieveitembound) (int char_id, int aid, int guild_id); +typedef int (*HPMHOOK_pre_guild_payexp_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_guild_payexp_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef struct map_session_data* (*HPMHOOK_pre_guild_sd_check) (int *guild_id, int *account_id, int *char_id); +typedef struct map_session_data* (*HPMHOOK_post_guild_sd_check) (struct map_session_data* retVal___, int guild_id, int account_id, int char_id); +typedef bool (*HPMHOOK_pre_guild_read_guildskill_tree_db) (char **split[], int *columns, int *current); +typedef bool (*HPMHOOK_post_guild_read_guildskill_tree_db) (bool retVal___, char *split[], int columns, int current); +typedef bool (*HPMHOOK_pre_guild_read_castledb_libconfig) (void); +typedef bool (*HPMHOOK_post_guild_read_castledb_libconfig) (bool retVal___); +typedef bool (*HPMHOOK_pre_guild_read_castledb_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source); +typedef bool (*HPMHOOK_post_guild_read_castledb_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source); +typedef bool (*HPMHOOK_pre_guild_read_castledb_libconfig_sub_warp) (struct config_setting_t **wd, const char **source, struct guild_castle **gc); +typedef bool (*HPMHOOK_post_guild_read_castledb_libconfig_sub_warp) (bool retVal___, struct config_setting_t *wd, const char *source, struct guild_castle *gc); +typedef int (*HPMHOOK_pre_guild_payexp_timer_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_guild_payexp_timer_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_guild_send_xy_timer_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_guild_send_xy_timer_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_guild_send_xy_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_guild_send_xy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef struct DBData (*HPMHOOK_pre_guild_create_expcache) (union DBKey *key, va_list args); +typedef struct DBData (*HPMHOOK_post_guild_create_expcache) (struct DBData retVal___, union DBKey key, va_list args); +typedef int (*HPMHOOK_pre_guild_eventlist_db_final) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_guild_eventlist_db_final) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_guild_expcache_db_final) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_guild_expcache_db_final) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_guild_castle_db_final) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_guild_castle_db_final) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_guild_broken_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_guild_broken_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_guild_castle_broken_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_guild_castle_broken_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef void (*HPMHOOK_pre_guild_makemember) (struct guild_member **m, struct map_session_data **sd); +typedef void (*HPMHOOK_post_guild_makemember) (struct guild_member *m, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_guild_check_member) (const struct guild **g); +typedef int (*HPMHOOK_post_guild_check_member) (int retVal___, const struct guild *g); +typedef int (*HPMHOOK_pre_guild_get_alliance_count) (struct guild **g, int *flag); +typedef int (*HPMHOOK_post_guild_get_alliance_count) (int retVal___, struct guild *g, int flag); +typedef void (*HPMHOOK_pre_guild_castle_reconnect_sub) (void **key, void **data, va_list ap); +typedef void (*HPMHOOK_post_guild_castle_reconnect_sub) (void *key, void *data, va_list ap); +#endif // MAP_GUILD_H +#ifdef MAP_STORAGE_H /* gstorage */ +typedef struct guild_storage* (*HPMHOOK_pre_gstorage_ensure) (int *guild_id); +typedef struct guild_storage* (*HPMHOOK_post_gstorage_ensure) (struct guild_storage* retVal___, int guild_id); +typedef void (*HPMHOOK_pre_gstorage_init) (bool *minimal); +typedef void (*HPMHOOK_post_gstorage_init) (bool minimal); +typedef void (*HPMHOOK_pre_gstorage_final) (void); +typedef void (*HPMHOOK_post_gstorage_final) (void); +typedef int (*HPMHOOK_pre_gstorage_delete) (int *guild_id); +typedef int (*HPMHOOK_post_gstorage_delete) (int retVal___, int guild_id); +typedef int (*HPMHOOK_pre_gstorage_open) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_gstorage_open) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_gstorage_additem) (struct map_session_data **sd, struct guild_storage **stor, struct item **item_data, int *amount); +typedef int (*HPMHOOK_post_gstorage_additem) (int retVal___, struct map_session_data *sd, struct guild_storage *stor, struct item *item_data, int amount); +typedef int (*HPMHOOK_pre_gstorage_delitem) (struct map_session_data **sd, struct guild_storage **stor, int *n, int *amount); +typedef int (*HPMHOOK_post_gstorage_delitem) (int retVal___, struct map_session_data *sd, struct guild_storage *stor, int n, int amount); +typedef int (*HPMHOOK_pre_gstorage_add) (struct map_session_data **sd, int *index, int *amount); +typedef int (*HPMHOOK_post_gstorage_add) (int retVal___, struct map_session_data *sd, int index, int amount); +typedef int (*HPMHOOK_pre_gstorage_get) (struct map_session_data **sd, int *index, int *amount); +typedef int (*HPMHOOK_post_gstorage_get) (int retVal___, struct map_session_data *sd, int index, int amount); +typedef int (*HPMHOOK_pre_gstorage_addfromcart) (struct map_session_data **sd, int *index, int *amount); +typedef int (*HPMHOOK_post_gstorage_addfromcart) (int retVal___, struct map_session_data *sd, int index, int amount); +typedef int (*HPMHOOK_pre_gstorage_gettocart) (struct map_session_data **sd, int *index, int *amount); +typedef int (*HPMHOOK_post_gstorage_gettocart) (int retVal___, struct map_session_data *sd, int index, int amount); +typedef int (*HPMHOOK_pre_gstorage_close) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_gstorage_close) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_gstorage_pc_quit) (struct map_session_data **sd, int *flag); +typedef int (*HPMHOOK_post_gstorage_pc_quit) (int retVal___, struct map_session_data *sd, int flag); +typedef int (*HPMHOOK_pre_gstorage_save) (int *account_id, int *guild_id, int *flag); +typedef int (*HPMHOOK_post_gstorage_save) (int retVal___, int account_id, int guild_id, int flag); +typedef int (*HPMHOOK_pre_gstorage_saved) (int *guild_id); +typedef int (*HPMHOOK_post_gstorage_saved) (int retVal___, int guild_id); +typedef struct DBData (*HPMHOOK_pre_gstorage_create) (union DBKey *key, va_list args); +typedef struct DBData (*HPMHOOK_post_gstorage_create) (struct DBData retVal___, union DBKey key, va_list args); +#endif // MAP_STORAGE_H +#ifdef MAP_HOMUNCULUS_H /* homun */ +typedef void (*HPMHOOK_pre_homun_init) (bool *minimal); +typedef void (*HPMHOOK_post_homun_init) (bool minimal); +typedef void (*HPMHOOK_pre_homun_final) (void); +typedef void (*HPMHOOK_post_homun_final) (void); +typedef void (*HPMHOOK_pre_homun_reload) (void); +typedef void (*HPMHOOK_post_homun_reload) (void); +typedef void (*HPMHOOK_pre_homun_reload_skill) (void); +typedef void (*HPMHOOK_post_homun_reload_skill) (void); +typedef struct view_data* (*HPMHOOK_pre_homun_get_viewdata) (int *class_); +typedef struct view_data* (*HPMHOOK_post_homun_get_viewdata) (struct view_data* retVal___, int class_); +typedef enum homun_type (*HPMHOOK_pre_homun_class2type) (int *class_); +typedef enum homun_type (*HPMHOOK_post_homun_class2type) (enum homun_type retVal___, int class_); +typedef void (*HPMHOOK_pre_homun_damaged) (struct homun_data **hd); +typedef void (*HPMHOOK_post_homun_damaged) (struct homun_data *hd); +typedef int (*HPMHOOK_pre_homun_dead) (struct homun_data **hd); +typedef int (*HPMHOOK_post_homun_dead) (int retVal___, struct homun_data *hd); +typedef int (*HPMHOOK_pre_homun_vaporize) (struct map_session_data **sd, enum homun_state *state, bool *force); +typedef int (*HPMHOOK_post_homun_vaporize) (int retVal___, struct map_session_data *sd, enum homun_state state, bool force); +typedef int (*HPMHOOK_pre_homun_delete) (struct homun_data **hd, int *emote); +typedef int (*HPMHOOK_post_homun_delete) (int retVal___, struct homun_data *hd, int emote); +typedef int (*HPMHOOK_pre_homun_checkskill) (struct homun_data **hd, uint16 *skill_id); +typedef int (*HPMHOOK_post_homun_checkskill) (int retVal___, struct homun_data *hd, uint16 skill_id); +typedef int (*HPMHOOK_pre_homun_calc_skilltree) (struct homun_data **hd, int *flag_evolve); +typedef int (*HPMHOOK_post_homun_calc_skilltree) (int retVal___, struct homun_data *hd, int flag_evolve); +typedef int (*HPMHOOK_pre_homun_skill_tree_get_max) (int *id, int *b_class); +typedef int (*HPMHOOK_post_homun_skill_tree_get_max) (int retVal___, int id, int b_class); +typedef void (*HPMHOOK_pre_homun_skillup) (struct homun_data **hd, uint16 *skill_id); +typedef void (*HPMHOOK_post_homun_skillup) (struct homun_data *hd, uint16 skill_id); +typedef bool (*HPMHOOK_pre_homun_levelup) (struct homun_data **hd); +typedef bool (*HPMHOOK_post_homun_levelup) (bool retVal___, struct homun_data *hd); +typedef int (*HPMHOOK_pre_homun_change_class) (struct homun_data **hd, int *class_); +typedef int (*HPMHOOK_post_homun_change_class) (int retVal___, struct homun_data *hd, int class_); +typedef bool (*HPMHOOK_pre_homun_evolve) (struct homun_data **hd); +typedef bool (*HPMHOOK_post_homun_evolve) (bool retVal___, struct homun_data *hd); +typedef bool (*HPMHOOK_pre_homun_mutate) (struct homun_data **hd, int *homun_id); +typedef bool (*HPMHOOK_post_homun_mutate) (bool retVal___, struct homun_data *hd, int homun_id); +typedef int (*HPMHOOK_pre_homun_gainexp) (struct homun_data **hd, unsigned int *exp); +typedef int (*HPMHOOK_post_homun_gainexp) (int retVal___, struct homun_data *hd, unsigned int exp); +typedef int (*HPMHOOK_pre_homun_gainexp_real) (struct homun_data **hd, unsigned int *exp); +typedef int (*HPMHOOK_post_homun_gainexp_real) (int retVal___, struct homun_data *hd, unsigned int exp); +typedef unsigned int (*HPMHOOK_pre_homun_add_intimacy) (struct homun_data **hd, unsigned int *value); +typedef unsigned int (*HPMHOOK_post_homun_add_intimacy) (unsigned int retVal___, struct homun_data *hd, unsigned int value); +typedef unsigned int (*HPMHOOK_pre_homun_consume_intimacy) (struct homun_data **hd, unsigned int *value); +typedef unsigned int (*HPMHOOK_post_homun_consume_intimacy) (unsigned int retVal___, struct homun_data *hd, unsigned int value); +typedef void (*HPMHOOK_pre_homun_healed) (struct homun_data **hd); +typedef void (*HPMHOOK_post_homun_healed) (struct homun_data *hd); +typedef void (*HPMHOOK_pre_homun_save) (struct homun_data **hd); +typedef void (*HPMHOOK_post_homun_save) (struct homun_data *hd); +typedef unsigned char (*HPMHOOK_pre_homun_menu) (struct map_session_data **sd, unsigned char *menu_num); +typedef unsigned char (*HPMHOOK_post_homun_menu) (unsigned char retVal___, struct map_session_data *sd, unsigned char menu_num); +typedef bool (*HPMHOOK_pre_homun_feed) (struct map_session_data **sd, struct homun_data **hd); +typedef bool (*HPMHOOK_post_homun_feed) (bool retVal___, struct map_session_data *sd, struct homun_data *hd); +typedef int (*HPMHOOK_pre_homun_hunger_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_homun_hunger_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_homun_hunger_timer_delete) (struct homun_data **hd); +typedef void (*HPMHOOK_post_homun_hunger_timer_delete) (struct homun_data *hd); +typedef int (*HPMHOOK_pre_homun_change_name) (struct map_session_data **sd, const char **name); +typedef int (*HPMHOOK_post_homun_change_name) (int retVal___, struct map_session_data *sd, const char *name); +typedef bool (*HPMHOOK_pre_homun_change_name_ack) (struct map_session_data **sd, const char **name, int *flag); +typedef bool (*HPMHOOK_post_homun_change_name_ack) (bool retVal___, struct map_session_data *sd, const char *name, int flag); +typedef int (*HPMHOOK_pre_homun_db_search) (int *key, int *type); +typedef int (*HPMHOOK_post_homun_db_search) (int retVal___, int key, int type); +typedef bool (*HPMHOOK_pre_homun_create) (struct map_session_data **sd, const struct s_homunculus **hom, bool *is_new); +typedef bool (*HPMHOOK_post_homun_create) (bool retVal___, struct map_session_data *sd, const struct s_homunculus *hom, bool is_new); +typedef void (*HPMHOOK_pre_homun_init_timers) (struct homun_data **hd); +typedef void (*HPMHOOK_post_homun_init_timers) (struct homun_data *hd); +typedef bool (*HPMHOOK_pre_homun_call) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_homun_call) (bool retVal___, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_homun_recv_data) (int *account_id, const struct s_homunculus **sh, int *flag); +typedef bool (*HPMHOOK_post_homun_recv_data) (bool retVal___, int account_id, const struct s_homunculus *sh, int flag); +typedef bool (*HPMHOOK_pre_homun_creation_request) (struct map_session_data **sd, int *class_); +typedef bool (*HPMHOOK_post_homun_creation_request) (bool retVal___, struct map_session_data *sd, int class_); +typedef bool (*HPMHOOK_pre_homun_ressurect) (struct map_session_data **sd, unsigned char *per, short *x, short *y); +typedef bool (*HPMHOOK_post_homun_ressurect) (bool retVal___, struct map_session_data *sd, unsigned char per, short x, short y); +typedef void (*HPMHOOK_pre_homun_revive) (struct homun_data **hd, unsigned int *hp, unsigned int *sp); +typedef void (*HPMHOOK_post_homun_revive) (struct homun_data *hd, unsigned int hp, unsigned int sp); +typedef void (*HPMHOOK_pre_homun_stat_reset) (struct homun_data **hd); +typedef void (*HPMHOOK_post_homun_stat_reset) (struct homun_data *hd); +typedef bool (*HPMHOOK_pre_homun_shuffle) (struct homun_data **hd); +typedef bool (*HPMHOOK_post_homun_shuffle) (bool retVal___, struct homun_data *hd); +typedef bool (*HPMHOOK_pre_homun_read_db_sub) (char **str[], int *columns, int *current); +typedef bool (*HPMHOOK_post_homun_read_db_sub) (bool retVal___, char *str[], int columns, int current); +typedef void (*HPMHOOK_pre_homun_read_db) (void); +typedef void (*HPMHOOK_post_homun_read_db) (void); +typedef bool (*HPMHOOK_pre_homun_read_skill_db_sub) (char **split[], int *columns, int *current); +typedef bool (*HPMHOOK_post_homun_read_skill_db_sub) (bool retVal___, char *split[], int columns, int current); +typedef void (*HPMHOOK_pre_homun_skill_db_read) (void); +typedef void (*HPMHOOK_post_homun_skill_db_read) (void); +typedef void (*HPMHOOK_pre_homun_exp_db_read) (void); +typedef void (*HPMHOOK_post_homun_exp_db_read) (void); +typedef void (*HPMHOOK_pre_homun_addspiritball) (struct homun_data **hd, int *max); +typedef void (*HPMHOOK_post_homun_addspiritball) (struct homun_data *hd, int max); +typedef void (*HPMHOOK_pre_homun_delspiritball) (struct homun_data **hd, int *count, int *type); +typedef void (*HPMHOOK_post_homun_delspiritball) (struct homun_data *hd, int count, int type); +typedef int8 (*HPMHOOK_pre_homun_get_intimacy_grade) (struct homun_data **hd); +typedef int8 (*HPMHOOK_post_homun_get_intimacy_grade) (int8 retVal___, struct homun_data *hd); +#endif // MAP_HOMUNCULUS_H +#ifdef MAP_INSTANCE_H /* instance */ +typedef void (*HPMHOOK_pre_instance_init) (bool *minimal); +typedef void (*HPMHOOK_post_instance_init) (bool minimal); +typedef void (*HPMHOOK_pre_instance_final) (void); +typedef void (*HPMHOOK_post_instance_final) (void); +typedef void (*HPMHOOK_pre_instance_reload) (void); +typedef void (*HPMHOOK_post_instance_reload) (void); +typedef int (*HPMHOOK_pre_instance_create) (int *party_id, const char **name, enum instance_owner_type *type); +typedef int (*HPMHOOK_post_instance_create) (int retVal___, int party_id, const char *name, enum instance_owner_type type); +typedef int (*HPMHOOK_pre_instance_add_map) (const char **name, int *instance_id, bool *usebasename, const char **map_name); +typedef int (*HPMHOOK_post_instance_add_map) (int retVal___, const char *name, int instance_id, bool usebasename, const char *map_name); +typedef void (*HPMHOOK_pre_instance_del_map) (int16 *m); +typedef void (*HPMHOOK_post_instance_del_map) (int16 m); +typedef int (*HPMHOOK_pre_instance_map2imap) (int16 *m, int *instance_id); +typedef int (*HPMHOOK_post_instance_map2imap) (int retVal___, int16 m, int instance_id); +typedef int (*HPMHOOK_pre_instance_mapid2imapid) (int16 *m, int *instance_id); +typedef int (*HPMHOOK_post_instance_mapid2imapid) (int retVal___, int16 m, int instance_id); +typedef int (*HPMHOOK_pre_instance_mapname2imap) (const char **map_name, int *instance_id); +typedef int (*HPMHOOK_post_instance_mapname2imap) (int retVal___, const char *map_name, int instance_id); +typedef int (*HPMHOOK_pre_instance_map_npcsub) (struct block_list **bl, va_list args); +typedef int (*HPMHOOK_post_instance_map_npcsub) (int retVal___, struct block_list *bl, va_list args); +typedef int (*HPMHOOK_pre_instance_init_npc) (struct block_list **bl, va_list args); +typedef int (*HPMHOOK_post_instance_init_npc) (int retVal___, struct block_list *bl, va_list args); +typedef void (*HPMHOOK_pre_instance_destroy) (int *instance_id); +typedef void (*HPMHOOK_post_instance_destroy) (int instance_id); +typedef void (*HPMHOOK_pre_instance_start) (int *instance_id); +typedef void (*HPMHOOK_post_instance_start) (int instance_id); +typedef void (*HPMHOOK_pre_instance_check_idle) (int *instance_id); +typedef void (*HPMHOOK_post_instance_check_idle) (int instance_id); +typedef void (*HPMHOOK_pre_instance_check_kick) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_instance_check_kick) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_instance_set_timeout) (int *instance_id, unsigned int *progress_timeout, unsigned int *idle_timeout); +typedef void (*HPMHOOK_post_instance_set_timeout) (int instance_id, unsigned int progress_timeout, unsigned int idle_timeout); +typedef bool (*HPMHOOK_pre_instance_valid) (int *instance_id); +typedef bool (*HPMHOOK_post_instance_valid) (bool retVal___, int instance_id); +typedef int (*HPMHOOK_pre_instance_destroy_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_instance_destroy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_instance_force_destroy) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_instance_force_destroy) (struct map_session_data *sd); +#endif // MAP_INSTANCE_H +#ifdef CHAR_INT_ACHIEVEMENT_H /* inter_achievement */ +typedef int (*HPMHOOK_pre_inter_achievement_sql_init) (void); +typedef int (*HPMHOOK_post_inter_achievement_sql_init) (int retVal___); +typedef void (*HPMHOOK_pre_inter_achievement_sql_final) (void); +typedef void (*HPMHOOK_post_inter_achievement_sql_final) (void); +typedef int (*HPMHOOK_pre_inter_achievement_tosql) (int *char_id, struct char_achievements **cp, const struct char_achievements **p); +typedef int (*HPMHOOK_post_inter_achievement_tosql) (int retVal___, int char_id, struct char_achievements *cp, const struct char_achievements *p); +typedef bool (*HPMHOOK_pre_inter_achievement_fromsql) (int *char_id, struct char_achievements **a); +typedef bool (*HPMHOOK_post_inter_achievement_fromsql) (bool retVal___, int char_id, struct char_achievements *a); +typedef struct DBData (*HPMHOOK_pre_inter_achievement_ensure_char_achievements) (union DBKey *key, va_list args); +typedef struct DBData (*HPMHOOK_post_inter_achievement_ensure_char_achievements) (struct DBData retVal___, union DBKey key, va_list args); +typedef int (*HPMHOOK_pre_inter_achievement_char_achievements_clear) (union DBKey *key, struct DBData **data, va_list args); +typedef int (*HPMHOOK_post_inter_achievement_char_achievements_clear) (int retVal___, union DBKey key, struct DBData *data, va_list args); +typedef int (*HPMHOOK_pre_inter_achievement_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_achievement_parse_frommap) (int retVal___, int fd); +#endif // CHAR_INT_ACHIEVEMENT_H +#ifdef CHAR_INT_AUCTION_H /* inter_auction */ +typedef int (*HPMHOOK_pre_inter_auction_count) (int *char_id, bool *buy); +typedef int (*HPMHOOK_post_inter_auction_count) (int retVal___, int char_id, bool buy); +typedef void (*HPMHOOK_pre_inter_auction_save) (struct auction_data **auction); +typedef void (*HPMHOOK_post_inter_auction_save) (struct auction_data *auction); +typedef unsigned int (*HPMHOOK_pre_inter_auction_create) (struct auction_data **auction); +typedef unsigned int (*HPMHOOK_post_inter_auction_create) (unsigned int retVal___, struct auction_data *auction); +typedef int (*HPMHOOK_pre_inter_auction_end_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_inter_auction_end_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_inter_auction_delete_) (struct auction_data **auction); +typedef void (*HPMHOOK_post_inter_auction_delete_) (struct auction_data *auction); +typedef void (*HPMHOOK_pre_inter_auction_fromsql) (void); +typedef void (*HPMHOOK_post_inter_auction_fromsql) (void); +typedef int (*HPMHOOK_pre_inter_auction_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_auction_parse_frommap) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_inter_auction_sql_init) (void); +typedef int (*HPMHOOK_post_inter_auction_sql_init) (int retVal___); +typedef void (*HPMHOOK_pre_inter_auction_sql_final) (void); +typedef void (*HPMHOOK_post_inter_auction_sql_final) (void); +#endif // CHAR_INT_AUCTION_H +#ifdef CHAR_INT_CLAN_H /* inter_clan */ +typedef int (*HPMHOOK_pre_inter_clan_kick_inactive_members) (int *clan_id, int *kick_interval); +typedef int (*HPMHOOK_post_inter_clan_kick_inactive_members) (int retVal___, int clan_id, int kick_interval); +typedef int (*HPMHOOK_pre_inter_clan_count_members) (int *clan_id, int *kick_interval); +typedef int (*HPMHOOK_post_inter_clan_count_members) (int retVal___, int clan_id, int kick_interval); +typedef int (*HPMHOOK_pre_inter_clan_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_clan_parse_frommap) (int retVal___, int fd); +#endif // CHAR_INT_CLAN_H +#ifdef CHAR_INT_ELEMENTAL_H /* inter_elemental */ +typedef void (*HPMHOOK_pre_inter_elemental_sql_init) (void); +typedef void (*HPMHOOK_post_inter_elemental_sql_init) (void); +typedef void (*HPMHOOK_pre_inter_elemental_sql_final) (void); +typedef void (*HPMHOOK_post_inter_elemental_sql_final) (void); +typedef int (*HPMHOOK_pre_inter_elemental_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_elemental_parse_frommap) (int retVal___, int fd); +typedef bool (*HPMHOOK_pre_inter_elemental_create) (struct s_elemental **ele); +typedef bool (*HPMHOOK_post_inter_elemental_create) (bool retVal___, struct s_elemental *ele); +typedef bool (*HPMHOOK_pre_inter_elemental_save) (const struct s_elemental **ele); +typedef bool (*HPMHOOK_post_inter_elemental_save) (bool retVal___, const struct s_elemental *ele); +typedef bool (*HPMHOOK_pre_inter_elemental_load) (int *ele_id, int *char_id, struct s_elemental **ele); +typedef bool (*HPMHOOK_post_inter_elemental_load) (bool retVal___, int ele_id, int char_id, struct s_elemental *ele); +typedef bool (*HPMHOOK_pre_inter_elemental_delete) (int *ele_id); +typedef bool (*HPMHOOK_post_inter_elemental_delete) (bool retVal___, int ele_id); +#endif // CHAR_INT_ELEMENTAL_H +#ifdef CHAR_INT_GUILD_H /* inter_guild */ +typedef int (*HPMHOOK_pre_inter_guild_save_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_inter_guild_save_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_inter_guild_removemember_tosql) (int *account_id, int *char_id); +typedef int (*HPMHOOK_post_inter_guild_removemember_tosql) (int retVal___, int account_id, int char_id); +typedef int (*HPMHOOK_pre_inter_guild_tosql) (struct guild **g, int *flag); +typedef int (*HPMHOOK_post_inter_guild_tosql) (int retVal___, struct guild *g, int flag); +typedef struct guild* (*HPMHOOK_pre_inter_guild_fromsql) (int *guild_id); +typedef struct guild* (*HPMHOOK_post_inter_guild_fromsql) (struct guild* retVal___, int guild_id); +typedef int (*HPMHOOK_pre_inter_guild_castle_tosql) (struct guild_castle **gc); +typedef int (*HPMHOOK_post_inter_guild_castle_tosql) (int retVal___, struct guild_castle *gc); +typedef struct guild_castle* (*HPMHOOK_pre_inter_guild_castle_fromsql) (int *castle_id); +typedef struct guild_castle* (*HPMHOOK_post_inter_guild_castle_fromsql) (struct guild_castle* retVal___, int castle_id); +typedef bool (*HPMHOOK_pre_inter_guild_exp_parse_row) (char **split[], int *column, int *current); +typedef bool (*HPMHOOK_post_inter_guild_exp_parse_row) (bool retVal___, char *split[], int column, int current); +typedef int (*HPMHOOK_pre_inter_guild_CharOnline) (int *char_id, int *guild_id); +typedef int (*HPMHOOK_post_inter_guild_CharOnline) (int retVal___, int char_id, int guild_id); +typedef int (*HPMHOOK_pre_inter_guild_CharOffline) (int *char_id, int *guild_id); +typedef int (*HPMHOOK_post_inter_guild_CharOffline) (int retVal___, int char_id, int guild_id); +typedef int (*HPMHOOK_pre_inter_guild_sql_init) (void); +typedef int (*HPMHOOK_post_inter_guild_sql_init) (int retVal___); +typedef int (*HPMHOOK_pre_inter_guild_db_final) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_inter_guild_db_final) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef void (*HPMHOOK_pre_inter_guild_sql_final) (void); +typedef void (*HPMHOOK_post_inter_guild_sql_final) (void); +typedef int (*HPMHOOK_pre_inter_guild_search_guildname) (const char **str); +typedef int (*HPMHOOK_post_inter_guild_search_guildname) (int retVal___, const char *str); +typedef bool (*HPMHOOK_pre_inter_guild_check_empty) (struct guild **g); +typedef bool (*HPMHOOK_post_inter_guild_check_empty) (bool retVal___, struct guild *g); +typedef unsigned int (*HPMHOOK_pre_inter_guild_nextexp) (int *level); +typedef unsigned int (*HPMHOOK_post_inter_guild_nextexp) (unsigned int retVal___, int level); +typedef int (*HPMHOOK_pre_inter_guild_checkskill) (struct guild **g, int *id); +typedef int (*HPMHOOK_post_inter_guild_checkskill) (int retVal___, struct guild *g, int id); +typedef int (*HPMHOOK_pre_inter_guild_calcinfo) (struct guild **g); +typedef int (*HPMHOOK_post_inter_guild_calcinfo) (int retVal___, struct guild *g); +typedef int (*HPMHOOK_pre_inter_guild_sex_changed) (int *guild_id, int *account_id, int *char_id, short *gender); +typedef int (*HPMHOOK_post_inter_guild_sex_changed) (int retVal___, int guild_id, int account_id, int char_id, short gender); +typedef int (*HPMHOOK_pre_inter_guild_charname_changed) (int *guild_id, int *account_id, int *char_id, char **name); +typedef int (*HPMHOOK_post_inter_guild_charname_changed) (int retVal___, int guild_id, int account_id, int char_id, char *name); +typedef int (*HPMHOOK_pre_inter_guild_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_guild_parse_frommap) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_inter_guild_broken) (int *guild_id); +typedef int (*HPMHOOK_post_inter_guild_broken) (int retVal___, int guild_id); +typedef struct guild* (*HPMHOOK_pre_inter_guild_create) (const char **name, const struct guild_member **master); +typedef struct guild* (*HPMHOOK_post_inter_guild_create) (struct guild* retVal___, const char *name, const struct guild_member *master); +typedef bool (*HPMHOOK_pre_inter_guild_add_member) (int *guild_id, const struct guild_member **member, int *map_fd); +typedef bool (*HPMHOOK_post_inter_guild_add_member) (bool retVal___, int guild_id, const struct guild_member *member, int map_fd); +typedef bool (*HPMHOOK_pre_inter_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes, int *map_fd); +typedef bool (*HPMHOOK_post_inter_guild_leave) (bool retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes, int map_fd); +typedef bool (*HPMHOOK_pre_inter_guild_update_member_info_short) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); +typedef bool (*HPMHOOK_post_inter_guild_update_member_info_short) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class); +typedef bool (*HPMHOOK_pre_inter_guild_update_member_info) (int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len); +typedef bool (*HPMHOOK_post_inter_guild_update_member_info) (bool retVal___, int guild_id, int account_id, int char_id, int type, const char *data, int len); +typedef bool (*HPMHOOK_pre_inter_guild_disband) (int *guild_id); +typedef bool (*HPMHOOK_post_inter_guild_disband) (bool retVal___, int guild_id); +typedef bool (*HPMHOOK_pre_inter_guild_update_basic_info) (int *guild_id, int *type, const void **data, int *len); +typedef bool (*HPMHOOK_post_inter_guild_update_basic_info) (bool retVal___, int guild_id, int type, const void *data, int len); +typedef bool (*HPMHOOK_pre_inter_guild_update_position) (int *guild_id, int *idx, const struct guild_position **p); +typedef bool (*HPMHOOK_post_inter_guild_update_position) (bool retVal___, int guild_id, int idx, const struct guild_position *p); +typedef bool (*HPMHOOK_pre_inter_guild_use_skill_point) (int *guild_id, uint16 *skill_id, int *account_id, int *max); +typedef bool (*HPMHOOK_post_inter_guild_use_skill_point) (bool retVal___, int guild_id, uint16 skill_id, int account_id, int max); +typedef bool (*HPMHOOK_pre_inter_guild_remove_alliance) (struct guild **g, int *guild_id, int *account_id1, int *account_id2, int *flag); +typedef bool (*HPMHOOK_post_inter_guild_remove_alliance) (bool retVal___, struct guild *g, int guild_id, int account_id1, int account_id2, int flag); +typedef bool (*HPMHOOK_pre_inter_guild_change_alliance) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); +typedef bool (*HPMHOOK_post_inter_guild_change_alliance) (bool retVal___, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag); +typedef bool (*HPMHOOK_pre_inter_guild_update_notice) (int *guild_id, const char **mes1, const char **mes2); +typedef bool (*HPMHOOK_post_inter_guild_update_notice) (bool retVal___, int guild_id, const char *mes1, const char *mes2); +typedef bool (*HPMHOOK_pre_inter_guild_update_emblem) (int *len, int *guild_id, const char **data); +typedef bool (*HPMHOOK_post_inter_guild_update_emblem) (bool retVal___, int len, int guild_id, const char *data); +typedef bool (*HPMHOOK_pre_inter_guild_update_castle_data) (int *castle_id, int *index, int *value); +typedef bool (*HPMHOOK_post_inter_guild_update_castle_data) (bool retVal___, int castle_id, int index, int value); +typedef bool (*HPMHOOK_pre_inter_guild_change_leader) (int *guild_id, const char **name, int *len); +typedef bool (*HPMHOOK_post_inter_guild_change_leader) (bool retVal___, int guild_id, const char *name, int len); +#endif // CHAR_INT_GUILD_H +#ifdef CHAR_INT_HOMUN_H /* inter_homunculus */ +typedef int (*HPMHOOK_pre_inter_homunculus_sql_init) (void); +typedef int (*HPMHOOK_post_inter_homunculus_sql_init) (int retVal___); +typedef void (*HPMHOOK_pre_inter_homunculus_sql_final) (void); +typedef void (*HPMHOOK_post_inter_homunculus_sql_final) (void); +typedef int (*HPMHOOK_pre_inter_homunculus_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_homunculus_parse_frommap) (int retVal___, int fd); +typedef bool (*HPMHOOK_pre_inter_homunculus_create) (struct s_homunculus **hd); +typedef bool (*HPMHOOK_post_inter_homunculus_create) (bool retVal___, struct s_homunculus *hd); +typedef bool (*HPMHOOK_pre_inter_homunculus_save) (const struct s_homunculus **hd); +typedef bool (*HPMHOOK_post_inter_homunculus_save) (bool retVal___, const struct s_homunculus *hd); +typedef bool (*HPMHOOK_pre_inter_homunculus_load) (int *homun_id, struct s_homunculus **hd); +typedef bool (*HPMHOOK_post_inter_homunculus_load) (bool retVal___, int homun_id, struct s_homunculus *hd); +typedef bool (*HPMHOOK_pre_inter_homunculus_delete) (int *homun_id); +typedef bool (*HPMHOOK_post_inter_homunculus_delete) (bool retVal___, int homun_id); +typedef bool (*HPMHOOK_pre_inter_homunculus_rename) (const char **name); +typedef bool (*HPMHOOK_post_inter_homunculus_rename) (bool retVal___, const char *name); +#endif // CHAR_INT_HOMUN_H +#ifdef CHAR_INTER_H /* inter */ +typedef const char* (*HPMHOOK_pre_inter_msg_txt) (int *msg_number); +typedef const char* (*HPMHOOK_post_inter_msg_txt) (const char* retVal___, int msg_number); +typedef bool (*HPMHOOK_pre_inter_msg_config_read) (const char **cfg_name, bool *allow_override); +typedef bool (*HPMHOOK_post_inter_msg_config_read) (bool retVal___, const char *cfg_name, bool allow_override); +typedef void (*HPMHOOK_pre_inter_do_final_msg) (void); +typedef void (*HPMHOOK_post_inter_do_final_msg) (void); +typedef const char* (*HPMHOOK_pre_inter_job_name) (int *class); +typedef const char* (*HPMHOOK_post_inter_job_name) (const char* retVal___, int class); +typedef void (*HPMHOOK_pre_inter_vmsg_to_fd) (int *fd, int *u_fd, int *aid, char **msg, va_list ap); +typedef void (*HPMHOOK_post_inter_vmsg_to_fd) (int fd, int u_fd, int aid, char *msg, va_list ap); +typedef void (*HPMHOOK_pre_inter_savereg) (int *account_id, int *char_id, const char **key, unsigned int *index, intptr_t *val, bool *is_string); +typedef void (*HPMHOOK_post_inter_savereg) (int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string); +typedef int (*HPMHOOK_pre_inter_accreg_fromsql) (int *account_id, int *char_id, int *fd, int *type); +typedef int (*HPMHOOK_post_inter_accreg_fromsql) (int retVal___, int account_id, int char_id, int fd, int type); +typedef int (*HPMHOOK_pre_inter_vlog) (char **fmt, va_list ap); +typedef int (*HPMHOOK_post_inter_vlog) (int retVal___, char *fmt, va_list ap); +typedef int (*HPMHOOK_pre_inter_init_sql) (const char **file); +typedef int (*HPMHOOK_post_inter_init_sql) (int retVal___, const char *file); +typedef int (*HPMHOOK_pre_inter_mapif_init) (int *fd); +typedef int (*HPMHOOK_post_inter_mapif_init) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_inter_check_length) (int *fd, int *length); +typedef int (*HPMHOOK_post_inter_check_length) (int retVal___, int fd, int length); +typedef int (*HPMHOOK_pre_inter_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_parse_frommap) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_inter_final) (void); +typedef void (*HPMHOOK_post_inter_final) (void); +typedef bool (*HPMHOOK_pre_inter_config_read) (const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_inter_config_read) (bool retVal___, const char *filename, bool imported); +typedef bool (*HPMHOOK_pre_inter_config_read_log) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_inter_config_read_log) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_inter_config_read_connection) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_inter_config_read_connection) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef void (*HPMHOOK_pre_inter_accinfo) (int *u_fd, int *aid, int *castergroup, const char **query, int *map_fd); +typedef void (*HPMHOOK_post_inter_accinfo) (int u_fd, int aid, int castergroup, const char *query, int map_fd); +typedef void (*HPMHOOK_pre_inter_accinfo2) (bool *success, int *map_fd, int *u_fd, int *u_aid, int *account_id, const char **userid, const char **user_pass, const char **email, const char **last_ip, const char **lastlogin, const char **pin_code, const char **birthdate, int *group_id, int *logincount, int *state); +typedef void (*HPMHOOK_post_inter_accinfo2) (bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int group_id, int logincount, int state); +#endif // CHAR_INTER_H +#ifdef CHAR_INT_MAIL_H /* inter_mail */ +typedef int (*HPMHOOK_pre_inter_mail_sql_init) (void); +typedef int (*HPMHOOK_post_inter_mail_sql_init) (int retVal___); +typedef void (*HPMHOOK_pre_inter_mail_sql_final) (void); +typedef void (*HPMHOOK_post_inter_mail_sql_final) (void); +typedef int (*HPMHOOK_pre_inter_mail_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_mail_parse_frommap) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_inter_mail_fromsql) (int *char_id, struct mail_data **md); +typedef int (*HPMHOOK_post_inter_mail_fromsql) (int retVal___, int char_id, struct mail_data *md); +typedef int (*HPMHOOK_pre_inter_mail_savemessage) (struct mail_message **msg); +typedef int (*HPMHOOK_post_inter_mail_savemessage) (int retVal___, struct mail_message *msg); +typedef bool (*HPMHOOK_pre_inter_mail_loadmessage) (int *mail_id, struct mail_message **msg); +typedef bool (*HPMHOOK_post_inter_mail_loadmessage) (bool retVal___, int mail_id, struct mail_message *msg); +typedef bool (*HPMHOOK_pre_inter_mail_DeleteAttach) (int *mail_id); +typedef bool (*HPMHOOK_post_inter_mail_DeleteAttach) (bool retVal___, int mail_id); +typedef void (*HPMHOOK_pre_inter_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); +typedef void (*HPMHOOK_post_inter_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); +typedef bool (*HPMHOOK_pre_inter_mail_mark_read) (int *mail_id); +typedef bool (*HPMHOOK_post_inter_mail_mark_read) (bool retVal___, int mail_id); +typedef bool (*HPMHOOK_pre_inter_mail_get_attachment) (int *char_id, int *mail_id, struct mail_message **msg); +typedef bool (*HPMHOOK_post_inter_mail_get_attachment) (bool retVal___, int char_id, int mail_id, struct mail_message *msg); +typedef bool (*HPMHOOK_pre_inter_mail_delete) (int *char_id, int *mail_id); +typedef bool (*HPMHOOK_post_inter_mail_delete) (bool retVal___, int char_id, int mail_id); +typedef bool (*HPMHOOK_pre_inter_mail_return_message) (int *char_id, int *mail_id, int **new_mail); +typedef bool (*HPMHOOK_post_inter_mail_return_message) (bool retVal___, int char_id, int mail_id, int *new_mail); +typedef bool (*HPMHOOK_pre_inter_mail_send) (int *account_id, struct mail_message **msg); +typedef bool (*HPMHOOK_post_inter_mail_send) (bool retVal___, int account_id, struct mail_message *msg); +#endif // CHAR_INT_MAIL_H +#ifdef CHAR_INT_MERCENARY_H /* inter_mercenary */ +typedef bool (*HPMHOOK_pre_inter_mercenary_owner_fromsql) (int *char_id, struct mmo_charstatus **status); +typedef bool (*HPMHOOK_post_inter_mercenary_owner_fromsql) (bool retVal___, int char_id, struct mmo_charstatus *status); +typedef bool (*HPMHOOK_pre_inter_mercenary_owner_tosql) (int *char_id, struct mmo_charstatus **status); +typedef bool (*HPMHOOK_post_inter_mercenary_owner_tosql) (bool retVal___, int char_id, struct mmo_charstatus *status); +typedef bool (*HPMHOOK_pre_inter_mercenary_owner_delete) (int *char_id); +typedef bool (*HPMHOOK_post_inter_mercenary_owner_delete) (bool retVal___, int char_id); +typedef int (*HPMHOOK_pre_inter_mercenary_sql_init) (void); +typedef int (*HPMHOOK_post_inter_mercenary_sql_init) (int retVal___); +typedef void (*HPMHOOK_pre_inter_mercenary_sql_final) (void); +typedef void (*HPMHOOK_post_inter_mercenary_sql_final) (void); +typedef int (*HPMHOOK_pre_inter_mercenary_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_mercenary_parse_frommap) (int retVal___, int fd); +typedef bool (*HPMHOOK_pre_inter_mercenary_create) (struct s_mercenary **merc); +typedef bool (*HPMHOOK_post_inter_mercenary_create) (bool retVal___, struct s_mercenary *merc); +typedef bool (*HPMHOOK_pre_inter_mercenary_save) (const struct s_mercenary **merc); +typedef bool (*HPMHOOK_post_inter_mercenary_save) (bool retVal___, const struct s_mercenary *merc); +typedef bool (*HPMHOOK_pre_inter_mercenary_load) (int *merc_id, int *char_id, struct s_mercenary **merc); +typedef bool (*HPMHOOK_post_inter_mercenary_load) (bool retVal___, int merc_id, int char_id, struct s_mercenary *merc); +typedef bool (*HPMHOOK_pre_inter_mercenary_delete) (int *merc_id); +typedef bool (*HPMHOOK_post_inter_mercenary_delete) (bool retVal___, int merc_id); +#endif // CHAR_INT_MERCENARY_H +#ifdef CHAR_INT_PARTY_H /* inter_party */ +typedef int (*HPMHOOK_pre_inter_party_check_lv) (struct party_data **p); +typedef int (*HPMHOOK_post_inter_party_check_lv) (int retVal___, struct party_data *p); +typedef int (*HPMHOOK_pre_inter_party_is_family_party) (struct party_data **p); +typedef int (*HPMHOOK_post_inter_party_is_family_party) (int retVal___, struct party_data *p); +typedef void (*HPMHOOK_pre_inter_party_calc_state) (struct party_data **p); +typedef void (*HPMHOOK_post_inter_party_calc_state) (struct party_data *p); +typedef int (*HPMHOOK_pre_inter_party_tosql) (struct party **p, int *flag, int *index); +typedef int (*HPMHOOK_post_inter_party_tosql) (int retVal___, struct party *p, int flag, int index); +typedef int (*HPMHOOK_pre_inter_party_del_nonexistent_party) (int *party_id); +typedef int (*HPMHOOK_post_inter_party_del_nonexistent_party) (int retVal___, int party_id); +typedef struct party_data* (*HPMHOOK_pre_inter_party_fromsql) (int *party_id); +typedef struct party_data* (*HPMHOOK_post_inter_party_fromsql) (struct party_data* retVal___, int party_id); +typedef int (*HPMHOOK_pre_inter_party_sql_init) (void); +typedef int (*HPMHOOK_post_inter_party_sql_init) (int retVal___); +typedef void (*HPMHOOK_pre_inter_party_sql_final) (void); +typedef void (*HPMHOOK_post_inter_party_sql_final) (void); +typedef struct party_data* (*HPMHOOK_pre_inter_party_search_partyname) (const char **str); +typedef struct party_data* (*HPMHOOK_post_inter_party_search_partyname) (struct party_data* retVal___, const char *str); +typedef int (*HPMHOOK_pre_inter_party_check_exp_share) (struct party_data **p); +typedef int (*HPMHOOK_post_inter_party_check_exp_share) (int retVal___, struct party_data *p); +typedef int (*HPMHOOK_pre_inter_party_check_empty) (struct party_data **p); +typedef int (*HPMHOOK_post_inter_party_check_empty) (int retVal___, struct party_data *p); +typedef int (*HPMHOOK_pre_inter_party_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_party_parse_frommap) (int retVal___, int fd); +typedef bool (*HPMHOOK_pre_inter_party_leave) (int *party_id, int *account_id, int *char_id); +typedef bool (*HPMHOOK_post_inter_party_leave) (bool retVal___, int party_id, int account_id, int char_id); +typedef int (*HPMHOOK_pre_inter_party_CharOnline) (int *char_id, int *party_id); +typedef int (*HPMHOOK_post_inter_party_CharOnline) (int retVal___, int char_id, int party_id); +typedef int (*HPMHOOK_pre_inter_party_CharOffline) (int *char_id, int *party_id); +typedef int (*HPMHOOK_post_inter_party_CharOffline) (int retVal___, int char_id, int party_id); +typedef struct party_data* (*HPMHOOK_pre_inter_party_create) (const char **name, int *item, int *item2, const struct party_member **leader); +typedef struct party_data* (*HPMHOOK_post_inter_party_create) (struct party_data* retVal___, const char *name, int item, int item2, const struct party_member *leader); +typedef bool (*HPMHOOK_pre_inter_party_add_member) (int *party_id, const struct party_member **member); +typedef bool (*HPMHOOK_post_inter_party_add_member) (bool retVal___, int party_id, const struct party_member *member); +typedef bool (*HPMHOOK_pre_inter_party_change_option) (int *party_id, int *account_id, int *exp, int *item, int *map_fd); +typedef bool (*HPMHOOK_post_inter_party_change_option) (bool retVal___, int party_id, int account_id, int exp, int item, int map_fd); +typedef bool (*HPMHOOK_pre_inter_party_change_map) (int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, int *lv); +typedef bool (*HPMHOOK_post_inter_party_change_map) (bool retVal___, int party_id, int account_id, int char_id, unsigned short map, int online, int lv); +typedef bool (*HPMHOOK_pre_inter_party_disband) (int *party_id); +typedef bool (*HPMHOOK_post_inter_party_disband) (bool retVal___, int party_id); +typedef bool (*HPMHOOK_pre_inter_party_change_leader) (int *party_id, int *account_id, int *char_id); +typedef bool (*HPMHOOK_post_inter_party_change_leader) (bool retVal___, int party_id, int account_id, int char_id); +#endif // CHAR_INT_PARTY_H +#ifdef CHAR_INT_PET_H /* inter_pet */ +typedef int (*HPMHOOK_pre_inter_pet_tosql) (const struct s_pet **p); +typedef int (*HPMHOOK_post_inter_pet_tosql) (int retVal___, const struct s_pet *p); +typedef int (*HPMHOOK_pre_inter_pet_fromsql) (int *pet_id, struct s_pet **p); +typedef int (*HPMHOOK_post_inter_pet_fromsql) (int retVal___, int pet_id, struct s_pet *p); +typedef int (*HPMHOOK_pre_inter_pet_sql_init) (void); +typedef int (*HPMHOOK_post_inter_pet_sql_init) (int retVal___); +typedef void (*HPMHOOK_pre_inter_pet_sql_final) (void); +typedef void (*HPMHOOK_post_inter_pet_sql_final) (void); +typedef int (*HPMHOOK_pre_inter_pet_delete_) (int *pet_id); +typedef int (*HPMHOOK_post_inter_pet_delete_) (int retVal___, int pet_id); +typedef int (*HPMHOOK_pre_inter_pet_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_pet_parse_frommap) (int retVal___, int fd); +typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, int *pet_class, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); +typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); +typedef struct s_pet* (*HPMHOOK_pre_inter_pet_load) (int *account_id, int *char_id, int *pet_id); +typedef struct s_pet* (*HPMHOOK_post_inter_pet_load) (struct s_pet* retVal___, int account_id, int char_id, int pet_id); +#endif // CHAR_INT_PET_H +#ifdef CHAR_INT_QUEST_H /* inter_quest */ +typedef int (*HPMHOOK_pre_inter_quest_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_quest_parse_frommap) (int retVal___, int fd); +typedef struct quest* (*HPMHOOK_pre_inter_quest_fromsql) (int *char_id, int **count); +typedef struct quest* (*HPMHOOK_post_inter_quest_fromsql) (struct quest* retVal___, int char_id, int *count); +typedef bool (*HPMHOOK_pre_inter_quest_delete) (int *char_id, int *quest_id); +typedef bool (*HPMHOOK_post_inter_quest_delete) (bool retVal___, int char_id, int quest_id); +typedef bool (*HPMHOOK_pre_inter_quest_add) (int *char_id, struct quest *qd); +typedef bool (*HPMHOOK_post_inter_quest_add) (bool retVal___, int char_id, struct quest qd); +typedef bool (*HPMHOOK_pre_inter_quest_update) (int *char_id, struct quest *qd); +typedef bool (*HPMHOOK_post_inter_quest_update) (bool retVal___, int char_id, struct quest qd); +typedef bool (*HPMHOOK_pre_inter_quest_save) (int *char_id, const struct quest **new_qd, int *new_n); +typedef bool (*HPMHOOK_post_inter_quest_save) (bool retVal___, int char_id, const struct quest *new_qd, int new_n); +#endif // CHAR_INT_QUEST_H +#ifdef CHAR_INT_RODEX_H /* inter_rodex */ +typedef int (*HPMHOOK_pre_inter_rodex_sql_init) (void); +typedef int (*HPMHOOK_post_inter_rodex_sql_init) (int retVal___); +typedef void (*HPMHOOK_pre_inter_rodex_sql_final) (void); +typedef void (*HPMHOOK_post_inter_rodex_sql_final) (void); +typedef int (*HPMHOOK_pre_inter_rodex_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_rodex_parse_frommap) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_inter_rodex_fromsql) (int *char_id, int *account_id, int8 *opentype, int64 *mail_id, struct rodex_maillist **mails); +typedef int (*HPMHOOK_post_inter_rodex_fromsql) (int retVal___, int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails); +typedef bool (*HPMHOOK_pre_inter_rodex_hasnew) (int *char_id, int *account_id); +typedef bool (*HPMHOOK_post_inter_rodex_hasnew) (bool retVal___, int char_id, int account_id); +typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, int **target_class, int **target_level); +typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level); +typedef int64 (*HPMHOOK_pre_inter_rodex_savemessage) (struct rodex_message **msg); +typedef int64 (*HPMHOOK_post_inter_rodex_savemessage) (int64 retVal___, struct rodex_message *msg); +typedef bool (*HPMHOOK_pre_inter_rodex_updatemail) (int *fd, int *account_id, int *char_id, int64 *mail_id, uint8 *opentype, int8 *flag); +typedef bool (*HPMHOOK_post_inter_rodex_updatemail) (bool retVal___, int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag); +typedef int64 (*HPMHOOK_pre_inter_rodex_getzeny) (int64 *mail_id); +typedef int64 (*HPMHOOK_post_inter_rodex_getzeny) (int64 retVal___, int64 mail_id); +typedef int (*HPMHOOK_pre_inter_rodex_getitems) (int64 *mail_id, struct rodex_item **items); +typedef int (*HPMHOOK_post_inter_rodex_getitems) (int retVal___, int64 mail_id, struct rodex_item *items); +#endif // CHAR_INT_RODEX_H +#ifdef CHAR_INT_STORAGE_H /* inter_storage */ +typedef int (*HPMHOOK_pre_inter_storage_tosql) (int *account_id, const struct storage_data **p); +typedef int (*HPMHOOK_post_inter_storage_tosql) (int retVal___, int account_id, const struct storage_data *p); +typedef int (*HPMHOOK_pre_inter_storage_fromsql) (int *account_id, struct storage_data **p); +typedef int (*HPMHOOK_post_inter_storage_fromsql) (int retVal___, int account_id, struct storage_data *p); +typedef bool (*HPMHOOK_pre_inter_storage_guild_storage_tosql) (int *guild_id, const struct guild_storage **p); +typedef bool (*HPMHOOK_post_inter_storage_guild_storage_tosql) (bool retVal___, int guild_id, const struct guild_storage *p); +typedef int (*HPMHOOK_pre_inter_storage_guild_storage_fromsql) (int *guild_id, struct guild_storage **p); +typedef int (*HPMHOOK_post_inter_storage_guild_storage_fromsql) (int retVal___, int guild_id, struct guild_storage *p); +typedef int (*HPMHOOK_pre_inter_storage_sql_init) (void); +typedef int (*HPMHOOK_post_inter_storage_sql_init) (int retVal___); +typedef void (*HPMHOOK_pre_inter_storage_sql_final) (void); +typedef void (*HPMHOOK_post_inter_storage_sql_final) (void); +typedef int (*HPMHOOK_pre_inter_storage_delete_) (int *account_id); +typedef int (*HPMHOOK_post_inter_storage_delete_) (int retVal___, int account_id); +typedef int (*HPMHOOK_pre_inter_storage_guild_storage_delete) (int *guild_id); +typedef int (*HPMHOOK_post_inter_storage_guild_storage_delete) (int retVal___, int guild_id); +typedef int (*HPMHOOK_pre_inter_storage_parse_frommap) (int *fd); +typedef int (*HPMHOOK_post_inter_storage_parse_frommap) (int retVal___, int fd); +typedef bool (*HPMHOOK_pre_inter_storage_retrieve_bound_items) (int *char_id, int *account_id, int *guild_id); +typedef bool (*HPMHOOK_post_inter_storage_retrieve_bound_items) (bool retVal___, int char_id, int account_id, int guild_id); +#endif // CHAR_INT_STORAGE_H +#ifdef MAP_INTIF_H /* intif */ +typedef int (*HPMHOOK_pre_intif_parse) (int *fd); +typedef int (*HPMHOOK_post_intif_parse) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_intif_create_pet) (int *account_id, int *char_id, int *pet_type, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); +typedef int (*HPMHOOK_post_intif_create_pet) (int retVal___, int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); +typedef int (*HPMHOOK_pre_intif_saveregistry) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_intif_saveregistry) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_intif_request_registry) (struct map_session_data **sd, int *flag); +typedef int (*HPMHOOK_post_intif_request_registry) (int retVal___, struct map_session_data *sd, int flag); +typedef void (*HPMHOOK_pre_intif_request_account_storage) (const struct map_session_data **sd); +typedef void (*HPMHOOK_post_intif_request_account_storage) (const struct map_session_data *sd); +typedef void (*HPMHOOK_pre_intif_send_account_storage) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_intif_send_account_storage) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_intif_request_guild_storage) (int *account_id, int *guild_id); +typedef int (*HPMHOOK_post_intif_request_guild_storage) (int retVal___, int account_id, int guild_id); +typedef int (*HPMHOOK_pre_intif_send_guild_storage) (int *account_id, struct guild_storage **gstor); +typedef int (*HPMHOOK_post_intif_send_guild_storage) (int retVal___, int account_id, struct guild_storage *gstor); +typedef int (*HPMHOOK_pre_intif_create_party) (struct party_member **member, const char **name, int *item, int *item2); +typedef int (*HPMHOOK_post_intif_create_party) (int retVal___, struct party_member *member, const char *name, int item, int item2); +typedef int (*HPMHOOK_pre_intif_request_partyinfo) (int *party_id, int *char_id); +typedef int (*HPMHOOK_post_intif_request_partyinfo) (int retVal___, int party_id, int char_id); +typedef int (*HPMHOOK_pre_intif_party_addmember) (int *party_id, struct party_member **member); +typedef int (*HPMHOOK_post_intif_party_addmember) (int retVal___, int party_id, struct party_member *member); +typedef int (*HPMHOOK_pre_intif_party_changeoption) (int *party_id, int *account_id, int *exp, int *item); +typedef int (*HPMHOOK_post_intif_party_changeoption) (int retVal___, int party_id, int account_id, int exp, int item); +typedef int (*HPMHOOK_pre_intif_party_leave) (int *party_id, int *account_id, int *char_id); +typedef int (*HPMHOOK_post_intif_party_leave) (int retVal___, int party_id, int account_id, int char_id); +typedef int (*HPMHOOK_pre_intif_party_changemap) (struct map_session_data **sd, int *online); +typedef int (*HPMHOOK_post_intif_party_changemap) (int retVal___, struct map_session_data *sd, int online); +typedef int (*HPMHOOK_pre_intif_break_party) (int *party_id); +typedef int (*HPMHOOK_post_intif_break_party) (int retVal___, int party_id); +typedef int (*HPMHOOK_pre_intif_party_leaderchange) (int *party_id, int *account_id, int *char_id); +typedef int (*HPMHOOK_post_intif_party_leaderchange) (int retVal___, int party_id, int account_id, int char_id); +typedef int (*HPMHOOK_pre_intif_guild_create) (const char **name, const struct guild_member **master); +typedef int (*HPMHOOK_post_intif_guild_create) (int retVal___, const char *name, const struct guild_member *master); +typedef int (*HPMHOOK_pre_intif_guild_request_info) (int *guild_id); +typedef int (*HPMHOOK_post_intif_guild_request_info) (int retVal___, int guild_id); +typedef int (*HPMHOOK_pre_intif_guild_addmember) (int *guild_id, struct guild_member **m); +typedef int (*HPMHOOK_post_intif_guild_addmember) (int retVal___, int guild_id, struct guild_member *m); +typedef int (*HPMHOOK_pre_intif_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); +typedef int (*HPMHOOK_post_intif_guild_leave) (int retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes); +typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); +typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class); +typedef int (*HPMHOOK_pre_intif_guild_break) (int *guild_id); +typedef int (*HPMHOOK_post_intif_guild_break) (int retVal___, int guild_id); +typedef int (*HPMHOOK_pre_intif_guild_change_gm) (int *guild_id, const char **name, int *len); +typedef int (*HPMHOOK_post_intif_guild_change_gm) (int retVal___, int guild_id, const char *name, int len); +typedef int (*HPMHOOK_pre_intif_guild_change_basicinfo) (int *guild_id, int *type, const void **data, int *len); +typedef int (*HPMHOOK_post_intif_guild_change_basicinfo) (int retVal___, int guild_id, int type, const void *data, int len); +typedef int (*HPMHOOK_pre_intif_guild_change_memberinfo) (int *guild_id, int *account_id, int *char_id, int *type, const void **data, int *len); +typedef int (*HPMHOOK_post_intif_guild_change_memberinfo) (int retVal___, int guild_id, int account_id, int char_id, int type, const void *data, int len); +typedef int (*HPMHOOK_pre_intif_guild_position) (int *guild_id, int *idx, struct guild_position **p); +typedef int (*HPMHOOK_post_intif_guild_position) (int retVal___, int guild_id, int idx, struct guild_position *p); +typedef int (*HPMHOOK_pre_intif_guild_skillup) (int *guild_id, uint16 *skill_id, int *account_id, int *max); +typedef int (*HPMHOOK_post_intif_guild_skillup) (int retVal___, int guild_id, uint16 skill_id, int account_id, int max); +typedef int (*HPMHOOK_pre_intif_guild_alliance) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); +typedef int (*HPMHOOK_post_intif_guild_alliance) (int retVal___, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag); +typedef int (*HPMHOOK_pre_intif_guild_notice) (int *guild_id, const char **mes1, const char **mes2); +typedef int (*HPMHOOK_post_intif_guild_notice) (int retVal___, int guild_id, const char *mes1, const char *mes2); +typedef int (*HPMHOOK_pre_intif_guild_emblem) (int *guild_id, int *len, const char **data); +typedef int (*HPMHOOK_post_intif_guild_emblem) (int retVal___, int guild_id, int len, const char *data); +typedef int (*HPMHOOK_pre_intif_guild_castle_dataload) (int *num, int **castle_ids); +typedef int (*HPMHOOK_post_intif_guild_castle_dataload) (int retVal___, int num, int *castle_ids); +typedef int (*HPMHOOK_pre_intif_guild_castle_datasave) (int *castle_id, int *index, int *value); +typedef int (*HPMHOOK_post_intif_guild_castle_datasave) (int retVal___, int castle_id, int index, int value); +typedef void (*HPMHOOK_pre_intif_itembound_req) (int *char_id, int *aid, int *guild_id); +typedef void (*HPMHOOK_post_intif_itembound_req) (int char_id, int aid, int guild_id); +typedef int (*HPMHOOK_pre_intif_request_petdata) (int *account_id, int *char_id, int *pet_id); +typedef int (*HPMHOOK_post_intif_request_petdata) (int retVal___, int account_id, int char_id, int pet_id); +typedef int (*HPMHOOK_pre_intif_save_petdata) (int *account_id, struct s_pet **p); +typedef int (*HPMHOOK_post_intif_save_petdata) (int retVal___, int account_id, struct s_pet *p); +typedef int (*HPMHOOK_pre_intif_delete_petdata) (int *pet_id); +typedef int (*HPMHOOK_post_intif_delete_petdata) (int retVal___, int pet_id); +typedef int (*HPMHOOK_pre_intif_rename) (struct map_session_data **sd, int *type, const char **name); +typedef int (*HPMHOOK_post_intif_rename) (int retVal___, struct map_session_data *sd, int type, const char *name); +typedef int (*HPMHOOK_pre_intif_homunculus_create) (int *account_id, struct s_homunculus **sh); +typedef int (*HPMHOOK_post_intif_homunculus_create) (int retVal___, int account_id, struct s_homunculus *sh); +typedef bool (*HPMHOOK_pre_intif_homunculus_requestload) (int *account_id, int *homun_id); +typedef bool (*HPMHOOK_post_intif_homunculus_requestload) (bool retVal___, int account_id, int homun_id); +typedef int (*HPMHOOK_pre_intif_homunculus_requestsave) (int *account_id, struct s_homunculus **sh); +typedef int (*HPMHOOK_post_intif_homunculus_requestsave) (int retVal___, int account_id, struct s_homunculus *sh); +typedef int (*HPMHOOK_pre_intif_homunculus_requestdelete) (int *homun_id); +typedef int (*HPMHOOK_post_intif_homunculus_requestdelete) (int retVal___, int homun_id); +typedef void (*HPMHOOK_pre_intif_request_questlog) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_intif_request_questlog) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_intif_quest_save) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_intif_quest_save) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_intif_mercenary_create) (struct s_mercenary **merc); +typedef int (*HPMHOOK_post_intif_mercenary_create) (int retVal___, struct s_mercenary *merc); +typedef int (*HPMHOOK_pre_intif_mercenary_request) (int *merc_id, int *char_id); +typedef int (*HPMHOOK_post_intif_mercenary_request) (int retVal___, int merc_id, int char_id); +typedef int (*HPMHOOK_pre_intif_mercenary_delete) (int *merc_id); +typedef int (*HPMHOOK_post_intif_mercenary_delete) (int retVal___, int merc_id); +typedef int (*HPMHOOK_pre_intif_mercenary_save) (struct s_mercenary **merc); +typedef int (*HPMHOOK_post_intif_mercenary_save) (int retVal___, struct s_mercenary *merc); +typedef int (*HPMHOOK_pre_intif_Mail_requestinbox) (int *char_id, unsigned char *flag); +typedef int (*HPMHOOK_post_intif_Mail_requestinbox) (int retVal___, int char_id, unsigned char flag); +typedef int (*HPMHOOK_pre_intif_Mail_read) (int *mail_id); +typedef int (*HPMHOOK_post_intif_Mail_read) (int retVal___, int mail_id); +typedef int (*HPMHOOK_pre_intif_Mail_getattach) (int *char_id, int *mail_id); +typedef int (*HPMHOOK_post_intif_Mail_getattach) (int retVal___, int char_id, int mail_id); +typedef int (*HPMHOOK_pre_intif_Mail_delete) (int *char_id, int *mail_id); +typedef int (*HPMHOOK_post_intif_Mail_delete) (int retVal___, int char_id, int mail_id); +typedef int (*HPMHOOK_pre_intif_Mail_return) (int *char_id, int *mail_id); +typedef int (*HPMHOOK_post_intif_Mail_return) (int retVal___, int char_id, int mail_id); +typedef int (*HPMHOOK_pre_intif_Mail_send) (int *account_id, struct mail_message **msg); +typedef int (*HPMHOOK_post_intif_Mail_send) (int retVal___, int account_id, struct mail_message *msg); +typedef int (*HPMHOOK_pre_intif_Auction_requestlist) (int *char_id, short *type, int *price, const char **searchtext, short *page); +typedef int (*HPMHOOK_post_intif_Auction_requestlist) (int retVal___, int char_id, short type, int price, const char *searchtext, short page); +typedef int (*HPMHOOK_pre_intif_Auction_register) (struct auction_data **auction); +typedef int (*HPMHOOK_post_intif_Auction_register) (int retVal___, struct auction_data *auction); +typedef int (*HPMHOOK_pre_intif_Auction_cancel) (int *char_id, unsigned int *auction_id); +typedef int (*HPMHOOK_post_intif_Auction_cancel) (int retVal___, int char_id, unsigned int auction_id); +typedef int (*HPMHOOK_pre_intif_Auction_close) (int *char_id, unsigned int *auction_id); +typedef int (*HPMHOOK_post_intif_Auction_close) (int retVal___, int char_id, unsigned int auction_id); +typedef int (*HPMHOOK_pre_intif_Auction_bid) (int *char_id, const char **name, unsigned int *auction_id, int *bid); +typedef int (*HPMHOOK_post_intif_Auction_bid) (int retVal___, int char_id, const char *name, unsigned int auction_id, int bid); +typedef int (*HPMHOOK_pre_intif_elemental_create) (struct s_elemental **ele); +typedef int (*HPMHOOK_post_intif_elemental_create) (int retVal___, struct s_elemental *ele); +typedef int (*HPMHOOK_pre_intif_elemental_request) (int *ele_id, int *char_id); +typedef int (*HPMHOOK_post_intif_elemental_request) (int retVal___, int ele_id, int char_id); +typedef int (*HPMHOOK_pre_intif_elemental_delete) (int *ele_id); +typedef int (*HPMHOOK_post_intif_elemental_delete) (int retVal___, int ele_id); +typedef int (*HPMHOOK_pre_intif_elemental_save) (struct s_elemental **ele); +typedef int (*HPMHOOK_post_intif_elemental_save) (int retVal___, struct s_elemental *ele); +typedef int (*HPMHOOK_pre_intif_rodex_requestinbox) (int *char_id, int *account_id, int8 *flag, int8 *opentype, int64 *mail_id); +typedef int (*HPMHOOK_post_intif_rodex_requestinbox) (int retVal___, int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id); +typedef int (*HPMHOOK_pre_intif_rodex_checkhasnew) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_intif_rodex_checkhasnew) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_intif_rodex_updatemail) (struct map_session_data **sd, int64 *mail_id, uint8 *opentype, int8 *flag); +typedef int (*HPMHOOK_post_intif_rodex_updatemail) (int retVal___, struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag); +typedef int (*HPMHOOK_pre_intif_rodex_sendmail) (struct rodex_message **msg); +typedef int (*HPMHOOK_post_intif_rodex_sendmail) (int retVal___, struct rodex_message *msg); +typedef int (*HPMHOOK_pre_intif_rodex_checkname) (struct map_session_data **sd, const char **name); +typedef int (*HPMHOOK_post_intif_rodex_checkname) (int retVal___, struct map_session_data *sd, const char *name); +typedef void (*HPMHOOK_pre_intif_pGetZenyAck) (int *fd); +typedef void (*HPMHOOK_post_intif_pGetZenyAck) (int fd); +typedef void (*HPMHOOK_pre_intif_pGetItemsAck) (int *fd); +typedef void (*HPMHOOK_post_intif_pGetItemsAck) (int fd); +typedef int (*HPMHOOK_pre_intif_clan_kickoffline) (int *clan_id, int *kick_interval); +typedef int (*HPMHOOK_post_intif_clan_kickoffline) (int retVal___, int clan_id, int kick_interval); +typedef int (*HPMHOOK_pre_intif_clan_membercount) (int *clan_id, int *kick_interval); +typedef int (*HPMHOOK_post_intif_clan_membercount) (int retVal___, int clan_id, int kick_interval); +typedef void (*HPMHOOK_pre_intif_request_accinfo) (int *u_fd, int *aid, int *group_lv, char **query); +typedef void (*HPMHOOK_post_intif_request_accinfo) (int u_fd, int aid, int group_lv, char *query); +typedef int (*HPMHOOK_pre_intif_CheckForCharServer) (void); +typedef int (*HPMHOOK_post_intif_CheckForCharServer) (int retVal___); +typedef void (*HPMHOOK_pre_intif_achievements_request) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_intif_achievements_request) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_intif_achievements_save) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_intif_achievements_save) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_intif_pRegisters) (int *fd); +typedef void (*HPMHOOK_post_intif_pRegisters) (int fd); +typedef void (*HPMHOOK_pre_intif_pAccountStorage) (int *fd); +typedef void (*HPMHOOK_post_intif_pAccountStorage) (int fd); +typedef void (*HPMHOOK_pre_intif_pChangeNameOk) (int *fd); +typedef void (*HPMHOOK_post_intif_pChangeNameOk) (int fd); +typedef void (*HPMHOOK_pre_intif_pMessageToFD) (int *fd); +typedef void (*HPMHOOK_post_intif_pMessageToFD) (int fd); +typedef void (*HPMHOOK_pre_intif_pAccountStorageSaveAck) (int *fd); +typedef void (*HPMHOOK_post_intif_pAccountStorageSaveAck) (int fd); +typedef void (*HPMHOOK_pre_intif_pLoadGuildStorage) (int *fd); +typedef void (*HPMHOOK_post_intif_pLoadGuildStorage) (int fd); +typedef void (*HPMHOOK_pre_intif_pSaveGuildStorage) (int *fd); +typedef void (*HPMHOOK_post_intif_pSaveGuildStorage) (int fd); +typedef void (*HPMHOOK_pre_intif_pPartyCreated) (int *fd); +typedef void (*HPMHOOK_post_intif_pPartyCreated) (int fd); +typedef void (*HPMHOOK_pre_intif_pPartyInfo) (int *fd); +typedef void (*HPMHOOK_post_intif_pPartyInfo) (int fd); +typedef void (*HPMHOOK_pre_intif_pPartyMemberAdded) (int *fd); +typedef void (*HPMHOOK_post_intif_pPartyMemberAdded) (int fd); +typedef void (*HPMHOOK_pre_intif_pPartyOptionChanged) (int *fd); +typedef void (*HPMHOOK_post_intif_pPartyOptionChanged) (int fd); +typedef void (*HPMHOOK_pre_intif_pPartyMemberWithdraw) (int *fd); +typedef void (*HPMHOOK_post_intif_pPartyMemberWithdraw) (int fd); +typedef void (*HPMHOOK_pre_intif_pPartyMove) (int *fd); +typedef void (*HPMHOOK_post_intif_pPartyMove) (int fd); +typedef void (*HPMHOOK_pre_intif_pPartyBroken) (int *fd); +typedef void (*HPMHOOK_post_intif_pPartyBroken) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildCreated) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildCreated) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildInfo) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildInfo) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildMemberAdded) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildMemberAdded) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildMemberWithdraw) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildMemberWithdraw) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildMemberInfoShort) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildMemberInfoShort) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildBroken) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildBroken) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildBasicInfoChanged) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildBasicInfoChanged) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildMemberInfoChanged) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildMemberInfoChanged) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildPosition) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildPosition) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildSkillUp) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildSkillUp) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildAlliance) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildAlliance) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildNotice) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildNotice) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildEmblem) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildEmblem) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildCastleDataLoad) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildCastleDataLoad) (int fd); +typedef void (*HPMHOOK_pre_intif_pGuildMasterChanged) (int *fd); +typedef void (*HPMHOOK_post_intif_pGuildMasterChanged) (int fd); +typedef void (*HPMHOOK_pre_intif_pQuestLog) (int *fd); +typedef void (*HPMHOOK_post_intif_pQuestLog) (int fd); +typedef void (*HPMHOOK_pre_intif_pQuestSave) (int *fd); +typedef void (*HPMHOOK_post_intif_pQuestSave) (int fd); +typedef void (*HPMHOOK_pre_intif_pMailInboxReceived) (int *fd); +typedef void (*HPMHOOK_post_intif_pMailInboxReceived) (int fd); +typedef void (*HPMHOOK_pre_intif_pMailNew) (int *fd); +typedef void (*HPMHOOK_post_intif_pMailNew) (int fd); +typedef void (*HPMHOOK_pre_intif_pMailGetAttach) (int *fd); +typedef void (*HPMHOOK_post_intif_pMailGetAttach) (int fd); +typedef void (*HPMHOOK_pre_intif_pMailDelete) (int *fd); +typedef void (*HPMHOOK_post_intif_pMailDelete) (int fd); +typedef void (*HPMHOOK_pre_intif_pMailReturn) (int *fd); +typedef void (*HPMHOOK_post_intif_pMailReturn) (int fd); +typedef void (*HPMHOOK_pre_intif_pMailSend) (int *fd); +typedef void (*HPMHOOK_post_intif_pMailSend) (int fd); +typedef void (*HPMHOOK_pre_intif_pAuctionResults) (int *fd); +typedef void (*HPMHOOK_post_intif_pAuctionResults) (int fd); +typedef void (*HPMHOOK_pre_intif_pAuctionRegister) (int *fd); +typedef void (*HPMHOOK_post_intif_pAuctionRegister) (int fd); +typedef void (*HPMHOOK_pre_intif_pAuctionCancel) (int *fd); +typedef void (*HPMHOOK_post_intif_pAuctionCancel) (int fd); +typedef void (*HPMHOOK_pre_intif_pAuctionClose) (int *fd); +typedef void (*HPMHOOK_post_intif_pAuctionClose) (int fd); +typedef void (*HPMHOOK_pre_intif_pAuctionMessage) (int *fd); +typedef void (*HPMHOOK_post_intif_pAuctionMessage) (int fd); +typedef void (*HPMHOOK_pre_intif_pAuctionBid) (int *fd); +typedef void (*HPMHOOK_post_intif_pAuctionBid) (int fd); +typedef void (*HPMHOOK_pre_intif_pItembound_ack) (int *fd); +typedef void (*HPMHOOK_post_intif_pItembound_ack) (int fd); +typedef void (*HPMHOOK_pre_intif_pMercenaryReceived) (int *fd); +typedef void (*HPMHOOK_post_intif_pMercenaryReceived) (int fd); +typedef void (*HPMHOOK_pre_intif_pMercenaryDeleted) (int *fd); +typedef void (*HPMHOOK_post_intif_pMercenaryDeleted) (int fd); +typedef void (*HPMHOOK_pre_intif_pMercenarySaved) (int *fd); +typedef void (*HPMHOOK_post_intif_pMercenarySaved) (int fd); +typedef void (*HPMHOOK_pre_intif_pElementalReceived) (int *fd); +typedef void (*HPMHOOK_post_intif_pElementalReceived) (int fd); +typedef void (*HPMHOOK_pre_intif_pElementalDeleted) (int *fd); +typedef void (*HPMHOOK_post_intif_pElementalDeleted) (int fd); +typedef void (*HPMHOOK_pre_intif_pElementalSaved) (int *fd); +typedef void (*HPMHOOK_post_intif_pElementalSaved) (int fd); +typedef void (*HPMHOOK_pre_intif_pCreatePet) (int *fd); +typedef void (*HPMHOOK_post_intif_pCreatePet) (int fd); +typedef void (*HPMHOOK_pre_intif_pRecvPetData) (int *fd); +typedef void (*HPMHOOK_post_intif_pRecvPetData) (int fd); +typedef void (*HPMHOOK_pre_intif_pSavePetOk) (int *fd); +typedef void (*HPMHOOK_post_intif_pSavePetOk) (int fd); +typedef void (*HPMHOOK_pre_intif_pDeletePetOk) (int *fd); +typedef void (*HPMHOOK_post_intif_pDeletePetOk) (int fd); +typedef void (*HPMHOOK_pre_intif_pCreateHomunculus) (int *fd); +typedef void (*HPMHOOK_post_intif_pCreateHomunculus) (int fd); +typedef void (*HPMHOOK_pre_intif_pRecvHomunculusData) (int *fd); +typedef void (*HPMHOOK_post_intif_pRecvHomunculusData) (int fd); +typedef void (*HPMHOOK_pre_intif_pSaveHomunculusOk) (int *fd); +typedef void (*HPMHOOK_post_intif_pSaveHomunculusOk) (int fd); +typedef void (*HPMHOOK_pre_intif_pDeleteHomunculusOk) (int *fd); +typedef void (*HPMHOOK_post_intif_pDeleteHomunculusOk) (int fd); +typedef void (*HPMHOOK_pre_intif_pRequestRodexOpenInbox) (int *fd); +typedef void (*HPMHOOK_post_intif_pRequestRodexOpenInbox) (int fd); +typedef void (*HPMHOOK_pre_intif_pRodexHasNew) (int *fd); +typedef void (*HPMHOOK_post_intif_pRodexHasNew) (int fd); +typedef void (*HPMHOOK_pre_intif_pRodexSendMail) (int *fd); +typedef void (*HPMHOOK_post_intif_pRodexSendMail) (int fd); +typedef void (*HPMHOOK_pre_intif_pRodexCheckName) (int *fd); +typedef void (*HPMHOOK_post_intif_pRodexCheckName) (int fd); +typedef void (*HPMHOOK_pre_intif_pRecvClanMemberAction) (int *fd); +typedef void (*HPMHOOK_post_intif_pRecvClanMemberAction) (int fd); +typedef void (*HPMHOOK_pre_intif_pAchievementsLoad) (int *fd); +typedef void (*HPMHOOK_post_intif_pAchievementsLoad) (int fd); +#endif // MAP_INTIF_H +#ifdef LOGIN_IPBAN_H /* ipban */ +typedef void (*HPMHOOK_pre_ipban_init) (void); +typedef void (*HPMHOOK_post_ipban_init) (void); +typedef void (*HPMHOOK_pre_ipban_final) (void); +typedef void (*HPMHOOK_post_ipban_final) (void); +typedef int (*HPMHOOK_pre_ipban_cleanup) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_ipban_cleanup) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef bool (*HPMHOOK_pre_ipban_config_read_inter) (const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_ipban_config_read_inter) (bool retVal___, const char *filename, bool imported); +typedef bool (*HPMHOOK_pre_ipban_config_read_connection) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_ipban_config_read_connection) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_ipban_config_read_dynamic) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_ipban_config_read_dynamic) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_ipban_config_read) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_ipban_config_read) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_ipban_check) (uint32 *ip); +typedef bool (*HPMHOOK_post_ipban_check) (bool retVal___, uint32 ip); +typedef void (*HPMHOOK_pre_ipban_log) (uint32 *ip); +typedef void (*HPMHOOK_post_ipban_log) (uint32 ip); +#endif // LOGIN_IPBAN_H +#ifdef MAP_IRC_BOT_H /* ircbot */ +typedef void (*HPMHOOK_pre_ircbot_init) (bool *minimal); +typedef void (*HPMHOOK_post_ircbot_init) (bool minimal); +typedef void (*HPMHOOK_pre_ircbot_final) (void); +typedef void (*HPMHOOK_post_ircbot_final) (void); +typedef int (*HPMHOOK_pre_ircbot_parse) (int *fd); +typedef int (*HPMHOOK_post_ircbot_parse) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_ircbot_parse_sub) (int *fd, char **str); +typedef void (*HPMHOOK_post_ircbot_parse_sub) (int fd, char *str); +typedef void (*HPMHOOK_pre_ircbot_parse_source) (char **source, char **nick, char **ident, char **host); +typedef void (*HPMHOOK_post_ircbot_parse_source) (char *source, char *nick, char *ident, char *host); +typedef struct irc_func* (*HPMHOOK_pre_ircbot_func_search) (char **function_name); +typedef struct irc_func* (*HPMHOOK_post_ircbot_func_search) (struct irc_func* retVal___, char *function_name); +typedef int (*HPMHOOK_pre_ircbot_connect_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_ircbot_connect_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_ircbot_identify_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_ircbot_identify_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_ircbot_join_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_ircbot_join_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_ircbot_queue_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_ircbot_queue_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_ircbot_queue) (char **str); +typedef void (*HPMHOOK_post_ircbot_queue) (char *str); +typedef void (*HPMHOOK_pre_ircbot_send) (char **str, bool *force); +typedef void (*HPMHOOK_post_ircbot_send) (char *str, bool force); +typedef void (*HPMHOOK_pre_ircbot_relay) (const char **name, const char **msg); +typedef void (*HPMHOOK_post_ircbot_relay) (const char *name, const char *msg); +typedef void (*HPMHOOK_pre_ircbot_pong) (int *fd, char **cmd, char **source, char **target, char **msg); +typedef void (*HPMHOOK_post_ircbot_pong) (int fd, char *cmd, char *source, char *target, char *msg); +typedef void (*HPMHOOK_pre_ircbot_privmsg) (int *fd, char **cmd, char **source, char **target, char **msg); +typedef void (*HPMHOOK_post_ircbot_privmsg) (int fd, char *cmd, char *source, char *target, char *msg); +typedef void (*HPMHOOK_pre_ircbot_privmsg_ctcp) (int *fd, char **cmd, char **source, char **target, char **msg); +typedef void (*HPMHOOK_post_ircbot_privmsg_ctcp) (int fd, char *cmd, char *source, char *target, char *msg); +typedef void (*HPMHOOK_pre_ircbot_userjoin) (int *fd, char **cmd, char **source, char **target, char **msg); +typedef void (*HPMHOOK_post_ircbot_userjoin) (int fd, char *cmd, char *source, char *target, char *msg); +typedef void (*HPMHOOK_pre_ircbot_userleave) (int *fd, char **cmd, char **source, char **target, char **msg); +typedef void (*HPMHOOK_post_ircbot_userleave) (int fd, char *cmd, char *source, char *target, char *msg); +typedef void (*HPMHOOK_pre_ircbot_usernick) (int *fd, char **cmd, char **source, char **target, char **msg); +typedef void (*HPMHOOK_post_ircbot_usernick) (int fd, char *cmd, char *source, char *target, char *msg); +#endif // MAP_IRC_BOT_H +#ifdef MAP_ITEMDB_H /* itemdb */ +typedef void (*HPMHOOK_pre_itemdb_init) (bool *minimal); +typedef void (*HPMHOOK_post_itemdb_init) (bool minimal); +typedef void (*HPMHOOK_pre_itemdb_final) (void); +typedef void (*HPMHOOK_post_itemdb_final) (void); +typedef void (*HPMHOOK_pre_itemdb_reload) (void); +typedef void (*HPMHOOK_post_itemdb_reload) (void); +typedef void (*HPMHOOK_pre_itemdb_name_constants) (void); +typedef void (*HPMHOOK_post_itemdb_name_constants) (void); +typedef void (*HPMHOOK_pre_itemdb_read_groups) (void); +typedef void (*HPMHOOK_post_itemdb_read_groups) (void); +typedef void (*HPMHOOK_pre_itemdb_read_chains) (void); +typedef void (*HPMHOOK_post_itemdb_read_chains) (void); +typedef void (*HPMHOOK_pre_itemdb_read_packages) (void); +typedef void (*HPMHOOK_post_itemdb_read_packages) (void); +typedef void (*HPMHOOK_pre_itemdb_read_options) (void); +typedef void (*HPMHOOK_post_itemdb_read_options) (void); +typedef void (*HPMHOOK_pre_itemdb_write_cached_packages) (const char **config_filename); +typedef void (*HPMHOOK_post_itemdb_write_cached_packages) (const char *config_filename); +typedef bool (*HPMHOOK_pre_itemdb_read_cached_packages) (const char **config_filename); +typedef bool (*HPMHOOK_post_itemdb_read_cached_packages) (bool retVal___, const char *config_filename); +typedef struct item_data* (*HPMHOOK_pre_itemdb_name2id) (const char **str); +typedef struct item_data* (*HPMHOOK_post_itemdb_name2id) (struct item_data* retVal___, const char *str); +typedef struct item_data* (*HPMHOOK_pre_itemdb_search_name) (const char **name); +typedef struct item_data* (*HPMHOOK_post_itemdb_search_name) (struct item_data* retVal___, const char *name); +typedef int (*HPMHOOK_pre_itemdb_search_name_array) (struct item_data ***data, const int *size, const char **str, enum item_name_search_flag *flag); +typedef int (*HPMHOOK_post_itemdb_search_name_array) (int retVal___, struct item_data **data, const int size, const char *str, enum item_name_search_flag flag); +typedef struct item_data* (*HPMHOOK_pre_itemdb_load) (int *nameid); +typedef struct item_data* (*HPMHOOK_post_itemdb_load) (struct item_data* retVal___, int nameid); +typedef struct item_data* (*HPMHOOK_pre_itemdb_search) (int *nameid); +typedef struct item_data* (*HPMHOOK_post_itemdb_search) (struct item_data* retVal___, int nameid); +typedef struct item_data* (*HPMHOOK_pre_itemdb_exists) (int *nameid); +typedef struct item_data* (*HPMHOOK_post_itemdb_exists) (struct item_data* retVal___, int nameid); +typedef struct itemdb_option* (*HPMHOOK_pre_itemdb_option_exists) (int *idx); +typedef struct itemdb_option* (*HPMHOOK_post_itemdb_option_exists) (struct itemdb_option* retVal___, int idx); +typedef bool (*HPMHOOK_pre_itemdb_in_group) (struct item_group **group, int *nameid); +typedef bool (*HPMHOOK_post_itemdb_in_group) (bool retVal___, struct item_group *group, int nameid); +typedef int (*HPMHOOK_pre_itemdb_group_item) (struct item_group **group); +typedef int (*HPMHOOK_post_itemdb_group_item) (int retVal___, struct item_group *group); +typedef int (*HPMHOOK_pre_itemdb_chain_item) (unsigned short *chain_id, int **rate); +typedef int (*HPMHOOK_post_itemdb_chain_item) (int retVal___, unsigned short chain_id, int *rate); +typedef void (*HPMHOOK_pre_itemdb_package_item) (struct map_session_data **sd, struct item_package **package); +typedef void (*HPMHOOK_post_itemdb_package_item) (struct map_session_data *sd, struct item_package *package); +typedef int (*HPMHOOK_pre_itemdb_searchname_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_itemdb_searchname_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_itemdb_searchname_array_sub) (union DBKey *key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_post_itemdb_searchname_array_sub) (int retVal___, union DBKey key, struct DBData data, va_list ap); +typedef int (*HPMHOOK_pre_itemdb_searchrandomid) (struct item_group **group); +typedef int (*HPMHOOK_post_itemdb_searchrandomid) (int retVal___, struct item_group *group); +typedef const char* (*HPMHOOK_pre_itemdb_typename) (int *type); +typedef const char* (*HPMHOOK_post_itemdb_typename) (const char* retVal___, int type); +typedef void (*HPMHOOK_pre_itemdb_jobmask2mapid) (uint64 **bclass, uint64 *jobmask); +typedef void (*HPMHOOK_post_itemdb_jobmask2mapid) (uint64 *bclass, uint64 jobmask); +typedef void (*HPMHOOK_pre_itemdb_jobid2mapid) (uint64 **bclass, int *job_class, bool *enable); +typedef void (*HPMHOOK_post_itemdb_jobid2mapid) (uint64 *bclass, int job_class, bool enable); +typedef void (*HPMHOOK_pre_itemdb_create_dummy_data) (void); +typedef void (*HPMHOOK_post_itemdb_create_dummy_data) (void); +typedef struct item_data* (*HPMHOOK_pre_itemdb_create_item_data) (int *nameid); +typedef struct item_data* (*HPMHOOK_post_itemdb_create_item_data) (struct item_data* retVal___, int nameid); +typedef int (*HPMHOOK_pre_itemdb_isequip) (int *nameid); +typedef int (*HPMHOOK_post_itemdb_isequip) (int retVal___, int nameid); +typedef int (*HPMHOOK_pre_itemdb_isequip2) (struct item_data **data); +typedef int (*HPMHOOK_post_itemdb_isequip2) (int retVal___, struct item_data *data); +typedef int (*HPMHOOK_pre_itemdb_isstackable) (int *nameid); +typedef int (*HPMHOOK_post_itemdb_isstackable) (int retVal___, int nameid); +typedef int (*HPMHOOK_pre_itemdb_isstackable2) (struct item_data **data); +typedef int (*HPMHOOK_post_itemdb_isstackable2) (int retVal___, struct item_data *data); +typedef int (*HPMHOOK_pre_itemdb_isdropable_sub) (struct item_data **item, int *gmlv, int *unused); +typedef int (*HPMHOOK_post_itemdb_isdropable_sub) (int retVal___, struct item_data *item, int gmlv, int unused); +typedef int (*HPMHOOK_pre_itemdb_cantrade_sub) (struct item_data **item, int *gmlv, int *gmlv2); +typedef int (*HPMHOOK_post_itemdb_cantrade_sub) (int retVal___, struct item_data *item, int gmlv, int gmlv2); +typedef int (*HPMHOOK_pre_itemdb_canpartnertrade_sub) (struct item_data **item, int *gmlv, int *gmlv2); +typedef int (*HPMHOOK_post_itemdb_canpartnertrade_sub) (int retVal___, struct item_data *item, int gmlv, int gmlv2); +typedef int (*HPMHOOK_pre_itemdb_cansell_sub) (struct item_data **item, int *gmlv, int *unused); +typedef int (*HPMHOOK_post_itemdb_cansell_sub) (int retVal___, struct item_data *item, int gmlv, int unused); +typedef int (*HPMHOOK_pre_itemdb_cancartstore_sub) (struct item_data **item, int *gmlv, int *unused); +typedef int (*HPMHOOK_post_itemdb_cancartstore_sub) (int retVal___, struct item_data *item, int gmlv, int unused); +typedef int (*HPMHOOK_pre_itemdb_canstore_sub) (struct item_data **item, int *gmlv, int *unused); +typedef int (*HPMHOOK_post_itemdb_canstore_sub) (int retVal___, struct item_data *item, int gmlv, int unused); +typedef int (*HPMHOOK_pre_itemdb_canguildstore_sub) (struct item_data **item, int *gmlv, int *unused); +typedef int (*HPMHOOK_post_itemdb_canguildstore_sub) (int retVal___, struct item_data *item, int gmlv, int unused); +typedef int (*HPMHOOK_pre_itemdb_canmail_sub) (struct item_data **item, int *gmlv, int *unused); +typedef int (*HPMHOOK_post_itemdb_canmail_sub) (int retVal___, struct item_data *item, int gmlv, int unused); +typedef int (*HPMHOOK_pre_itemdb_canauction_sub) (struct item_data **item, int *gmlv, int *unused); +typedef int (*HPMHOOK_post_itemdb_canauction_sub) (int retVal___, struct item_data *item, int gmlv, int unused); +typedef int (*HPMHOOK_pre_itemdb_isrestricted) (struct item **item, int *gmlv, int *gmlv2, int ( **func ) (struct item_data *, int, int)); +typedef int (*HPMHOOK_post_itemdb_isrestricted) (int retVal___, struct item *item, int gmlv, int gmlv2, int ( *func ) (struct item_data *, int, int)); +typedef int (*HPMHOOK_pre_itemdb_isidentified) (int *nameid); +typedef int (*HPMHOOK_post_itemdb_isidentified) (int retVal___, int nameid); +typedef int (*HPMHOOK_pre_itemdb_isidentified2) (struct item_data **data); +typedef int (*HPMHOOK_post_itemdb_isidentified2) (int retVal___, struct item_data *data); +typedef bool (*HPMHOOK_pre_itemdb_read_combodb_libconfig) (void); +typedef bool (*HPMHOOK_post_itemdb_read_combodb_libconfig) (bool retVal___); +typedef bool (*HPMHOOK_pre_itemdb_read_combodb_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source); +typedef bool (*HPMHOOK_post_itemdb_read_combodb_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source); +typedef int (*HPMHOOK_pre_itemdb_gendercheck) (struct item_data **id); +typedef int (*HPMHOOK_post_itemdb_gendercheck) (int retVal___, struct item_data *id); +typedef int (*HPMHOOK_pre_itemdb_validate_entry) (struct item_data **entry, int *n, const char **source); +typedef int (*HPMHOOK_post_itemdb_validate_entry) (int retVal___, struct item_data *entry, int n, const char *source); +typedef void (*HPMHOOK_pre_itemdb_readdb_options_additional_fields) (struct itemdb_option **ito, struct config_setting_t **t, const char **source); +typedef void (*HPMHOOK_post_itemdb_readdb_options_additional_fields) (struct itemdb_option *ito, struct config_setting_t *t, const char *source); +typedef void (*HPMHOOK_pre_itemdb_readdb_additional_fields) (int *itemid, struct config_setting_t **it, int *n, const char **source); +typedef void (*HPMHOOK_post_itemdb_readdb_additional_fields) (int itemid, struct config_setting_t *it, int n, const char *source); +typedef void (*HPMHOOK_pre_itemdb_readdb_job_sub) (struct item_data **id, struct config_setting_t **t); +typedef void (*HPMHOOK_post_itemdb_readdb_job_sub) (struct item_data *id, struct config_setting_t *t); +typedef int (*HPMHOOK_pre_itemdb_readdb_libconfig_sub) (struct config_setting_t **it, int *n, const char **source); +typedef int (*HPMHOOK_post_itemdb_readdb_libconfig_sub) (int retVal___, struct config_setting_t *it, int n, const char *source); +typedef int (*HPMHOOK_pre_itemdb_readdb_libconfig) (const char **filename); +typedef int (*HPMHOOK_post_itemdb_readdb_libconfig) (int retVal___, const char *filename); +typedef uint64 (*HPMHOOK_pre_itemdb_unique_id) (struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_itemdb_unique_id) (uint64 retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_itemdb_read) (bool *minimal); +typedef void (*HPMHOOK_post_itemdb_read) (bool minimal); +typedef void (*HPMHOOK_pre_itemdb_destroy_item_data) (struct item_data **self, int *free_self); +typedef void (*HPMHOOK_post_itemdb_destroy_item_data) (struct item_data *self, int free_self); +typedef int (*HPMHOOK_pre_itemdb_final_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_itemdb_final_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_itemdb_options_final_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_itemdb_options_final_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef void (*HPMHOOK_pre_itemdb_clear) (bool *total); +typedef void (*HPMHOOK_post_itemdb_clear) (bool total); +typedef struct item_combo* (*HPMHOOK_pre_itemdb_id2combo) (int *id); +typedef struct item_combo* (*HPMHOOK_post_itemdb_id2combo) (struct item_combo* retVal___, int id); +typedef bool (*HPMHOOK_pre_itemdb_is_item_usable) (struct item_data **item); +typedef bool (*HPMHOOK_post_itemdb_is_item_usable) (bool retVal___, struct item_data *item); +typedef bool (*HPMHOOK_pre_itemdb_lookup_const) (const struct config_setting_t **it, const char **name, int **value); +typedef bool (*HPMHOOK_post_itemdb_lookup_const) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); +typedef bool (*HPMHOOK_pre_itemdb_lookup_const_mask) (const struct config_setting_t **it, const char **name, int **value); +typedef bool (*HPMHOOK_post_itemdb_lookup_const_mask) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); +typedef int (*HPMHOOK_pre_itemdb_addname_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_itemdb_addname_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_lapineddukddak) (void); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_lapineddukddak) (bool retVal___); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_lapineddukddak_sub) (struct config_setting_t **it, const char **source); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_lapineddukddak_sub) (bool retVal___, struct config_setting_t *it, const char *source); +typedef bool (*HPMHOOK_pre_itemdb_read_libconfig_lapineddukddak_sub_sources) (struct config_setting_t **sources, struct item_data **data); +typedef bool (*HPMHOOK_post_itemdb_read_libconfig_lapineddukddak_sub_sources) (bool retVal___, struct config_setting_t *sources, struct item_data *data); +#endif // MAP_ITEMDB_H +#ifdef LOGIN_LOGIN_H /* lchrif */ +typedef void (*HPMHOOK_pre_lchrif_server_init) (int *id); +typedef void (*HPMHOOK_post_lchrif_server_init) (int id); +typedef void (*HPMHOOK_pre_lchrif_server_destroy) (int *id); +typedef void (*HPMHOOK_post_lchrif_server_destroy) (int id); +typedef void (*HPMHOOK_pre_lchrif_server_reset) (int *id); +typedef void (*HPMHOOK_post_lchrif_server_reset) (int id); +typedef void (*HPMHOOK_pre_lchrif_on_disconnect) (int *id); +typedef void (*HPMHOOK_post_lchrif_on_disconnect) (int id); +#endif // LOGIN_LOGIN_H +#ifdef LOGIN_LCLIF_H /* lclif */ +typedef void (*HPMHOOK_pre_lclif_init) (void); +typedef void (*HPMHOOK_post_lclif_init) (void); +typedef void (*HPMHOOK_pre_lclif_final) (void); +typedef void (*HPMHOOK_post_lclif_final) (void); +typedef void (*HPMHOOK_pre_lclif_connection_error) (int *fd, uint8 *error); +typedef void (*HPMHOOK_post_lclif_connection_error) (int fd, uint8 error); +typedef bool (*HPMHOOK_pre_lclif_server_list) (struct login_session_data **sd); +typedef bool (*HPMHOOK_post_lclif_server_list) (bool retVal___, struct login_session_data *sd); +typedef void (*HPMHOOK_pre_lclif_auth_failed) (int *fd, time_t *ban, uint32 *error); +typedef void (*HPMHOOK_post_lclif_auth_failed) (int fd, time_t ban, uint32 error); +typedef void (*HPMHOOK_pre_lclif_login_error) (int *fd, uint8 *error); +typedef void (*HPMHOOK_post_lclif_login_error) (int fd, uint8 error); +typedef void (*HPMHOOK_pre_lclif_coding_key) (int *fd, struct login_session_data **sd); +typedef void (*HPMHOOK_post_lclif_coding_key) (int fd, struct login_session_data *sd); +typedef const struct login_packet_db* (*HPMHOOK_pre_lclif_packet) (int16 *packet_id); +typedef const struct login_packet_db* (*HPMHOOK_post_lclif_packet) (const struct login_packet_db* retVal___, int16 packet_id); +typedef enum parsefunc_rcode (*HPMHOOK_pre_lclif_parse_packet) (const struct login_packet_db **lpd, int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_lclif_parse_packet) (enum parsefunc_rcode retVal___, const struct login_packet_db *lpd, int fd, struct login_session_data *sd); +typedef int (*HPMHOOK_pre_lclif_parse) (int *fd); +typedef int (*HPMHOOK_post_lclif_parse) (int retVal___, int fd); +#endif // LOGIN_LCLIF_H +#ifdef LOGIN_LCLIF_P_H /* PRIV__lclif */ +typedef void (*HPMHOOK_pre_PRIV__lclif_packetdb_loaddb) (void); +typedef void (*HPMHOOK_post_PRIV__lclif_packetdb_loaddb) (void); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_sub) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_sub) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_EXE_HASHCHECK) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_EXE_HASHCHECK) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_LOGIN) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_LOGIN) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_LOGIN2) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_LOGIN2) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_LOGIN3) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_LOGIN3) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_LOGIN4) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_LOGIN4) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_LOGIN_PCBANG) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_LOGIN_PCBANG) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_LOGIN_HAN) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_LOGIN_HAN) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_LOGIN_OTP) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_LOGIN_OTP) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_OTP_CODE) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_OTP_CODE) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_REQ_HASH) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_REQ_HASH) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +typedef enum parsefunc_rcode (*HPMHOOK_pre_PRIV__lclif_parse_CA_CHARSERVERCONNECT) (int *fd, struct login_session_data **sd); +typedef enum parsefunc_rcode (*HPMHOOK_post_PRIV__lclif_parse_CA_CHARSERVERCONNECT) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); +#endif // LOGIN_LCLIF_P_H +#ifdef COMMON_CONF_H /* libconfig */ +typedef void (*HPMHOOK_pre_libconfig_set_db_path) (const char **db_path); +typedef void (*HPMHOOK_post_libconfig_set_db_path) (const char *db_path); +typedef void (*HPMHOOK_pre_libconfig_format_db_path) (const char **filename, char **path_buf, int *buffer_len); +typedef void (*HPMHOOK_post_libconfig_format_db_path) (const char *filename, char *path_buf, int buffer_len); +typedef int (*HPMHOOK_pre_libconfig_read) (struct config_t **config, FILE **stream); +typedef int (*HPMHOOK_post_libconfig_read) (int retVal___, struct config_t *config, FILE *stream); +typedef void (*HPMHOOK_pre_libconfig_write) (const struct config_t **config, FILE **stream); +typedef void (*HPMHOOK_post_libconfig_write) (const struct config_t *config, FILE *stream); +typedef void (*HPMHOOK_pre_libconfig_set_options) (struct config_t **config, int *options); +typedef void (*HPMHOOK_post_libconfig_set_options) (struct config_t *config, int options); +typedef int (*HPMHOOK_pre_libconfig_get_options) (const struct config_t **config); +typedef int (*HPMHOOK_post_libconfig_get_options) (int retVal___, const struct config_t *config); +typedef int (*HPMHOOK_pre_libconfig_read_string) (struct config_t **config, const char **str); +typedef int (*HPMHOOK_post_libconfig_read_string) (int retVal___, struct config_t *config, const char *str); +typedef int (*HPMHOOK_pre_libconfig_read_file_src) (struct config_t **config, const char **filename); +typedef int (*HPMHOOK_post_libconfig_read_file_src) (int retVal___, struct config_t *config, const char *filename); +typedef int (*HPMHOOK_pre_libconfig_write_file) (struct config_t **config, const char **filename); +typedef int (*HPMHOOK_post_libconfig_write_file) (int retVal___, struct config_t *config, const char *filename); +typedef void (*HPMHOOK_pre_libconfig_set_destructor) (struct config_t **config, void ( **destructor ) (void *)); +typedef void (*HPMHOOK_post_libconfig_set_destructor) (struct config_t *config, void ( *destructor ) (void *)); +typedef void (*HPMHOOK_pre_libconfig_set_include_dir) (struct config_t **config, const char **include_dir); +typedef void (*HPMHOOK_post_libconfig_set_include_dir) (struct config_t *config, const char *include_dir); +typedef void (*HPMHOOK_pre_libconfig_init) (struct config_t **config); +typedef void (*HPMHOOK_post_libconfig_init) (struct config_t *config); +typedef void (*HPMHOOK_pre_libconfig_destroy) (struct config_t **config); +typedef void (*HPMHOOK_post_libconfig_destroy) (struct config_t *config); +typedef int (*HPMHOOK_pre_libconfig_setting_get_int) (const struct config_setting_t **setting); +typedef int (*HPMHOOK_post_libconfig_setting_get_int) (int retVal___, const struct config_setting_t *setting); +typedef int64 (*HPMHOOK_pre_libconfig_setting_get_int64) (const struct config_setting_t **setting); +typedef int64 (*HPMHOOK_post_libconfig_setting_get_int64) (int64 retVal___, const struct config_setting_t *setting); +typedef double (*HPMHOOK_pre_libconfig_setting_get_float) (const struct config_setting_t **setting); +typedef double (*HPMHOOK_post_libconfig_setting_get_float) (double retVal___, const struct config_setting_t *setting); +typedef int (*HPMHOOK_pre_libconfig_setting_get_bool) (const struct config_setting_t **setting); +typedef int (*HPMHOOK_post_libconfig_setting_get_bool) (int retVal___, const struct config_setting_t *setting); +typedef const char* (*HPMHOOK_pre_libconfig_setting_get_string) (const struct config_setting_t **setting); +typedef const char* (*HPMHOOK_post_libconfig_setting_get_string) (const char* retVal___, const struct config_setting_t *setting); +typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_lookup) (struct config_setting_t **setting, const char **name); +typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_lookup) (struct config_setting_t* retVal___, struct config_setting_t *setting, const char *name); +typedef int (*HPMHOOK_pre_libconfig_setting_lookup_int) (const struct config_setting_t **setting, const char **name, int **value); +typedef int (*HPMHOOK_post_libconfig_setting_lookup_int) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); +typedef int (*HPMHOOK_pre_libconfig_setting_lookup_int64) (const struct config_setting_t **setting, const char **name, int64 **value); +typedef int (*HPMHOOK_post_libconfig_setting_lookup_int64) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value); +typedef int (*HPMHOOK_pre_libconfig_setting_lookup_float) (const struct config_setting_t **setting, const char **name, double **value); +typedef int (*HPMHOOK_post_libconfig_setting_lookup_float) (int retVal___, const struct config_setting_t *setting, const char *name, double *value); +typedef int (*HPMHOOK_pre_libconfig_setting_lookup_bool) (const struct config_setting_t **setting, const char **name, int **value); +typedef int (*HPMHOOK_post_libconfig_setting_lookup_bool) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); +typedef int (*HPMHOOK_pre_libconfig_setting_lookup_string) (const struct config_setting_t **setting, const char **name, const char ***value); +typedef int (*HPMHOOK_post_libconfig_setting_lookup_string) (int retVal___, const struct config_setting_t *setting, const char *name, const char **value); +typedef int (*HPMHOOK_pre_libconfig_setting_set_int) (struct config_setting_t **setting, int *value); +typedef int (*HPMHOOK_post_libconfig_setting_set_int) (int retVal___, struct config_setting_t *setting, int value); +typedef int (*HPMHOOK_pre_libconfig_setting_set_int64) (struct config_setting_t **setting, int64 *value); +typedef int (*HPMHOOK_post_libconfig_setting_set_int64) (int retVal___, struct config_setting_t *setting, int64 value); +typedef int (*HPMHOOK_pre_libconfig_setting_set_float) (struct config_setting_t **setting, double *value); +typedef int (*HPMHOOK_post_libconfig_setting_set_float) (int retVal___, struct config_setting_t *setting, double value); +typedef int (*HPMHOOK_pre_libconfig_setting_set_bool) (struct config_setting_t **setting, int *value); +typedef int (*HPMHOOK_post_libconfig_setting_set_bool) (int retVal___, struct config_setting_t *setting, int value); +typedef int (*HPMHOOK_pre_libconfig_setting_set_string) (struct config_setting_t **setting, const char **value); +typedef int (*HPMHOOK_post_libconfig_setting_set_string) (int retVal___, struct config_setting_t *setting, const char *value); +typedef int (*HPMHOOK_pre_libconfig_setting_set_format) (struct config_setting_t **setting, short *format); +typedef int (*HPMHOOK_post_libconfig_setting_set_format) (int retVal___, struct config_setting_t *setting, short format); +typedef short (*HPMHOOK_pre_libconfig_setting_get_format) (const struct config_setting_t **setting); +typedef short (*HPMHOOK_post_libconfig_setting_get_format) (short retVal___, const struct config_setting_t *setting); +typedef int (*HPMHOOK_pre_libconfig_setting_get_int_elem) (const struct config_setting_t **setting, int *idx); +typedef int (*HPMHOOK_post_libconfig_setting_get_int_elem) (int retVal___, const struct config_setting_t *setting, int idx); +typedef int64 (*HPMHOOK_pre_libconfig_setting_get_int64_elem) (const struct config_setting_t **setting, int *idx); +typedef int64 (*HPMHOOK_post_libconfig_setting_get_int64_elem) (int64 retVal___, const struct config_setting_t *setting, int idx); +typedef double (*HPMHOOK_pre_libconfig_setting_get_float_elem) (const struct config_setting_t **setting, int *idx); +typedef double (*HPMHOOK_post_libconfig_setting_get_float_elem) (double retVal___, const struct config_setting_t *setting, int idx); +typedef int (*HPMHOOK_pre_libconfig_setting_get_bool_elem) (const struct config_setting_t **setting, int *idx); +typedef int (*HPMHOOK_post_libconfig_setting_get_bool_elem) (int retVal___, const struct config_setting_t *setting, int idx); +typedef const char* (*HPMHOOK_pre_libconfig_setting_get_string_elem) (const struct config_setting_t **setting, int *idx); +typedef const char* (*HPMHOOK_post_libconfig_setting_get_string_elem) (const char* retVal___, const struct config_setting_t *setting, int idx); +typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_int_elem) (struct config_setting_t **setting, int *idx, int *value); +typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_int_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); +typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_int64_elem) (struct config_setting_t **setting, int *idx, int64 *value); +typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_int64_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value); +typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_float_elem) (struct config_setting_t **setting, int *idx, double *value); +typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_float_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, double value); +typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_bool_elem) (struct config_setting_t **setting, int *idx, int *value); +typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_bool_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); +typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_set_string_elem) (struct config_setting_t **setting, int *idx, const char **value); +typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_set_string_elem) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, const char *value); +typedef int (*HPMHOOK_pre_libconfig_setting_index) (const struct config_setting_t **setting); +typedef int (*HPMHOOK_post_libconfig_setting_index) (int retVal___, const struct config_setting_t *setting); +typedef int (*HPMHOOK_pre_libconfig_setting_length) (const struct config_setting_t **setting); +typedef int (*HPMHOOK_post_libconfig_setting_length) (int retVal___, const struct config_setting_t *setting); +typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_get_elem) (const struct config_setting_t **setting, unsigned int *idx); +typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_get_elem) (struct config_setting_t* retVal___, const struct config_setting_t *setting, unsigned int idx); +typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_get_member) (const struct config_setting_t **setting, const char **name); +typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_get_member) (struct config_setting_t* retVal___, const struct config_setting_t *setting, const char *name); +typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_setting_add) (struct config_setting_t **parent, const char **name, int *type); +typedef struct config_setting_t* (*HPMHOOK_post_libconfig_setting_add) (struct config_setting_t* retVal___, struct config_setting_t *parent, const char *name, int type); +typedef int (*HPMHOOK_pre_libconfig_setting_remove) (struct config_setting_t **parent, const char **name); +typedef int (*HPMHOOK_post_libconfig_setting_remove) (int retVal___, struct config_setting_t *parent, const char *name); +typedef int (*HPMHOOK_pre_libconfig_setting_remove_elem) (struct config_setting_t **parent, unsigned int *idx); +typedef int (*HPMHOOK_post_libconfig_setting_remove_elem) (int retVal___, struct config_setting_t *parent, unsigned int idx); +typedef void (*HPMHOOK_pre_libconfig_setting_set_hook) (struct config_setting_t **setting, void **hook); +typedef void (*HPMHOOK_post_libconfig_setting_set_hook) (struct config_setting_t *setting, void *hook); +typedef struct config_setting_t* (*HPMHOOK_pre_libconfig_lookup) (const struct config_t **config, const char **filepath); +typedef struct config_setting_t* (*HPMHOOK_post_libconfig_lookup) (struct config_setting_t* retVal___, const struct config_t *config, const char *filepath); +typedef int (*HPMHOOK_pre_libconfig_lookup_int) (const struct config_t **config, const char **filepath, int **value); +typedef int (*HPMHOOK_post_libconfig_lookup_int) (int retVal___, const struct config_t *config, const char *filepath, int *value); +typedef int (*HPMHOOK_pre_libconfig_lookup_int64) (const struct config_t **config, const char **filepath, int64 **value); +typedef int (*HPMHOOK_post_libconfig_lookup_int64) (int retVal___, const struct config_t *config, const char *filepath, int64 *value); +typedef int (*HPMHOOK_pre_libconfig_lookup_float) (const struct config_t **config, const char **filepath, double **value); +typedef int (*HPMHOOK_post_libconfig_lookup_float) (int retVal___, const struct config_t *config, const char *filepath, double *value); +typedef int (*HPMHOOK_pre_libconfig_lookup_bool) (const struct config_t **config, const char **filepath, int **value); +typedef int (*HPMHOOK_post_libconfig_lookup_bool) (int retVal___, const struct config_t *config, const char *filepath, int *value); +typedef int (*HPMHOOK_pre_libconfig_lookup_string) (const struct config_t **config, const char **filepath, const char ***value); +typedef int (*HPMHOOK_post_libconfig_lookup_string) (int retVal___, const struct config_t *config, const char *filepath, const char **value); +typedef int (*HPMHOOK_pre_libconfig_load_file) (struct config_t **config, const char **config_filename); +typedef int (*HPMHOOK_post_libconfig_load_file) (int retVal___, struct config_t *config, const char *config_filename); +typedef void (*HPMHOOK_pre_libconfig_setting_copy_simple) (struct config_setting_t **parent, const struct config_setting_t **src); +typedef void (*HPMHOOK_post_libconfig_setting_copy_simple) (struct config_setting_t *parent, const struct config_setting_t *src); +typedef void (*HPMHOOK_pre_libconfig_setting_copy_elem) (struct config_setting_t **parent, const struct config_setting_t **src); +typedef void (*HPMHOOK_post_libconfig_setting_copy_elem) (struct config_setting_t *parent, const struct config_setting_t *src); +typedef void (*HPMHOOK_pre_libconfig_setting_copy_aggregate) (struct config_setting_t **parent, const struct config_setting_t **src); +typedef void (*HPMHOOK_post_libconfig_setting_copy_aggregate) (struct config_setting_t *parent, const struct config_setting_t *src); +typedef int (*HPMHOOK_pre_libconfig_setting_copy) (struct config_setting_t **parent, const struct config_setting_t **src); +typedef int (*HPMHOOK_post_libconfig_setting_copy) (int retVal___, struct config_setting_t *parent, const struct config_setting_t *src); +typedef bool (*HPMHOOK_pre_libconfig_setting_get_bool_real) (const struct config_setting_t **setting); +typedef bool (*HPMHOOK_post_libconfig_setting_get_bool_real) (bool retVal___, const struct config_setting_t *setting); +typedef uint32 (*HPMHOOK_pre_libconfig_setting_get_uint32) (const struct config_setting_t **setting); +typedef uint32 (*HPMHOOK_post_libconfig_setting_get_uint32) (uint32 retVal___, const struct config_setting_t *setting); +typedef uint16 (*HPMHOOK_pre_libconfig_setting_get_uint16) (const struct config_setting_t **setting); +typedef uint16 (*HPMHOOK_post_libconfig_setting_get_uint16) (uint16 retVal___, const struct config_setting_t *setting); +typedef int16 (*HPMHOOK_pre_libconfig_setting_get_int16) (const struct config_setting_t **setting); +typedef int16 (*HPMHOOK_post_libconfig_setting_get_int16) (int16 retVal___, const struct config_setting_t *setting); +typedef int (*HPMHOOK_pre_libconfig_setting_lookup_bool_real) (const struct config_setting_t **setting, const char **name, bool **value); +typedef int (*HPMHOOK_post_libconfig_setting_lookup_bool_real) (int retVal___, const struct config_setting_t *setting, const char *name, bool *value); +typedef int (*HPMHOOK_pre_libconfig_setting_lookup_uint32) (const struct config_setting_t **setting, const char **name, uint32 **value); +typedef int (*HPMHOOK_post_libconfig_setting_lookup_uint32) (int retVal___, const struct config_setting_t *setting, const char *name, uint32 *value); +typedef int (*HPMHOOK_pre_libconfig_setting_lookup_uint16) (const struct config_setting_t **setting, const char **name, uint16 **value); +typedef int (*HPMHOOK_post_libconfig_setting_lookup_uint16) (int retVal___, const struct config_setting_t *setting, const char *name, uint16 *value); +typedef int (*HPMHOOK_pre_libconfig_setting_lookup_int16) (const struct config_setting_t **setting, const char **name, int16 **value); +typedef int (*HPMHOOK_post_libconfig_setting_lookup_int16) (int retVal___, const struct config_setting_t *setting, const char *name, int16 *value); +typedef int (*HPMHOOK_pre_libconfig_setting_lookup_mutable_string) (const struct config_setting_t **setting, const char **name, char **out, size_t *out_size); +typedef int (*HPMHOOK_post_libconfig_setting_lookup_mutable_string) (int retVal___, const struct config_setting_t *setting, const char *name, char *out, size_t out_size); +typedef int (*HPMHOOK_pre_libconfig_lookup_mutable_string) (const struct config_t **config, const char **name, char **out, size_t *out_size); +typedef int (*HPMHOOK_post_libconfig_lookup_mutable_string) (int retVal___, const struct config_t *config, const char *name, char *out, size_t out_size); +#endif // COMMON_CONF_H +#ifdef MAP_LOG_H /* logs */ +typedef void (*HPMHOOK_pre_logs_pick_pc) (struct map_session_data **sd, e_log_pick_type *type, int *amount, struct item **itm, struct item_data **data); +typedef void (*HPMHOOK_post_logs_pick_pc) (struct map_session_data *sd, e_log_pick_type type, int amount, struct item *itm, struct item_data *data); +typedef void (*HPMHOOK_pre_logs_pick_mob) (struct mob_data **md, e_log_pick_type *type, int *amount, struct item **itm, struct item_data **data); +typedef void (*HPMHOOK_post_logs_pick_mob) (struct mob_data *md, e_log_pick_type type, int amount, struct item *itm, struct item_data *data); +typedef void (*HPMHOOK_pre_logs_zeny) (struct map_session_data **sd, e_log_pick_type *type, struct map_session_data **src_sd, int *amount); +typedef void (*HPMHOOK_post_logs_zeny) (struct map_session_data *sd, e_log_pick_type type, struct map_session_data *src_sd, int amount); +typedef void (*HPMHOOK_pre_logs_npc) (struct map_session_data **sd, const char **message); +typedef void (*HPMHOOK_post_logs_npc) (struct map_session_data *sd, const char *message); +typedef void (*HPMHOOK_pre_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); +typedef void (*HPMHOOK_post_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); +typedef void (*HPMHOOK_pre_logs_atcommand) (struct map_session_data **sd, const char **message); +typedef void (*HPMHOOK_post_logs_atcommand) (struct map_session_data *sd, const char *message); +typedef void (*HPMHOOK_pre_logs_branch) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_logs_branch) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_logs_mvpdrop) (struct map_session_data **sd, int *monster_id, int **log_mvp); +typedef void (*HPMHOOK_post_logs_mvpdrop) (struct map_session_data *sd, int monster_id, int *log_mvp); +typedef void (*HPMHOOK_pre_logs_pick_sub) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item **itm, struct item_data **data); +typedef void (*HPMHOOK_post_logs_pick_sub) (int id, int16 m, e_log_pick_type type, int amount, struct item *itm, struct item_data *data); +typedef void (*HPMHOOK_pre_logs_zeny_sub) (struct map_session_data **sd, e_log_pick_type *type, struct map_session_data **src_sd, int *amount); +typedef void (*HPMHOOK_post_logs_zeny_sub) (struct map_session_data *sd, e_log_pick_type type, struct map_session_data *src_sd, int amount); +typedef void (*HPMHOOK_pre_logs_npc_sub) (struct map_session_data **sd, const char **message); +typedef void (*HPMHOOK_post_logs_npc_sub) (struct map_session_data *sd, const char *message); +typedef void (*HPMHOOK_pre_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); +typedef void (*HPMHOOK_post_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); +typedef void (*HPMHOOK_pre_logs_atcommand_sub) (struct map_session_data **sd, const char **message); +typedef void (*HPMHOOK_post_logs_atcommand_sub) (struct map_session_data *sd, const char *message); +typedef void (*HPMHOOK_pre_logs_branch_sub) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_logs_branch_sub) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_logs_mvpdrop_sub) (struct map_session_data **sd, int *monster_id, int **log_mvp); +typedef void (*HPMHOOK_post_logs_mvpdrop_sub) (struct map_session_data *sd, int monster_id, int *log_mvp); +typedef bool (*HPMHOOK_pre_logs_config_read) (const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_logs_config_read) (bool retVal___, const char *filename, bool imported); +typedef void (*HPMHOOK_pre_logs_config_done) (void); +typedef void (*HPMHOOK_post_logs_config_done) (void); +typedef void (*HPMHOOK_pre_logs_sql_init) (void); +typedef void (*HPMHOOK_post_logs_sql_init) (void); +typedef void (*HPMHOOK_pre_logs_sql_final) (void); +typedef void (*HPMHOOK_post_logs_sql_final) (void); +typedef char (*HPMHOOK_pre_logs_picktype2char) (e_log_pick_type *type); +typedef char (*HPMHOOK_post_logs_picktype2char) (char retVal___, e_log_pick_type type); +typedef char (*HPMHOOK_pre_logs_chattype2char) (e_log_chat_type *type); +typedef char (*HPMHOOK_post_logs_chattype2char) (char retVal___, e_log_chat_type type); +typedef bool (*HPMHOOK_pre_logs_should_log_item) (int *nameid, int *amount, int *refine_level, struct item_data **id); +typedef bool (*HPMHOOK_post_logs_should_log_item) (bool retVal___, int nameid, int amount, int refine_level, struct item_data *id); +#endif // MAP_LOG_H +#ifdef LOGIN_LOGIN_H /* login */ +typedef int (*HPMHOOK_pre_login_mmo_auth) (struct login_session_data **sd, bool *isServer); +typedef int (*HPMHOOK_post_login_mmo_auth) (int retVal___, struct login_session_data *sd, bool isServer); +typedef int (*HPMHOOK_pre_login_mmo_auth_new) (const char **userid, const char **pass, const char *sex, const char **last_ip); +typedef int (*HPMHOOK_post_login_mmo_auth_new) (int retVal___, const char *userid, const char *pass, const char sex, const char *last_ip); +typedef int (*HPMHOOK_pre_login_waiting_disconnect_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_login_waiting_disconnect_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef struct DBData (*HPMHOOK_pre_login_create_online_user) (union DBKey *key, va_list args); +typedef struct DBData (*HPMHOOK_post_login_create_online_user) (struct DBData retVal___, union DBKey key, va_list args); +typedef struct online_login_data* (*HPMHOOK_pre_login_add_online_user) (int *char_server, int *account_id); +typedef struct online_login_data* (*HPMHOOK_post_login_add_online_user) (struct online_login_data* retVal___, int char_server, int account_id); +typedef void (*HPMHOOK_pre_login_remove_online_user) (int *account_id); +typedef void (*HPMHOOK_post_login_remove_online_user) (int account_id); +typedef int (*HPMHOOK_pre_login_online_db_setoffline) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_login_online_db_setoffline) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_login_online_data_cleanup_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_login_online_data_cleanup_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_login_online_data_cleanup) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_login_online_data_cleanup) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_login_sync_ip_addresses) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_login_sync_ip_addresses) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef bool (*HPMHOOK_pre_login_check_encrypted) (const char **str1, const char **str2, const char **passwd); +typedef bool (*HPMHOOK_post_login_check_encrypted) (bool retVal___, const char *str1, const char *str2, const char *passwd); +typedef bool (*HPMHOOK_pre_login_check_password) (const char **md5key, int *passwdenc, const char **passwd, const char **refpass); +typedef bool (*HPMHOOK_post_login_check_password) (bool retVal___, const char *md5key, int passwdenc, const char *passwd, const char *refpass); +typedef uint32 (*HPMHOOK_pre_login_lan_subnet_check) (uint32 *ip); +typedef uint32 (*HPMHOOK_post_login_lan_subnet_check) (uint32 retVal___, uint32 ip); +typedef void (*HPMHOOK_pre_login_fromchar_accinfo) (int *fd, int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd, struct mmo_account **acc); +typedef void (*HPMHOOK_post_login_fromchar_accinfo) (int fd, int account_id, int u_fd, int u_aid, int u_group, int map_fd, struct mmo_account *acc); +typedef void (*HPMHOOK_pre_login_fromchar_account) (int *fd, int *account_id, struct mmo_account **acc); +typedef void (*HPMHOOK_post_login_fromchar_account) (int fd, int account_id, struct mmo_account *acc); +typedef void (*HPMHOOK_pre_login_fromchar_account_update_other) (int *account_id, unsigned int *state); +typedef void (*HPMHOOK_post_login_fromchar_account_update_other) (int account_id, unsigned int state); +typedef void (*HPMHOOK_pre_login_fromchar_auth_ack) (int *fd, int *account_id, uint32 *login_id1, uint32 *login_id2, uint8 *sex, int *request_id, struct login_auth_node **node); +typedef void (*HPMHOOK_post_login_fromchar_auth_ack) (int fd, int account_id, uint32 login_id1, uint32 login_id2, uint8 sex, int request_id, struct login_auth_node *node); +typedef void (*HPMHOOK_pre_login_fromchar_ban) (int *account_id, time_t *timestamp); +typedef void (*HPMHOOK_post_login_fromchar_ban) (int account_id, time_t timestamp); +typedef void (*HPMHOOK_pre_login_fromchar_change_sex_other) (int *account_id, char *sex); +typedef void (*HPMHOOK_post_login_fromchar_change_sex_other) (int account_id, char sex); +typedef void (*HPMHOOK_pre_login_fromchar_pong) (int *fd); +typedef void (*HPMHOOK_post_login_fromchar_pong) (int fd); +typedef void (*HPMHOOK_pre_login_fromchar_parse_auth) (int *fd, int *id, const char **ip); +typedef void (*HPMHOOK_post_login_fromchar_parse_auth) (int fd, int id, const char *ip); +typedef void (*HPMHOOK_pre_login_fromchar_parse_update_users) (int *fd, int *id); +typedef void (*HPMHOOK_post_login_fromchar_parse_update_users) (int fd, int id); +typedef void (*HPMHOOK_pre_login_fromchar_parse_request_change_email) (int *fd, int *id, const char **ip); +typedef void (*HPMHOOK_post_login_fromchar_parse_request_change_email) (int fd, int id, const char *ip); +typedef void (*HPMHOOK_pre_login_fromchar_parse_account_data) (int *fd, int *id, const char **ip); +typedef void (*HPMHOOK_post_login_fromchar_parse_account_data) (int fd, int id, const char *ip); +typedef void (*HPMHOOK_pre_login_fromchar_parse_ping) (int *fd); +typedef void (*HPMHOOK_post_login_fromchar_parse_ping) (int fd); +typedef void (*HPMHOOK_pre_login_fromchar_parse_change_email) (int *fd, int *id, const char **ip); +typedef void (*HPMHOOK_post_login_fromchar_parse_change_email) (int fd, int id, const char *ip); +typedef void (*HPMHOOK_pre_login_fromchar_parse_account_update) (int *fd, int *id, const char **ip); +typedef void (*HPMHOOK_post_login_fromchar_parse_account_update) (int fd, int id, const char *ip); +typedef void (*HPMHOOK_pre_login_fromchar_parse_ban) (int *fd, int *id, const char **ip); +typedef void (*HPMHOOK_post_login_fromchar_parse_ban) (int fd, int id, const char *ip); +typedef void (*HPMHOOK_pre_login_fromchar_parse_change_sex) (int *fd, int *id, const char **ip); +typedef void (*HPMHOOK_post_login_fromchar_parse_change_sex) (int fd, int id, const char *ip); +typedef void (*HPMHOOK_pre_login_fromchar_parse_account_reg2) (int *fd, int *id, const char **ip); +typedef void (*HPMHOOK_post_login_fromchar_parse_account_reg2) (int fd, int id, const char *ip); +typedef void (*HPMHOOK_pre_login_fromchar_parse_unban) (int *fd, int *id, const char **ip); +typedef void (*HPMHOOK_post_login_fromchar_parse_unban) (int fd, int id, const char *ip); +typedef void (*HPMHOOK_pre_login_fromchar_parse_account_online) (int *fd, int *id); +typedef void (*HPMHOOK_post_login_fromchar_parse_account_online) (int fd, int id); +typedef void (*HPMHOOK_pre_login_fromchar_parse_account_offline) (int *fd); +typedef void (*HPMHOOK_post_login_fromchar_parse_account_offline) (int fd); +typedef void (*HPMHOOK_pre_login_fromchar_parse_online_accounts) (int *fd, int *id); +typedef void (*HPMHOOK_post_login_fromchar_parse_online_accounts) (int fd, int id); +typedef void (*HPMHOOK_pre_login_fromchar_parse_request_account_reg2) (int *fd); +typedef void (*HPMHOOK_post_login_fromchar_parse_request_account_reg2) (int fd); +typedef void (*HPMHOOK_pre_login_fromchar_parse_update_wan_ip) (int *fd, int *id); +typedef void (*HPMHOOK_post_login_fromchar_parse_update_wan_ip) (int fd, int id); +typedef void (*HPMHOOK_pre_login_fromchar_parse_all_offline) (int *fd, int *id); +typedef void (*HPMHOOK_post_login_fromchar_parse_all_offline) (int fd, int id); +typedef void (*HPMHOOK_pre_login_fromchar_parse_change_pincode) (int *fd); +typedef void (*HPMHOOK_post_login_fromchar_parse_change_pincode) (int fd); +typedef bool (*HPMHOOK_pre_login_fromchar_parse_wrong_pincode) (int *fd); +typedef bool (*HPMHOOK_post_login_fromchar_parse_wrong_pincode) (bool retVal___, int fd); +typedef void (*HPMHOOK_pre_login_fromchar_parse_accinfo) (int *fd); +typedef void (*HPMHOOK_post_login_fromchar_parse_accinfo) (int fd); +typedef int (*HPMHOOK_pre_login_parse_fromchar) (int *fd); +typedef int (*HPMHOOK_post_login_parse_fromchar) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_login_kick) (struct login_session_data **sd); +typedef void (*HPMHOOK_post_login_kick) (struct login_session_data *sd); +typedef void (*HPMHOOK_pre_login_auth_ok) (struct login_session_data **sd); +typedef void (*HPMHOOK_post_login_auth_ok) (struct login_session_data *sd); +typedef void (*HPMHOOK_pre_login_auth_failed) (struct login_session_data **sd, int *result); +typedef void (*HPMHOOK_post_login_auth_failed) (struct login_session_data *sd, int result); +typedef bool (*HPMHOOK_pre_login_client_login) (int *fd, struct login_session_data **sd); +typedef bool (*HPMHOOK_post_login_client_login) (bool retVal___, int fd, struct login_session_data *sd); +typedef bool (*HPMHOOK_pre_login_client_login_otp) (int *fd, struct login_session_data **sd); +typedef bool (*HPMHOOK_post_login_client_login_otp) (bool retVal___, int fd, struct login_session_data *sd); +typedef void (*HPMHOOK_pre_login_client_login_mobile_otp_request) (int *fd, struct login_session_data **sd); +typedef void (*HPMHOOK_post_login_client_login_mobile_otp_request) (int fd, struct login_session_data *sd); +typedef void (*HPMHOOK_pre_login_char_server_connection_status) (int *fd, struct login_session_data **sd, uint8 *status); +typedef void (*HPMHOOK_post_login_char_server_connection_status) (int fd, struct login_session_data *sd, uint8 status); +typedef void (*HPMHOOK_pre_login_parse_request_connection) (int *fd, struct login_session_data **sd, const char **ip, uint32 *ipl); +typedef void (*HPMHOOK_post_login_parse_request_connection) (int fd, struct login_session_data *sd, const char *ip, uint32 ipl); +typedef void (*HPMHOOK_pre_login_config_set_defaults) (void); +typedef void (*HPMHOOK_post_login_config_set_defaults) (void); +typedef bool (*HPMHOOK_pre_login_config_read) (const char **filename, bool *included); +typedef bool (*HPMHOOK_post_login_config_read) (bool retVal___, const char *filename, bool included); +typedef bool (*HPMHOOK_pre_login_config_read_inter) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_inter) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_console) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_console) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_log) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_log) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_account) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_account) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission_hash) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission_hash) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_permission_blacklist) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_permission_blacklist) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_login_config_read_users) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_login_config_read_users) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef void (*HPMHOOK_pre_login_clear_dnsbl_servers) (void); +typedef void (*HPMHOOK_post_login_clear_dnsbl_servers) (void); +typedef void (*HPMHOOK_pre_login_config_set_dnsbl_servers) (struct config_setting_t **setting); +typedef void (*HPMHOOK_post_login_config_set_dnsbl_servers) (struct config_setting_t *setting); +typedef void (*HPMHOOK_pre_login_clear_client_hash_nodes) (void); +typedef void (*HPMHOOK_post_login_clear_client_hash_nodes) (void); +typedef void (*HPMHOOK_pre_login_config_set_md5hash) (struct config_setting_t **setting); +typedef void (*HPMHOOK_post_login_config_set_md5hash) (struct config_setting_t *setting); +typedef uint16 (*HPMHOOK_pre_login_convert_users_to_colors) (uint16 *users); +typedef uint16 (*HPMHOOK_post_login_convert_users_to_colors) (uint16 retVal___, uint16 users); +#endif // LOGIN_LOGIN_H +#ifdef CHAR_LOGINIF_H /* loginif */ +typedef void (*HPMHOOK_pre_loginif_init) (void); +typedef void (*HPMHOOK_post_loginif_init) (void); +typedef void (*HPMHOOK_pre_loginif_final) (void); +typedef void (*HPMHOOK_post_loginif_final) (void); +typedef void (*HPMHOOK_pre_loginif_reset) (void); +typedef void (*HPMHOOK_post_loginif_reset) (void); +typedef void (*HPMHOOK_pre_loginif_check_shutdown) (void); +typedef void (*HPMHOOK_post_loginif_check_shutdown) (void); +typedef void (*HPMHOOK_pre_loginif_on_disconnect) (void); +typedef void (*HPMHOOK_post_loginif_on_disconnect) (void); +typedef void (*HPMHOOK_pre_loginif_on_ready) (void); +typedef void (*HPMHOOK_post_loginif_on_ready) (void); +typedef void (*HPMHOOK_pre_loginif_block_account) (int *account_id, int *flag); +typedef void (*HPMHOOK_post_loginif_block_account) (int account_id, int flag); +typedef void (*HPMHOOK_pre_loginif_ban_account) (int *account_id, short *year, short *month, short *day, short *hour, short *minute, short *second); +typedef void (*HPMHOOK_post_loginif_ban_account) (int account_id, short year, short month, short day, short hour, short minute, short second); +typedef void (*HPMHOOK_pre_loginif_unban_account) (int *account_id); +typedef void (*HPMHOOK_post_loginif_unban_account) (int account_id); +typedef void (*HPMHOOK_pre_loginif_changesex) (int *account_id); +typedef void (*HPMHOOK_post_loginif_changesex) (int account_id); +typedef void (*HPMHOOK_pre_loginif_auth) (int *fd, struct char_session_data **sd, uint32 *ipl); +typedef void (*HPMHOOK_post_loginif_auth) (int fd, struct char_session_data *sd, uint32 ipl); +typedef void (*HPMHOOK_pre_loginif_send_users_count) (int *users); +typedef void (*HPMHOOK_post_loginif_send_users_count) (int users); +typedef void (*HPMHOOK_pre_loginif_connect_to_server) (void); +typedef void (*HPMHOOK_post_loginif_connect_to_server) (void); +#endif // CHAR_LOGINIF_H +#ifdef LOGIN_LOGINLOG_H /* loginlog */ +typedef unsigned long (*HPMHOOK_pre_loginlog_failedattempts) (uint32 *ip, unsigned int *minutes); +typedef unsigned long (*HPMHOOK_post_loginlog_failedattempts) (unsigned long retVal___, uint32 ip, unsigned int minutes); +typedef void (*HPMHOOK_pre_loginlog_log) (uint32 *ip, const char **username, int *rcode, const char **message); +typedef void (*HPMHOOK_post_loginlog_log) (uint32 ip, const char *username, int rcode, const char *message); +typedef bool (*HPMHOOK_pre_loginlog_init) (void); +typedef bool (*HPMHOOK_post_loginlog_init) (bool retVal___); +typedef bool (*HPMHOOK_pre_loginlog_final) (void); +typedef bool (*HPMHOOK_post_loginlog_final) (bool retVal___); +typedef bool (*HPMHOOK_pre_loginlog_config_read_names) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_loginlog_config_read_names) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_loginlog_config_read_log) (const char **filename, struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_loginlog_config_read_log) (bool retVal___, const char *filename, struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_loginlog_config_read) (const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_loginlog_config_read) (bool retVal___, const char *filename, bool imported); +#endif // LOGIN_LOGINLOG_H +#ifdef MAP_MAIL_H /* mail */ +typedef void (*HPMHOOK_pre_mail_clear) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_mail_clear) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_mail_removeitem) (struct map_session_data **sd, short *flag); +typedef int (*HPMHOOK_post_mail_removeitem) (int retVal___, struct map_session_data *sd, short flag); +typedef int (*HPMHOOK_pre_mail_removezeny) (struct map_session_data **sd, short *flag); +typedef int (*HPMHOOK_post_mail_removezeny) (int retVal___, struct map_session_data *sd, short flag); +typedef unsigned char (*HPMHOOK_pre_mail_setitem) (struct map_session_data **sd, int *idx, int *amount); +typedef unsigned char (*HPMHOOK_post_mail_setitem) (unsigned char retVal___, struct map_session_data *sd, int idx, int amount); +typedef bool (*HPMHOOK_pre_mail_setattachment) (struct map_session_data **sd, struct mail_message **msg); +typedef bool (*HPMHOOK_post_mail_setattachment) (bool retVal___, struct map_session_data *sd, struct mail_message *msg); +typedef void (*HPMHOOK_pre_mail_getattachment) (struct map_session_data **sd, int *zeny, struct item **item); +typedef void (*HPMHOOK_post_mail_getattachment) (struct map_session_data *sd, int zeny, struct item *item); +typedef int (*HPMHOOK_pre_mail_openmail) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_mail_openmail) (int retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_mail_deliveryfail) (struct map_session_data **sd, struct mail_message **msg); +typedef void (*HPMHOOK_post_mail_deliveryfail) (struct map_session_data *sd, struct mail_message *msg); +typedef bool (*HPMHOOK_pre_mail_invalid_operation) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_mail_invalid_operation) (bool retVal___, struct map_session_data *sd); +#endif // MAP_MAIL_H +#ifdef MAP_MAP_H /* map */ +typedef void (*HPMHOOK_pre_map_zone_init) (void); +typedef void (*HPMHOOK_post_map_zone_init) (void); +typedef void (*HPMHOOK_pre_map_zone_remove) (int *m); +typedef void (*HPMHOOK_post_map_zone_remove) (int m); +typedef void (*HPMHOOK_pre_map_zone_remove_all) (int *m); +typedef void (*HPMHOOK_post_map_zone_remove_all) (int m); +typedef void (*HPMHOOK_pre_map_zone_apply) (int *m, struct map_zone_data **zone, const char **start, const char **buffer, const char **filepath); +typedef void (*HPMHOOK_post_map_zone_apply) (int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); +typedef void (*HPMHOOK_pre_map_zone_change) (int *m, struct map_zone_data **zone, const char **start, const char **buffer, const char **filepath); +typedef void (*HPMHOOK_post_map_zone_change) (int m, struct map_zone_data *zone, const char *start, const char *buffer, const char *filepath); +typedef void (*HPMHOOK_pre_map_zone_change2) (int *m, struct map_zone_data **zone); +typedef void (*HPMHOOK_post_map_zone_change2) (int m, struct map_zone_data *zone); +typedef void (*HPMHOOK_pre_map_zone_reload) (void); +typedef void (*HPMHOOK_post_map_zone_reload) (void); +typedef int (*HPMHOOK_pre_map_getcell) (int16 *m, const struct block_list **bl, int16 *x, int16 *y, cell_chk *cellchk); +typedef int (*HPMHOOK_post_map_getcell) (int retVal___, int16 m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk); +typedef void (*HPMHOOK_pre_map_setgatcell) (int16 *m, int16 *x, int16 *y, int *gat); +typedef void (*HPMHOOK_post_map_setgatcell) (int16 m, int16 x, int16 y, int gat); +typedef void (*HPMHOOK_pre_map_cellfromcache) (struct map_data **m); +typedef void (*HPMHOOK_post_map_cellfromcache) (struct map_data *m); +typedef void (*HPMHOOK_pre_map_setusers) (int *p1); +typedef void (*HPMHOOK_post_map_setusers) (int p1); +typedef int (*HPMHOOK_pre_map_getusers) (void); +typedef int (*HPMHOOK_post_map_getusers) (int retVal___); +typedef int (*HPMHOOK_pre_map_usercount) (void); +typedef int (*HPMHOOK_post_map_usercount) (int retVal___); +typedef int (*HPMHOOK_pre_map_freeblock) (struct block_list **bl); +typedef int (*HPMHOOK_post_map_freeblock) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_map_freeblock_lock) (void); +typedef int (*HPMHOOK_post_map_freeblock_lock) (int retVal___); +typedef int (*HPMHOOK_pre_map_freeblock_unlock) (void); +typedef int (*HPMHOOK_post_map_freeblock_unlock) (int retVal___); +typedef int (*HPMHOOK_pre_map_addblock) (struct block_list **bl); +typedef int (*HPMHOOK_post_map_addblock) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_map_delblock) (struct block_list **bl); +typedef int (*HPMHOOK_post_map_delblock) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_map_moveblock) (struct block_list **bl, int *x1, int *y1, int64 *tick); +typedef int (*HPMHOOK_post_map_moveblock) (int retVal___, struct block_list *bl, int x1, int y1, int64 tick); +typedef int (*HPMHOOK_pre_map_count_oncell) (int16 *m, int16 *x, int16 *y, int *type, int *flag); +typedef int (*HPMHOOK_post_map_count_oncell) (int retVal___, int16 m, int16 x, int16 y, int type, int flag); +typedef struct skill_unit* (*HPMHOOK_pre_map_find_skill_unit_oncell) (struct block_list **target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit **out_unit, int *flag); +typedef struct skill_unit* (*HPMHOOK_post_map_find_skill_unit_oncell) (struct skill_unit* retVal___, struct block_list *target, int16 x, int16 y, uint16 skill_id, struct skill_unit *out_unit, int flag); +typedef int (*HPMHOOK_pre_map_get_new_object_id) (void); +typedef int (*HPMHOOK_post_map_get_new_object_id) (int retVal___); +typedef int (*HPMHOOK_pre_map_search_freecell) (struct block_list **src, int16 *m, int16 **x, int16 **y, int16 *rx, int16 *ry, int *flag); +typedef int (*HPMHOOK_post_map_search_freecell) (int retVal___, struct block_list *src, int16 m, int16 *x, int16 *y, int16 rx, int16 ry, int flag); +typedef bool (*HPMHOOK_pre_map_closest_freecell) (int16 *m, const struct block_list **bl, int16 **x, int16 **y, int *type, int *flag); +typedef bool (*HPMHOOK_post_map_closest_freecell) (bool retVal___, int16 m, const struct block_list *bl, int16 *x, int16 *y, int type, int flag); +typedef int (*HPMHOOK_pre_map_quit) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_map_quit) (int retVal___, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_map_addnpc) (int16 *m, struct npc_data **nd); +typedef bool (*HPMHOOK_post_map_addnpc) (bool retVal___, int16 m, struct npc_data *nd); +typedef int (*HPMHOOK_pre_map_clearflooritem_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_map_clearflooritem_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_map_removemobs_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_map_removemobs_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_map_clearflooritem) (struct block_list **bl); +typedef void (*HPMHOOK_post_map_clearflooritem) (struct block_list *bl); +typedef int (*HPMHOOK_pre_map_addflooritem) (const struct block_list **bl, struct item **item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags, bool *showdropeffect); +typedef int (*HPMHOOK_post_map_addflooritem) (int retVal___, const struct block_list *bl, struct item *item_data, int amount, int16 m, int16 x, int16 y, int first_charid, int second_charid, int third_charid, int flags, bool showdropeffect); +typedef void (*HPMHOOK_pre_map_addnickdb) (int *charid, const char **nick); +typedef void (*HPMHOOK_post_map_addnickdb) (int charid, const char *nick); +typedef void (*HPMHOOK_pre_map_delnickdb) (int *charid, const char **nick); +typedef void (*HPMHOOK_post_map_delnickdb) (int charid, const char *nick); +typedef void (*HPMHOOK_pre_map_reqnickdb) (struct map_session_data **sd, int *charid); +typedef void (*HPMHOOK_post_map_reqnickdb) (struct map_session_data *sd, int charid); +typedef const char* (*HPMHOOK_pre_map_charid2nick) (int *charid); +typedef const char* (*HPMHOOK_post_map_charid2nick) (const char* retVal___, int charid); +typedef struct map_session_data* (*HPMHOOK_pre_map_charid2sd) (int *charid); +typedef struct map_session_data* (*HPMHOOK_post_map_charid2sd) (struct map_session_data* retVal___, int charid); +typedef void (*HPMHOOK_pre_map_vforeachpc) (int ( **func ) (struct map_session_data *sd, va_list args), va_list args); +typedef void (*HPMHOOK_post_map_vforeachpc) (int ( *func ) (struct map_session_data *sd, va_list args), va_list args); +typedef void (*HPMHOOK_pre_map_vforeachmob) (int ( **func ) (struct mob_data *md, va_list args), va_list args); +typedef void (*HPMHOOK_post_map_vforeachmob) (int ( *func ) (struct mob_data *md, va_list args), va_list args); +typedef void (*HPMHOOK_pre_map_vforeachnpc) (int ( **func ) (struct npc_data *nd, va_list args), va_list args); +typedef void (*HPMHOOK_post_map_vforeachnpc) (int ( *func ) (struct npc_data *nd, va_list args), va_list args); +typedef void (*HPMHOOK_pre_map_vforeachregen) (int ( **func ) (struct block_list *bl, va_list args), va_list args); +typedef void (*HPMHOOK_post_map_vforeachregen) (int ( *func ) (struct block_list *bl, va_list args), va_list args); +typedef void (*HPMHOOK_pre_map_vforeachiddb) (int ( **func ) (struct block_list *bl, va_list args), va_list args); +typedef void (*HPMHOOK_post_map_vforeachiddb) (int ( *func ) (struct block_list *bl, va_list args), va_list args); +typedef int (*HPMHOOK_pre_map_vforeachinrange) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int *type, va_list ap); +typedef int (*HPMHOOK_post_map_vforeachinrange) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int type, va_list ap); +typedef int (*HPMHOOK_pre_map_vforeachinshootrange) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int *type, va_list ap); +typedef int (*HPMHOOK_post_map_vforeachinshootrange) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int type, va_list ap); +typedef int (*HPMHOOK_pre_map_vforeachinarea) (int ( **func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap); +typedef int (*HPMHOOK_post_map_vforeachinarea) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int type, va_list ap); +typedef int (*HPMHOOK_pre_map_vforcountinrange) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int *count, int *type, va_list ap); +typedef int (*HPMHOOK_post_map_vforcountinrange) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int count, int type, va_list ap); +typedef int (*HPMHOOK_pre_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); +typedef int (*HPMHOOK_post_map_vforcountinarea) (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); +typedef int (*HPMHOOK_pre_map_vforeachinmovearea) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap); +typedef int (*HPMHOOK_post_map_vforeachinmovearea) (int retVal___, int ( *func ) (struct block_list *, va_list), struct block_list *center, int16 range, int16 dx, int16 dy, int type, va_list ap); +typedef int (*HPMHOOK_pre_map_vforeachincell) (int ( **func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap); +typedef int (*HPMHOOK_post_map_vforeachincell) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 m, int16 x, int16 y, int type, va_list ap); +typedef int (*HPMHOOK_pre_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); +typedef int (*HPMHOOK_post_map_vforeachinpath) (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); +typedef int (*HPMHOOK_pre_map_vforeachinmap) (int ( **func ) (struct block_list *, va_list), int16 *m, int *type, va_list args); +typedef int (*HPMHOOK_post_map_vforeachinmap) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 m, int type, va_list args); +typedef int (*HPMHOOK_pre_map_vforeachininstance) (int ( **func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap); +typedef int (*HPMHOOK_post_map_vforeachininstance) (int retVal___, int ( *func ) (struct block_list *, va_list), int16 instance_id, int type, va_list ap); +typedef struct map_session_data* (*HPMHOOK_pre_map_id2sd) (int *id); +typedef struct map_session_data* (*HPMHOOK_post_map_id2sd) (struct map_session_data* retVal___, int id); +typedef struct npc_data* (*HPMHOOK_pre_map_id2nd) (int *id); +typedef struct npc_data* (*HPMHOOK_post_map_id2nd) (struct npc_data* retVal___, int id); +typedef struct mob_data* (*HPMHOOK_pre_map_id2md) (int *id); +typedef struct mob_data* (*HPMHOOK_post_map_id2md) (struct mob_data* retVal___, int id); +typedef struct flooritem_data* (*HPMHOOK_pre_map_id2fi) (int *id); +typedef struct flooritem_data* (*HPMHOOK_post_map_id2fi) (struct flooritem_data* retVal___, int id); +typedef struct chat_data* (*HPMHOOK_pre_map_id2cd) (int *id); +typedef struct chat_data* (*HPMHOOK_post_map_id2cd) (struct chat_data* retVal___, int id); +typedef struct skill_unit* (*HPMHOOK_pre_map_id2su) (int *id); +typedef struct skill_unit* (*HPMHOOK_post_map_id2su) (struct skill_unit* retVal___, int id); +typedef struct pet_data* (*HPMHOOK_pre_map_id2pd) (int *id); +typedef struct pet_data* (*HPMHOOK_post_map_id2pd) (struct pet_data* retVal___, int id); +typedef struct homun_data* (*HPMHOOK_pre_map_id2hd) (int *id); +typedef struct homun_data* (*HPMHOOK_post_map_id2hd) (struct homun_data* retVal___, int id); +typedef struct mercenary_data* (*HPMHOOK_pre_map_id2mc) (int *id); +typedef struct mercenary_data* (*HPMHOOK_post_map_id2mc) (struct mercenary_data* retVal___, int id); +typedef struct elemental_data* (*HPMHOOK_pre_map_id2ed) (int *id); +typedef struct elemental_data* (*HPMHOOK_post_map_id2ed) (struct elemental_data* retVal___, int id); +typedef struct block_list* (*HPMHOOK_pre_map_id2bl) (int *id); +typedef struct block_list* (*HPMHOOK_post_map_id2bl) (struct block_list* retVal___, int id); +typedef bool (*HPMHOOK_pre_map_blid_exists) (int *id); +typedef bool (*HPMHOOK_post_map_blid_exists) (bool retVal___, int id); +typedef int16 (*HPMHOOK_pre_map_mapindex2mapid) (unsigned short *map_index); +typedef int16 (*HPMHOOK_post_map_mapindex2mapid) (int16 retVal___, unsigned short map_index); +typedef int16 (*HPMHOOK_pre_map_mapname2mapid) (const char **name); +typedef int16 (*HPMHOOK_post_map_mapname2mapid) (int16 retVal___, const char *name); +typedef int (*HPMHOOK_pre_map_mapname2ipport) (unsigned short *name, uint32 **ip, uint16 **port); +typedef int (*HPMHOOK_post_map_mapname2ipport) (int retVal___, unsigned short name, uint32 *ip, uint16 *port); +typedef int (*HPMHOOK_pre_map_setipport) (unsigned short *map_index, uint32 *ip, uint16 *port); +typedef int (*HPMHOOK_post_map_setipport) (int retVal___, unsigned short map_index, uint32 ip, uint16 port); +typedef int (*HPMHOOK_pre_map_eraseipport) (unsigned short *map_index, uint32 *ip, uint16 *port); +typedef int (*HPMHOOK_post_map_eraseipport) (int retVal___, unsigned short map_index, uint32 ip, uint16 port); +typedef int (*HPMHOOK_pre_map_eraseallipport) (void); +typedef int (*HPMHOOK_post_map_eraseallipport) (int retVal___); +typedef void (*HPMHOOK_pre_map_addiddb) (struct block_list **bl); +typedef void (*HPMHOOK_post_map_addiddb) (struct block_list *bl); +typedef void (*HPMHOOK_pre_map_deliddb) (struct block_list **bl); +typedef void (*HPMHOOK_post_map_deliddb) (struct block_list *bl); +typedef struct map_session_data* (*HPMHOOK_pre_map_nick2sd) (const char **nick, bool *allow_partial); +typedef struct map_session_data* (*HPMHOOK_post_map_nick2sd) (struct map_session_data* retVal___, const char *nick, bool allow_partial); +typedef struct mob_data* (*HPMHOOK_pre_map_getmob_boss) (int16 *m); +typedef struct mob_data* (*HPMHOOK_post_map_getmob_boss) (struct mob_data* retVal___, int16 m); +typedef struct mob_data* (*HPMHOOK_pre_map_id2boss) (int *id); +typedef struct mob_data* (*HPMHOOK_post_map_id2boss) (struct mob_data* retVal___, int id); +typedef uint32 (*HPMHOOK_pre_map_race_id2mask) (int *race); +typedef uint32 (*HPMHOOK_post_map_race_id2mask) (uint32 retVal___, int race); +typedef void (*HPMHOOK_pre_map_reloadnpc) (bool *clear); +typedef void (*HPMHOOK_post_map_reloadnpc) (bool clear); +typedef int (*HPMHOOK_pre_map_check_dir) (enum unit_dir *s_dir, enum unit_dir *t_dir); +typedef int (*HPMHOOK_post_map_check_dir) (int retVal___, enum unit_dir s_dir, enum unit_dir t_dir); +typedef enum unit_dir (*HPMHOOK_pre_map_calc_dir) (const struct block_list **src, int16 *x, int16 *y); +typedef enum unit_dir (*HPMHOOK_post_map_calc_dir) (enum unit_dir retVal___, const struct block_list *src, int16 x, int16 y); +typedef int (*HPMHOOK_pre_map_random_dir) (struct block_list **bl, short **x, short **y); +typedef int (*HPMHOOK_post_map_random_dir) (int retVal___, struct block_list *bl, short *x, short *y); +typedef int (*HPMHOOK_pre_map_cleanup_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_map_cleanup_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_map_delmap) (const char **mapname); +typedef int (*HPMHOOK_post_map_delmap) (int retVal___, const char *mapname); +typedef void (*HPMHOOK_pre_map_flags_init) (void); +typedef void (*HPMHOOK_post_map_flags_init) (void); +typedef bool (*HPMHOOK_pre_map_iwall_set) (int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char **wall_name); +typedef bool (*HPMHOOK_post_map_iwall_set) (bool retVal___, int16 m, int16 x, int16 y, int size, int8 dir, bool shootable, const char *wall_name); +typedef void (*HPMHOOK_pre_map_iwall_get) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_map_iwall_get) (struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_map_iwall_remove) (const char **wall_name); +typedef bool (*HPMHOOK_post_map_iwall_remove) (bool retVal___, const char *wall_name); +typedef int (*HPMHOOK_pre_map_addmobtolist) (unsigned short *m, struct spawn_data **spawn); +typedef int (*HPMHOOK_post_map_addmobtolist) (int retVal___, unsigned short m, struct spawn_data *spawn); +typedef void (*HPMHOOK_pre_map_spawnmobs) (int16 *m); +typedef void (*HPMHOOK_post_map_spawnmobs) (int16 m); +typedef void (*HPMHOOK_pre_map_removemobs) (int16 *m); +typedef void (*HPMHOOK_post_map_removemobs) (int16 m); +typedef void (*HPMHOOK_pre_map_addmap2db) (struct map_data **m); +typedef void (*HPMHOOK_post_map_addmap2db) (struct map_data *m); +typedef void (*HPMHOOK_pre_map_removemapdb) (struct map_data **m); +typedef void (*HPMHOOK_post_map_removemapdb) (struct map_data *m); +typedef void (*HPMHOOK_pre_map_clean) (int *i); +typedef void (*HPMHOOK_post_map_clean) (int i); +typedef void (*HPMHOOK_pre_map_do_shutdown) (void); +typedef void (*HPMHOOK_post_map_do_shutdown) (void); +typedef int (*HPMHOOK_pre_map_freeblock_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_map_freeblock_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_map_searchrandfreecell) (int16 *m, const struct block_list **bl, int16 **x, int16 **y, int *stack); +typedef int (*HPMHOOK_post_map_searchrandfreecell) (int retVal___, int16 m, const struct block_list *bl, int16 *x, int16 *y, int stack); +typedef int (*HPMHOOK_pre_map_count_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_map_count_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef struct DBData (*HPMHOOK_pre_map_create_charid2nick) (union DBKey *key, va_list args); +typedef struct DBData (*HPMHOOK_post_map_create_charid2nick) (struct DBData retVal___, union DBKey key, va_list args); +typedef int (*HPMHOOK_pre_map_removemobs_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_map_removemobs_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef struct mapcell (*HPMHOOK_pre_map_gat2cell) (int *gat); +typedef struct mapcell (*HPMHOOK_post_map_gat2cell) (struct mapcell retVal___, int gat); +typedef int (*HPMHOOK_pre_map_cell2gat) (struct mapcell *cell); +typedef int (*HPMHOOK_post_map_cell2gat) (int retVal___, struct mapcell cell); +typedef int (*HPMHOOK_pre_map_getcellp) (struct map_data **m, const struct block_list **bl, int16 *x, int16 *y, cell_chk *cellchk); +typedef int (*HPMHOOK_post_map_getcellp) (int retVal___, struct map_data *m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk); +typedef void (*HPMHOOK_pre_map_setcell) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); +typedef void (*HPMHOOK_post_map_setcell) (int16 m, int16 x, int16 y, cell_t cell, bool flag); +typedef int (*HPMHOOK_pre_map_sub_getcellp) (struct map_data **m, const struct block_list **bl, int16 *x, int16 *y, cell_chk *cellchk); +typedef int (*HPMHOOK_post_map_sub_getcellp) (int retVal___, struct map_data *m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk); +typedef void (*HPMHOOK_pre_map_sub_setcell) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); +typedef void (*HPMHOOK_post_map_sub_setcell) (int16 m, int16 x, int16 y, cell_t cell, bool flag); +typedef void (*HPMHOOK_pre_map_iwall_nextxy) (int16 *x, int16 *y, int8 *dir, int *pos, int16 **x1, int16 **y1); +typedef void (*HPMHOOK_post_map_iwall_nextxy) (int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 *y1); +typedef struct DBData (*HPMHOOK_pre_map_create_map_data_other_server) (union DBKey *key, va_list args); +typedef struct DBData (*HPMHOOK_post_map_create_map_data_other_server) (struct DBData retVal___, union DBKey key, va_list args); +typedef int (*HPMHOOK_pre_map_eraseallipport_sub) (union DBKey *key, struct DBData **data, va_list va); +typedef int (*HPMHOOK_post_map_eraseallipport_sub) (int retVal___, union DBKey key, struct DBData *data, va_list va); +typedef bool (*HPMHOOK_pre_map_readfromcache) (struct map_data **m); +typedef bool (*HPMHOOK_post_map_readfromcache) (bool retVal___, struct map_data *m); +typedef bool (*HPMHOOK_pre_map_readfromcache_v1) (FILE **fp, struct map_data **m, unsigned int *file_size); +typedef bool (*HPMHOOK_post_map_readfromcache_v1) (bool retVal___, FILE *fp, struct map_data *m, unsigned int file_size); +typedef int (*HPMHOOK_pre_map_addmap) (const char **mapname); +typedef int (*HPMHOOK_post_map_addmap) (int retVal___, const char *mapname); +typedef void (*HPMHOOK_pre_map_delmapid) (int *id); +typedef void (*HPMHOOK_post_map_delmapid) (int id); +typedef void (*HPMHOOK_pre_map_zone_db_clear) (void); +typedef void (*HPMHOOK_post_map_zone_db_clear) (void); +typedef void (*HPMHOOK_pre_map_list_final) (void); +typedef void (*HPMHOOK_post_map_list_final) (void); +typedef int (*HPMHOOK_pre_map_waterheight) (char **mapname); +typedef int (*HPMHOOK_post_map_waterheight) (int retVal___, char *mapname); +typedef int (*HPMHOOK_pre_map_readgat) (struct map_data **m); +typedef int (*HPMHOOK_post_map_readgat) (int retVal___, struct map_data *m); +typedef int (*HPMHOOK_pre_map_readallmaps) (void); +typedef int (*HPMHOOK_post_map_readallmaps) (int retVal___); +typedef bool (*HPMHOOK_pre_map_config_read) (const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_map_config_read) (bool retVal___, const char *filename, bool imported); +typedef bool (*HPMHOOK_pre_map_read_npclist) (const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_map_read_npclist) (bool retVal___, const char *filename, bool imported); +typedef bool (*HPMHOOK_pre_map_inter_config_read) (const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_map_inter_config_read) (bool retVal___, const char *filename, bool imported); +typedef bool (*HPMHOOK_pre_map_inter_config_read_database_names) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_map_inter_config_read_database_names) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef bool (*HPMHOOK_pre_map_inter_config_read_connection) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_map_inter_config_read_connection) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef int (*HPMHOOK_pre_map_sql_init) (void); +typedef int (*HPMHOOK_post_map_sql_init) (int retVal___); +typedef int (*HPMHOOK_pre_map_sql_close) (void); +typedef int (*HPMHOOK_post_map_sql_close) (int retVal___); +typedef bool (*HPMHOOK_pre_map_zone_mf_cache) (int *m, char **flag, char **params); +typedef bool (*HPMHOOK_post_map_zone_mf_cache) (bool retVal___, int m, char *flag, char *params); +typedef int (*HPMHOOK_pre_map_zone_str2itemid) (const char **name); +typedef int (*HPMHOOK_post_map_zone_str2itemid) (int retVal___, const char *name); +typedef unsigned short (*HPMHOOK_pre_map_zone_str2skillid) (const char **name); +typedef unsigned short (*HPMHOOK_post_map_zone_str2skillid) (unsigned short retVal___, const char *name); +typedef enum bl_type (*HPMHOOK_pre_map_zone_bl_type) (const char **entry, enum map_zone_skill_subtype **subtype); +typedef enum bl_type (*HPMHOOK_post_map_zone_bl_type) (enum bl_type retVal___, const char *entry, enum map_zone_skill_subtype *subtype); +typedef void (*HPMHOOK_pre_map_read_zone_db) (void); +typedef void (*HPMHOOK_post_map_read_zone_db) (void); +typedef int (*HPMHOOK_pre_map_db_final) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_map_db_final) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_map_nick_db_final) (union DBKey *key, struct DBData **data, va_list args); +typedef int (*HPMHOOK_post_map_nick_db_final) (int retVal___, union DBKey key, struct DBData *data, va_list args); +typedef int (*HPMHOOK_pre_map_cleanup_db_sub) (union DBKey *key, struct DBData **data, va_list va); +typedef int (*HPMHOOK_post_map_cleanup_db_sub) (int retVal___, union DBKey key, struct DBData *data, va_list va); +typedef int (*HPMHOOK_pre_map_abort_sub) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_map_abort_sub) (int retVal___, struct map_session_data *sd, va_list ap); +typedef void (*HPMHOOK_pre_map_update_cell_bl) (struct block_list **bl, bool *increase); +typedef void (*HPMHOOK_post_map_update_cell_bl) (struct block_list *bl, bool increase); +typedef int (*HPMHOOK_pre_map_get_new_bonus_id) (void); +typedef int (*HPMHOOK_post_map_get_new_bonus_id) (int retVal___); +typedef bool (*HPMHOOK_pre_map_add_questinfo) (int *m, struct npc_data **nd); +typedef bool (*HPMHOOK_post_map_add_questinfo) (bool retVal___, int m, struct npc_data *nd); +typedef bool (*HPMHOOK_pre_map_remove_questinfo) (int *m, struct npc_data **nd); +typedef bool (*HPMHOOK_post_map_remove_questinfo) (bool retVal___, int m, struct npc_data *nd); +typedef struct map_zone_data* (*HPMHOOK_pre_map_merge_zone) (struct map_zone_data **main, struct map_zone_data **other); +typedef struct map_zone_data* (*HPMHOOK_post_map_merge_zone) (struct map_zone_data* retVal___, struct map_zone_data *main, struct map_zone_data *other); +typedef void (*HPMHOOK_pre_map_zone_clear_single) (struct map_zone_data **zone); +typedef void (*HPMHOOK_post_map_zone_clear_single) (struct map_zone_data *zone); +#endif // MAP_MAP_H +#ifdef CHAR_MAPIF_H /* mapif */ +typedef void (*HPMHOOK_pre_mapif_ban) (int *id, unsigned int *flag, int *status); +typedef void (*HPMHOOK_post_mapif_ban) (int id, unsigned int flag, int status); +typedef void (*HPMHOOK_pre_mapif_server_init) (int *id); +typedef void (*HPMHOOK_post_mapif_server_init) (int id); +typedef void (*HPMHOOK_pre_mapif_server_destroy) (int *id); +typedef void (*HPMHOOK_post_mapif_server_destroy) (int id); +typedef void (*HPMHOOK_pre_mapif_server_reset) (int *id); +typedef void (*HPMHOOK_post_mapif_server_reset) (int id); +typedef void (*HPMHOOK_pre_mapif_on_disconnect) (int *id); +typedef void (*HPMHOOK_post_mapif_on_disconnect) (int id); +typedef void (*HPMHOOK_pre_mapif_on_parse_accinfo) (int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd); +typedef void (*HPMHOOK_post_mapif_on_parse_accinfo) (int account_id, int u_fd, int u_aid, int u_group, int map_fd); +typedef void (*HPMHOOK_pre_mapif_char_ban) (int *char_id, time_t *timestamp); +typedef void (*HPMHOOK_post_mapif_char_ban) (int char_id, time_t timestamp); +typedef int (*HPMHOOK_pre_mapif_sendall) (const unsigned char **buf, unsigned int *len); +typedef int (*HPMHOOK_post_mapif_sendall) (int retVal___, const unsigned char *buf, unsigned int len); +typedef int (*HPMHOOK_pre_mapif_sendallwos) (int *sfd, unsigned char **buf, unsigned int *len); +typedef int (*HPMHOOK_post_mapif_sendallwos) (int retVal___, int sfd, unsigned char *buf, unsigned int len); +typedef int (*HPMHOOK_pre_mapif_send) (int *fd, unsigned char **buf, unsigned int *len); +typedef int (*HPMHOOK_post_mapif_send) (int retVal___, int fd, unsigned char *buf, unsigned int len); +typedef void (*HPMHOOK_pre_mapif_send_users_count) (int *users); +typedef void (*HPMHOOK_post_mapif_send_users_count) (int users); +typedef void (*HPMHOOK_pre_mapif_pLoadAchievements) (int *fd); +typedef void (*HPMHOOK_post_mapif_pLoadAchievements) (int fd); +typedef void (*HPMHOOK_pre_mapif_sAchievementsToMap) (int *fd, int *char_id, const struct char_achievements **p); +typedef void (*HPMHOOK_post_mapif_sAchievementsToMap) (int fd, int char_id, const struct char_achievements *p); +typedef void (*HPMHOOK_pre_mapif_pSaveAchievements) (int *fd); +typedef void (*HPMHOOK_post_mapif_pSaveAchievements) (int fd); +typedef void (*HPMHOOK_pre_mapif_achievement_load) (int *fd, int *char_id); +typedef void (*HPMHOOK_post_mapif_achievement_load) (int fd, int char_id); +typedef void (*HPMHOOK_pre_mapif_achievement_save) (int *char_id, struct char_achievements **p); +typedef void (*HPMHOOK_post_mapif_achievement_save) (int char_id, struct char_achievements *p); +typedef void (*HPMHOOK_pre_mapif_auction_message) (int *char_id, unsigned char *result); +typedef void (*HPMHOOK_post_mapif_auction_message) (int char_id, unsigned char result); +typedef void (*HPMHOOK_pre_mapif_auction_sendlist) (int *fd, int *char_id, short *count, short *pages, unsigned char **buf); +typedef void (*HPMHOOK_post_mapif_auction_sendlist) (int fd, int char_id, short count, short pages, unsigned char *buf); +typedef void (*HPMHOOK_pre_mapif_parse_auction_requestlist) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_auction_requestlist) (int fd); +typedef void (*HPMHOOK_pre_mapif_auction_register) (int *fd, struct auction_data **auction); +typedef void (*HPMHOOK_post_mapif_auction_register) (int fd, struct auction_data *auction); +typedef void (*HPMHOOK_pre_mapif_parse_auction_register) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_auction_register) (int fd); +typedef void (*HPMHOOK_pre_mapif_auction_cancel) (int *fd, int *char_id, unsigned char *result); +typedef void (*HPMHOOK_post_mapif_auction_cancel) (int fd, int char_id, unsigned char result); +typedef void (*HPMHOOK_pre_mapif_parse_auction_cancel) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_auction_cancel) (int fd); +typedef void (*HPMHOOK_pre_mapif_auction_close) (int *fd, int *char_id, unsigned char *result); +typedef void (*HPMHOOK_post_mapif_auction_close) (int fd, int char_id, unsigned char result); +typedef void (*HPMHOOK_pre_mapif_parse_auction_close) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_auction_close) (int fd); +typedef void (*HPMHOOK_pre_mapif_auction_bid) (int *fd, int *char_id, int *bid, unsigned char *result); +typedef void (*HPMHOOK_post_mapif_auction_bid) (int fd, int char_id, int bid, unsigned char result); +typedef void (*HPMHOOK_pre_mapif_parse_auction_bid) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_auction_bid) (int fd); +typedef void (*HPMHOOK_pre_mapif_elemental_send) (int *fd, struct s_elemental **ele, unsigned char *flag); +typedef void (*HPMHOOK_post_mapif_elemental_send) (int fd, struct s_elemental *ele, unsigned char flag); +typedef void (*HPMHOOK_pre_mapif_parse_elemental_create) (int *fd, const struct s_elemental **ele); +typedef void (*HPMHOOK_post_mapif_parse_elemental_create) (int fd, const struct s_elemental *ele); +typedef void (*HPMHOOK_pre_mapif_parse_elemental_load) (int *fd, int *ele_id, int *char_id); +typedef void (*HPMHOOK_post_mapif_parse_elemental_load) (int fd, int ele_id, int char_id); +typedef void (*HPMHOOK_pre_mapif_elemental_deleted) (int *fd, unsigned char *flag); +typedef void (*HPMHOOK_post_mapif_elemental_deleted) (int fd, unsigned char flag); +typedef void (*HPMHOOK_pre_mapif_parse_elemental_delete) (int *fd, int *ele_id); +typedef void (*HPMHOOK_post_mapif_parse_elemental_delete) (int fd, int ele_id); +typedef void (*HPMHOOK_pre_mapif_elemental_saved) (int *fd, unsigned char *flag); +typedef void (*HPMHOOK_post_mapif_elemental_saved) (int fd, unsigned char flag); +typedef void (*HPMHOOK_pre_mapif_parse_elemental_save) (int *fd, const struct s_elemental **ele); +typedef void (*HPMHOOK_post_mapif_parse_elemental_save) (int fd, const struct s_elemental *ele); +typedef int (*HPMHOOK_pre_mapif_guild_created) (int *fd, int *account_id, struct guild **g); +typedef int (*HPMHOOK_post_mapif_guild_created) (int retVal___, int fd, int account_id, struct guild *g); +typedef int (*HPMHOOK_pre_mapif_guild_noinfo) (int *fd, int *guild_id); +typedef int (*HPMHOOK_post_mapif_guild_noinfo) (int retVal___, int fd, int guild_id); +typedef int (*HPMHOOK_pre_mapif_guild_info) (int *fd, struct guild **g); +typedef int (*HPMHOOK_post_mapif_guild_info) (int retVal___, int fd, struct guild *g); +typedef int (*HPMHOOK_pre_mapif_guild_memberadded) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag); +typedef int (*HPMHOOK_post_mapif_guild_memberadded) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag); +typedef int (*HPMHOOK_pre_mapif_guild_withdraw) (int *guild_id, int *account_id, int *char_id, int *flag, const char **name, const char **mes); +typedef int (*HPMHOOK_post_mapif_guild_withdraw) (int retVal___, int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes); +typedef int (*HPMHOOK_pre_mapif_guild_memberinfoshort) (struct guild **g, int *idx); +typedef int (*HPMHOOK_post_mapif_guild_memberinfoshort) (int retVal___, struct guild *g, int idx); +typedef int (*HPMHOOK_pre_mapif_guild_broken) (int *guild_id, int *flag); +typedef int (*HPMHOOK_post_mapif_guild_broken) (int retVal___, int guild_id, int flag); +typedef int (*HPMHOOK_pre_mapif_guild_basicinfochanged) (int *guild_id, int *type, const void **data, int *len); +typedef int (*HPMHOOK_post_mapif_guild_basicinfochanged) (int retVal___, int guild_id, int type, const void *data, int len); +typedef int (*HPMHOOK_pre_mapif_guild_memberinfochanged) (int *guild_id, int *account_id, int *char_id, int *type, const void **data, int *len); +typedef int (*HPMHOOK_post_mapif_guild_memberinfochanged) (int retVal___, int guild_id, int account_id, int char_id, int type, const void *data, int len); +typedef int (*HPMHOOK_pre_mapif_guild_skillupack) (int *guild_id, uint16 *skill_id, int *account_id); +typedef int (*HPMHOOK_post_mapif_guild_skillupack) (int retVal___, int guild_id, uint16 skill_id, int account_id); +typedef int (*HPMHOOK_pre_mapif_guild_alliance) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char **name1, const char **name2); +typedef int (*HPMHOOK_post_mapif_guild_alliance) (int retVal___, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag, const char *name1, const char *name2); +typedef int (*HPMHOOK_pre_mapif_guild_position) (struct guild **g, int *idx); +typedef int (*HPMHOOK_post_mapif_guild_position) (int retVal___, struct guild *g, int idx); +typedef int (*HPMHOOK_pre_mapif_guild_notice) (struct guild **g); +typedef int (*HPMHOOK_post_mapif_guild_notice) (int retVal___, struct guild *g); +typedef int (*HPMHOOK_pre_mapif_guild_emblem) (struct guild **g); +typedef int (*HPMHOOK_post_mapif_guild_emblem) (int retVal___, struct guild *g); +typedef int (*HPMHOOK_pre_mapif_guild_master_changed) (struct guild **g, int *aid, int *cid); +typedef int (*HPMHOOK_post_mapif_guild_master_changed) (int retVal___, struct guild *g, int aid, int cid); +typedef int (*HPMHOOK_pre_mapif_guild_castle_dataload) (int *fd, int *sz, const int **castle_ids); +typedef int (*HPMHOOK_post_mapif_guild_castle_dataload) (int retVal___, int fd, int sz, const int *castle_ids); +typedef int (*HPMHOOK_pre_mapif_parse_CreateGuild) (int *fd, int *account_id, const char **name, const struct guild_member **master); +typedef int (*HPMHOOK_post_mapif_parse_CreateGuild) (int retVal___, int fd, int account_id, const char *name, const struct guild_member *master); +typedef int (*HPMHOOK_pre_mapif_parse_GuildInfo) (int *fd, int *guild_id); +typedef int (*HPMHOOK_post_mapif_parse_GuildInfo) (int retVal___, int fd, int guild_id); +typedef int (*HPMHOOK_pre_mapif_parse_GuildAddMember) (int *fd, int *guild_id, const struct guild_member **m); +typedef int (*HPMHOOK_post_mapif_parse_GuildAddMember) (int retVal___, int fd, int guild_id, const struct guild_member *m); +typedef int (*HPMHOOK_pre_mapif_parse_GuildLeave) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); +typedef int (*HPMHOOK_post_mapif_parse_GuildLeave) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag, const char *mes); +typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); +typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class); +typedef int (*HPMHOOK_pre_mapif_parse_BreakGuild) (int *fd, int *guild_id); +typedef int (*HPMHOOK_post_mapif_parse_BreakGuild) (int retVal___, int fd, int guild_id); +typedef int (*HPMHOOK_pre_mapif_parse_GuildBasicInfoChange) (int *fd, int *guild_id, int *type, const void **data, int *len); +typedef int (*HPMHOOK_post_mapif_parse_GuildBasicInfoChange) (int retVal___, int fd, int guild_id, int type, const void *data, int len); +typedef int (*HPMHOOK_pre_mapif_parse_GuildMemberInfoChange) (int *fd, int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len); +typedef int (*HPMHOOK_post_mapif_parse_GuildMemberInfoChange) (int retVal___, int fd, int guild_id, int account_id, int char_id, int type, const char *data, int len); +typedef int (*HPMHOOK_pre_mapif_parse_GuildPosition) (int *fd, int *guild_id, int *idx, const struct guild_position **p); +typedef int (*HPMHOOK_post_mapif_parse_GuildPosition) (int retVal___, int fd, int guild_id, int idx, const struct guild_position *p); +typedef int (*HPMHOOK_pre_mapif_parse_GuildSkillUp) (int *fd, int *guild_id, uint16 *skill_id, int *account_id, int *max); +typedef int (*HPMHOOK_post_mapif_parse_GuildSkillUp) (int retVal___, int fd, int guild_id, uint16 skill_id, int account_id, int max); +typedef int (*HPMHOOK_pre_mapif_parse_GuildAlliance) (int *fd, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); +typedef int (*HPMHOOK_post_mapif_parse_GuildAlliance) (int retVal___, int fd, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag); +typedef int (*HPMHOOK_pre_mapif_parse_GuildNotice) (int *fd, int *guild_id, const char **mes1, const char **mes2); +typedef int (*HPMHOOK_post_mapif_parse_GuildNotice) (int retVal___, int fd, int guild_id, const char *mes1, const char *mes2); +typedef int (*HPMHOOK_pre_mapif_parse_GuildEmblem) (int *fd, int *len, int *guild_id, int *dummy, const char **data); +typedef int (*HPMHOOK_post_mapif_parse_GuildEmblem) (int retVal___, int fd, int len, int guild_id, int dummy, const char *data); +typedef int (*HPMHOOK_pre_mapif_parse_GuildCastleDataLoad) (int *fd, int *len, const int **castle_ids); +typedef int (*HPMHOOK_post_mapif_parse_GuildCastleDataLoad) (int retVal___, int fd, int len, const int *castle_ids); +typedef int (*HPMHOOK_pre_mapif_parse_GuildCastleDataSave) (int *fd, int *castle_id, int *index, int *value); +typedef int (*HPMHOOK_post_mapif_parse_GuildCastleDataSave) (int retVal___, int fd, int castle_id, int index, int value); +typedef int (*HPMHOOK_pre_mapif_parse_GuildMasterChange) (int *fd, int *guild_id, const char **name, int *len); +typedef int (*HPMHOOK_post_mapif_parse_GuildMasterChange) (int retVal___, int fd, int guild_id, const char *name, int len); +typedef void (*HPMHOOK_pre_mapif_homunculus_created) (int *fd, int *account_id, const struct s_homunculus **sh, unsigned char *flag); +typedef void (*HPMHOOK_post_mapif_homunculus_created) (int fd, int account_id, const struct s_homunculus *sh, unsigned char flag); +typedef void (*HPMHOOK_pre_mapif_homunculus_deleted) (int *fd, int *flag); +typedef void (*HPMHOOK_post_mapif_homunculus_deleted) (int fd, int flag); +typedef void (*HPMHOOK_pre_mapif_homunculus_loaded) (int *fd, int *account_id, struct s_homunculus **hd); +typedef void (*HPMHOOK_post_mapif_homunculus_loaded) (int fd, int account_id, struct s_homunculus *hd); +typedef void (*HPMHOOK_pre_mapif_homunculus_saved) (int *fd, int *account_id, bool *flag); +typedef void (*HPMHOOK_post_mapif_homunculus_saved) (int fd, int account_id, bool flag); +typedef void (*HPMHOOK_pre_mapif_homunculus_renamed) (int *fd, int *account_id, int *char_id, unsigned char *flag, const char **name); +typedef void (*HPMHOOK_post_mapif_homunculus_renamed) (int fd, int account_id, int char_id, unsigned char flag, const char *name); +typedef void (*HPMHOOK_pre_mapif_parse_homunculus_create) (int *fd, int *len, int *account_id, const struct s_homunculus **phd); +typedef void (*HPMHOOK_post_mapif_parse_homunculus_create) (int fd, int len, int account_id, const struct s_homunculus *phd); +typedef void (*HPMHOOK_pre_mapif_parse_homunculus_delete) (int *fd, int *homun_id); +typedef void (*HPMHOOK_post_mapif_parse_homunculus_delete) (int fd, int homun_id); +typedef void (*HPMHOOK_pre_mapif_parse_homunculus_load) (int *fd, int *account_id, int *homun_id); +typedef void (*HPMHOOK_post_mapif_parse_homunculus_load) (int fd, int account_id, int homun_id); +typedef void (*HPMHOOK_pre_mapif_parse_homunculus_save) (int *fd, int *len, int *account_id, const struct s_homunculus **phd); +typedef void (*HPMHOOK_post_mapif_parse_homunculus_save) (int fd, int len, int account_id, const struct s_homunculus *phd); +typedef void (*HPMHOOK_pre_mapif_parse_homunculus_rename) (int *fd, int *account_id, int *char_id, const char **name); +typedef void (*HPMHOOK_post_mapif_parse_homunculus_rename) (int fd, int account_id, int char_id, const char *name); +typedef void (*HPMHOOK_pre_mapif_mail_sendinbox) (int *fd, int *char_id, unsigned char *flag, struct mail_data **md); +typedef void (*HPMHOOK_post_mapif_mail_sendinbox) (int fd, int char_id, unsigned char flag, struct mail_data *md); +typedef void (*HPMHOOK_pre_mapif_parse_mail_requestinbox) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_mail_requestinbox) (int fd); +typedef void (*HPMHOOK_pre_mapif_parse_mail_read) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_mail_read) (int fd); +typedef void (*HPMHOOK_pre_mapif_mail_sendattach) (int *fd, int *char_id, struct mail_message **msg); +typedef void (*HPMHOOK_post_mapif_mail_sendattach) (int fd, int char_id, struct mail_message *msg); +typedef void (*HPMHOOK_pre_mapif_parse_mail_getattach) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_mail_getattach) (int fd); +typedef void (*HPMHOOK_pre_mapif_mail_delete) (int *fd, int *char_id, int *mail_id, bool *failed); +typedef void (*HPMHOOK_post_mapif_mail_delete) (int fd, int char_id, int mail_id, bool failed); +typedef void (*HPMHOOK_pre_mapif_parse_mail_delete) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_mail_delete) (int fd); +typedef void (*HPMHOOK_pre_mapif_mail_new) (struct mail_message **msg); +typedef void (*HPMHOOK_post_mapif_mail_new) (struct mail_message *msg); +typedef void (*HPMHOOK_pre_mapif_mail_return) (int *fd, int *char_id, int *mail_id, int *new_mail); +typedef void (*HPMHOOK_post_mapif_mail_return) (int fd, int char_id, int mail_id, int new_mail); +typedef void (*HPMHOOK_pre_mapif_parse_mail_return) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_mail_return) (int fd); +typedef void (*HPMHOOK_pre_mapif_mail_send) (int *fd, struct mail_message **msg); +typedef void (*HPMHOOK_post_mapif_mail_send) (int fd, struct mail_message *msg); +typedef void (*HPMHOOK_pre_mapif_parse_mail_send) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_mail_send) (int fd); +typedef void (*HPMHOOK_pre_mapif_mercenary_send) (int *fd, struct s_mercenary **merc, unsigned char *flag); +typedef void (*HPMHOOK_post_mapif_mercenary_send) (int fd, struct s_mercenary *merc, unsigned char flag); +typedef void (*HPMHOOK_pre_mapif_parse_mercenary_create) (int *fd, const struct s_mercenary **merc); +typedef void (*HPMHOOK_post_mapif_parse_mercenary_create) (int fd, const struct s_mercenary *merc); +typedef void (*HPMHOOK_pre_mapif_parse_mercenary_load) (int *fd, int *merc_id, int *char_id); +typedef void (*HPMHOOK_post_mapif_parse_mercenary_load) (int fd, int merc_id, int char_id); +typedef void (*HPMHOOK_pre_mapif_mercenary_deleted) (int *fd, unsigned char *flag); +typedef void (*HPMHOOK_post_mapif_mercenary_deleted) (int fd, unsigned char flag); +typedef void (*HPMHOOK_pre_mapif_parse_mercenary_delete) (int *fd, int *merc_id); +typedef void (*HPMHOOK_post_mapif_parse_mercenary_delete) (int fd, int merc_id); +typedef void (*HPMHOOK_pre_mapif_mercenary_saved) (int *fd, unsigned char *flag); +typedef void (*HPMHOOK_post_mapif_mercenary_saved) (int fd, unsigned char flag); +typedef void (*HPMHOOK_pre_mapif_parse_mercenary_save) (int *fd, const struct s_mercenary **merc); +typedef void (*HPMHOOK_post_mapif_parse_mercenary_save) (int fd, const struct s_mercenary *merc); +typedef int (*HPMHOOK_pre_mapif_party_created) (int *fd, int *account_id, int *char_id, struct party **p); +typedef int (*HPMHOOK_post_mapif_party_created) (int retVal___, int fd, int account_id, int char_id, struct party *p); +typedef void (*HPMHOOK_pre_mapif_party_noinfo) (int *fd, int *party_id, int *char_id); +typedef void (*HPMHOOK_post_mapif_party_noinfo) (int fd, int party_id, int char_id); +typedef void (*HPMHOOK_pre_mapif_party_info) (int *fd, struct party **p, int *char_id); +typedef void (*HPMHOOK_post_mapif_party_info) (int fd, struct party *p, int char_id); +typedef int (*HPMHOOK_pre_mapif_party_memberadded) (int *fd, int *party_id, int *account_id, int *char_id, int *flag); +typedef int (*HPMHOOK_post_mapif_party_memberadded) (int retVal___, int fd, int party_id, int account_id, int char_id, int flag); +typedef int (*HPMHOOK_pre_mapif_party_optionchanged) (int *fd, struct party **p, int *account_id, int *flag); +typedef int (*HPMHOOK_post_mapif_party_optionchanged) (int retVal___, int fd, struct party *p, int account_id, int flag); +typedef int (*HPMHOOK_pre_mapif_party_withdraw) (int *party_id, int *account_id, int *char_id); +typedef int (*HPMHOOK_post_mapif_party_withdraw) (int retVal___, int party_id, int account_id, int char_id); +typedef int (*HPMHOOK_pre_mapif_party_membermoved) (struct party **p, int *idx); +typedef int (*HPMHOOK_post_mapif_party_membermoved) (int retVal___, struct party *p, int idx); +typedef int (*HPMHOOK_pre_mapif_party_broken) (int *party_id, int *flag); +typedef int (*HPMHOOK_post_mapif_party_broken) (int retVal___, int party_id, int flag); +typedef int (*HPMHOOK_pre_mapif_parse_CreateParty) (int *fd, const char **name, int *item, int *item2, const struct party_member **leader); +typedef int (*HPMHOOK_post_mapif_parse_CreateParty) (int retVal___, int fd, const char *name, int item, int item2, const struct party_member *leader); +typedef void (*HPMHOOK_pre_mapif_parse_PartyInfo) (int *fd, int *party_id, int *char_id); +typedef void (*HPMHOOK_post_mapif_parse_PartyInfo) (int fd, int party_id, int char_id); +typedef int (*HPMHOOK_pre_mapif_parse_PartyAddMember) (int *fd, int *party_id, const struct party_member **member); +typedef int (*HPMHOOK_post_mapif_parse_PartyAddMember) (int retVal___, int fd, int party_id, const struct party_member *member); +typedef int (*HPMHOOK_pre_mapif_parse_PartyChangeOption) (int *fd, int *party_id, int *account_id, int *exp, int *item); +typedef int (*HPMHOOK_post_mapif_parse_PartyChangeOption) (int retVal___, int fd, int party_id, int account_id, int exp, int item); +typedef int (*HPMHOOK_pre_mapif_parse_PartyLeave) (int *fd, int *party_id, int *account_id, int *char_id); +typedef int (*HPMHOOK_post_mapif_parse_PartyLeave) (int retVal___, int fd, int party_id, int account_id, int char_id); +typedef int (*HPMHOOK_pre_mapif_parse_PartyChangeMap) (int *fd, int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, unsigned int *lv); +typedef int (*HPMHOOK_post_mapif_parse_PartyChangeMap) (int retVal___, int fd, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv); +typedef int (*HPMHOOK_pre_mapif_parse_BreakParty) (int *fd, int *party_id); +typedef int (*HPMHOOK_post_mapif_parse_BreakParty) (int retVal___, int fd, int party_id); +typedef int (*HPMHOOK_pre_mapif_parse_PartyLeaderChange) (int *fd, int *party_id, int *account_id, int *char_id); +typedef int (*HPMHOOK_post_mapif_parse_PartyLeaderChange) (int retVal___, int fd, int party_id, int account_id, int char_id); +typedef int (*HPMHOOK_pre_mapif_pet_created) (int *fd, int *account_id, struct s_pet **p); +typedef int (*HPMHOOK_post_mapif_pet_created) (int retVal___, int fd, int account_id, struct s_pet *p); +typedef int (*HPMHOOK_pre_mapif_pet_info) (int *fd, int *account_id, struct s_pet **p); +typedef int (*HPMHOOK_post_mapif_pet_info) (int retVal___, int fd, int account_id, struct s_pet *p); +typedef int (*HPMHOOK_pre_mapif_pet_noinfo) (int *fd, int *account_id); +typedef int (*HPMHOOK_post_mapif_pet_noinfo) (int retVal___, int fd, int account_id); +typedef int (*HPMHOOK_pre_mapif_save_pet_ack) (int *fd, int *account_id, int *flag); +typedef int (*HPMHOOK_post_mapif_save_pet_ack) (int retVal___, int fd, int account_id, int flag); +typedef int (*HPMHOOK_pre_mapif_delete_pet_ack) (int *fd, int *flag); +typedef int (*HPMHOOK_post_mapif_delete_pet_ack) (int retVal___, int fd, int flag); +typedef int (*HPMHOOK_pre_mapif_save_pet) (int *fd, int *account_id, const struct s_pet **data); +typedef int (*HPMHOOK_post_mapif_save_pet) (int retVal___, int fd, int account_id, const struct s_pet *data); +typedef int (*HPMHOOK_pre_mapif_delete_pet) (int *fd, int *pet_id); +typedef int (*HPMHOOK_post_mapif_delete_pet) (int retVal___, int fd, int pet_id); +typedef int (*HPMHOOK_pre_mapif_parse_CreatePet) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_CreatePet) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_parse_LoadPet) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_LoadPet) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_parse_SavePet) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_SavePet) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_parse_DeletePet) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_DeletePet) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_mapif_quest_save_ack) (int *fd, int *char_id, bool *success); +typedef void (*HPMHOOK_post_mapif_quest_save_ack) (int fd, int char_id, bool success); +typedef int (*HPMHOOK_pre_mapif_parse_quest_save) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_quest_save) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_mapif_send_quests) (int *fd, int *char_id, struct quest **tmp_questlog, int *num_quests); +typedef void (*HPMHOOK_post_mapif_send_quests) (int fd, int char_id, struct quest *tmp_questlog, int num_quests); +typedef int (*HPMHOOK_pre_mapif_parse_quest_load) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_quest_load) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_mapif_parse_rodex_requestinbox) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_rodex_requestinbox) (int fd); +typedef void (*HPMHOOK_pre_mapif_rodex_sendinbox) (int *fd, int *char_id, int8 *opentype, int8 *flag, int *count, int64 *mail_id, struct rodex_maillist **mails); +typedef void (*HPMHOOK_post_mapif_rodex_sendinbox) (int fd, int char_id, int8 opentype, int8 flag, int count, int64 mail_id, struct rodex_maillist *mails); +typedef void (*HPMHOOK_pre_mapif_parse_rodex_checkhasnew) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_rodex_checkhasnew) (int fd); +typedef void (*HPMHOOK_pre_mapif_rodex_sendhasnew) (int *fd, int *char_id, bool *has_new); +typedef void (*HPMHOOK_post_mapif_rodex_sendhasnew) (int fd, int char_id, bool has_new); +typedef void (*HPMHOOK_pre_mapif_parse_rodex_updatemail) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_rodex_updatemail) (int fd); +typedef void (*HPMHOOK_pre_mapif_parse_rodex_send) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_rodex_send) (int fd); +typedef void (*HPMHOOK_pre_mapif_rodex_send) (int *fd, int *sender_id, int *receiver_id, int *receiver_accountid, bool *result); +typedef void (*HPMHOOK_post_mapif_rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result); +typedef void (*HPMHOOK_pre_mapif_parse_rodex_checkname) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_rodex_checkname) (int fd); +typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name); +typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name); +typedef void (*HPMHOOK_pre_mapif_rodex_getzenyack) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int64 *zeny); +typedef void (*HPMHOOK_post_mapif_rodex_getzenyack) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny); +typedef void (*HPMHOOK_pre_mapif_rodex_getitemsack) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int *count, const struct rodex_item **items); +typedef void (*HPMHOOK_post_mapif_rodex_getitemsack) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items); +typedef int (*HPMHOOK_pre_mapif_load_guild_storage) (int *fd, int *account_id, int *guild_id, char *flag); +typedef int (*HPMHOOK_post_mapif_load_guild_storage) (int retVal___, int fd, int account_id, int guild_id, char flag); +typedef int (*HPMHOOK_pre_mapif_save_guild_storage_ack) (int *fd, int *account_id, int *guild_id, int *fail); +typedef int (*HPMHOOK_post_mapif_save_guild_storage_ack) (int retVal___, int fd, int account_id, int guild_id, int fail); +typedef int (*HPMHOOK_pre_mapif_parse_LoadGuildStorage) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_LoadGuildStorage) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_parse_SaveGuildStorage) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_SaveGuildStorage) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_account_storage_load) (int *fd, int *account_id); +typedef int (*HPMHOOK_post_mapif_account_storage_load) (int retVal___, int fd, int account_id); +typedef int (*HPMHOOK_pre_mapif_pAccountStorageLoad) (int *fd); +typedef int (*HPMHOOK_post_mapif_pAccountStorageLoad) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_pAccountStorageSave) (int *fd); +typedef int (*HPMHOOK_post_mapif_pAccountStorageSave) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_mapif_sAccountStorageSaveAck) (int *fd, int *account_id, bool *save); +typedef void (*HPMHOOK_post_mapif_sAccountStorageSaveAck) (int fd, int account_id, bool save); +typedef int (*HPMHOOK_pre_mapif_itembound_ack) (int *fd, int *aid, int *guild_id); +typedef int (*HPMHOOK_post_mapif_itembound_ack) (int retVal___, int fd, int aid, int guild_id); +typedef void (*HPMHOOK_pre_mapif_parse_ItemBoundRetrieve) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_ItemBoundRetrieve) (int fd); +typedef void (*HPMHOOK_pre_mapif_parse_accinfo) (int *fd); +typedef void (*HPMHOOK_post_mapif_parse_accinfo) (int fd); +typedef int (*HPMHOOK_pre_mapif_account_reg_reply) (int *fd, int *account_id, int *char_id, int *type); +typedef int (*HPMHOOK_post_mapif_account_reg_reply) (int retVal___, int fd, int account_id, int char_id, int type); +typedef int (*HPMHOOK_pre_mapif_disconnectplayer) (int *fd, int *account_id, int *char_id, int *reason); +typedef int (*HPMHOOK_post_mapif_disconnectplayer) (int retVal___, int fd, int account_id, int char_id, int reason); +typedef int (*HPMHOOK_pre_mapif_parse_Registry) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_Registry) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_parse_RegistryRequest) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_RegistryRequest) (int retVal___, int fd); +typedef void (*HPMHOOK_pre_mapif_namechange_ack) (int *fd, int *account_id, int *char_id, int *type, int *flag, const char **name); +typedef void (*HPMHOOK_post_mapif_namechange_ack) (int fd, int account_id, int char_id, int type, int flag, const char *name); +typedef int (*HPMHOOK_pre_mapif_parse_NameChangeRequest) (int *fd); +typedef int (*HPMHOOK_post_mapif_parse_NameChangeRequest) (int retVal___, int fd); +typedef int (*HPMHOOK_pre_mapif_parse_ClanMemberKick) (int *fd, int *clan_id, int *kick_interval); +typedef int (*HPMHOOK_post_mapif_parse_ClanMemberKick) (int retVal___, int fd, int clan_id, int kick_interval); +typedef int (*HPMHOOK_pre_mapif_parse_ClanMemberCount) (int *fd, int *clan_id, int *kick_interval); +typedef int (*HPMHOOK_post_mapif_parse_ClanMemberCount) (int retVal___, int fd, int clan_id, int kick_interval); +#endif // CHAR_MAPIF_H +#ifdef COMMON_MAPINDEX_H /* mapindex */ +typedef bool (*HPMHOOK_pre_mapindex_config_read_dbpath) (const char **filename, const struct config_t **config); +typedef bool (*HPMHOOK_post_mapindex_config_read_dbpath) (bool retVal___, const char *filename, const struct config_t *config); +typedef bool (*HPMHOOK_pre_mapindex_config_read) (void); +typedef bool (*HPMHOOK_post_mapindex_config_read) (bool retVal___); +typedef int (*HPMHOOK_pre_mapindex_init) (void); +typedef int (*HPMHOOK_post_mapindex_init) (int retVal___); +typedef void (*HPMHOOK_pre_mapindex_final) (void); +typedef void (*HPMHOOK_post_mapindex_final) (void); +typedef int (*HPMHOOK_pre_mapindex_addmap) (int *index, const char **name); +typedef int (*HPMHOOK_post_mapindex_addmap) (int retVal___, int index, const char *name); +typedef void (*HPMHOOK_pre_mapindex_removemap) (int *index); +typedef void (*HPMHOOK_post_mapindex_removemap) (int index); +typedef const char* (*HPMHOOK_pre_mapindex_getmapname) (const char **string, char **output); +typedef const char* (*HPMHOOK_post_mapindex_getmapname) (const char* retVal___, const char *string, char *output); +typedef const char* (*HPMHOOK_pre_mapindex_getmapname_ext) (const char **string, char **output); +typedef const char* (*HPMHOOK_post_mapindex_getmapname_ext) (const char* retVal___, const char *string, char *output); +typedef unsigned short (*HPMHOOK_pre_mapindex_name2id) (const char **p1); +typedef unsigned short (*HPMHOOK_post_mapindex_name2id) (unsigned short retVal___, const char *p1); +typedef const char* (*HPMHOOK_pre_mapindex_id2name) (uint16 *id, const char **file, int *line, const char **func); +typedef const char* (*HPMHOOK_post_mapindex_id2name) (const char* retVal___, uint16 id, const char *file, int line, const char *func); +typedef bool (*HPMHOOK_pre_mapindex_check_default) (void); +typedef bool (*HPMHOOK_post_mapindex_check_default) (bool retVal___); +#endif // COMMON_MAPINDEX_H +#ifdef MAP_MAP_H /* mapit */ +typedef struct s_mapiterator* (*HPMHOOK_pre_mapit_alloc) (enum e_mapitflags *flags, enum bl_type *types); +typedef struct s_mapiterator* (*HPMHOOK_post_mapit_alloc) (struct s_mapiterator* retVal___, enum e_mapitflags flags, enum bl_type types); +typedef void (*HPMHOOK_pre_mapit_free) (struct s_mapiterator **iter); +typedef void (*HPMHOOK_post_mapit_free) (struct s_mapiterator *iter); +typedef struct block_list* (*HPMHOOK_pre_mapit_first) (struct s_mapiterator **iter); +typedef struct block_list* (*HPMHOOK_post_mapit_first) (struct block_list* retVal___, struct s_mapiterator *iter); +typedef struct block_list* (*HPMHOOK_pre_mapit_last) (struct s_mapiterator **iter); +typedef struct block_list* (*HPMHOOK_post_mapit_last) (struct block_list* retVal___, struct s_mapiterator *iter); +typedef struct block_list* (*HPMHOOK_pre_mapit_next) (struct s_mapiterator **iter); +typedef struct block_list* (*HPMHOOK_post_mapit_next) (struct block_list* retVal___, struct s_mapiterator *iter); +typedef struct block_list* (*HPMHOOK_pre_mapit_prev) (struct s_mapiterator **iter); +typedef struct block_list* (*HPMHOOK_post_mapit_prev) (struct block_list* retVal___, struct s_mapiterator *iter); +typedef bool (*HPMHOOK_pre_mapit_exists) (struct s_mapiterator **iter); +typedef bool (*HPMHOOK_post_mapit_exists) (bool retVal___, struct s_mapiterator *iter); +#endif // MAP_MAP_H +#ifdef MAP_MAPREG_H /* mapreg */ +typedef void (*HPMHOOK_pre_mapreg_init) (void); +typedef void (*HPMHOOK_post_mapreg_init) (void); +typedef void (*HPMHOOK_pre_mapreg_final) (void); +typedef void (*HPMHOOK_post_mapreg_final) (void); +typedef int (*HPMHOOK_pre_mapreg_readreg) (int64 *uid); +typedef int (*HPMHOOK_post_mapreg_readreg) (int retVal___, int64 uid); +typedef char* (*HPMHOOK_pre_mapreg_readregstr) (int64 *uid); +typedef char* (*HPMHOOK_post_mapreg_readregstr) (char* retVal___, int64 uid); +typedef bool (*HPMHOOK_pre_mapreg_setreg) (int64 *uid, int *val); +typedef bool (*HPMHOOK_post_mapreg_setreg) (bool retVal___, int64 uid, int val); +typedef bool (*HPMHOOK_pre_mapreg_setregstr) (int64 *uid, const char **str); +typedef bool (*HPMHOOK_post_mapreg_setregstr) (bool retVal___, int64 uid, const char *str); +typedef void (*HPMHOOK_pre_mapreg_load) (void); +typedef void (*HPMHOOK_post_mapreg_load) (void); +typedef void (*HPMHOOK_pre_mapreg_save) (void); +typedef void (*HPMHOOK_post_mapreg_save) (void); +typedef int (*HPMHOOK_pre_mapreg_save_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_mapreg_save_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_mapreg_destroyreg) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_mapreg_destroyreg) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef void (*HPMHOOK_pre_mapreg_reload) (void); +typedef void (*HPMHOOK_post_mapreg_reload) (void); +typedef bool (*HPMHOOK_pre_mapreg_config_read) (const char **filename, const struct config_setting_t **config, bool *imported); +typedef bool (*HPMHOOK_post_mapreg_config_read) (bool retVal___, const char *filename, const struct config_setting_t *config, bool imported); +#endif // MAP_MAPREG_H +#ifdef COMMON_MD5CALC_H /* md5 */ +typedef void (*HPMHOOK_pre_md5_string) (const char **string, char **output); +typedef void (*HPMHOOK_post_md5_string) (const char *string, char *output); +typedef void (*HPMHOOK_pre_md5_binary) (const uint8 **buf, const int *buf_size, uint8 **output); +typedef void (*HPMHOOK_post_md5_binary) (const uint8 *buf, const int buf_size, uint8 *output); +typedef void (*HPMHOOK_pre_md5_salt) (int *len, char **output); +typedef void (*HPMHOOK_post_md5_salt) (int len, char *output); +#endif // COMMON_MD5CALC_H +#ifdef MAP_MERCENARY_H /* mercenary */ +typedef void (*HPMHOOK_pre_mercenary_init) (bool *minimal); +typedef void (*HPMHOOK_post_mercenary_init) (bool minimal); +typedef bool (*HPMHOOK_pre_mercenary_class) (int *class_); +typedef bool (*HPMHOOK_post_mercenary_class) (bool retVal___, int class_); +typedef struct view_data* (*HPMHOOK_pre_mercenary_get_viewdata) (int *class_); +typedef struct view_data* (*HPMHOOK_post_mercenary_get_viewdata) (struct view_data* retVal___, int class_); +typedef int (*HPMHOOK_pre_mercenary_create) (struct map_session_data **sd, int *class_, unsigned int *lifetime); +typedef int (*HPMHOOK_post_mercenary_create) (int retVal___, struct map_session_data *sd, int class_, unsigned int lifetime); +typedef int (*HPMHOOK_pre_mercenary_data_received) (const struct s_mercenary **merc, bool *flag); +typedef int (*HPMHOOK_post_mercenary_data_received) (int retVal___, const struct s_mercenary *merc, bool flag); +typedef int (*HPMHOOK_pre_mercenary_save) (struct mercenary_data **md); +typedef int (*HPMHOOK_post_mercenary_save) (int retVal___, struct mercenary_data *md); +typedef void (*HPMHOOK_pre_mercenary_heal) (struct mercenary_data **md, int *hp, int *sp); +typedef void (*HPMHOOK_post_mercenary_heal) (struct mercenary_data *md, int hp, int sp); +typedef int (*HPMHOOK_pre_mercenary_dead) (struct mercenary_data **md); +typedef int (*HPMHOOK_post_mercenary_dead) (int retVal___, struct mercenary_data *md); +typedef int (*HPMHOOK_pre_mercenary_delete) (struct mercenary_data **md, int *reply); +typedef int (*HPMHOOK_post_mercenary_delete) (int retVal___, struct mercenary_data *md, int reply); +typedef void (*HPMHOOK_pre_mercenary_contract_stop) (struct mercenary_data **md); +typedef void (*HPMHOOK_post_mercenary_contract_stop) (struct mercenary_data *md); +typedef int (*HPMHOOK_pre_mercenary_get_lifetime) (struct mercenary_data **md); +typedef int (*HPMHOOK_post_mercenary_get_lifetime) (int retVal___, struct mercenary_data *md); +typedef int (*HPMHOOK_pre_mercenary_get_guild) (struct mercenary_data **md); +typedef int (*HPMHOOK_post_mercenary_get_guild) (int retVal___, struct mercenary_data *md); +typedef int (*HPMHOOK_pre_mercenary_get_faith) (struct mercenary_data **md); +typedef int (*HPMHOOK_post_mercenary_get_faith) (int retVal___, struct mercenary_data *md); +typedef int (*HPMHOOK_pre_mercenary_set_faith) (struct mercenary_data **md, int *value); +typedef int (*HPMHOOK_post_mercenary_set_faith) (int retVal___, struct mercenary_data *md, int value); +typedef int (*HPMHOOK_pre_mercenary_get_calls) (struct mercenary_data **md); +typedef int (*HPMHOOK_post_mercenary_get_calls) (int retVal___, struct mercenary_data *md); +typedef int (*HPMHOOK_pre_mercenary_set_calls) (struct mercenary_data **md, int *value); +typedef int (*HPMHOOK_post_mercenary_set_calls) (int retVal___, struct mercenary_data *md, int value); +typedef int (*HPMHOOK_pre_mercenary_kills) (struct mercenary_data **md); +typedef int (*HPMHOOK_post_mercenary_kills) (int retVal___, struct mercenary_data *md); +typedef int (*HPMHOOK_pre_mercenary_checkskill) (struct mercenary_data **md, uint16 *skill_id); +typedef int (*HPMHOOK_post_mercenary_checkskill) (int retVal___, struct mercenary_data *md, uint16 skill_id); +typedef int (*HPMHOOK_pre_mercenary_read_db) (void); +typedef int (*HPMHOOK_post_mercenary_read_db) (int retVal___); +typedef int (*HPMHOOK_pre_mercenary_read_skilldb) (void); +typedef int (*HPMHOOK_post_mercenary_read_skilldb) (int retVal___); +typedef int (*HPMHOOK_pre_mercenary_killbonus) (struct mercenary_data **md); +typedef int (*HPMHOOK_post_mercenary_killbonus) (int retVal___, struct mercenary_data *md); +typedef int (*HPMHOOK_pre_mercenary_search_index) (int *class_); +typedef int (*HPMHOOK_post_mercenary_search_index) (int retVal___, int class_); +typedef int (*HPMHOOK_pre_mercenary_contract_end_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_mercenary_contract_end_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef bool (*HPMHOOK_pre_mercenary_read_db_sub) (char **str[], int *columns, int *current); +typedef bool (*HPMHOOK_post_mercenary_read_db_sub) (bool retVal___, char *str[], int columns, int current); +typedef bool (*HPMHOOK_pre_mercenary_read_skill_db_sub) (char **str[], int *columns, int *current); +typedef bool (*HPMHOOK_post_mercenary_read_skill_db_sub) (bool retVal___, char *str[], int columns, int current); +#endif // MAP_MERCENARY_H +#ifdef MAP_MOB_H /* mob */ +typedef int (*HPMHOOK_pre_mob_init) (bool *mimimal); +typedef int (*HPMHOOK_post_mob_init) (int retVal___, bool mimimal); +typedef int (*HPMHOOK_pre_mob_final) (void); +typedef int (*HPMHOOK_post_mob_final) (int retVal___); +typedef void (*HPMHOOK_pre_mob_reload) (void); +typedef void (*HPMHOOK_post_mob_reload) (void); +typedef int (*HPMHOOK_pre_mob_reload_sub_mob) (struct mob_data **md, va_list args); +typedef int (*HPMHOOK_post_mob_reload_sub_mob) (int retVal___, struct mob_data *md, va_list args); +typedef struct mob_db* (*HPMHOOK_pre_mob_db) (int *index); +typedef struct mob_db* (*HPMHOOK_post_mob_db) (struct mob_db* retVal___, int index); +typedef struct mob_chat* (*HPMHOOK_pre_mob_chat) (short *id); +typedef struct mob_chat* (*HPMHOOK_post_mob_chat) (struct mob_chat* retVal___, short id); +typedef int (*HPMHOOK_pre_mob_makedummymobdb) (int *p1); +typedef int (*HPMHOOK_post_mob_makedummymobdb) (int retVal___, int p1); +typedef int (*HPMHOOK_pre_mob_spawn_guardian_sub) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_mob_spawn_guardian_sub) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_mob_skill_id2skill_idx) (int *class_, uint16 *skill_id); +typedef int (*HPMHOOK_post_mob_skill_id2skill_idx) (int retVal___, int class_, uint16 skill_id); +typedef int (*HPMHOOK_pre_mob_db_searchname) (const char **str); +typedef int (*HPMHOOK_post_mob_db_searchname) (int retVal___, const char *str); +typedef int (*HPMHOOK_pre_mob_db_searchname_array_sub) (struct mob_db **monster, const char **str, int *flag); +typedef int (*HPMHOOK_post_mob_db_searchname_array_sub) (int retVal___, struct mob_db *monster, const char *str, int flag); +typedef void (*HPMHOOK_pre_mob_mvptomb_spawn_delayed) (struct npc_data **nd); +typedef void (*HPMHOOK_post_mob_mvptomb_spawn_delayed) (struct npc_data *nd); +typedef int (*HPMHOOK_pre_mob_mvptomb_delayspawn) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_mob_mvptomb_delayspawn) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_mob_mvptomb_create) (struct mob_data **md, char **killer, time_t *time); +typedef void (*HPMHOOK_post_mob_mvptomb_create) (struct mob_data *md, char *killer, time_t time); +typedef void (*HPMHOOK_pre_mob_mvptomb_destroy) (struct mob_data **md); +typedef void (*HPMHOOK_post_mob_mvptomb_destroy) (struct mob_data *md); +typedef int (*HPMHOOK_pre_mob_db_searchname_array) (struct mob_db ***data, int *size, const char **str, int *flag); +typedef int (*HPMHOOK_post_mob_db_searchname_array) (int retVal___, struct mob_db **data, int size, const char *str, int flag); +typedef int (*HPMHOOK_pre_mob_db_checkid) (const int *id); +typedef int (*HPMHOOK_post_mob_db_checkid) (int retVal___, const int id); +typedef struct view_data* (*HPMHOOK_pre_mob_get_viewdata) (int *class_); +typedef struct view_data* (*HPMHOOK_post_mob_get_viewdata) (struct view_data* retVal___, int class_); +typedef int (*HPMHOOK_pre_mob_parse_dataset) (struct spawn_data **data); +typedef int (*HPMHOOK_post_mob_parse_dataset) (int retVal___, struct spawn_data *data); +typedef struct mob_data* (*HPMHOOK_pre_mob_spawn_dataset) (struct spawn_data **data, int *npc_id); +typedef struct mob_data* (*HPMHOOK_post_mob_spawn_dataset) (struct mob_data* retVal___, struct spawn_data *data, int npc_id); +typedef int (*HPMHOOK_pre_mob_get_random_id) (int *type, int *flag, int *lv); +typedef int (*HPMHOOK_post_mob_get_random_id) (int retVal___, int type, int flag, int lv); +typedef bool (*HPMHOOK_pre_mob_ksprotected) (struct block_list **src, struct block_list **target); +typedef bool (*HPMHOOK_post_mob_ksprotected) (bool retVal___, struct block_list *src, struct block_list *target); +typedef struct mob_data* (*HPMHOOK_pre_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 *npc_id); +typedef struct mob_data* (*HPMHOOK_post_mob_once_spawn_sub) (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, int npc_id); +typedef int (*HPMHOOK_pre_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); +typedef int (*HPMHOOK_post_mob_once_spawn) (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); +typedef int (*HPMHOOK_pre_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); +typedef int (*HPMHOOK_post_mob_once_spawn_area) (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); +typedef int (*HPMHOOK_pre_mob_spawn_guardian) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, int *guardian, bool *has_index, int *npc_id); +typedef int (*HPMHOOK_post_mob_spawn_guardian) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index, int npc_id); +typedef int (*HPMHOOK_pre_mob_spawn_bg) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, unsigned int *bg_id, int *npc_id); +typedef int (*HPMHOOK_post_mob_spawn_bg) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id, int npc_id); +typedef int (*HPMHOOK_pre_mob_can_reach) (struct mob_data **md, struct block_list **bl, int *range, int *state); +typedef int (*HPMHOOK_post_mob_can_reach) (int retVal___, struct mob_data *md, struct block_list *bl, int range, int state); +typedef int (*HPMHOOK_pre_mob_linksearch) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_linksearch) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_mob_delayspawn) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_mob_delayspawn) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_mob_setdelayspawn) (struct mob_data **md); +typedef int (*HPMHOOK_post_mob_setdelayspawn) (int retVal___, struct mob_data *md); +typedef int (*HPMHOOK_pre_mob_count_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_count_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_mob_spawn) (struct mob_data **md); +typedef int (*HPMHOOK_post_mob_spawn) (int retVal___, struct mob_data *md); +typedef int (*HPMHOOK_pre_mob_can_changetarget) (const struct mob_data **md, const struct block_list **target, uint32 *mode); +typedef int (*HPMHOOK_post_mob_can_changetarget) (int retVal___, const struct mob_data *md, const struct block_list *target, uint32 mode); +typedef int (*HPMHOOK_pre_mob_target) (struct mob_data **md, struct block_list **bl, int *dist); +typedef int (*HPMHOOK_post_mob_target) (int retVal___, struct mob_data *md, struct block_list *bl, int dist); +typedef int (*HPMHOOK_pre_mob_ai_sub_hard_activesearch) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_ai_sub_hard_activesearch) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_mob_ai_sub_hard_changechase) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_ai_sub_hard_changechase) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_mob_ai_sub_hard_bg_ally) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_ai_sub_hard_bg_ally) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_mob_ai_sub_hard_lootsearch) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_ai_sub_hard_lootsearch) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_mob_warpchase_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_warpchase_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef bool (*HPMHOOK_pre_mob_is_in_battle_state) (const struct mob_data **md); +typedef bool (*HPMHOOK_post_mob_is_in_battle_state) (bool retVal___, const struct mob_data *md); +typedef int (*HPMHOOK_pre_mob_ai_sub_hard_slavemob) (struct mob_data **md, int64 *tick); +typedef int (*HPMHOOK_post_mob_ai_sub_hard_slavemob) (int retVal___, struct mob_data *md, int64 tick); +typedef int (*HPMHOOK_pre_mob_unlocktarget) (struct mob_data **md, int64 *tick); +typedef int (*HPMHOOK_post_mob_unlocktarget) (int retVal___, struct mob_data *md, int64 tick); +typedef int (*HPMHOOK_pre_mob_randomwalk) (struct mob_data **md, int64 *tick); +typedef int (*HPMHOOK_post_mob_randomwalk) (int retVal___, struct mob_data *md, int64 tick); +typedef int (*HPMHOOK_pre_mob_warpchase) (struct mob_data **md, struct block_list **target); +typedef int (*HPMHOOK_post_mob_warpchase) (int retVal___, struct mob_data *md, struct block_list *target); +typedef bool (*HPMHOOK_pre_mob_ai_sub_hard) (struct mob_data **md, int64 *tick); +typedef bool (*HPMHOOK_post_mob_ai_sub_hard) (bool retVal___, struct mob_data *md, int64 tick); +typedef int (*HPMHOOK_pre_mob_ai_sub_hard_timer) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_ai_sub_hard_timer) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_mob_ai_sub_foreachclient) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_mob_ai_sub_foreachclient) (int retVal___, struct map_session_data *sd, va_list ap); +typedef int (*HPMHOOK_pre_mob_ai_sub_lazy) (struct mob_data **md, va_list args); +typedef int (*HPMHOOK_post_mob_ai_sub_lazy) (int retVal___, struct mob_data *md, va_list args); +typedef int (*HPMHOOK_pre_mob_ai_lazy) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_mob_ai_lazy) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_mob_ai_hard) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_mob_ai_hard) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_mob_setdropitem_options) (struct item **item, struct optdrop_group **options); +typedef void (*HPMHOOK_post_mob_setdropitem_options) (struct item *item, struct optdrop_group *options); +typedef struct item_drop* (*HPMHOOK_pre_mob_setdropitem) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data); +typedef struct item_drop* (*HPMHOOK_post_mob_setdropitem) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, int qty, struct item_data *data); +typedef struct item_drop* (*HPMHOOK_pre_mob_setlootitem) (struct item **item); +typedef struct item_drop* (*HPMHOOK_post_mob_setlootitem) (struct item_drop* retVal___, struct item *item); +typedef int (*HPMHOOK_pre_mob_delay_item_drop) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_mob_delay_item_drop) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_mob_item_drop) (struct mob_data **md, struct item_drop_list **dlist, struct item_drop **ditem, int *loot, int *drop_rate, unsigned short *flag); +typedef void (*HPMHOOK_post_mob_item_drop) (struct mob_data *md, struct item_drop_list *dlist, struct item_drop *ditem, int loot, int drop_rate, unsigned short flag); +typedef int (*HPMHOOK_pre_mob_timer_delete) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_mob_timer_delete) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_mob_deleteslave_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_deleteslave_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_mob_deleteslave) (struct mob_data **md); +typedef int (*HPMHOOK_post_mob_deleteslave) (int retVal___, struct mob_data *md); +typedef int (*HPMHOOK_pre_mob_respawn) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_mob_respawn) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_mob_log_damage) (struct mob_data **md, struct block_list **src, int *damage); +typedef void (*HPMHOOK_post_mob_log_damage) (struct mob_data *md, struct block_list *src, int damage); +typedef void (*HPMHOOK_pre_mob_damage) (struct mob_data **md, struct block_list **src, int *damage); +typedef void (*HPMHOOK_post_mob_damage) (struct mob_data *md, struct block_list *src, int damage); +typedef int (*HPMHOOK_pre_mob_dead) (struct mob_data **md, struct block_list **src, int *type); +typedef int (*HPMHOOK_post_mob_dead) (int retVal___, struct mob_data *md, struct block_list *src, int type); +typedef void (*HPMHOOK_pre_mob_revive) (struct mob_data **md, unsigned int *hp); +typedef void (*HPMHOOK_post_mob_revive) (struct mob_data *md, unsigned int hp); +typedef int (*HPMHOOK_pre_mob_guardian_guildchange) (struct mob_data **md); +typedef int (*HPMHOOK_post_mob_guardian_guildchange) (int retVal___, struct mob_data *md); +typedef int (*HPMHOOK_pre_mob_random_class) (int **value, size_t *count); +typedef int (*HPMHOOK_post_mob_random_class) (int retVal___, int *value, size_t count); +typedef int (*HPMHOOK_pre_mob_class_change) (struct mob_data **md, int *class_); +typedef int (*HPMHOOK_post_mob_class_change) (int retVal___, struct mob_data *md, int class_); +typedef void (*HPMHOOK_pre_mob_heal) (struct mob_data **md, unsigned int *heal); +typedef void (*HPMHOOK_post_mob_heal) (struct mob_data *md, unsigned int heal); +typedef int (*HPMHOOK_pre_mob_warpslave_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_warpslave_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_mob_warpslave) (struct block_list **bl, int *range); +typedef int (*HPMHOOK_post_mob_warpslave) (int retVal___, struct block_list *bl, int range); +typedef int (*HPMHOOK_pre_mob_countslave_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_countslave_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_mob_countslave) (struct block_list **bl); +typedef int (*HPMHOOK_post_mob_countslave) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_mob_summonslave) (struct mob_data **md2, int **value, int *amount, uint16 *skill_id); +typedef int (*HPMHOOK_post_mob_summonslave) (int retVal___, struct mob_data *md2, int *value, int amount, uint16 skill_id); +typedef int (*HPMHOOK_pre_mob_getfriendhprate_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_getfriendhprate_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef struct block_list* (*HPMHOOK_pre_mob_getfriendhprate) (struct mob_data **md, int *min_rate, int *max_rate); +typedef struct block_list* (*HPMHOOK_post_mob_getfriendhprate) (struct block_list* retVal___, struct mob_data *md, int min_rate, int max_rate); +typedef struct block_list* (*HPMHOOK_pre_mob_getmasterhpltmaxrate) (struct mob_data **md, int *rate); +typedef struct block_list* (*HPMHOOK_post_mob_getmasterhpltmaxrate) (struct block_list* retVal___, struct mob_data *md, int rate); +typedef int (*HPMHOOK_pre_mob_getfriendstatus_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_mob_getfriendstatus_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef struct block_list* (*HPMHOOK_pre_mob_getfriendstatus) (struct mob_data **md, int *cond1, int *cond2); +typedef struct block_list* (*HPMHOOK_post_mob_getfriendstatus) (struct block_list* retVal___, struct mob_data *md, int cond1, int cond2); +typedef int (*HPMHOOK_pre_mob_skill_use) (struct mob_data **md, int64 *tick, int *event); +typedef int (*HPMHOOK_post_mob_skill_use) (int retVal___, struct mob_data *md, int64 tick, int event); +typedef int (*HPMHOOK_pre_mob_skill_event) (struct mob_data **md, struct block_list **src, int64 *tick, int *flag); +typedef int (*HPMHOOK_post_mob_skill_event) (int retVal___, struct mob_data *md, struct block_list *src, int64 tick, int flag); +typedef int (*HPMHOOK_pre_mob_is_clone) (int *class_); +typedef int (*HPMHOOK_post_mob_is_clone) (int retVal___, int class_); +typedef int (*HPMHOOK_pre_mob_clone_spawn) (struct map_session_data **sd, int16 *m, int16 *x, int16 *y, const char **event, int *master_id, uint32 *mode, int *flag, unsigned int *duration); +typedef int (*HPMHOOK_post_mob_clone_spawn) (int retVal___, struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, uint32 mode, int flag, unsigned int duration); +typedef int (*HPMHOOK_pre_mob_clone_delete) (struct mob_data **md); +typedef int (*HPMHOOK_post_mob_clone_delete) (int retVal___, struct mob_data *md); +typedef unsigned int (*HPMHOOK_pre_mob_drop_adjust) (int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max); +typedef unsigned int (*HPMHOOK_post_mob_drop_adjust) (unsigned int retVal___, int baserate, int rate_adjust, unsigned short rate_min, unsigned short rate_max); +typedef void (*HPMHOOK_pre_mob_item_dropratio_adjust) (int *nameid, int *mob_id, int **rate_adjust); +typedef void (*HPMHOOK_post_mob_item_dropratio_adjust) (int nameid, int mob_id, int *rate_adjust); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_option) (struct config_setting_t **option, struct optdrop_group_optslot **entry, int **idx, bool **calc_rate, int *slot, const char **group); +typedef bool (*HPMHOOK_post_mob_read_optdrops_option) (bool retVal___, struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_optslot) (struct config_setting_t **optslot, int *n, int *group_id, const char **group); +typedef bool (*HPMHOOK_post_mob_read_optdrops_optslot) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_group) (struct config_setting_t **group, int *n); +typedef bool (*HPMHOOK_post_mob_read_optdrops_group) (bool retVal___, struct config_setting_t *group, int n); +typedef bool (*HPMHOOK_pre_mob_read_optdrops_db) (void); +typedef bool (*HPMHOOK_post_mob_read_optdrops_db) (bool retVal___); +typedef void (*HPMHOOK_pre_mob_readdb) (void); +typedef void (*HPMHOOK_post_mob_readdb) (void); +typedef bool (*HPMHOOK_pre_mob_lookup_const) (const struct config_setting_t **it, const char **name, int **value); +typedef bool (*HPMHOOK_post_mob_lookup_const) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); +typedef bool (*HPMHOOK_pre_mob_get_const) (const struct config_setting_t **it, int **value); +typedef bool (*HPMHOOK_post_mob_get_const) (bool retVal___, const struct config_setting_t *it, int *value); +typedef int (*HPMHOOK_pre_mob_db_validate_entry) (struct mob_db **entry, int *n, const char **source); +typedef int (*HPMHOOK_post_mob_db_validate_entry) (int retVal___, struct mob_db *entry, int n, const char *source); +typedef int (*HPMHOOK_pre_mob_read_libconfig) (const char **filename, bool *ignore_missing); +typedef int (*HPMHOOK_post_mob_read_libconfig) (int retVal___, const char *filename, bool ignore_missing); +typedef void (*HPMHOOK_pre_mob_read_db_additional_fields) (struct mob_db **entry, struct config_setting_t **it, int *n, const char **source); +typedef void (*HPMHOOK_post_mob_read_db_additional_fields) (struct mob_db *entry, struct config_setting_t *it, int n, const char *source); +typedef int (*HPMHOOK_pre_mob_read_db_sub) (struct config_setting_t **mobt, int *id, const char **source); +typedef int (*HPMHOOK_post_mob_read_db_sub) (int retVal___, struct config_setting_t *mobt, int id, const char *source); +typedef void (*HPMHOOK_pre_mob_read_db_drops_sub) (struct mob_db **entry, struct config_setting_t **t); +typedef void (*HPMHOOK_post_mob_read_db_drops_sub) (struct mob_db *entry, struct config_setting_t *t); +typedef void (*HPMHOOK_pre_mob_read_db_mvpdrops_sub) (struct mob_db **entry, struct config_setting_t **t); +typedef void (*HPMHOOK_post_mob_read_db_mvpdrops_sub) (struct mob_db *entry, struct config_setting_t *t); +typedef uint32 (*HPMHOOK_pre_mob_read_db_mode_sub) (struct mob_db **entry, struct config_setting_t **t); +typedef uint32 (*HPMHOOK_post_mob_read_db_mode_sub) (uint32 retVal___, struct mob_db *entry, struct config_setting_t *t); +typedef struct optdrop_group* (*HPMHOOK_pre_mob_read_db_drops_option) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate); +typedef struct optdrop_group* (*HPMHOOK_post_mob_read_db_drops_option) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate); +typedef void (*HPMHOOK_pre_mob_read_db_stats_sub) (struct mob_db **entry, struct config_setting_t **t); +typedef void (*HPMHOOK_post_mob_read_db_stats_sub) (struct mob_db *entry, struct config_setting_t *t); +typedef void (*HPMHOOK_pre_mob_read_db_viewdata_sub) (struct mob_db **entry, struct config_setting_t **t); +typedef void (*HPMHOOK_post_mob_read_db_viewdata_sub) (struct mob_db *entry, struct config_setting_t *t); +typedef void (*HPMHOOK_pre_mob_name_constants) (void); +typedef void (*HPMHOOK_post_mob_name_constants) (void); +typedef void (*HPMHOOK_pre_mob_mobavail_removal_notice) (void); +typedef void (*HPMHOOK_post_mob_mobavail_removal_notice) (void); +typedef int (*HPMHOOK_pre_mob_read_randommonster) (void); +typedef int (*HPMHOOK_post_mob_read_randommonster) (int retVal___); +typedef bool (*HPMHOOK_pre_mob_parse_row_chatdb) (char ***str, const char **source, int *line, int **last_msg_id); +typedef bool (*HPMHOOK_post_mob_parse_row_chatdb) (bool retVal___, char **str, const char *source, int line, int *last_msg_id); +typedef void (*HPMHOOK_pre_mob_readchatdb) (void); +typedef void (*HPMHOOK_post_mob_readchatdb) (void); +typedef void (*HPMHOOK_pre_mob_readskilldb) (void); +typedef void (*HPMHOOK_post_mob_readskilldb) (void); +typedef bool (*HPMHOOK_pre_mob_readdb_race2) (char **fields[], int *columns, int *current); +typedef bool (*HPMHOOK_post_mob_readdb_race2) (bool retVal___, char *fields[], int columns, int current); +typedef bool (*HPMHOOK_pre_mob_readdb_itemratio) (char **str[], int *columns, int *current); +typedef bool (*HPMHOOK_post_mob_readdb_itemratio) (bool retVal___, char *str[], int columns, int current); +typedef void (*HPMHOOK_pre_mob_load) (bool *minimal); +typedef void (*HPMHOOK_post_mob_load) (bool minimal); +typedef void (*HPMHOOK_pre_mob_clear_spawninfo) (void); +typedef void (*HPMHOOK_post_mob_clear_spawninfo) (void); +typedef struct item_drop_ratio* (*HPMHOOK_pre_mob_get_item_drop_ratio) (int *nameid); +typedef struct item_drop_ratio* (*HPMHOOK_post_mob_get_item_drop_ratio) (struct item_drop_ratio* retVal___, int nameid); +typedef void (*HPMHOOK_pre_mob_set_item_drop_ratio) (int *nameid, struct item_drop_ratio **ratio); +typedef void (*HPMHOOK_post_mob_set_item_drop_ratio) (int nameid, struct item_drop_ratio *ratio); +typedef int (*HPMHOOK_pre_mob_final_ratio_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_mob_final_ratio_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef void (*HPMHOOK_pre_mob_destroy_mob_db) (int *index); +typedef void (*HPMHOOK_post_mob_destroy_mob_db) (int index); +typedef void (*HPMHOOK_pre_mob_destroy_drop_groups) (void); +typedef void (*HPMHOOK_post_mob_destroy_drop_groups) (void); +typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig) (const char **filename, bool *ignore_missing); +typedef bool (*HPMHOOK_post_mob_skill_db_libconfig) (bool retVal___, const char *filename, bool ignore_missing); +typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig_sub) (struct config_setting_t **it, int *n); +typedef bool (*HPMHOOK_post_mob_skill_db_libconfig_sub) (bool retVal___, struct config_setting_t *it, int n); +typedef bool (*HPMHOOK_pre_mob_skill_db_libconfig_sub_skill) (struct config_setting_t **it, int *n, int *mob_id); +typedef bool (*HPMHOOK_post_mob_skill_db_libconfig_sub_skill) (bool retVal___, struct config_setting_t *it, int n, int mob_id); +#endif // MAP_MOB_H +#ifdef COMMON_MUTEX_H /* mutex */ +typedef struct mutex_data* (*HPMHOOK_pre_mutex_create) (void); +typedef struct mutex_data* (*HPMHOOK_post_mutex_create) (struct mutex_data* retVal___); +typedef void (*HPMHOOK_pre_mutex_destroy) (struct mutex_data **m); +typedef void (*HPMHOOK_post_mutex_destroy) (struct mutex_data *m); +typedef void (*HPMHOOK_pre_mutex_lock) (struct mutex_data **m); +typedef void (*HPMHOOK_post_mutex_lock) (struct mutex_data *m); +typedef bool (*HPMHOOK_pre_mutex_trylock) (struct mutex_data **m); +typedef bool (*HPMHOOK_post_mutex_trylock) (bool retVal___, struct mutex_data *m); +typedef void (*HPMHOOK_pre_mutex_unlock) (struct mutex_data **m); +typedef void (*HPMHOOK_post_mutex_unlock) (struct mutex_data *m); +typedef struct cond_data* (*HPMHOOK_pre_mutex_cond_create) (void); +typedef struct cond_data* (*HPMHOOK_post_mutex_cond_create) (struct cond_data* retVal___); +typedef void (*HPMHOOK_pre_mutex_cond_destroy) (struct cond_data **c); +typedef void (*HPMHOOK_post_mutex_cond_destroy) (struct cond_data *c); +typedef void (*HPMHOOK_pre_mutex_cond_wait) (struct cond_data **c, struct mutex_data **m, sysint *timeout_ticks); +typedef void (*HPMHOOK_post_mutex_cond_wait) (struct cond_data *c, struct mutex_data *m, sysint timeout_ticks); +typedef void (*HPMHOOK_pre_mutex_cond_signal) (struct cond_data **c); +typedef void (*HPMHOOK_post_mutex_cond_signal) (struct cond_data *c); +typedef void (*HPMHOOK_pre_mutex_cond_broadcast) (struct cond_data **c); +typedef void (*HPMHOOK_post_mutex_cond_broadcast) (struct cond_data *c); +#endif // COMMON_MUTEX_H +#ifdef MAP_NPC_H /* npc_chat */ +typedef int (*HPMHOOK_pre_npc_chat_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_npc_chat_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_npc_chat_finalize) (struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_chat_finalize) (struct npc_data *nd); +typedef void (*HPMHOOK_pre_npc_chat_def_pattern) (struct npc_data **nd, int *setid, const char **pattern, const char **label); +typedef void (*HPMHOOK_post_npc_chat_def_pattern) (struct npc_data *nd, int setid, const char *pattern, const char *label); +typedef struct pcrematch_entry* (*HPMHOOK_pre_npc_chat_create_pcrematch_entry) (struct pcrematch_set **set); +typedef struct pcrematch_entry* (*HPMHOOK_post_npc_chat_create_pcrematch_entry) (struct pcrematch_entry* retVal___, struct pcrematch_set *set); +typedef void (*HPMHOOK_pre_npc_chat_delete_pcreset) (struct npc_data **nd, int *setid); +typedef void (*HPMHOOK_post_npc_chat_delete_pcreset) (struct npc_data *nd, int setid); +typedef void (*HPMHOOK_pre_npc_chat_deactivate_pcreset) (struct npc_data **nd, int *setid); +typedef void (*HPMHOOK_post_npc_chat_deactivate_pcreset) (struct npc_data *nd, int setid); +typedef void (*HPMHOOK_pre_npc_chat_activate_pcreset) (struct npc_data **nd, int *setid); +typedef void (*HPMHOOK_post_npc_chat_activate_pcreset) (struct npc_data *nd, int setid); +typedef struct pcrematch_set* (*HPMHOOK_pre_npc_chat_lookup_pcreset) (struct npc_data **nd, int *setid); +typedef struct pcrematch_set* (*HPMHOOK_post_npc_chat_lookup_pcreset) (struct pcrematch_set* retVal___, struct npc_data *nd, int setid); +typedef void (*HPMHOOK_pre_npc_chat_finalize_pcrematch_entry) (struct pcrematch_entry **e); +typedef void (*HPMHOOK_post_npc_chat_finalize_pcrematch_entry) (struct pcrematch_entry *e); +#endif // MAP_NPC_H +#ifdef MAP_NPC_H /* npc */ +typedef int (*HPMHOOK_pre_npc_init) (bool *minimal); +typedef int (*HPMHOOK_post_npc_init) (int retVal___, bool minimal); +typedef int (*HPMHOOK_pre_npc_final) (void); +typedef int (*HPMHOOK_post_npc_final) (int retVal___); +typedef int (*HPMHOOK_pre_npc_get_new_npc_id) (void); +typedef int (*HPMHOOK_post_npc_get_new_npc_id) (int retVal___); +typedef struct view_data* (*HPMHOOK_pre_npc_get_viewdata) (int *class_); +typedef struct view_data* (*HPMHOOK_post_npc_get_viewdata) (struct view_data* retVal___, int class_); +typedef int (*HPMHOOK_pre_npc_isnear_sub) (struct block_list **bl, va_list args); +typedef int (*HPMHOOK_post_npc_isnear_sub) (int retVal___, struct block_list *bl, va_list args); +typedef bool (*HPMHOOK_pre_npc_isnear) (struct block_list **bl); +typedef bool (*HPMHOOK_post_npc_isnear) (bool retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_npc_ontouch_event) (struct map_session_data **sd, struct npc_data **nd); +typedef int (*HPMHOOK_post_npc_ontouch_event) (int retVal___, struct map_session_data *sd, struct npc_data *nd); +typedef int (*HPMHOOK_pre_npc_ontouch2_event) (struct map_session_data **sd, struct npc_data **nd); +typedef int (*HPMHOOK_post_npc_ontouch2_event) (int retVal___, struct map_session_data *sd, struct npc_data *nd); +typedef int (*HPMHOOK_pre_npc_onuntouch_event) (struct map_session_data **sd, struct npc_data **nd); +typedef int (*HPMHOOK_post_npc_onuntouch_event) (int retVal___, struct map_session_data *sd, struct npc_data *nd); +typedef int (*HPMHOOK_pre_npc_enable_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_npc_enable_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_npc_enable) (const char **name, int *flag); +typedef int (*HPMHOOK_post_npc_enable) (int retVal___, const char *name, int flag); +typedef struct npc_data* (*HPMHOOK_pre_npc_name2id) (const char **name); +typedef struct npc_data* (*HPMHOOK_post_npc_name2id) (struct npc_data* retVal___, const char *name); +typedef int (*HPMHOOK_pre_npc_event_dequeue) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_npc_event_dequeue) (int retVal___, struct map_session_data *sd); +typedef struct DBData (*HPMHOOK_pre_npc_event_export_create) (union DBKey *key, va_list args); +typedef struct DBData (*HPMHOOK_post_npc_event_export_create) (struct DBData retVal___, union DBKey key, va_list args); +typedef int (*HPMHOOK_pre_npc_event_export) (struct npc_data **nd, int *i); +typedef int (*HPMHOOK_post_npc_event_export) (int retVal___, struct npc_data *nd, int i); +typedef int (*HPMHOOK_pre_npc_event_sub) (struct map_session_data **sd, struct event_data **ev, const char **eventname); +typedef int (*HPMHOOK_post_npc_event_sub) (int retVal___, struct map_session_data *sd, struct event_data *ev, const char *eventname); +typedef void (*HPMHOOK_pre_npc_event_doall_sub) (void **key, void **data, va_list ap); +typedef void (*HPMHOOK_post_npc_event_doall_sub) (void *key, void *data, va_list ap); +typedef int (*HPMHOOK_pre_npc_event_do) (const char **name); +typedef int (*HPMHOOK_post_npc_event_do) (int retVal___, const char *name); +typedef int (*HPMHOOK_pre_npc_event_doall_id) (const char **name, int *rid); +typedef int (*HPMHOOK_post_npc_event_doall_id) (int retVal___, const char *name, int rid); +typedef int (*HPMHOOK_pre_npc_event_doall) (const char **name); +typedef int (*HPMHOOK_post_npc_event_doall) (int retVal___, const char *name); +typedef int (*HPMHOOK_pre_npc_event_do_clock) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_npc_event_do_clock) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_npc_event_do_oninit) (bool *reload); +typedef void (*HPMHOOK_post_npc_event_do_oninit) (bool reload); +typedef int (*HPMHOOK_pre_npc_timerevent_export) (struct npc_data **nd, int *i); +typedef int (*HPMHOOK_post_npc_timerevent_export) (int retVal___, struct npc_data *nd, int i); +typedef int (*HPMHOOK_pre_npc_timerevent) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_npc_timerevent) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_npc_timerevent_start) (struct npc_data **nd, int *rid); +typedef int (*HPMHOOK_post_npc_timerevent_start) (int retVal___, struct npc_data *nd, int rid); +typedef int (*HPMHOOK_pre_npc_timerevent_stop) (struct npc_data **nd); +typedef int (*HPMHOOK_post_npc_timerevent_stop) (int retVal___, struct npc_data *nd); +typedef void (*HPMHOOK_pre_npc_timerevent_quit) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_npc_timerevent_quit) (struct map_session_data *sd); +typedef int64 (*HPMHOOK_pre_npc_gettimerevent_tick) (struct npc_data **nd); +typedef int64 (*HPMHOOK_post_npc_gettimerevent_tick) (int64 retVal___, struct npc_data *nd); +typedef int (*HPMHOOK_pre_npc_settimerevent_tick) (struct npc_data **nd, int *newtimer); +typedef int (*HPMHOOK_post_npc_settimerevent_tick) (int retVal___, struct npc_data *nd, int newtimer); +typedef int (*HPMHOOK_pre_npc_event) (struct map_session_data **sd, const char **eventname, int *ontouch); +typedef int (*HPMHOOK_post_npc_event) (int retVal___, struct map_session_data *sd, const char *eventname, int ontouch); +typedef int (*HPMHOOK_pre_npc_touch_areanpc_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_npc_touch_areanpc_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_npc_touchnext_areanpc) (struct map_session_data **sd, bool *leavemap); +typedef int (*HPMHOOK_post_npc_touchnext_areanpc) (int retVal___, struct map_session_data *sd, bool leavemap); +typedef int (*HPMHOOK_pre_npc_touch_areanpc) (struct map_session_data **sd, int16 *m, int16 *x, int16 *y); +typedef int (*HPMHOOK_post_npc_touch_areanpc) (int retVal___, struct map_session_data *sd, int16 m, int16 x, int16 y); +typedef int (*HPMHOOK_pre_npc_untouch_areanpc) (struct map_session_data **sd, int16 *m, int16 *x, int16 *y); +typedef int (*HPMHOOK_post_npc_untouch_areanpc) (int retVal___, struct map_session_data *sd, int16 m, int16 x, int16 y); +typedef int (*HPMHOOK_pre_npc_touch_areanpc2) (struct mob_data **md); +typedef int (*HPMHOOK_post_npc_touch_areanpc2) (int retVal___, struct mob_data *md); +typedef int (*HPMHOOK_pre_npc_check_areanpc) (int *flag, int16 *m, int16 *x, int16 *y, int16 *range); +typedef int (*HPMHOOK_post_npc_check_areanpc) (int retVal___, int flag, int16 m, int16 x, int16 y, int16 range); +typedef struct npc_data* (*HPMHOOK_pre_npc_checknear) (struct map_session_data **sd, struct block_list **bl); +typedef struct npc_data* (*HPMHOOK_post_npc_checknear) (struct npc_data* retVal___, struct map_session_data *sd, struct block_list *bl); +typedef int (*HPMHOOK_pre_npc_globalmessage) (const char **name, const char **mes); +typedef int (*HPMHOOK_post_npc_globalmessage) (int retVal___, const char *name, const char *mes); +typedef void (*HPMHOOK_pre_npc_run_tomb) (struct map_session_data **sd, struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_run_tomb) (struct map_session_data *sd, struct npc_data *nd); +typedef int (*HPMHOOK_pre_npc_click) (struct map_session_data **sd, struct npc_data **nd); +typedef int (*HPMHOOK_post_npc_click) (int retVal___, struct map_session_data *sd, struct npc_data *nd); +typedef int (*HPMHOOK_pre_npc_scriptcont) (struct map_session_data **sd, int *id, bool *closing); +typedef int (*HPMHOOK_post_npc_scriptcont) (int retVal___, struct map_session_data *sd, int id, bool closing); +typedef int (*HPMHOOK_pre_npc_buysellsel) (struct map_session_data **sd, int *id, int *type); +typedef int (*HPMHOOK_post_npc_buysellsel) (int retVal___, struct map_session_data *sd, int id, int type); +typedef int (*HPMHOOK_pre_npc_cashshop_buylist) (struct map_session_data **sd, int *points, struct itemlist **item_list); +typedef int (*HPMHOOK_post_npc_cashshop_buylist) (int retVal___, struct map_session_data *sd, int points, struct itemlist *item_list); +typedef int (*HPMHOOK_pre_npc_buylist_sub) (struct map_session_data **sd, struct itemlist **item_list, struct npc_data **nd); +typedef int (*HPMHOOK_post_npc_buylist_sub) (int retVal___, struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd); +typedef int (*HPMHOOK_pre_npc_cashshop_buy) (struct map_session_data **sd, int *nameid, int *amount, int *points); +typedef int (*HPMHOOK_post_npc_cashshop_buy) (int retVal___, struct map_session_data *sd, int nameid, int amount, int points); +typedef int (*HPMHOOK_pre_npc_buylist) (struct map_session_data **sd, struct itemlist **item_list); +typedef int (*HPMHOOK_post_npc_buylist) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); +typedef int (*HPMHOOK_pre_npc_selllist_sub) (struct map_session_data **sd, struct itemlist **item_list, struct npc_data **nd); +typedef int (*HPMHOOK_post_npc_selllist_sub) (int retVal___, struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd); +typedef int (*HPMHOOK_pre_npc_selllist) (struct map_session_data **sd, struct itemlist **item_list); +typedef int (*HPMHOOK_post_npc_selllist) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); +typedef int (*HPMHOOK_pre_npc_remove_map) (struct npc_data **nd); +typedef int (*HPMHOOK_post_npc_remove_map) (int retVal___, struct npc_data *nd); +typedef int (*HPMHOOK_pre_npc_unload_ev) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_npc_unload_ev) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_npc_unload_ev_label) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_npc_unload_ev_label) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_npc_unload_dup_sub) (struct npc_data **nd, va_list args); +typedef int (*HPMHOOK_post_npc_unload_dup_sub) (int retVal___, struct npc_data *nd, va_list args); +typedef void (*HPMHOOK_pre_npc_unload_duplicates) (struct npc_data **nd, bool *unload_mobs); +typedef void (*HPMHOOK_post_npc_unload_duplicates) (struct npc_data *nd, bool unload_mobs); +typedef int (*HPMHOOK_pre_npc_unload_mob) (struct mob_data **md, va_list args); +typedef int (*HPMHOOK_post_npc_unload_mob) (int retVal___, struct mob_data *md, va_list args); +typedef int (*HPMHOOK_pre_npc_unload) (struct npc_data **nd, bool *single, bool *unload_mobs); +typedef int (*HPMHOOK_post_npc_unload) (int retVal___, struct npc_data *nd, bool single, bool unload_mobs); +typedef void (*HPMHOOK_pre_npc_clearsrcfile) (void); +typedef void (*HPMHOOK_post_npc_clearsrcfile) (void); +typedef void (*HPMHOOK_pre_npc_addsrcfile) (const char **name); +typedef void (*HPMHOOK_post_npc_addsrcfile) (const char *name); +typedef void (*HPMHOOK_pre_npc_delsrcfile) (const char **name); +typedef void (*HPMHOOK_post_npc_delsrcfile) (const char *name); +typedef const char* (*HPMHOOK_pre_npc_retainpathreference) (const char **filepath); +typedef const char* (*HPMHOOK_post_npc_retainpathreference) (const char* retVal___, const char *filepath); +typedef void (*HPMHOOK_pre_npc_releasepathreference) (const char **filepath); +typedef void (*HPMHOOK_post_npc_releasepathreference) (const char *filepath); +typedef void (*HPMHOOK_pre_npc_parsename) (struct npc_data **nd, const char **name, const char **start, const char **buffer, const char **filepath); +typedef void (*HPMHOOK_post_npc_parsename) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath); +typedef int (*HPMHOOK_pre_npc_parseview) (const char **w4, const char **start, const char **buffer, const char **filepath); +typedef int (*HPMHOOK_post_npc_parseview) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath); +typedef bool (*HPMHOOK_pre_npc_viewisid) (const char **viewid); +typedef bool (*HPMHOOK_post_npc_viewisid) (bool retVal___, const char *viewid); +typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, enum unit_dir *dir, int *class_); +typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_); +typedef struct npc_data* (*HPMHOOK_pre_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); +typedef struct npc_data* (*HPMHOOK_post_npc_add_warp) (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); +typedef const char* (*HPMHOOK_pre_npc_parse_warp) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); +typedef const char* (*HPMHOOK_post_npc_parse_warp) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); +typedef const char* (*HPMHOOK_pre_npc_parse_shop) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); +typedef const char* (*HPMHOOK_post_npc_parse_shop) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); +typedef const char* (*HPMHOOK_pre_npc_parse_unknown_object) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); +typedef const char* (*HPMHOOK_post_npc_parse_unknown_object) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); +typedef void (*HPMHOOK_pre_npc_convertlabel_db) (struct npc_label_list **label_list, const char **filepath); +typedef void (*HPMHOOK_post_npc_convertlabel_db) (struct npc_label_list *label_list, const char *filepath); +typedef const char* (*HPMHOOK_pre_npc_skip_script) (const char **start, const char **buffer, const char **filepath, int **retval); +typedef const char* (*HPMHOOK_post_npc_skip_script) (const char* retVal___, const char *start, const char *buffer, const char *filepath, int *retval); +typedef const char* (*HPMHOOK_pre_npc_parse_script) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int *options, int **retval); +typedef const char* (*HPMHOOK_post_npc_parse_script) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval); +typedef void (*HPMHOOK_pre_npc_add_to_location) (struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_add_to_location) (struct npc_data *nd); +typedef bool (*HPMHOOK_pre_npc_duplicate_script_sub) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); +typedef bool (*HPMHOOK_post_npc_duplicate_script_sub) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); +typedef bool (*HPMHOOK_pre_npc_duplicate_shop_sub) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); +typedef bool (*HPMHOOK_post_npc_duplicate_shop_sub) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); +typedef bool (*HPMHOOK_pre_npc_duplicate_warp_sub) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); +typedef bool (*HPMHOOK_post_npc_duplicate_warp_sub) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); +typedef bool (*HPMHOOK_pre_npc_duplicate_sub) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); +typedef bool (*HPMHOOK_post_npc_duplicate_sub) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); +typedef const char* (*HPMHOOK_pre_npc_parse_duplicate) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int *options, int **retval); +typedef const char* (*HPMHOOK_post_npc_parse_duplicate) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval); +typedef int (*HPMHOOK_pre_npc_duplicate4instance) (struct npc_data **snd, int16 *m); +typedef int (*HPMHOOK_post_npc_duplicate4instance) (int retVal___, struct npc_data *snd, int16 m); +typedef void (*HPMHOOK_pre_npc_setcells) (struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_setcells) (struct npc_data *nd); +typedef int (*HPMHOOK_pre_npc_unsetcells_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_npc_unsetcells_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_npc_unsetcells) (struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_unsetcells) (struct npc_data *nd); +typedef void (*HPMHOOK_pre_npc_movenpc) (struct npc_data **nd, int16 *x, int16 *y); +typedef void (*HPMHOOK_post_npc_movenpc) (struct npc_data *nd, int16 x, int16 y); +typedef void (*HPMHOOK_pre_npc_setdisplayname) (struct npc_data **nd, const char **newname); +typedef void (*HPMHOOK_post_npc_setdisplayname) (struct npc_data *nd, const char *newname); +typedef void (*HPMHOOK_pre_npc_setclass) (struct npc_data **nd, int *class_); +typedef void (*HPMHOOK_post_npc_setclass) (struct npc_data *nd, int class_); +typedef int (*HPMHOOK_pre_npc_do_atcmd_event) (struct map_session_data **sd, const char **command, const char **message, const char **eventname); +typedef int (*HPMHOOK_post_npc_do_atcmd_event) (int retVal___, struct map_session_data *sd, const char *command, const char *message, const char *eventname); +typedef const char* (*HPMHOOK_pre_npc_parse_function) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); +typedef const char* (*HPMHOOK_post_npc_parse_function) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); +typedef void (*HPMHOOK_pre_npc_parse_mob2) (struct spawn_data **mobspawn); +typedef void (*HPMHOOK_post_npc_parse_mob2) (struct spawn_data *mobspawn); +typedef const char* (*HPMHOOK_pre_npc_parse_mob) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); +typedef const char* (*HPMHOOK_post_npc_parse_mob) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); +typedef const char* (*HPMHOOK_pre_npc_parse_mapflag) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); +typedef const char* (*HPMHOOK_post_npc_parse_mapflag) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); +typedef void (*HPMHOOK_pre_npc_parse_unknown_mapflag) (const char **name, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); +typedef void (*HPMHOOK_post_npc_parse_unknown_mapflag) (const char *name, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); +typedef int (*HPMHOOK_pre_npc_parsesrcfile) (const char **filepath, bool *runOnInit); +typedef int (*HPMHOOK_post_npc_parsesrcfile) (int retVal___, const char *filepath, bool runOnInit); +typedef int (*HPMHOOK_pre_npc_script_event) (struct map_session_data **sd, enum npce_event *type); +typedef int (*HPMHOOK_post_npc_script_event) (int retVal___, struct map_session_data *sd, enum npce_event type); +typedef void (*HPMHOOK_pre_npc_read_event_script) (void); +typedef void (*HPMHOOK_post_npc_read_event_script) (void); +typedef int (*HPMHOOK_pre_npc_path_db_clear_sub) (union DBKey *key, struct DBData **data, va_list args); +typedef int (*HPMHOOK_post_npc_path_db_clear_sub) (int retVal___, union DBKey key, struct DBData *data, va_list args); +typedef int (*HPMHOOK_pre_npc_ev_label_db_clear_sub) (union DBKey *key, struct DBData **data, va_list args); +typedef int (*HPMHOOK_post_npc_ev_label_db_clear_sub) (int retVal___, union DBKey key, struct DBData *data, va_list args); +typedef int (*HPMHOOK_pre_npc_reload) (void); +typedef int (*HPMHOOK_post_npc_reload) (int retVal___); +typedef bool (*HPMHOOK_pre_npc_unloadfile) (const char **filepath, bool *unload_mobs); +typedef bool (*HPMHOOK_post_npc_unloadfile) (bool retVal___, const char *filepath, bool unload_mobs); +typedef void (*HPMHOOK_pre_npc_do_clear_npc) (void); +typedef void (*HPMHOOK_post_npc_do_clear_npc) (void); +typedef void (*HPMHOOK_pre_npc_debug_warps_sub) (struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_debug_warps_sub) (struct npc_data *nd); +typedef void (*HPMHOOK_pre_npc_debug_warps) (void); +typedef void (*HPMHOOK_post_npc_debug_warps) (void); +typedef void (*HPMHOOK_pre_npc_trader_count_funds) (struct npc_data **nd, struct map_session_data **sd); +typedef void (*HPMHOOK_post_npc_trader_count_funds) (struct npc_data *nd, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_npc_trader_pay) (struct npc_data **nd, struct map_session_data **sd, int *price, int *points); +typedef bool (*HPMHOOK_post_npc_trader_pay) (bool retVal___, struct npc_data *nd, struct map_session_data *sd, int price, int points); +typedef void (*HPMHOOK_pre_npc_trader_update) (int *master); +typedef void (*HPMHOOK_post_npc_trader_update) (int master); +typedef enum market_buy_result (*HPMHOOK_pre_npc_market_buylist) (struct map_session_data **sd, struct itemlist **item_list); +typedef enum market_buy_result (*HPMHOOK_post_npc_market_buylist) (enum market_buy_result retVal___, struct map_session_data *sd, struct itemlist *item_list); +typedef int (*HPMHOOK_pre_npc_barter_buylist) (struct map_session_data **sd, struct barteritemlist **item_list); +typedef int (*HPMHOOK_post_npc_barter_buylist) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list); +typedef int (*HPMHOOK_pre_npc_expanded_barter_buylist) (struct map_session_data **sd, struct barteritemlist **item_list); +typedef int (*HPMHOOK_post_npc_expanded_barter_buylist) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list); +typedef bool (*HPMHOOK_pre_npc_trader_open) (struct map_session_data **sd, struct npc_data **nd); +typedef bool (*HPMHOOK_post_npc_trader_open) (bool retVal___, struct map_session_data *sd, struct npc_data *nd); +typedef void (*HPMHOOK_pre_npc_market_fromsql) (void); +typedef void (*HPMHOOK_post_npc_market_fromsql) (void); +typedef void (*HPMHOOK_pre_npc_market_tosql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_market_tosql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_market_delfromsql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_market_delfromsql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_market_delfromsql_sub) (const char **npcname, int *index); +typedef void (*HPMHOOK_post_npc_market_delfromsql_sub) (const char *npcname, int index); +typedef void (*HPMHOOK_pre_npc_barter_fromsql) (void); +typedef void (*HPMHOOK_post_npc_barter_fromsql) (void); +typedef void (*HPMHOOK_pre_npc_barter_tosql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_barter_tosql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_barter_delfromsql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_barter_delfromsql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_barter_delfromsql_sub) (const char **npcname, int *itemId, int *itemId2, int *amount2); +typedef void (*HPMHOOK_post_npc_barter_delfromsql_sub) (const char *npcname, int itemId, int itemId2, int amount2); +typedef void (*HPMHOOK_pre_npc_expanded_barter_fromsql) (void); +typedef void (*HPMHOOK_post_npc_expanded_barter_fromsql) (void); +typedef void (*HPMHOOK_pre_npc_expanded_barter_tosql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_expanded_barter_tosql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_expanded_barter_delfromsql) (struct npc_data **nd, int *index); +typedef void (*HPMHOOK_post_npc_expanded_barter_delfromsql) (struct npc_data *nd, int index); +typedef void (*HPMHOOK_pre_npc_expanded_barter_delfromsql_sub) (const char **npcname, int *itemId, int *zeny, int *currencyCount, struct npc_barter_currency **currency); +typedef void (*HPMHOOK_post_npc_expanded_barter_delfromsql_sub) (const char *npcname, int itemId, int zeny, int currencyCount, struct npc_barter_currency *currency); +typedef bool (*HPMHOOK_pre_npc_db_checkid) (const int *id); +typedef bool (*HPMHOOK_post_npc_db_checkid) (bool retVal___, const int id); +typedef void (*HPMHOOK_pre_npc_refresh) (struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_refresh) (struct npc_data *nd); +typedef void (*HPMHOOK_pre_npc_questinfo_clear) (struct npc_data **nd); +typedef void (*HPMHOOK_post_npc_questinfo_clear) (struct npc_data *nd); +typedef int (*HPMHOOK_pre_npc_secure_timeout_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_npc_secure_timeout_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +#endif // MAP_NPC_H +#ifdef COMMON_NULLPO_H /* nullpo */ +typedef void (*HPMHOOK_pre_nullpo_init) (void); +typedef void (*HPMHOOK_post_nullpo_init) (void); +typedef void (*HPMHOOK_pre_nullpo_final) (void); +typedef void (*HPMHOOK_post_nullpo_final) (void); +typedef void (*HPMHOOK_pre_nullpo_assert_report) (const char **file, int *line, const char **func, const char **targetname, const char **title); +typedef void (*HPMHOOK_post_nullpo_assert_report) (const char *file, int line, const char *func, const char *targetname, const char *title); +#endif // COMMON_NULLPO_H +#ifdef COMMON_PACKETS_H /* packets */ +typedef void (*HPMHOOK_pre_packets_init) (void); +typedef void (*HPMHOOK_post_packets_init) (void); +typedef void (*HPMHOOK_pre_packets_final) (void); +typedef void (*HPMHOOK_post_packets_final) (void); +typedef void (*HPMHOOK_pre_packets_addLens) (void); +typedef void (*HPMHOOK_post_packets_addLens) (void); +typedef void (*HPMHOOK_pre_packets_addLen) (int *id, int *len); +typedef void (*HPMHOOK_post_packets_addLen) (int id, int len); +#endif // COMMON_PACKETS_H +#ifdef MAP_PARTY_H /* party */ +typedef void (*HPMHOOK_pre_party_init) (bool *minimal); +typedef void (*HPMHOOK_post_party_init) (bool minimal); +typedef void (*HPMHOOK_pre_party_final) (void); +typedef void (*HPMHOOK_post_party_final) (void); +typedef struct party_data* (*HPMHOOK_pre_party_search) (int *party_id); +typedef struct party_data* (*HPMHOOK_post_party_search) (struct party_data* retVal___, int party_id); +typedef struct party_data* (*HPMHOOK_pre_party_searchname) (const char **str); +typedef struct party_data* (*HPMHOOK_post_party_searchname) (struct party_data* retVal___, const char *str); +typedef int (*HPMHOOK_pre_party_getmemberid) (struct party_data **p, struct map_session_data **sd); +typedef int (*HPMHOOK_post_party_getmemberid) (int retVal___, struct party_data *p, struct map_session_data *sd); +typedef struct map_session_data* (*HPMHOOK_pre_party_getavailablesd) (struct party_data **p); +typedef struct map_session_data* (*HPMHOOK_post_party_getavailablesd) (struct map_session_data* retVal___, struct party_data *p); +typedef int (*HPMHOOK_pre_party_create) (struct map_session_data **sd, const char **name, int *item, int *item2); +typedef int (*HPMHOOK_post_party_create) (int retVal___, struct map_session_data *sd, const char *name, int item, int item2); +typedef void (*HPMHOOK_pre_party_created) (int *account_id, int *char_id, int *fail, int *party_id, const char **name); +typedef void (*HPMHOOK_post_party_created) (int account_id, int char_id, int fail, int party_id, const char *name); +typedef int (*HPMHOOK_pre_party_request_info) (int *party_id, int *char_id); +typedef int (*HPMHOOK_post_party_request_info) (int retVal___, int party_id, int char_id); +typedef int (*HPMHOOK_pre_party_invite) (struct map_session_data **sd, struct map_session_data **tsd); +typedef int (*HPMHOOK_post_party_invite) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); +typedef void (*HPMHOOK_pre_party_member_joined) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_party_member_joined) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_party_member_added) (int *party_id, int *account_id, int *char_id, int *flag); +typedef int (*HPMHOOK_post_party_member_added) (int retVal___, int party_id, int account_id, int char_id, int flag); +typedef int (*HPMHOOK_pre_party_leave) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_party_leave) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_party_removemember) (struct map_session_data **sd, int *account_id, const char **name); +typedef int (*HPMHOOK_post_party_removemember) (int retVal___, struct map_session_data *sd, int account_id, const char *name); +typedef int (*HPMHOOK_pre_party_member_withdraw) (int *party_id, int *account_id, int *char_id); +typedef int (*HPMHOOK_post_party_member_withdraw) (int retVal___, int party_id, int account_id, int char_id); +typedef void (*HPMHOOK_pre_party_reply_invite) (struct map_session_data **sd, int *party_id, int *flag); +typedef void (*HPMHOOK_post_party_reply_invite) (struct map_session_data *sd, int party_id, int flag); +typedef int (*HPMHOOK_pre_party_recv_noinfo) (int *party_id, int *char_id); +typedef int (*HPMHOOK_post_party_recv_noinfo) (int retVal___, int party_id, int char_id); +typedef int (*HPMHOOK_pre_party_recv_info) (const struct party **sp, int *char_id); +typedef int (*HPMHOOK_post_party_recv_info) (int retVal___, const struct party *sp, int char_id); +typedef int (*HPMHOOK_pre_party_recv_movemap) (int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv); +typedef int (*HPMHOOK_post_party_recv_movemap) (int retVal___, int party_id, int account_id, int char_id, unsigned short mapid, int online, int lv); +typedef int (*HPMHOOK_pre_party_broken) (int *party_id); +typedef int (*HPMHOOK_post_party_broken) (int retVal___, int party_id); +typedef int (*HPMHOOK_pre_party_optionchanged) (int *party_id, int *account_id, int *exp, int *item, int *flag); +typedef int (*HPMHOOK_post_party_optionchanged) (int retVal___, int party_id, int account_id, int exp, int item, int flag); +typedef int (*HPMHOOK_pre_party_changeoption) (struct map_session_data **sd, int *exp, int *item); +typedef int (*HPMHOOK_post_party_changeoption) (int retVal___, struct map_session_data *sd, int exp, int item); +typedef bool (*HPMHOOK_pre_party_changeleader) (struct map_session_data **sd, struct map_session_data **t_sd); +typedef bool (*HPMHOOK_post_party_changeleader) (bool retVal___, struct map_session_data *sd, struct map_session_data *t_sd); +typedef void (*HPMHOOK_pre_party_send_movemap) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_party_send_movemap) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_party_send_levelup) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_party_send_levelup) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_party_send_logout) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_party_send_logout) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_party_send_message) (struct map_session_data **sd, const char **mes); +typedef int (*HPMHOOK_post_party_send_message) (int retVal___, struct map_session_data *sd, const char *mes); +typedef int (*HPMHOOK_pre_party_skill_check) (struct map_session_data **sd, int *party_id, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_party_skill_check) (int retVal___, struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_party_send_xy_clear) (struct party_data **p); +typedef int (*HPMHOOK_post_party_send_xy_clear) (int retVal___, struct party_data *p); +typedef int (*HPMHOOK_pre_party_exp_share) (struct party_data **p, struct block_list **src, unsigned int *base_exp, unsigned int *job_exp, int *zeny); +typedef int (*HPMHOOK_post_party_exp_share) (int retVal___, struct party_data *p, struct block_list *src, unsigned int base_exp, unsigned int job_exp, int zeny); +typedef int (*HPMHOOK_pre_party_share_loot) (struct party_data **p, struct map_session_data **sd, struct item **item_data, int *first_charid); +typedef int (*HPMHOOK_post_party_share_loot) (int retVal___, struct party_data *p, struct map_session_data *sd, struct item *item_data, int first_charid); +typedef int (*HPMHOOK_pre_party_send_dot_remove) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_party_send_dot_remove) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_party_sub_count) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_party_sub_count) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_party_sub_count_chorus) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_party_sub_count_chorus) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_party_booking_register) (struct map_session_data **sd, short *level, short *mapid, short **job); +typedef void (*HPMHOOK_post_party_booking_register) (struct map_session_data *sd, short level, short mapid, short *job); +typedef void (*HPMHOOK_pre_party_booking_update) (struct map_session_data **sd, short **job); +typedef void (*HPMHOOK_post_party_booking_update) (struct map_session_data *sd, short *job); +typedef void (*HPMHOOK_pre_party_booking_search) (struct map_session_data **sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount); +typedef void (*HPMHOOK_post_party_booking_search) (struct map_session_data *sd, short level, short mapid, short job, unsigned long lastindex, short resultcount); +typedef void (*HPMHOOK_pre_party_recruit_register) (struct map_session_data **sd, short *level, const char **notice); +typedef void (*HPMHOOK_post_party_recruit_register) (struct map_session_data *sd, short level, const char *notice); +typedef void (*HPMHOOK_pre_party_recruit_update) (struct map_session_data **sd, const char **notice); +typedef void (*HPMHOOK_post_party_recruit_update) (struct map_session_data *sd, const char *notice); +typedef void (*HPMHOOK_pre_party_recruit_search) (struct map_session_data **sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); +typedef void (*HPMHOOK_post_party_recruit_search) (struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount); +typedef bool (*HPMHOOK_pre_party_booking_delete) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_party_booking_delete) (bool retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_party_vforeachsamemap) (int ( **func ) (struct block_list *, va_list), struct map_session_data **sd, int *range, va_list ap); +typedef int (*HPMHOOK_post_party_vforeachsamemap) (int retVal___, int ( *func ) (struct block_list *, va_list), struct map_session_data *sd, int range, va_list ap); +typedef int (*HPMHOOK_pre_party_send_xy_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_party_send_xy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_party_fill_member) (struct party_member **member, struct map_session_data **sd, unsigned int *leader); +typedef void (*HPMHOOK_post_party_fill_member) (struct party_member *member, struct map_session_data *sd, unsigned int leader); +typedef struct map_session_data* (*HPMHOOK_pre_party_sd_check) (int *party_id, int *account_id, int *char_id); +typedef struct map_session_data* (*HPMHOOK_post_party_sd_check) (struct map_session_data* retVal___, int party_id, int account_id, int char_id); +typedef void (*HPMHOOK_pre_party_check_state) (struct party_data **p); +typedef void (*HPMHOOK_post_party_check_state) (struct party_data *p); +typedef struct party_booking_ad_info* (*HPMHOOK_pre_party_create_booking_data) (void); +typedef struct party_booking_ad_info* (*HPMHOOK_post_party_create_booking_data) (struct party_booking_ad_info* retVal___); +typedef int (*HPMHOOK_pre_party_db_final) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_party_db_final) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +#endif // MAP_PARTY_H +#ifdef MAP_PATH_H /* path */ +typedef int (*HPMHOOK_pre_path_blownpos) (struct block_list **bl, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); +typedef int (*HPMHOOK_post_path_blownpos) (int retVal___, struct block_list *bl, int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count); +typedef bool (*HPMHOOK_pre_path_search) (struct walkpath_data **wpd, struct block_list **bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); +typedef bool (*HPMHOOK_post_path_search) (bool retVal___, struct walkpath_data *wpd, struct block_list *bl, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int flag, cell_chk cell); +typedef bool (*HPMHOOK_pre_path_search_long) (struct shootpath_data **spd, struct block_list **bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); +typedef bool (*HPMHOOK_post_path_search_long) (bool retVal___, struct shootpath_data *spd, struct block_list *bl, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, cell_chk cell); +typedef bool (*HPMHOOK_pre_path_check_distance) (int *dx, int *dy, int *distance); +typedef bool (*HPMHOOK_post_path_check_distance) (bool retVal___, int dx, int dy, int distance); +typedef unsigned int (*HPMHOOK_pre_path_distance) (int *dx, int *dy); +typedef unsigned int (*HPMHOOK_post_path_distance) (unsigned int retVal___, int dx, int dy); +typedef bool (*HPMHOOK_pre_path_check_distance_client) (int *dx, int *dy, int *distance); +typedef bool (*HPMHOOK_post_path_check_distance_client) (bool retVal___, int dx, int dy, int distance); +typedef int (*HPMHOOK_pre_path_distance_client) (int *dx, int *dy); +typedef int (*HPMHOOK_post_path_distance_client) (int retVal___, int dx, int dy); +#endif // MAP_PATH_H +#ifdef MAP_PC_GROUPS_H /* pcg */ +typedef void (*HPMHOOK_pre_pcg_init) (void); +typedef void (*HPMHOOK_post_pcg_init) (void); +typedef void (*HPMHOOK_pre_pcg_final) (void); +typedef void (*HPMHOOK_post_pcg_final) (void); +typedef void (*HPMHOOK_pre_pcg_reload) (void); +typedef void (*HPMHOOK_post_pcg_reload) (void); +typedef GroupSettings* (*HPMHOOK_pre_pcg_get_dummy_group) (void); +typedef GroupSettings* (*HPMHOOK_post_pcg_get_dummy_group) (GroupSettings* retVal___); +typedef bool (*HPMHOOK_pre_pcg_exists) (int *group_id); +typedef bool (*HPMHOOK_post_pcg_exists) (bool retVal___, int group_id); +typedef GroupSettings* (*HPMHOOK_pre_pcg_id2group) (int *group_id); +typedef GroupSettings* (*HPMHOOK_post_pcg_id2group) (GroupSettings* retVal___, int group_id); +typedef bool (*HPMHOOK_pre_pcg_has_permission) (GroupSettings **group, unsigned int *permission); +typedef bool (*HPMHOOK_post_pcg_has_permission) (bool retVal___, GroupSettings *group, unsigned int permission); +typedef bool (*HPMHOOK_pre_pcg_should_log_commands) (GroupSettings **group); +typedef bool (*HPMHOOK_post_pcg_should_log_commands) (bool retVal___, GroupSettings *group); +typedef const char* (*HPMHOOK_pre_pcg_get_name) (GroupSettings **group); +typedef const char* (*HPMHOOK_post_pcg_get_name) (const char* retVal___, GroupSettings *group); +typedef int (*HPMHOOK_pre_pcg_get_level) (GroupSettings **group); +typedef int (*HPMHOOK_post_pcg_get_level) (int retVal___, GroupSettings *group); +typedef int (*HPMHOOK_pre_pcg_get_idx) (GroupSettings **group); +typedef int (*HPMHOOK_post_pcg_get_idx) (int retVal___, GroupSettings *group); +#endif // MAP_PC_GROUPS_H +#ifdef MAP_PC_H /* pc */ +typedef void (*HPMHOOK_pre_pc_init) (bool *minimal); +typedef void (*HPMHOOK_post_pc_init) (bool minimal); +typedef void (*HPMHOOK_pre_pc_final) (void); +typedef void (*HPMHOOK_post_pc_final) (void); +typedef struct map_session_data* (*HPMHOOK_pre_pc_get_dummy_sd) (void); +typedef struct map_session_data* (*HPMHOOK_post_pc_get_dummy_sd) (struct map_session_data* retVal___); +typedef int (*HPMHOOK_pre_pc_class2idx) (int *class); +typedef int (*HPMHOOK_post_pc_class2idx) (int retVal___, int class); +typedef bool (*HPMHOOK_pre_pc_can_talk) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_pc_can_talk) (bool retVal___, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_pc_can_attack) (struct map_session_data **sd, int *target_id); +typedef bool (*HPMHOOK_post_pc_can_attack) (bool retVal___, struct map_session_data *sd, int target_id); +typedef bool (*HPMHOOK_pre_pc_can_use_command) (struct map_session_data **sd, const char **command); +typedef bool (*HPMHOOK_post_pc_can_use_command) (bool retVal___, struct map_session_data *sd, const char *command); +typedef int (*HPMHOOK_pre_pc_set_group) (struct map_session_data **sd, int *group_id); +typedef int (*HPMHOOK_post_pc_set_group) (int retVal___, struct map_session_data *sd, int group_id); +typedef bool (*HPMHOOK_pre_pc_should_log_commands) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_pc_should_log_commands) (bool retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_setrestartvalue) (struct map_session_data **sd, int *type); +typedef int (*HPMHOOK_post_pc_setrestartvalue) (int retVal___, struct map_session_data *sd, int type); +typedef int (*HPMHOOK_pre_pc_makesavestatus) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_makesavestatus) (int retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_respawn) (struct map_session_data **sd, enum clr_type *clrtype); +typedef void (*HPMHOOK_post_pc_respawn) (struct map_session_data *sd, enum clr_type clrtype); +typedef int (*HPMHOOK_pre_pc_setnewpc) (struct map_session_data **sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd); +typedef int (*HPMHOOK_post_pc_setnewpc) (int retVal___, struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd); +typedef bool (*HPMHOOK_pre_pc_authok) (struct map_session_data **sd, int *login_id2, time_t *expiration_time, int *group_id, const struct mmo_charstatus **st, bool *changing_mapservers); +typedef bool (*HPMHOOK_post_pc_authok) (bool retVal___, struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, const struct mmo_charstatus *st, bool changing_mapservers); +typedef void (*HPMHOOK_pre_pc_authfail) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_authfail) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_reg_received) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_reg_received) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_isequip) (struct map_session_data **sd, int *n); +typedef int (*HPMHOOK_post_pc_isequip) (int retVal___, struct map_session_data *sd, int n); +typedef int (*HPMHOOK_pre_pc_equippoint) (struct map_session_data **sd, int *n); +typedef int (*HPMHOOK_post_pc_equippoint) (int retVal___, struct map_session_data *sd, int n); +typedef int (*HPMHOOK_pre_pc_item_equippoint) (struct map_session_data **sd, struct item_data **id); +typedef int (*HPMHOOK_post_pc_item_equippoint) (int retVal___, struct map_session_data *sd, struct item_data *id); +typedef int (*HPMHOOK_pre_pc_setinventorydata) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_setinventorydata) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_checkskill) (struct map_session_data **sd, uint16 *skill_id); +typedef int (*HPMHOOK_post_pc_checkskill) (int retVal___, struct map_session_data *sd, uint16 skill_id); +typedef int (*HPMHOOK_pre_pc_checkskill2) (struct map_session_data **sd, uint16 *index); +typedef int (*HPMHOOK_post_pc_checkskill2) (int retVal___, struct map_session_data *sd, uint16 index); +typedef int (*HPMHOOK_pre_pc_checkallowskill) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_checkallowskill) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_checkequip) (struct map_session_data **sd, int *pos); +typedef int (*HPMHOOK_post_pc_checkequip) (int retVal___, struct map_session_data *sd, int pos); +typedef int (*HPMHOOK_pre_pc_calc_skilltree) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_calc_skilltree) (int retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_calc_skilltree_clear) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_calc_skilltree_clear) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_calc_skilltree_bonus) (struct map_session_data **sd, int *classidx); +typedef void (*HPMHOOK_post_pc_calc_skilltree_bonus) (struct map_session_data *sd, int classidx); +typedef int (*HPMHOOK_pre_pc_calc_skilltree_normalize_job) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_calc_skilltree_normalize_job) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_clean_skilltree) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_clean_skilltree) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_setpos) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, enum clr_type *clrtype); +typedef int (*HPMHOOK_post_pc_setpos) (int retVal___, struct map_session_data *sd, unsigned short map_index, int x, int y, enum clr_type clrtype); +typedef int (*HPMHOOK_pre_pc_setsavepoint) (struct map_session_data **sd, short *map_index, int *x, int *y); +typedef int (*HPMHOOK_post_pc_setsavepoint) (int retVal___, struct map_session_data *sd, short map_index, int x, int y); +typedef int (*HPMHOOK_pre_pc_randomwarp) (struct map_session_data **sd, enum clr_type *type); +typedef int (*HPMHOOK_post_pc_randomwarp) (int retVal___, struct map_session_data *sd, enum clr_type type); +typedef int (*HPMHOOK_pre_pc_memo) (struct map_session_data **sd, int *pos); +typedef int (*HPMHOOK_post_pc_memo) (int retVal___, struct map_session_data *sd, int pos); +typedef int (*HPMHOOK_pre_pc_checkadditem) (struct map_session_data **sd, int *nameid, int *amount); +typedef int (*HPMHOOK_post_pc_checkadditem) (int retVal___, struct map_session_data *sd, int nameid, int amount); +typedef int (*HPMHOOK_pre_pc_inventoryblank) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_inventoryblank) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_search_inventory) (struct map_session_data **sd, int *item_id); +typedef int (*HPMHOOK_post_pc_search_inventory) (int retVal___, struct map_session_data *sd, int item_id); +typedef int (*HPMHOOK_pre_pc_payzeny) (struct map_session_data **sd, int *zeny, enum e_log_pick_type *type, struct map_session_data **tsd); +typedef int (*HPMHOOK_post_pc_payzeny) (int retVal___, struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd); +typedef int (*HPMHOOK_pre_pc_additem) (struct map_session_data **sd, const struct item **item_data, int *amount, e_log_pick_type *log_type); +typedef int (*HPMHOOK_post_pc_additem) (int retVal___, struct map_session_data *sd, const struct item *item_data, int amount, e_log_pick_type log_type); +typedef int (*HPMHOOK_pre_pc_getzeny) (struct map_session_data **sd, int *zeny, enum e_log_pick_type *type, struct map_session_data **tsd); +typedef int (*HPMHOOK_post_pc_getzeny) (int retVal___, struct map_session_data *sd, int zeny, enum e_log_pick_type type, struct map_session_data *tsd); +typedef int (*HPMHOOK_pre_pc_delitem) (struct map_session_data **sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type); +typedef int (*HPMHOOK_post_pc_delitem) (int retVal___, struct map_session_data *sd, int n, int amount, int type, short reason, e_log_pick_type log_type); +typedef int (*HPMHOOK_pre_pc_paycash) (struct map_session_data **sd, int *price, int *points); +typedef int (*HPMHOOK_post_pc_paycash) (int retVal___, struct map_session_data *sd, int price, int points); +typedef int (*HPMHOOK_pre_pc_getcash) (struct map_session_data **sd, int *cash, int *points); +typedef int (*HPMHOOK_post_pc_getcash) (int retVal___, struct map_session_data *sd, int cash, int points); +typedef int (*HPMHOOK_pre_pc_cart_additem) (struct map_session_data **sd, struct item **item_data, int *amount, e_log_pick_type *log_type); +typedef int (*HPMHOOK_post_pc_cart_additem) (int retVal___, struct map_session_data *sd, struct item *item_data, int amount, e_log_pick_type log_type); +typedef int (*HPMHOOK_pre_pc_cart_delitem) (struct map_session_data **sd, int *n, int *amount, int *type, e_log_pick_type *log_type); +typedef int (*HPMHOOK_post_pc_cart_delitem) (int retVal___, struct map_session_data *sd, int n, int amount, int type, e_log_pick_type log_type); +typedef int (*HPMHOOK_pre_pc_putitemtocart) (struct map_session_data **sd, int *idx, int *amount); +typedef int (*HPMHOOK_post_pc_putitemtocart) (int retVal___, struct map_session_data *sd, int idx, int amount); +typedef int (*HPMHOOK_pre_pc_getitemfromcart) (struct map_session_data **sd, int *idx, int *amount); +typedef int (*HPMHOOK_post_pc_getitemfromcart) (int retVal___, struct map_session_data *sd, int idx, int amount); +typedef int (*HPMHOOK_pre_pc_cartitem_amount) (struct map_session_data **sd, int *idx, int *amount); +typedef int (*HPMHOOK_post_pc_cartitem_amount) (int retVal___, struct map_session_data *sd, int idx, int amount); +typedef int (*HPMHOOK_pre_pc_takeitem) (struct map_session_data **sd, struct flooritem_data **fitem); +typedef int (*HPMHOOK_post_pc_takeitem) (int retVal___, struct map_session_data *sd, struct flooritem_data *fitem); +typedef int (*HPMHOOK_pre_pc_dropitem) (struct map_session_data **sd, int *n, int *amount); +typedef int (*HPMHOOK_post_pc_dropitem) (int retVal___, struct map_session_data *sd, int n, int amount); +typedef bool (*HPMHOOK_pre_pc_isequipped) (struct map_session_data **sd, int *nameid); +typedef bool (*HPMHOOK_post_pc_isequipped) (bool retVal___, struct map_session_data *sd, int nameid); +typedef bool (*HPMHOOK_pre_pc_can_Adopt) (struct map_session_data **p1_sd, struct map_session_data **p2_sd, struct map_session_data **b_sd); +typedef bool (*HPMHOOK_post_pc_can_Adopt) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); +typedef bool (*HPMHOOK_pre_pc_adoption) (struct map_session_data **p1_sd, struct map_session_data **p2_sd, struct map_session_data **b_sd); +typedef bool (*HPMHOOK_post_pc_adoption) (bool retVal___, struct map_session_data *p1_sd, struct map_session_data *p2_sd, struct map_session_data *b_sd); +typedef int (*HPMHOOK_pre_pc_updateweightstatus) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_updateweightstatus) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_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 int *pos, bool *onskill); +typedef int (*HPMHOOK_post_pc_addautobonus) (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 int pos, bool onskill); +typedef int (*HPMHOOK_pre_pc_exeautobonus) (struct map_session_data **sd, struct s_autobonus **bonus); +typedef int (*HPMHOOK_post_pc_exeautobonus) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus); +typedef int (*HPMHOOK_pre_pc_endautobonus) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_endautobonus) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pc_delautobonus) (struct map_session_data **sd, struct s_autobonus **bonus, char *max, bool *restore); +typedef int (*HPMHOOK_post_pc_delautobonus) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus, char max, bool restore); +typedef int (*HPMHOOK_pre_pc_bonus) (struct map_session_data **sd, int *type, int *val); +typedef int (*HPMHOOK_post_pc_bonus) (int retVal___, struct map_session_data *sd, int type, int val); +typedef int (*HPMHOOK_pre_pc_bonus2) (struct map_session_data **sd, int *type, int *type2, int *val); +typedef int (*HPMHOOK_post_pc_bonus2) (int retVal___, struct map_session_data *sd, int type, int type2, int val); +typedef int (*HPMHOOK_pre_pc_bonus3) (struct map_session_data **sd, int *type, int *type2, int *type3, int *val); +typedef int (*HPMHOOK_post_pc_bonus3) (int retVal___, struct map_session_data *sd, int type, int type2, int type3, int val); +typedef int (*HPMHOOK_pre_pc_bonus4) (struct map_session_data **sd, int *type, int *type2, int *type3, int *type4, int *val); +typedef int (*HPMHOOK_post_pc_bonus4) (int retVal___, struct map_session_data *sd, int type, int type2, int type3, int type4, int val); +typedef int (*HPMHOOK_pre_pc_bonus5) (struct map_session_data **sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val); +typedef int (*HPMHOOK_post_pc_bonus5) (int retVal___, struct map_session_data *sd, int type, int type2, int type3, int type4, int type5, int val); +typedef int (*HPMHOOK_pre_pc_skill) (struct map_session_data **sd, int *id, int *level, int *flag); +typedef int (*HPMHOOK_post_pc_skill) (int retVal___, struct map_session_data *sd, int id, int level, int flag); +typedef int (*HPMHOOK_pre_pc_insert_card) (struct map_session_data **sd, int *idx_card, int *idx_equip); +typedef int (*HPMHOOK_post_pc_insert_card) (int retVal___, struct map_session_data *sd, int idx_card, int idx_equip); +typedef bool (*HPMHOOK_pre_pc_can_insert_card) (struct map_session_data **sd, int *idx_card); +typedef bool (*HPMHOOK_post_pc_can_insert_card) (bool retVal___, struct map_session_data *sd, int idx_card); +typedef bool (*HPMHOOK_pre_pc_can_insert_card_into) (struct map_session_data **sd, int *idx_card, int *idx_equip); +typedef bool (*HPMHOOK_post_pc_can_insert_card_into) (bool retVal___, struct map_session_data *sd, int idx_card, int idx_equip); +typedef int (*HPMHOOK_pre_pc_steal_item) (struct map_session_data **sd, struct block_list **bl, uint16 *skill_lv); +typedef int (*HPMHOOK_post_pc_steal_item) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 skill_lv); +typedef int (*HPMHOOK_pre_pc_steal_coin) (struct map_session_data **sd, struct block_list **bl, uint16 *skill_lv); +typedef int (*HPMHOOK_post_pc_steal_coin) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 skill_lv); +typedef int (*HPMHOOK_pre_pc_modifybuyvalue) (struct map_session_data **sd, int *orig_value); +typedef int (*HPMHOOK_post_pc_modifybuyvalue) (int retVal___, struct map_session_data *sd, int orig_value); +typedef int (*HPMHOOK_pre_pc_modifysellvalue) (struct map_session_data **sd, int *orig_value); +typedef int (*HPMHOOK_post_pc_modifysellvalue) (int retVal___, struct map_session_data *sd, int orig_value); +typedef int (*HPMHOOK_pre_pc_follow) (struct map_session_data **sd, int *target_id); +typedef int (*HPMHOOK_post_pc_follow) (int retVal___, struct map_session_data *sd, int target_id); +typedef int (*HPMHOOK_pre_pc_stop_following) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_stop_following) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_maxbaselv) (const struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_maxbaselv) (int retVal___, const struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_maxjoblv) (const struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_maxjoblv) (int retVal___, const struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_checkbaselevelup) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_checkbaselevelup) (int retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_checkbaselevelup_sc) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_checkbaselevelup_sc) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_checkjoblevelup) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_checkjoblevelup) (int retVal___, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest); +typedef bool (*HPMHOOK_post_pc_gainexp) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); +typedef uint64 (*HPMHOOK_pre_pc_nextbaseexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_nextbaseexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_thisbaseexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_thisbaseexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_nextjobexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_nextjobexp) (uint64 retVal___, const struct map_session_data *sd); +typedef uint64 (*HPMHOOK_pre_pc_thisjobexp) (const struct map_session_data **sd); +typedef uint64 (*HPMHOOK_post_pc_thisjobexp) (uint64 retVal___, const struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_gets_status_point) (int *level); +typedef int (*HPMHOOK_post_pc_gets_status_point) (int retVal___, int level); +typedef int (*HPMHOOK_pre_pc_need_status_point) (struct map_session_data **sd, int *type, int *val); +typedef int (*HPMHOOK_post_pc_need_status_point) (int retVal___, struct map_session_data *sd, int type, int val); +typedef int (*HPMHOOK_pre_pc_maxparameterincrease) (struct map_session_data **sd, int *type); +typedef int (*HPMHOOK_post_pc_maxparameterincrease) (int retVal___, struct map_session_data *sd, int type); +typedef bool (*HPMHOOK_pre_pc_statusup) (struct map_session_data **sd, int *type, int *increase); +typedef bool (*HPMHOOK_post_pc_statusup) (bool retVal___, struct map_session_data *sd, int type, int increase); +typedef int (*HPMHOOK_pre_pc_statusup2) (struct map_session_data **sd, int *type, int *val); +typedef int (*HPMHOOK_post_pc_statusup2) (int retVal___, struct map_session_data *sd, int type, int val); +typedef int (*HPMHOOK_pre_pc_skillup) (struct map_session_data **sd, uint16 *skill_id); +typedef int (*HPMHOOK_post_pc_skillup) (int retVal___, struct map_session_data *sd, uint16 skill_id); +typedef int (*HPMHOOK_pre_pc_allskillup) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_allskillup) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_resetlvl) (struct map_session_data **sd, int *type); +typedef int (*HPMHOOK_post_pc_resetlvl) (int retVal___, struct map_session_data *sd, int type); +typedef int (*HPMHOOK_pre_pc_resetstate) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_resetstate) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_resetskill) (struct map_session_data **sd, int *flag); +typedef int (*HPMHOOK_post_pc_resetskill) (int retVal___, struct map_session_data *sd, int flag); +typedef bool (*HPMHOOK_pre_pc_resetskill_job) (struct map_session_data **sd, int *index); +typedef bool (*HPMHOOK_post_pc_resetskill_job) (bool retVal___, struct map_session_data *sd, int index); +typedef int (*HPMHOOK_pre_pc_resetfeel) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_resetfeel) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_resethate) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_resethate) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_equipitem) (struct map_session_data **sd, int *n, int *req_pos); +typedef int (*HPMHOOK_post_pc_equipitem) (int retVal___, struct map_session_data *sd, int n, int req_pos); +typedef void (*HPMHOOK_pre_pc_equipitem_pos) (struct map_session_data **sd, struct item_data **id, int *n, int *pos); +typedef void (*HPMHOOK_post_pc_equipitem_pos) (struct map_session_data *sd, struct item_data *id, int n, int pos); +typedef int (*HPMHOOK_pre_pc_unequipitem) (struct map_session_data **sd, int *n, int *flag); +typedef int (*HPMHOOK_post_pc_unequipitem) (int retVal___, struct map_session_data *sd, int n, int flag); +typedef void (*HPMHOOK_pre_pc_unequipitem_pos) (struct map_session_data **sd, int *n, int *pos); +typedef void (*HPMHOOK_post_pc_unequipitem_pos) (struct map_session_data *sd, int n, int pos); +typedef int (*HPMHOOK_pre_pc_checkitem) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_checkitem) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_useitem) (struct map_session_data **sd, int *n); +typedef int (*HPMHOOK_post_pc_useitem) (int retVal___, struct map_session_data *sd, int n); +typedef int (*HPMHOOK_pre_pc_autocast_clear) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_autocast_clear) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_skillatk_bonus) (struct map_session_data **sd, uint16 *skill_id); +typedef int (*HPMHOOK_post_pc_skillatk_bonus) (int retVal___, struct map_session_data *sd, uint16 skill_id); +typedef int (*HPMHOOK_pre_pc_skillheal_bonus) (struct map_session_data **sd, uint16 *skill_id); +typedef int (*HPMHOOK_post_pc_skillheal_bonus) (int retVal___, struct map_session_data *sd, uint16 skill_id); +typedef int (*HPMHOOK_pre_pc_skillheal2_bonus) (struct map_session_data **sd, uint16 *skill_id); +typedef int (*HPMHOOK_post_pc_skillheal2_bonus) (int retVal___, struct map_session_data *sd, uint16 skill_id); +typedef void (*HPMHOOK_pre_pc_damage) (struct map_session_data **sd, struct block_list **src, unsigned int *hp, unsigned int *sp); +typedef void (*HPMHOOK_post_pc_damage) (struct map_session_data *sd, struct block_list *src, unsigned int hp, unsigned int sp); +typedef int (*HPMHOOK_pre_pc_dead) (struct map_session_data **sd, struct block_list **src); +typedef int (*HPMHOOK_post_pc_dead) (int retVal___, struct map_session_data *sd, struct block_list *src); +typedef void (*HPMHOOK_pre_pc_revive) (struct map_session_data **sd, unsigned int *hp, unsigned int *sp); +typedef void (*HPMHOOK_post_pc_revive) (struct map_session_data *sd, unsigned int hp, unsigned int sp); +typedef void (*HPMHOOK_pre_pc_heal) (struct map_session_data **sd, unsigned int *hp, unsigned int *sp, int *type); +typedef void (*HPMHOOK_post_pc_heal) (struct map_session_data *sd, unsigned int hp, unsigned int sp, int type); +typedef int (*HPMHOOK_pre_pc_itemheal) (struct map_session_data **sd, int *itemid, int *hp, int *sp); +typedef int (*HPMHOOK_post_pc_itemheal) (int retVal___, struct map_session_data *sd, int itemid, int hp, int sp); +typedef int (*HPMHOOK_pre_pc_percentheal) (struct map_session_data **sd, int *hp, int *sp); +typedef int (*HPMHOOK_post_pc_percentheal) (int retVal___, struct map_session_data *sd, int hp, int sp); +typedef int (*HPMHOOK_pre_pc_jobchange) (struct map_session_data **sd, int *class, int *upper); +typedef int (*HPMHOOK_post_pc_jobchange) (int retVal___, struct map_session_data *sd, int class, int upper); +typedef void (*HPMHOOK_pre_pc_hide) (struct map_session_data **sd, bool *show_msg); +typedef void (*HPMHOOK_post_pc_hide) (struct map_session_data *sd, bool show_msg); +typedef void (*HPMHOOK_pre_pc_unhide) (struct map_session_data **sd, bool *show_msg); +typedef void (*HPMHOOK_post_pc_unhide) (struct map_session_data *sd, bool show_msg); +typedef int (*HPMHOOK_pre_pc_setoption) (struct map_session_data **sd, int *type); +typedef int (*HPMHOOK_post_pc_setoption) (int retVal___, struct map_session_data *sd, int type); +typedef int (*HPMHOOK_pre_pc_setcart) (struct map_session_data **sd, int *type); +typedef int (*HPMHOOK_post_pc_setcart) (int retVal___, struct map_session_data *sd, int type); +typedef void (*HPMHOOK_pre_pc_setfalcon) (struct map_session_data **sd, bool *flag); +typedef void (*HPMHOOK_post_pc_setfalcon) (struct map_session_data *sd, bool flag); +typedef void (*HPMHOOK_pre_pc_setridingpeco) (struct map_session_data **sd, bool *flag); +typedef void (*HPMHOOK_post_pc_setridingpeco) (struct map_session_data *sd, bool flag); +typedef void (*HPMHOOK_pre_pc_setmadogear) (struct map_session_data **sd, bool *flag, enum mado_type *mtype); +typedef void (*HPMHOOK_post_pc_setmadogear) (struct map_session_data *sd, bool flag, enum mado_type mtype); +typedef void (*HPMHOOK_pre_pc_setridingdragon) (struct map_session_data **sd, unsigned int *type); +typedef void (*HPMHOOK_post_pc_setridingdragon) (struct map_session_data *sd, unsigned int type); +typedef void (*HPMHOOK_pre_pc_setridingwug) (struct map_session_data **sd, bool *flag); +typedef void (*HPMHOOK_post_pc_setridingwug) (struct map_session_data *sd, bool flag); +typedef int (*HPMHOOK_pre_pc_changelook) (struct map_session_data **sd, int *type, int *val); +typedef int (*HPMHOOK_post_pc_changelook) (int retVal___, struct map_session_data *sd, int type, int val); +typedef int (*HPMHOOK_pre_pc_equiplookall) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_equiplookall) (int retVal___, struct map_session_data *sd); +typedef int64 (*HPMHOOK_pre_pc_readparam) (const struct map_session_data **sd, int *type); +typedef int64 (*HPMHOOK_post_pc_readparam) (int64 retVal___, const struct map_session_data *sd, int type); +typedef int (*HPMHOOK_pre_pc_setparam) (struct map_session_data **sd, int *type, int64 *val); +typedef int (*HPMHOOK_post_pc_setparam) (int retVal___, struct map_session_data *sd, int type, int64 val); +typedef int (*HPMHOOK_pre_pc_readreg) (struct map_session_data **sd, int64 *reg); +typedef int (*HPMHOOK_post_pc_readreg) (int retVal___, struct map_session_data *sd, int64 reg); +typedef void (*HPMHOOK_pre_pc_setreg) (struct map_session_data **sd, int64 *reg, int *val); +typedef void (*HPMHOOK_post_pc_setreg) (struct map_session_data *sd, int64 reg, int val); +typedef char* (*HPMHOOK_pre_pc_readregstr) (struct map_session_data **sd, int64 *reg); +typedef char* (*HPMHOOK_post_pc_readregstr) (char* retVal___, struct map_session_data *sd, int64 reg); +typedef void (*HPMHOOK_pre_pc_setregstr) (struct map_session_data **sd, int64 *reg, const char **str); +typedef void (*HPMHOOK_post_pc_setregstr) (struct map_session_data *sd, int64 reg, const char *str); +typedef int (*HPMHOOK_pre_pc_readregistry) (struct map_session_data **sd, int64 *reg); +typedef int (*HPMHOOK_post_pc_readregistry) (int retVal___, struct map_session_data *sd, int64 reg); +typedef int (*HPMHOOK_pre_pc_setregistry) (struct map_session_data **sd, int64 *reg, int *val); +typedef int (*HPMHOOK_post_pc_setregistry) (int retVal___, struct map_session_data *sd, int64 reg, int val); +typedef char* (*HPMHOOK_pre_pc_readregistry_str) (struct map_session_data **sd, int64 *reg); +typedef char* (*HPMHOOK_post_pc_readregistry_str) (char* retVal___, struct map_session_data *sd, int64 reg); +typedef int (*HPMHOOK_pre_pc_setregistry_str) (struct map_session_data **sd, int64 *reg, const char **val); +typedef int (*HPMHOOK_post_pc_setregistry_str) (int retVal___, struct map_session_data *sd, int64 reg, const char *val); +typedef int (*HPMHOOK_pre_pc_addeventtimer) (struct map_session_data **sd, int *tick, const char **name); +typedef int (*HPMHOOK_post_pc_addeventtimer) (int retVal___, struct map_session_data *sd, int tick, const char *name); +typedef int (*HPMHOOK_pre_pc_deleventtimer) (struct map_session_data **sd, const char **name); +typedef int (*HPMHOOK_post_pc_deleventtimer) (int retVal___, struct map_session_data *sd, const char *name); +typedef int (*HPMHOOK_pre_pc_cleareventtimer) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_cleareventtimer) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_addeventtimercount) (struct map_session_data **sd, const char **name, int *tick); +typedef int (*HPMHOOK_post_pc_addeventtimercount) (int retVal___, struct map_session_data *sd, const char *name, int tick); +typedef int (*HPMHOOK_pre_pc_calc_pvprank) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_calc_pvprank) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_calc_pvprank_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_calc_pvprank_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pc_ismarried) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_ismarried) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_marriage) (struct map_session_data **sd, struct map_session_data **dstsd); +typedef int (*HPMHOOK_post_pc_marriage) (int retVal___, struct map_session_data *sd, struct map_session_data *dstsd); +typedef int (*HPMHOOK_pre_pc_divorce) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_divorce) (int retVal___, struct map_session_data *sd); +typedef struct map_session_data* (*HPMHOOK_pre_pc_get_partner) (struct map_session_data **sd); +typedef struct map_session_data* (*HPMHOOK_post_pc_get_partner) (struct map_session_data* retVal___, struct map_session_data *sd); +typedef struct map_session_data* (*HPMHOOK_pre_pc_get_father) (struct map_session_data **sd); +typedef struct map_session_data* (*HPMHOOK_post_pc_get_father) (struct map_session_data* retVal___, struct map_session_data *sd); +typedef struct map_session_data* (*HPMHOOK_pre_pc_get_mother) (struct map_session_data **sd); +typedef struct map_session_data* (*HPMHOOK_post_pc_get_mother) (struct map_session_data* retVal___, struct map_session_data *sd); +typedef struct map_session_data* (*HPMHOOK_pre_pc_get_child) (struct map_session_data **sd); +typedef struct map_session_data* (*HPMHOOK_post_pc_get_child) (struct map_session_data* retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_bleeding) (struct map_session_data **sd, unsigned int *diff_tick); +typedef void (*HPMHOOK_post_pc_bleeding) (struct map_session_data *sd, unsigned int diff_tick); +typedef void (*HPMHOOK_pre_pc_regen) (struct map_session_data **sd, unsigned int *diff_tick); +typedef void (*HPMHOOK_post_pc_regen) (struct map_session_data *sd, unsigned int diff_tick); +typedef void (*HPMHOOK_pre_pc_setstand) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_setstand) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_candrop) (struct map_session_data **sd, struct item **item); +typedef int (*HPMHOOK_post_pc_candrop) (int retVal___, struct map_session_data *sd, struct item *item); +typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int *class); +typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int class); +typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned int *class_, int *sex); +typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned int class_, int sex); +typedef const char* (*HPMHOOK_pre_pc_job_name) (int *class); +typedef const char* (*HPMHOOK_post_pc_job_name) (const char* retVal___, int class); +typedef void (*HPMHOOK_pre_pc_setinvincibletimer) (struct map_session_data **sd, int *val); +typedef void (*HPMHOOK_post_pc_setinvincibletimer) (struct map_session_data *sd, int val); +typedef void (*HPMHOOK_pre_pc_delinvincibletimer) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_delinvincibletimer) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_addspiritball) (struct map_session_data **sd, int *interval, int *max); +typedef int (*HPMHOOK_post_pc_addspiritball) (int retVal___, struct map_session_data *sd, int interval, int max); +typedef int (*HPMHOOK_pre_pc_addspiritball_sub) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_addspiritball_sub) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_delspiritball) (struct map_session_data **sd, int *count, int *type); +typedef int (*HPMHOOK_post_pc_delspiritball) (int retVal___, struct map_session_data *sd, int count, int type); +typedef int (*HPMHOOK_pre_pc_delspiritball_sub) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_delspiritball_sub) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_getmaxspiritball) (struct map_session_data **sd, int *min); +typedef int (*HPMHOOK_post_pc_getmaxspiritball) (int retVal___, struct map_session_data *sd, int min); +typedef void (*HPMHOOK_pre_pc_addfame) (struct map_session_data **sd, int *ranktype, int *count); +typedef void (*HPMHOOK_post_pc_addfame) (struct map_session_data *sd, int ranktype, int count); +typedef int (*HPMHOOK_pre_pc_fame_rank) (int *char_id, int *ranktype); +typedef int (*HPMHOOK_post_pc_fame_rank) (int retVal___, int char_id, int ranktype); +typedef int (*HPMHOOK_pre_pc_famelist_type) (uint16 *job_mapid); +typedef int (*HPMHOOK_post_pc_famelist_type) (int retVal___, uint16 job_mapid); +typedef int (*HPMHOOK_pre_pc_set_hate_mob) (struct map_session_data **sd, int *pos, struct block_list **bl); +typedef int (*HPMHOOK_post_pc_set_hate_mob) (int retVal___, struct map_session_data *sd, int pos, struct block_list *bl); +typedef int (*HPMHOOK_pre_pc_readdb) (void); +typedef int (*HPMHOOK_post_pc_readdb) (int retVal___); +typedef bool (*HPMHOOK_pre_pc_read_exp_db) (void); +typedef bool (*HPMHOOK_post_pc_read_exp_db) (bool retVal___); +typedef int (*HPMHOOK_pre_pc_read_exp_db_sub) (struct config_setting_t **conf, bool *base); +typedef int (*HPMHOOK_post_pc_read_exp_db_sub) (int retVal___, struct config_setting_t *conf, bool base); +typedef bool (*HPMHOOK_pre_pc_read_exp_db_sub_class) (struct config_setting_t **t, bool *base); +typedef bool (*HPMHOOK_post_pc_read_exp_db_sub_class) (bool retVal___, struct config_setting_t *t, bool base); +typedef int (*HPMHOOK_pre_pc_map_day_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_map_day_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pc_map_night_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_map_night_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_pc_inventory_rentals) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_inventory_rentals) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_inventory_rental_clear) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_inventory_rental_clear) (int retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_inventory_rental_add) (struct map_session_data **sd, int *seconds); +typedef void (*HPMHOOK_post_pc_inventory_rental_add) (struct map_session_data *sd, int seconds); +typedef int (*HPMHOOK_pre_pc_disguise) (struct map_session_data **sd, int *class); +typedef int (*HPMHOOK_post_pc_disguise) (int retVal___, struct map_session_data *sd, int class); +typedef bool (*HPMHOOK_pre_pc_isautolooting) (struct map_session_data **sd, int *nameid); +typedef bool (*HPMHOOK_post_pc_isautolooting) (bool retVal___, struct map_session_data *sd, int nameid); +typedef void (*HPMHOOK_pre_pc_overheat) (struct map_session_data **sd, int *val); +typedef void (*HPMHOOK_post_pc_overheat) (struct map_session_data *sd, int val); +typedef int (*HPMHOOK_pre_pc_banding) (struct map_session_data **sd, uint16 *skill_lv); +typedef int (*HPMHOOK_post_pc_banding) (int retVal___, struct map_session_data *sd, uint16 skill_lv); +typedef void (*HPMHOOK_pre_pc_itemcd_do) (struct map_session_data **sd, bool *load); +typedef void (*HPMHOOK_post_pc_itemcd_do) (struct map_session_data *sd, bool load); +typedef int (*HPMHOOK_pre_pc_load_combo) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_load_combo) (int retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_add_charm) (struct map_session_data **sd, int *interval, int *max, enum spirit_charm_types *type); +typedef void (*HPMHOOK_post_pc_add_charm) (struct map_session_data *sd, int interval, int max, enum spirit_charm_types type); +typedef void (*HPMHOOK_pre_pc_del_charm) (struct map_session_data **sd, int *count, enum spirit_charm_types *type); +typedef void (*HPMHOOK_post_pc_del_charm) (struct map_session_data *sd, int count, enum spirit_charm_types type); +typedef void (*HPMHOOK_pre_pc_baselevelchanged) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_baselevelchanged) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_level_penalty_mod) (int *diff, unsigned char *race, uint32 *mode, int *type); +typedef int (*HPMHOOK_post_pc_level_penalty_mod) (int retVal___, int diff, unsigned char race, uint32 mode, int type); +typedef int (*HPMHOOK_pre_pc_calc_skillpoint) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_calc_skillpoint) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_invincible_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_invincible_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pc_spiritball_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_spiritball_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pc_check_banding) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_pc_check_banding) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_pc_inventory_rental_end) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_inventory_rental_end) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_pc_check_skilltree) (struct map_session_data **sd, int *skill_id); +typedef void (*HPMHOOK_post_pc_check_skilltree) (struct map_session_data *sd, int skill_id); +typedef int (*HPMHOOK_pre_pc_bonus_autospell) (struct s_autospell **spell, int *max, short *id, short *lv, short *rate, short *flag, int *card_id); +typedef int (*HPMHOOK_post_pc_bonus_autospell) (int retVal___, struct s_autospell *spell, int max, short id, short lv, short rate, short flag, int card_id); +typedef int (*HPMHOOK_pre_pc_bonus_autospell_onskill) (struct s_autospell **spell, int *max, short *src_skill, short *id, short *lv, short *rate, int *card_id); +typedef int (*HPMHOOK_post_pc_bonus_autospell_onskill) (int retVal___, struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, int card_id); +typedef int (*HPMHOOK_pre_pc_bonus_addeff) (struct s_addeffect **effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); +typedef int (*HPMHOOK_post_pc_bonus_addeff) (int retVal___, struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration); +typedef int (*HPMHOOK_pre_pc_bonus_addeff_onskill) (struct s_addeffectonskill **effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target); +typedef int (*HPMHOOK_post_pc_bonus_addeff_onskill) (int retVal___, struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target); +typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, int *id, bool *is_group, int *race, int *rate); +typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate); +typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src); +typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); +typedef int (*HPMHOOK_pre_pc_respawn_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_respawn_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pc_jobchange_killclone) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_pc_jobchange_killclone) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_pc_getstat) (struct map_session_data **sd, int *type); +typedef int (*HPMHOOK_post_pc_getstat) (int retVal___, struct map_session_data *sd, int type); +typedef int (*HPMHOOK_pre_pc_setstat) (struct map_session_data **sd, int *type, int *val); +typedef int (*HPMHOOK_post_pc_setstat) (int retVal___, struct map_session_data *sd, int type, int val); +typedef int (*HPMHOOK_pre_pc_eventtimer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_eventtimer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pc_daynight_timer_sub) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_pc_daynight_timer_sub) (int retVal___, struct map_session_data *sd, va_list ap); +typedef int (*HPMHOOK_pre_pc_charm_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_charm_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef bool (*HPMHOOK_pre_pc_readdb_levelpenalty) (char **fields[], int *columns, int *current); +typedef bool (*HPMHOOK_post_pc_readdb_levelpenalty) (bool retVal___, char *fields[], int columns, int current); +typedef int (*HPMHOOK_pre_pc_autosave) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_autosave) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pc_follow_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_follow_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_pc_read_skill_tree) (void); +typedef void (*HPMHOOK_post_pc_read_skill_tree) (void); +typedef bool (*HPMHOOK_pre_pc_read_skill_job_skip) (short *skill_id, int *job_id); +typedef bool (*HPMHOOK_post_pc_read_skill_job_skip) (bool retVal___, short skill_id, int job_id); +typedef void (*HPMHOOK_pre_pc_clear_skill_tree) (void); +typedef void (*HPMHOOK_post_pc_clear_skill_tree) (void); +typedef int (*HPMHOOK_pre_pc_isUseitem) (struct map_session_data **sd, int *n); +typedef int (*HPMHOOK_post_pc_isUseitem) (int retVal___, struct map_session_data *sd, int n); +typedef int (*HPMHOOK_pre_pc_show_steal) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_pc_show_steal) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_pc_checkcombo) (struct map_session_data **sd, struct item_data **data); +typedef int (*HPMHOOK_post_pc_checkcombo) (int retVal___, struct map_session_data *sd, struct item_data *data); +typedef int (*HPMHOOK_pre_pc_calcweapontype) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_calcweapontype) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_removecombo) (struct map_session_data **sd, struct item_data **data); +typedef int (*HPMHOOK_post_pc_removecombo) (int retVal___, struct map_session_data *sd, struct item_data *data); +typedef void (*HPMHOOK_pre_pc_bank_deposit) (struct map_session_data **sd, int *money); +typedef void (*HPMHOOK_post_pc_bank_deposit) (struct map_session_data *sd, int money); +typedef void (*HPMHOOK_pre_pc_bank_withdraw) (struct map_session_data **sd, int *money); +typedef void (*HPMHOOK_post_pc_bank_withdraw) (struct map_session_data *sd, int money); +typedef void (*HPMHOOK_pre_pc_rental_expire) (struct map_session_data **sd, int *i); +typedef void (*HPMHOOK_post_pc_rental_expire) (struct map_session_data *sd, int i); +typedef void (*HPMHOOK_pre_pc_scdata_received) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_scdata_received) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_bound_clear) (struct map_session_data **sd, enum e_item_bound_type *type); +typedef void (*HPMHOOK_post_pc_bound_clear) (struct map_session_data *sd, enum e_item_bound_type type); +typedef int (*HPMHOOK_pre_pc_expiration_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_expiration_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pc_global_expiration_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pc_global_expiration_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_pc_expire_check) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_expire_check) (struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_pc_db_checkid) (int *class); +typedef bool (*HPMHOOK_post_pc_db_checkid) (bool retVal___, int class); +typedef void (*HPMHOOK_pre_pc_validate_levels) (void); +typedef void (*HPMHOOK_post_pc_validate_levels) (void); +typedef void (*HPMHOOK_pre_pc_update_job_and_level) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_update_job_and_level) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_clear_exp_groups) (void); +typedef void (*HPMHOOK_post_pc_clear_exp_groups) (void); +typedef void (*HPMHOOK_pre_pc_init_exp_groups) (void); +typedef void (*HPMHOOK_post_pc_init_exp_groups) (void); +typedef bool (*HPMHOOK_pre_pc_job_is_dummy) (int *job); +typedef bool (*HPMHOOK_post_pc_job_is_dummy) (bool retVal___, int job); +typedef void (*HPMHOOK_pre_pc_autotrade_load) (void); +typedef void (*HPMHOOK_post_pc_autotrade_load) (void); +typedef void (*HPMHOOK_pre_pc_autotrade_update) (struct map_session_data **sd, enum e_pc_autotrade_update_action *action); +typedef void (*HPMHOOK_post_pc_autotrade_update) (struct map_session_data *sd, enum e_pc_autotrade_update_action action); +typedef void (*HPMHOOK_pre_pc_autotrade_start) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_autotrade_start) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_autotrade_prepare) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_autotrade_prepare) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_pc_autotrade_populate) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_pc_autotrade_populate) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_autotrade_final) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_pc_autotrade_final) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef int (*HPMHOOK_pre_pc_check_job_name) (const char **name); +typedef int (*HPMHOOK_post_pc_check_job_name) (int retVal___, const char *name); +typedef void (*HPMHOOK_pre_pc_update_idle_time) (struct map_session_data **sd, enum e_battle_config_idletime *type); +typedef void (*HPMHOOK_post_pc_update_idle_time) (struct map_session_data *sd, enum e_battle_config_idletime type); +typedef int (*HPMHOOK_pre_pc_have_magnifier) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_pc_have_magnifier) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pc_have_item_chain) (struct map_session_data **sd, enum e_chain_cache *chain_cache_id); +typedef int (*HPMHOOK_post_pc_have_item_chain) (int retVal___, struct map_session_data *sd, enum e_chain_cache chain_cache_id); +typedef bool (*HPMHOOK_pre_pc_process_chat_message) (struct map_session_data **sd, const char **message); +typedef bool (*HPMHOOK_post_pc_process_chat_message) (bool retVal___, struct map_session_data *sd, const char *message); +typedef int (*HPMHOOK_pre_pc_wis_message_to_gm) (const char **sender_name, int *permission, const char **message); +typedef int (*HPMHOOK_post_pc_wis_message_to_gm) (int retVal___, const char *sender_name, int permission, const char *message); +typedef int (*HPMHOOK_pre_pc_wis_message_to_gm_sub) (struct map_session_data **sd, va_list va); +typedef int (*HPMHOOK_post_pc_wis_message_to_gm_sub) (int retVal___, struct map_session_data *sd, va_list va); +typedef void (*HPMHOOK_pre_pc_check_supernovice_call) (struct map_session_data **sd, const char **message); +typedef void (*HPMHOOK_post_pc_check_supernovice_call) (struct map_session_data *sd, const char *message); +typedef bool (*HPMHOOK_pre_pc_check_basicskill) (struct map_session_data **sd, int *level); +typedef bool (*HPMHOOK_post_pc_check_basicskill) (bool retVal___, struct map_session_data *sd, int level); +typedef bool (*HPMHOOK_pre_pc_isDeathPenaltyJob) (uint16 *job); +typedef bool (*HPMHOOK_post_pc_isDeathPenaltyJob) (bool retVal___, uint16 job); +typedef bool (*HPMHOOK_pre_pc_has_second_costume) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_pc_has_second_costume) (bool retVal___, struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_pc_expandInventory) (struct map_session_data **sd, int *adjustSize); +typedef bool (*HPMHOOK_post_pc_expandInventory) (bool retVal___, struct map_session_data *sd, int adjustSize); +typedef bool (*HPMHOOK_pre_pc_auto_exp_insurance) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_pc_auto_exp_insurance) (bool retVal___, struct map_session_data *sd); +#endif // MAP_PC_H +#ifdef MAP_NPC_H /* libpcre */ +typedef pcre* (*HPMHOOK_pre_libpcre_compile) (const char **pattern, int *options, const char ***errptr, int **erroffset, const unsigned char **tableptr); +typedef pcre* (*HPMHOOK_post_libpcre_compile) (pcre* retVal___, const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr); +typedef pcre_extra* (*HPMHOOK_pre_libpcre_study) (const pcre **code, int *options, const char ***errptr); +typedef pcre_extra* (*HPMHOOK_post_libpcre_study) (pcre_extra* retVal___, const pcre *code, int options, const char **errptr); +typedef int (*HPMHOOK_pre_libpcre_exec) (const pcre **code, const pcre_extra **extra, PCRE_SPTR *subject, int *length, int *startoffset, int *options, int **ovector, int *ovecsize); +typedef int (*HPMHOOK_post_libpcre_exec) (int retVal___, const pcre *code, const pcre_extra *extra, PCRE_SPTR subject, int length, int startoffset, int options, int *ovector, int ovecsize); +typedef void (*HPMHOOK_pre_libpcre_free) (void **ptr); +typedef void (*HPMHOOK_post_libpcre_free) (void *ptr); +typedef int (*HPMHOOK_pre_libpcre_copy_substring) (const char **subject, int **ovector, int *stringcount, int *stringnumber, char **buffer, int *buffersize); +typedef int (*HPMHOOK_post_libpcre_copy_substring) (int retVal___, const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int buffersize); +typedef void (*HPMHOOK_pre_libpcre_free_substring) (const char **stringptr); +typedef void (*HPMHOOK_post_libpcre_free_substring) (const char *stringptr); +typedef int (*HPMHOOK_pre_libpcre_copy_named_substring) (const pcre **code, const char **subject, int **ovector, int *stringcount, const char **stringname, char **buffer, int *buffersize); +typedef int (*HPMHOOK_post_libpcre_copy_named_substring) (int retVal___, const pcre *code, const char *subject, int *ovector, int stringcount, const char *stringname, char *buffer, int buffersize); +typedef int (*HPMHOOK_pre_libpcre_get_substring) (const char **subject, int **ovector, int *stringcount, int *stringnumber, const char ***stringptr); +typedef int (*HPMHOOK_post_libpcre_get_substring) (int retVal___, const char *subject, int *ovector, int stringcount, int stringnumber, const char **stringptr); +#endif // MAP_NPC_H +#ifdef MAP_PET_H /* pet */ +typedef int (*HPMHOOK_pre_pet_init) (bool *minimal); +typedef int (*HPMHOOK_post_pet_init) (int retVal___, bool minimal); +typedef int (*HPMHOOK_pre_pet_final) (void); +typedef int (*HPMHOOK_post_pet_final) (int retVal___); +typedef int (*HPMHOOK_pre_pet_hungry_val) (struct pet_data **pd); +typedef int (*HPMHOOK_post_pet_hungry_val) (int retVal___, struct pet_data *pd); +typedef void (*HPMHOOK_pre_pet_set_hunger) (struct pet_data **pd, int *value); +typedef void (*HPMHOOK_post_pet_set_hunger) (struct pet_data *pd, int value); +typedef void (*HPMHOOK_pre_pet_set_intimate) (struct pet_data **pd, int *value); +typedef void (*HPMHOOK_post_pet_set_intimate) (struct pet_data *pd, int value); +typedef int (*HPMHOOK_pre_pet_create_egg) (struct map_session_data **sd, int *item_id); +typedef int (*HPMHOOK_post_pet_create_egg) (int retVal___, struct map_session_data *sd, int item_id); +typedef int (*HPMHOOK_pre_pet_unlocktarget) (struct pet_data **pd); +typedef int (*HPMHOOK_post_pet_unlocktarget) (int retVal___, struct pet_data *pd); +typedef int (*HPMHOOK_pre_pet_attackskill) (struct pet_data **pd, int *target_id); +typedef int (*HPMHOOK_post_pet_attackskill) (int retVal___, struct pet_data *pd, int target_id); +typedef int (*HPMHOOK_pre_pet_target_check) (struct map_session_data **sd, struct block_list **bl, int *type); +typedef int (*HPMHOOK_post_pet_target_check) (int retVal___, struct map_session_data *sd, struct block_list *bl, int type); +typedef int (*HPMHOOK_pre_pet_sc_check) (struct map_session_data **sd, int *type); +typedef int (*HPMHOOK_post_pet_sc_check) (int retVal___, struct map_session_data *sd, int type); +typedef int (*HPMHOOK_pre_pet_hungry) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pet_hungry) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pet_search_petDB_index) (int *key, int *type); +typedef int (*HPMHOOK_post_pet_search_petDB_index) (int retVal___, int key, int type); +typedef int (*HPMHOOK_pre_pet_hungry_timer_delete) (struct pet_data **pd); +typedef int (*HPMHOOK_post_pet_hungry_timer_delete) (int retVal___, struct pet_data *pd); +typedef int (*HPMHOOK_pre_pet_performance) (struct map_session_data **sd, struct pet_data **pd); +typedef int (*HPMHOOK_post_pet_performance) (int retVal___, struct map_session_data *sd, struct pet_data *pd); +typedef int (*HPMHOOK_pre_pet_return_egg) (struct map_session_data **sd, struct pet_data **pd); +typedef int (*HPMHOOK_post_pet_return_egg) (int retVal___, struct map_session_data *sd, struct pet_data *pd); +typedef int (*HPMHOOK_pre_pet_data_init) (struct map_session_data **sd, struct s_pet **petinfo); +typedef int (*HPMHOOK_post_pet_data_init) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo); +typedef int (*HPMHOOK_pre_pet_birth_process) (struct map_session_data **sd, struct s_pet **petinfo); +typedef int (*HPMHOOK_post_pet_birth_process) (int retVal___, struct map_session_data *sd, struct s_pet *petinfo); +typedef int (*HPMHOOK_pre_pet_recv_petdata) (int *account_id, struct s_pet **p, int *flag); +typedef int (*HPMHOOK_post_pet_recv_petdata) (int retVal___, int account_id, struct s_pet *p, int flag); +typedef int (*HPMHOOK_pre_pet_select_egg) (struct map_session_data **sd, int *egg_index); +typedef int (*HPMHOOK_post_pet_select_egg) (int retVal___, struct map_session_data *sd, int egg_index); +typedef int (*HPMHOOK_pre_pet_catch_process1) (struct map_session_data **sd, int *target_class); +typedef int (*HPMHOOK_post_pet_catch_process1) (int retVal___, struct map_session_data *sd, int target_class); +typedef int (*HPMHOOK_pre_pet_catch_process2) (struct map_session_data **sd, int *target_id); +typedef int (*HPMHOOK_post_pet_catch_process2) (int retVal___, struct map_session_data *sd, int target_id); +typedef bool (*HPMHOOK_pre_pet_get_egg) (int *account_id, int *pet_class, int *pet_id); +typedef bool (*HPMHOOK_post_pet_get_egg) (bool retVal___, int account_id, int pet_class, int pet_id); +typedef int (*HPMHOOK_pre_pet_unequipitem) (struct map_session_data **sd, struct pet_data **pd); +typedef int (*HPMHOOK_post_pet_unequipitem) (int retVal___, struct map_session_data *sd, struct pet_data *pd); +typedef int (*HPMHOOK_pre_pet_food) (struct map_session_data **sd, struct pet_data **pd); +typedef int (*HPMHOOK_post_pet_food) (int retVal___, struct map_session_data *sd, struct pet_data *pd); +typedef int (*HPMHOOK_pre_pet_ai_sub_hard_lootsearch) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_pet_ai_sub_hard_lootsearch) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_pet_menu) (struct map_session_data **sd, int *menunum); +typedef int (*HPMHOOK_post_pet_menu) (int retVal___, struct map_session_data *sd, int menunum); +typedef int (*HPMHOOK_pre_pet_change_name) (struct map_session_data **sd, const char **name); +typedef int (*HPMHOOK_post_pet_change_name) (int retVal___, struct map_session_data *sd, const char *name); +typedef int (*HPMHOOK_pre_pet_change_name_ack) (struct map_session_data **sd, const char **name, int *flag); +typedef int (*HPMHOOK_post_pet_change_name_ack) (int retVal___, struct map_session_data *sd, const char *name, int flag); +typedef int (*HPMHOOK_pre_pet_equipitem) (struct map_session_data **sd, int *index); +typedef int (*HPMHOOK_post_pet_equipitem) (int retVal___, struct map_session_data *sd, int index); +typedef int (*HPMHOOK_pre_pet_randomwalk) (struct pet_data **pd, int64 *tick); +typedef int (*HPMHOOK_post_pet_randomwalk) (int retVal___, struct pet_data *pd, int64 tick); +typedef int (*HPMHOOK_pre_pet_ai_sub_hard) (struct pet_data **pd, struct map_session_data **sd, int64 *tick); +typedef int (*HPMHOOK_post_pet_ai_sub_hard) (int retVal___, struct pet_data *pd, struct map_session_data *sd, int64 tick); +typedef int (*HPMHOOK_pre_pet_ai_sub_foreachclient) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_pet_ai_sub_foreachclient) (int retVal___, struct map_session_data *sd, va_list ap); +typedef int (*HPMHOOK_pre_pet_ai_hard) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pet_ai_hard) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pet_delay_item_drop) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pet_delay_item_drop) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pet_lootitem_drop) (struct pet_data **pd, struct map_session_data **sd); +typedef int (*HPMHOOK_post_pet_lootitem_drop) (int retVal___, struct pet_data *pd, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_pet_skill_bonus_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pet_skill_bonus_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pet_recovery_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pet_recovery_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_pet_skill_support_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_pet_skill_support_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_pet_read_db) (void); +typedef void (*HPMHOOK_post_pet_read_db) (void); +typedef int (*HPMHOOK_pre_pet_read_db_libconfig) (const char **filename, bool *ignore_missing); +typedef int (*HPMHOOK_post_pet_read_db_libconfig) (int retVal___, const char *filename, bool ignore_missing); +typedef int (*HPMHOOK_pre_pet_read_db_sub) (struct config_setting_t **it, int *n, const char **source); +typedef int (*HPMHOOK_post_pet_read_db_sub) (int retVal___, struct config_setting_t *it, int n, const char *source); +typedef bool (*HPMHOOK_pre_pet_read_db_sub_intimacy) (int *idx, struct config_setting_t **t); +typedef bool (*HPMHOOK_post_pet_read_db_sub_intimacy) (bool retVal___, int idx, struct config_setting_t *t); +typedef void (*HPMHOOK_pre_pet_read_db_clear) (void); +typedef void (*HPMHOOK_post_pet_read_db_clear) (void); +typedef void (*HPMHOOK_pre_pet_read_db_sub_evolution) (struct config_setting_t **t, int *n); +typedef void (*HPMHOOK_post_pet_read_db_sub_evolution) (struct config_setting_t *t, int n); +#endif // MAP_PET_H +#ifdef CHAR_PINCODE_H /* pincode */ +typedef void (*HPMHOOK_pre_pincode_handle) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_pincode_handle) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_pincode_decrypt) (unsigned int *userSeed, char **pin); +typedef void (*HPMHOOK_post_pincode_decrypt) (unsigned int userSeed, char *pin); +typedef void (*HPMHOOK_pre_pincode_error) (int *account_id); +typedef void (*HPMHOOK_post_pincode_error) (int account_id); +typedef void (*HPMHOOK_pre_pincode_update) (int *account_id, char **pin); +typedef void (*HPMHOOK_post_pincode_update) (int account_id, char *pin); +typedef void (*HPMHOOK_pre_pincode_makestate) (int *fd, struct char_session_data **sd, enum pincode_make_response *state); +typedef void (*HPMHOOK_post_pincode_makestate) (int fd, struct char_session_data *sd, enum pincode_make_response state); +typedef void (*HPMHOOK_pre_pincode_editstate) (int *fd, struct char_session_data **sd, enum pincode_edit_response *state); +typedef void (*HPMHOOK_post_pincode_editstate) (int fd, struct char_session_data *sd, enum pincode_edit_response state); +typedef void (*HPMHOOK_pre_pincode_loginstate) (int *fd, struct char_session_data **sd, enum pincode_login_response *state); +typedef void (*HPMHOOK_post_pincode_loginstate) (int fd, struct char_session_data *sd, enum pincode_login_response state); +typedef void (*HPMHOOK_pre_pincode_loginstate2) (int *fd, struct char_session_data **sd, enum pincode_login_response *state, enum pincode_login_response2 *flag); +typedef void (*HPMHOOK_post_pincode_loginstate2) (int fd, struct char_session_data *sd, enum pincode_login_response state, enum pincode_login_response2 flag); +typedef void (*HPMHOOK_pre_pincode_setnew) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_pincode_setnew) (int fd, struct char_session_data *sd); +typedef void (*HPMHOOK_pre_pincode_change) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_pincode_change) (int fd, struct char_session_data *sd); +typedef bool (*HPMHOOK_pre_pincode_isBlacklisted) (const char **pin); +typedef bool (*HPMHOOK_post_pincode_isBlacklisted) (bool retVal___, const char *pin); +typedef int (*HPMHOOK_pre_pincode_compare) (int *fd, struct char_session_data **sd, char **pin); +typedef int (*HPMHOOK_post_pincode_compare) (int retVal___, int fd, struct char_session_data *sd, char *pin); +typedef void (*HPMHOOK_pre_pincode_check) (int *fd, struct char_session_data **sd); +typedef void (*HPMHOOK_post_pincode_check) (int fd, struct char_session_data *sd); +typedef bool (*HPMHOOK_pre_pincode_config_read) (const char **filename, const struct config_t **config, bool *imported); +typedef bool (*HPMHOOK_post_pincode_config_read) (bool retVal___, const char *filename, const struct config_t *config, bool imported); +typedef void (*HPMHOOK_pre_pincode_init) (void); +typedef void (*HPMHOOK_post_pincode_init) (void); +typedef void (*HPMHOOK_pre_pincode_final) (void); +typedef void (*HPMHOOK_post_pincode_final) (void); +#endif // CHAR_PINCODE_H +#ifdef MAP_QUEST_H /* quest */ +typedef void (*HPMHOOK_pre_quest_init) (bool *minimal); +typedef void (*HPMHOOK_post_quest_init) (bool minimal); +typedef void (*HPMHOOK_pre_quest_final) (void); +typedef void (*HPMHOOK_post_quest_final) (void); +typedef void (*HPMHOOK_pre_quest_reload) (void); +typedef void (*HPMHOOK_post_quest_reload) (void); +typedef struct quest_db* (*HPMHOOK_pre_quest_db) (int *quest_id); +typedef struct quest_db* (*HPMHOOK_post_quest_db) (struct quest_db* retVal___, int quest_id); +typedef int (*HPMHOOK_pre_quest_pc_login) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_quest_pc_login) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_quest_add) (struct map_session_data **sd, int *quest_id, unsigned int *time_limit); +typedef int (*HPMHOOK_post_quest_add) (int retVal___, struct map_session_data *sd, int quest_id, unsigned int time_limit); +typedef int (*HPMHOOK_pre_quest_change) (struct map_session_data **sd, int *qid1, int *qid2); +typedef int (*HPMHOOK_post_quest_change) (int retVal___, struct map_session_data *sd, int qid1, int qid2); +typedef int (*HPMHOOK_pre_quest_delete) (struct map_session_data **sd, int *quest_id); +typedef int (*HPMHOOK_post_quest_delete) (int retVal___, struct map_session_data *sd, int quest_id); +typedef int (*HPMHOOK_pre_quest_update_objective_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_quest_update_objective_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_quest_update_objective) (struct map_session_data **sd, int *mob_id); +typedef void (*HPMHOOK_post_quest_update_objective) (struct map_session_data *sd, int mob_id); +typedef int (*HPMHOOK_pre_quest_update_status) (struct map_session_data **sd, int *quest_id, enum quest_state *qs); +typedef int (*HPMHOOK_post_quest_update_status) (int retVal___, struct map_session_data *sd, int quest_id, enum quest_state qs); +typedef int (*HPMHOOK_pre_quest_check) (struct map_session_data **sd, int *quest_id, enum quest_check_type *type); +typedef int (*HPMHOOK_post_quest_check) (int retVal___, struct map_session_data *sd, int quest_id, enum quest_check_type type); +typedef void (*HPMHOOK_pre_quest_clear) (void); +typedef void (*HPMHOOK_post_quest_clear) (void); +typedef int (*HPMHOOK_pre_quest_read_db) (void); +typedef int (*HPMHOOK_post_quest_read_db) (int retVal___); +typedef struct quest_db* (*HPMHOOK_pre_quest_read_db_sub) (struct config_setting_t **cs, int *n, const char **source); +typedef struct quest_db* (*HPMHOOK_post_quest_read_db_sub) (struct quest_db* retVal___, struct config_setting_t *cs, int n, const char *source); +typedef int (*HPMHOOK_pre_quest_questinfo_validate_icon) (int *icon); +typedef int (*HPMHOOK_post_quest_questinfo_validate_icon) (int retVal___, int icon); +typedef void (*HPMHOOK_pre_quest_questinfo_refresh) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_quest_questinfo_refresh) (struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_job) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_job) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_sex) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_sex) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_baselevel) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_baselevel) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_joblevel) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_joblevel) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_items) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_items) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_homunculus_level) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_homunculus_level) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_homunculus_type) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_homunculus_type) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_quests) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_quests) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +typedef bool (*HPMHOOK_pre_quest_questinfo_validate_mercenary_class) (struct map_session_data **sd, struct questinfo **qi); +typedef bool (*HPMHOOK_post_quest_questinfo_validate_mercenary_class) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); +#endif // MAP_QUEST_H +#ifdef MAP_REFINE_H /* refine */ +typedef int (*HPMHOOK_pre_refine_init) (bool *minimal); +typedef int (*HPMHOOK_post_refine_init) (int retVal___, bool minimal); +typedef void (*HPMHOOK_pre_refine_final) (void); +typedef void (*HPMHOOK_post_refine_final) (void); +typedef int (*HPMHOOK_pre_refine_get_refine_chance) (enum refine_type *wlv, int *refine_level, enum refine_chance_type *type); +typedef int (*HPMHOOK_post_refine_get_refine_chance) (int retVal___, enum refine_type wlv, int refine_level, enum refine_chance_type type); +typedef int (*HPMHOOK_pre_refine_get_bonus) (enum refine_type *equipment_type, int *refine_level); +typedef int (*HPMHOOK_post_refine_get_bonus) (int retVal___, enum refine_type equipment_type, int refine_level); +typedef int (*HPMHOOK_pre_refine_get_randombonus_max) (enum refine_type *equipment_type, int *refine_level); +typedef int (*HPMHOOK_post_refine_get_randombonus_max) (int retVal___, enum refine_type equipment_type, int refine_level); +typedef void (*HPMHOOK_pre_refine_refinery_add_item) (struct map_session_data **sd, int *item_index); +typedef void (*HPMHOOK_post_refine_refinery_add_item) (struct map_session_data *sd, int item_index); +typedef void (*HPMHOOK_pre_refine_refinery_refine_request) (struct map_session_data **sd, int *item_index, int *material_id, bool *use_blacksmith_blessing); +typedef void (*HPMHOOK_post_refine_refinery_refine_request) (struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing); +#endif // MAP_REFINE_H +#ifdef MAP_REFINE_P_H /* PRIV__refine */ +typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refine_libconfig_sub) (struct config_setting_t **r, const char **name, const char **source); +typedef int (*HPMHOOK_post_PRIV__refine_readdb_refine_libconfig_sub) (int retVal___, struct config_setting_t *r, const char *name, const char *source); +typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refine_libconfig) (const char **filename); +typedef int (*HPMHOOK_post_PRIV__refine_readdb_refine_libconfig) (int retVal___, const char *filename); +typedef bool (*HPMHOOK_pre_PRIV__refine_announce_behavior_string2enum) (const char **str, unsigned int **result); +typedef bool (*HPMHOOK_post_PRIV__refine_announce_behavior_string2enum) (bool retVal___, const char *str, unsigned int *result); +typedef bool (*HPMHOOK_pre_PRIV__refine_failure_behavior_string2enum) (const char **str, enum refine_ui_failure_behavior **result); +typedef bool (*HPMHOOK_post_PRIV__refine_failure_behavior_string2enum) (bool retVal___, const char *str, enum refine_ui_failure_behavior *result); +typedef bool (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings_items) (const struct config_setting_t **elem, struct s_refine_requirement **req, const char **name, const char **source); +typedef bool (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings_items) (bool retVal___, const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source); +typedef bool (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings_sub) (const struct config_setting_t **elem, int *type, const char **name, const char **source); +typedef bool (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings_sub) (bool retVal___, const struct config_setting_t *elem, int type, const char *name, const char *source); +typedef int (*HPMHOOK_pre_PRIV__refine_readdb_refinery_ui_settings) (const struct config_setting_t **r, int *type, const char **name, const char **source); +typedef int (*HPMHOOK_post_PRIV__refine_readdb_refinery_ui_settings) (int retVal___, const struct config_setting_t *r, int type, const char *name, const char *source); +typedef bool (*HPMHOOK_pre_PRIV__refine_is_refinable) (struct map_session_data **sd, int *item_index); +typedef bool (*HPMHOOK_post_PRIV__refine_is_refinable) (bool retVal___, struct map_session_data *sd, int item_index); +#endif // MAP_REFINE_P_H +#ifdef COMMON_RANDOM_H /* rnd */ +typedef void (*HPMHOOK_pre_rnd_init) (void); +typedef void (*HPMHOOK_post_rnd_init) (void); +typedef void (*HPMHOOK_pre_rnd_final) (void); +typedef void (*HPMHOOK_post_rnd_final) (void); +typedef void (*HPMHOOK_pre_rnd_seed) (uint32 *seed); +typedef void (*HPMHOOK_post_rnd_seed) (uint32 seed); +typedef int32 (*HPMHOOK_pre_rnd_random) (void); +typedef int32 (*HPMHOOK_post_rnd_random) (int32 retVal___); +typedef uint32 (*HPMHOOK_pre_rnd_roll) (uint32 *dice_faces); +typedef uint32 (*HPMHOOK_post_rnd_roll) (uint32 retVal___, uint32 dice_faces); +typedef int32 (*HPMHOOK_pre_rnd_value) (int32 *min, int32 *max); +typedef int32 (*HPMHOOK_post_rnd_value) (int32 retVal___, int32 min, int32 max); +typedef double (*HPMHOOK_pre_rnd_uniform) (void); +typedef double (*HPMHOOK_post_rnd_uniform) (double retVal___); +typedef double (*HPMHOOK_pre_rnd_uniform53) (void); +typedef double (*HPMHOOK_post_rnd_uniform53) (double retVal___); +#endif // COMMON_RANDOM_H +#ifdef MAP_RODEX_H /* rodex */ +typedef void (*HPMHOOK_pre_rodex_init) (bool *minimal); +typedef void (*HPMHOOK_post_rodex_init) (bool minimal); +typedef void (*HPMHOOK_pre_rodex_final) (void); +typedef void (*HPMHOOK_post_rodex_final) (void); +typedef bool (*HPMHOOK_pre_rodex_isenabled) (void); +typedef bool (*HPMHOOK_post_rodex_isenabled) (bool retVal___); +typedef void (*HPMHOOK_pre_rodex_open) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); +typedef void (*HPMHOOK_post_rodex_open) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); +typedef void (*HPMHOOK_pre_rodex_next_page) (struct map_session_data **sd, int8 *open_type, int64 *last_mail_id); +typedef void (*HPMHOOK_post_rodex_next_page) (struct map_session_data *sd, int8 open_type, int64 last_mail_id); +typedef void (*HPMHOOK_pre_rodex_refresh) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); +typedef void (*HPMHOOK_post_rodex_refresh) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); +typedef void (*HPMHOOK_pre_rodex_add_item) (struct map_session_data **sd, int16 *idx, int16 *amount); +typedef void (*HPMHOOK_post_rodex_add_item) (struct map_session_data *sd, int16 idx, int16 amount); +typedef void (*HPMHOOK_pre_rodex_remove_item) (struct map_session_data **sd, int16 *idx, int16 *amount); +typedef void (*HPMHOOK_post_rodex_remove_item) (struct map_session_data *sd, int16 idx, int16 amount); +typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, int **class); +typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class); +typedef int (*HPMHOOK_pre_rodex_send_mail) (struct map_session_data **sd, const char **receiver_name, const char **body, const char **title, int64 *zeny); +typedef int (*HPMHOOK_post_rodex_send_mail) (int retVal___, struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny); +typedef void (*HPMHOOK_pre_rodex_send_mail_result) (struct map_session_data **ssd, struct map_session_data **rsd, bool *result); +typedef void (*HPMHOOK_post_rodex_send_mail_result) (struct map_session_data *ssd, struct map_session_data *rsd, bool result); +typedef struct rodex_message* (*HPMHOOK_pre_rodex_get_mail) (struct map_session_data **sd, int64 *mail_id); +typedef struct rodex_message* (*HPMHOOK_post_rodex_get_mail) (struct rodex_message* retVal___, struct map_session_data *sd, int64 mail_id); +typedef void (*HPMHOOK_pre_rodex_read_mail) (struct map_session_data **sd, int64 *mail_id); +typedef void (*HPMHOOK_post_rodex_read_mail) (struct map_session_data *sd, int64 mail_id); +typedef void (*HPMHOOK_pre_rodex_get_zeny) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); +typedef void (*HPMHOOK_post_rodex_get_zeny) (struct map_session_data *sd, int8 opentype, int64 mail_id); +typedef void (*HPMHOOK_pre_rodex_get_items) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); +typedef void (*HPMHOOK_post_rodex_get_items) (struct map_session_data *sd, int8 opentype, int64 mail_id); +typedef void (*HPMHOOK_pre_rodex_delete_mail) (struct map_session_data **sd, int64 *mail_id); +typedef void (*HPMHOOK_post_rodex_delete_mail) (struct map_session_data *sd, int64 mail_id); +typedef void (*HPMHOOK_pre_rodex_clean) (struct map_session_data **sd, int8 *flag); +typedef void (*HPMHOOK_post_rodex_clean) (struct map_session_data *sd, int8 flag); +typedef void (*HPMHOOK_pre_rodex_getZenyAck) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int64 *zeny); +typedef void (*HPMHOOK_post_rodex_getZenyAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny); +typedef void (*HPMHOOK_pre_rodex_getItemsAck) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int *count, const struct rodex_item **items); +typedef void (*HPMHOOK_post_rodex_getItemsAck) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items); +#endif // MAP_RODEX_H +#ifdef MAP_SCRIPT_H /* script */ +typedef void (*HPMHOOK_pre_script_init) (bool *minimal); +typedef void (*HPMHOOK_post_script_init) (bool minimal); +typedef void (*HPMHOOK_pre_script_final) (void); +typedef void (*HPMHOOK_post_script_final) (void); +typedef int (*HPMHOOK_pre_script_reload) (void); +typedef int (*HPMHOOK_post_script_reload) (int retVal___); +typedef struct script_code* (*HPMHOOK_pre_script_parse) (const char **src, const char **file, int *line, int *options, int **retval); +typedef struct script_code* (*HPMHOOK_post_script_parse) (struct script_code* retVal___, const char *src, const char *file, int line, int options, int *retval); +typedef bool (*HPMHOOK_pre_script_add_builtin) (const struct script_function **buildin, bool *override); +typedef bool (*HPMHOOK_post_script_add_builtin) (bool retVal___, const struct script_function *buildin, bool override); +typedef void (*HPMHOOK_pre_script_parse_builtin) (void); +typedef void (*HPMHOOK_post_script_parse_builtin) (void); +typedef const char* (*HPMHOOK_pre_script_parse_subexpr) (const char **p, int *limit); +typedef const char* (*HPMHOOK_post_script_parse_subexpr) (const char* retVal___, const char *p, int limit); +typedef const char* (*HPMHOOK_pre_script_skip_space) (const char **p); +typedef const char* (*HPMHOOK_post_script_skip_space) (const char* retVal___, const char *p); +typedef void (*HPMHOOK_pre_script_error) (const char **src, const char **file, int *start_line, const char **error_msg, const char **error_pos); +typedef void (*HPMHOOK_post_script_error) (const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos); +typedef void (*HPMHOOK_pre_script_warning) (const char **src, const char **file, int *start_line, const char **error_msg, const char **error_pos); +typedef void (*HPMHOOK_post_script_warning) (const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos); +typedef bool (*HPMHOOK_pre_script_addScript) (char **name, char **args, bool ( **func ) (struct script_state *st), bool *isDeprecated); +typedef bool (*HPMHOOK_post_script_addScript) (bool retVal___, char *name, char *args, bool ( *func ) (struct script_state *st), bool isDeprecated); +typedef int (*HPMHOOK_pre_script_conv_num) (struct script_state **st, struct script_data **data); +typedef int (*HPMHOOK_post_script_conv_num) (int retVal___, struct script_state *st, struct script_data *data); +typedef const char* (*HPMHOOK_pre_script_conv_str) (struct script_state **st, struct script_data **data); +typedef const char* (*HPMHOOK_post_script_conv_str) (const char* retVal___, struct script_state *st, struct script_data *data); +typedef struct map_session_data* (*HPMHOOK_pre_script_rid2sd) (struct script_state **st); +typedef struct map_session_data* (*HPMHOOK_post_script_rid2sd) (struct map_session_data* retVal___, struct script_state *st); +typedef struct map_session_data* (*HPMHOOK_pre_script_id2sd) (struct script_state **st, int *account_id); +typedef struct map_session_data* (*HPMHOOK_post_script_id2sd) (struct map_session_data* retVal___, struct script_state *st, int account_id); +typedef struct map_session_data* (*HPMHOOK_pre_script_charid2sd) (struct script_state **st, int *char_id); +typedef struct map_session_data* (*HPMHOOK_post_script_charid2sd) (struct map_session_data* retVal___, struct script_state *st, int char_id); +typedef struct map_session_data* (*HPMHOOK_pre_script_nick2sd) (struct script_state **st, const char **name); +typedef struct map_session_data* (*HPMHOOK_post_script_nick2sd) (struct map_session_data* retVal___, struct script_state *st, const char *name); +typedef void (*HPMHOOK_pre_script_detach_rid) (struct script_state **st); +typedef void (*HPMHOOK_post_script_detach_rid) (struct script_state *st); +typedef struct script_data* (*HPMHOOK_pre_script_push_val) (struct script_stack **stack, enum c_op *type, int64 *val, struct reg_db **ref); +typedef struct script_data* (*HPMHOOK_post_script_push_val) (struct script_data* retVal___, struct script_stack *stack, enum c_op type, int64 val, struct reg_db *ref); +typedef struct script_data* (*HPMHOOK_pre_script_get_val) (struct script_state **st, struct script_data **data); +typedef struct script_data* (*HPMHOOK_post_script_get_val) (struct script_data* retVal___, struct script_state *st, struct script_data *data); +typedef char* (*HPMHOOK_pre_script_get_val_ref_str) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef char* (*HPMHOOK_post_script_get_val_ref_str) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef char* (*HPMHOOK_pre_script_get_val_pc_ref_str) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef char* (*HPMHOOK_post_script_get_val_pc_ref_str) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef char* (*HPMHOOK_pre_script_get_val_scope_str) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef char* (*HPMHOOK_post_script_get_val_scope_str) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef char* (*HPMHOOK_pre_script_get_val_npc_str) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef char* (*HPMHOOK_post_script_get_val_npc_str) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef char* (*HPMHOOK_pre_script_get_val_instance_str) (struct script_state **st, const char **name, struct script_data **data); +typedef char* (*HPMHOOK_post_script_get_val_instance_str) (char* retVal___, struct script_state *st, const char *name, struct script_data *data); +typedef int (*HPMHOOK_pre_script_get_val_ref_num) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef int (*HPMHOOK_post_script_get_val_ref_num) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef int (*HPMHOOK_pre_script_get_val_pc_ref_num) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef int (*HPMHOOK_post_script_get_val_pc_ref_num) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef int (*HPMHOOK_pre_script_get_val_scope_num) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef int (*HPMHOOK_post_script_get_val_scope_num) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef int (*HPMHOOK_pre_script_get_val_npc_num) (struct script_state **st, struct reg_db **n, struct script_data **data); +typedef int (*HPMHOOK_post_script_get_val_npc_num) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); +typedef int (*HPMHOOK_pre_script_get_val_instance_num) (struct script_state **st, const char **name, struct script_data **data); +typedef int (*HPMHOOK_post_script_get_val_instance_num) (int retVal___, struct script_state *st, const char *name, struct script_data *data); +typedef const void* (*HPMHOOK_pre_script_get_val2) (struct script_state **st, int64 *uid, struct reg_db **ref); +typedef const void* (*HPMHOOK_post_script_get_val2) (const void* retVal___, struct script_state *st, int64 uid, struct reg_db *ref); +typedef struct script_data* (*HPMHOOK_pre_script_push_str) (struct script_stack **stack, char **str); +typedef struct script_data* (*HPMHOOK_post_script_push_str) (struct script_data* retVal___, struct script_stack *stack, char *str); +typedef struct script_data* (*HPMHOOK_pre_script_push_conststr) (struct script_stack **stack, const char **str); +typedef struct script_data* (*HPMHOOK_post_script_push_conststr) (struct script_data* retVal___, struct script_stack *stack, const char *str); +typedef struct script_data* (*HPMHOOK_pre_script_push_copy) (struct script_stack **stack, int *pos); +typedef struct script_data* (*HPMHOOK_post_script_push_copy) (struct script_data* retVal___, struct script_stack *stack, int pos); +typedef void (*HPMHOOK_pre_script_pop_stack) (struct script_state **st, int *start, int *end); +typedef void (*HPMHOOK_post_script_pop_stack) (struct script_state *st, int start, int end); +typedef void (*HPMHOOK_pre_script_set_constant) (const char **name, int *value, bool *is_parameter, bool *is_deprecated); +typedef void (*HPMHOOK_post_script_set_constant) (const char *name, int value, bool is_parameter, bool is_deprecated); +typedef void (*HPMHOOK_pre_script_set_constant2) (const char **name, int *value, bool *is_parameter, bool *is_deprecated); +typedef void (*HPMHOOK_post_script_set_constant2) (const char *name, int value, bool is_parameter, bool is_deprecated); +typedef bool (*HPMHOOK_pre_script_get_constant) (const char **name, int **value); +typedef bool (*HPMHOOK_post_script_get_constant) (bool retVal___, const char *name, int *value); +typedef void (*HPMHOOK_pre_script_label_add) (int *key, int *pos); +typedef void (*HPMHOOK_post_script_label_add) (int key, int pos); +typedef void (*HPMHOOK_pre_script_run) (struct script_code **rootscript, int *pos, int *rid, int *oid); +typedef void (*HPMHOOK_post_script_run) (struct script_code *rootscript, int pos, int rid, int oid); +typedef void (*HPMHOOK_pre_script_run_npc) (struct script_code **rootscript, int *pos, int *rid, int *oid); +typedef void (*HPMHOOK_post_script_run_npc) (struct script_code *rootscript, int pos, int rid, int oid); +typedef void (*HPMHOOK_pre_script_run_pet) (struct script_code **rootscript, int *pos, int *rid, int *oid); +typedef void (*HPMHOOK_post_script_run_pet) (struct script_code *rootscript, int pos, int rid, int oid); +typedef void (*HPMHOOK_pre_script_run_main) (struct script_state **st); +typedef void (*HPMHOOK_post_script_run_main) (struct script_state *st); +typedef int (*HPMHOOK_pre_script_run_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_script_run_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_script_set_var) (struct map_session_data **sd, char **name, void **val); +typedef int (*HPMHOOK_post_script_set_var) (int retVal___, struct map_session_data *sd, char *name, void *val); +typedef void (*HPMHOOK_pre_script_stop_instances) (struct script_code **code); +typedef void (*HPMHOOK_post_script_stop_instances) (struct script_code *code); +typedef void (*HPMHOOK_pre_script_free_code) (struct script_code **code); +typedef void (*HPMHOOK_post_script_free_code) (struct script_code *code); +typedef void (*HPMHOOK_pre_script_free_vars) (struct DBMap **var_storage); +typedef void (*HPMHOOK_post_script_free_vars) (struct DBMap *var_storage); +typedef struct script_state* (*HPMHOOK_pre_script_alloc_state) (struct script_code **rootscript, int *pos, int *rid, int *oid); +typedef struct script_state* (*HPMHOOK_post_script_alloc_state) (struct script_state* retVal___, struct script_code *rootscript, int pos, int rid, int oid); +typedef void (*HPMHOOK_pre_script_free_state) (struct script_state **st); +typedef void (*HPMHOOK_post_script_free_state) (struct script_state *st); +typedef void (*HPMHOOK_pre_script_add_pending_ref) (struct script_state **st, struct reg_db **ref); +typedef void (*HPMHOOK_post_script_add_pending_ref) (struct script_state *st, struct reg_db *ref); +typedef void (*HPMHOOK_pre_script_run_autobonus) (const char **autobonus, int *id, int *pos); +typedef void (*HPMHOOK_post_script_run_autobonus) (const char *autobonus, int id, int pos); +typedef void (*HPMHOOK_pre_script_cleararray_pc) (struct map_session_data **sd, const char **varname, void **value); +typedef void (*HPMHOOK_post_script_cleararray_pc) (struct map_session_data *sd, const char *varname, void *value); +typedef void (*HPMHOOK_pre_script_setarray_pc) (struct map_session_data **sd, const char **varname, uint32 *idx, void **value, int **refcache); +typedef void (*HPMHOOK_post_script_setarray_pc) (struct map_session_data *sd, const char *varname, uint32 idx, void *value, int *refcache); +typedef bool (*HPMHOOK_pre_script_config_read) (const char **filename, bool *imported); +typedef bool (*HPMHOOK_post_script_config_read) (bool retVal___, const char *filename, bool imported); +typedef int (*HPMHOOK_pre_script_add_str) (const char **p); +typedef int (*HPMHOOK_post_script_add_str) (int retVal___, const char *p); +typedef int (*HPMHOOK_pre_script_add_variable) (const char **varname); +typedef int (*HPMHOOK_post_script_add_variable) (int retVal___, const char *varname); +typedef const char* (*HPMHOOK_pre_script_get_str) (int *id); +typedef const char* (*HPMHOOK_post_script_get_str) (const char* retVal___, int id); +typedef int (*HPMHOOK_pre_script_search_str) (const char **p); +typedef int (*HPMHOOK_post_script_search_str) (int retVal___, const char *p); +typedef void (*HPMHOOK_pre_script_setd_sub) (struct script_state **st, struct map_session_data **sd, const char **varname, int *elem, const void **value, struct reg_db **ref); +typedef void (*HPMHOOK_post_script_setd_sub) (struct script_state *st, struct map_session_data *sd, const char *varname, int elem, const void *value, struct reg_db *ref); +typedef void (*HPMHOOK_pre_script_attach_state) (struct script_state **st); +typedef void (*HPMHOOK_post_script_attach_state) (struct script_state *st); +typedef struct script_queue* (*HPMHOOK_pre_script_queue) (int *idx); +typedef struct script_queue* (*HPMHOOK_post_script_queue) (struct script_queue* retVal___, int idx); +typedef bool (*HPMHOOK_pre_script_queue_add) (int *idx, int *var); +typedef bool (*HPMHOOK_post_script_queue_add) (bool retVal___, int idx, int var); +typedef bool (*HPMHOOK_pre_script_queue_del) (int *idx); +typedef bool (*HPMHOOK_post_script_queue_del) (bool retVal___, int idx); +typedef bool (*HPMHOOK_pre_script_queue_remove) (int *idx, int *var); +typedef bool (*HPMHOOK_post_script_queue_remove) (bool retVal___, int idx, int var); +typedef int (*HPMHOOK_pre_script_queue_create) (void); +typedef int (*HPMHOOK_post_script_queue_create) (int retVal___); +typedef bool (*HPMHOOK_pre_script_queue_clear) (int *idx); +typedef bool (*HPMHOOK_post_script_queue_clear) (bool retVal___, int idx); +typedef const char* (*HPMHOOK_pre_script_parse_curly_close) (const char **p); +typedef const char* (*HPMHOOK_post_script_parse_curly_close) (const char* retVal___, const char *p); +typedef const char* (*HPMHOOK_pre_script_parse_syntax_close) (const char **p); +typedef const char* (*HPMHOOK_post_script_parse_syntax_close) (const char* retVal___, const char *p); +typedef const char* (*HPMHOOK_pre_script_parse_syntax_close_sub) (const char **p, int **flag); +typedef const char* (*HPMHOOK_post_script_parse_syntax_close_sub) (const char* retVal___, const char *p, int *flag); +typedef const char* (*HPMHOOK_pre_script_parse_syntax) (const char **p); +typedef const char* (*HPMHOOK_post_script_parse_syntax) (const char* retVal___, const char *p); +typedef c_op (*HPMHOOK_pre_script_get_com) (const struct script_buf **scriptbuf, int **pos); +typedef c_op (*HPMHOOK_post_script_get_com) (c_op retVal___, const struct script_buf *scriptbuf, int *pos); +typedef int (*HPMHOOK_pre_script_get_num) (const struct script_buf **scriptbuf, int **pos); +typedef int (*HPMHOOK_post_script_get_num) (int retVal___, const struct script_buf *scriptbuf, int *pos); +typedef const char* (*HPMHOOK_pre_script_op2name) (int *op); +typedef const char* (*HPMHOOK_post_script_op2name) (const char* retVal___, int op); +typedef void (*HPMHOOK_pre_script_reportsrc) (struct script_state **st); +typedef void (*HPMHOOK_post_script_reportsrc) (struct script_state *st); +typedef void (*HPMHOOK_pre_script_reportdata) (struct script_data **data); +typedef void (*HPMHOOK_post_script_reportdata) (struct script_data *data); +typedef void (*HPMHOOK_pre_script_reportfunc) (struct script_state **st); +typedef void (*HPMHOOK_post_script_reportfunc) (struct script_state *st); +typedef void (*HPMHOOK_pre_script_disp_warning_message) (const char **mes, const char **pos); +typedef void (*HPMHOOK_post_script_disp_warning_message) (const char *mes, const char *pos); +typedef void (*HPMHOOK_pre_script_check_event) (struct script_state **st, const char **evt); +typedef void (*HPMHOOK_post_script_check_event) (struct script_state *st, const char *evt); +typedef unsigned int (*HPMHOOK_pre_script_calc_hash) (const char **p); +typedef unsigned int (*HPMHOOK_post_script_calc_hash) (unsigned int retVal___, const char *p); +typedef void (*HPMHOOK_pre_script_addb) (int *a); +typedef void (*HPMHOOK_post_script_addb) (int a); +typedef void (*HPMHOOK_pre_script_addc) (int *a); +typedef void (*HPMHOOK_post_script_addc) (int a); +typedef void (*HPMHOOK_pre_script_addi) (int *a); +typedef void (*HPMHOOK_post_script_addi) (int a); +typedef void (*HPMHOOK_pre_script_addl) (int *l); +typedef void (*HPMHOOK_post_script_addl) (int l); +typedef void (*HPMHOOK_pre_script_set_label) (int *l, int *pos, const char **script_pos); +typedef void (*HPMHOOK_post_script_set_label) (int l, int pos, const char *script_pos); +typedef const char* (*HPMHOOK_pre_script_skip_word) (const char **p); +typedef const char* (*HPMHOOK_post_script_skip_word) (const char* retVal___, const char *p); +typedef int (*HPMHOOK_pre_script_add_word) (const char **p); +typedef int (*HPMHOOK_post_script_add_word) (int retVal___, const char *p); +typedef const char* (*HPMHOOK_pre_script_parse_callfunc) (const char **p, int *require_paren, int *is_custom); +typedef const char* (*HPMHOOK_post_script_parse_callfunc) (const char* retVal___, const char *p, int require_paren, int is_custom); +typedef void (*HPMHOOK_pre_script_parse_nextline) (bool *first, const char **p); +typedef void (*HPMHOOK_post_script_parse_nextline) (bool first, const char *p); +typedef const char* (*HPMHOOK_pre_script_parse_variable) (const char **p); +typedef const char* (*HPMHOOK_post_script_parse_variable) (const char* retVal___, const char *p); +typedef const char* (*HPMHOOK_pre_script_parse_simpleexpr) (const char **p); +typedef const char* (*HPMHOOK_post_script_parse_simpleexpr) (const char* retVal___, const char *p); +typedef const char* (*HPMHOOK_pre_script_parse_simpleexpr_paren) (const char **p); +typedef const char* (*HPMHOOK_post_script_parse_simpleexpr_paren) (const char* retVal___, const char *p); +typedef const char* (*HPMHOOK_pre_script_parse_simpleexpr_number) (const char **p); +typedef const char* (*HPMHOOK_post_script_parse_simpleexpr_number) (const char* retVal___, const char *p); +typedef const char* (*HPMHOOK_pre_script_parse_simpleexpr_string) (const char **p); +typedef const char* (*HPMHOOK_post_script_parse_simpleexpr_string) (const char* retVal___, const char *p); +typedef const char* (*HPMHOOK_pre_script_parse_simpleexpr_name) (const char **p); +typedef const char* (*HPMHOOK_post_script_parse_simpleexpr_name) (const char* retVal___, const char *p); +typedef void (*HPMHOOK_pre_script_add_translatable_string) (const struct script_string_buf **string, const char **start_point); +typedef void (*HPMHOOK_post_script_add_translatable_string) (const struct script_string_buf *string, const char *start_point); +typedef const char* (*HPMHOOK_pre_script_parse_expr) (const char **p); +typedef const char* (*HPMHOOK_post_script_parse_expr) (const char* retVal___, const char *p); +typedef const char* (*HPMHOOK_pre_script_parse_line) (const char **p); +typedef const char* (*HPMHOOK_post_script_parse_line) (const char* retVal___, const char *p); +typedef void (*HPMHOOK_pre_script_read_constdb) (bool *reload); +typedef void (*HPMHOOK_post_script_read_constdb) (bool reload); +typedef void (*HPMHOOK_pre_script_constdb_comment) (const char **comment); +typedef void (*HPMHOOK_post_script_constdb_comment) (const char *comment); +typedef void (*HPMHOOK_pre_script_load_parameters) (void); +typedef void (*HPMHOOK_post_script_load_parameters) (void); +typedef const char* (*HPMHOOK_pre_script_print_line) (StringBuf **buf, const char **p, const char **mark, int *line); +typedef const char* (*HPMHOOK_post_script_print_line) (const char* retVal___, StringBuf *buf, const char *p, const char *mark, int line); +typedef void (*HPMHOOK_pre_script_errorwarning_sub) (StringBuf **buf, const char **src, const char **file, int *start_line, const char **error_msg, const char **error_pos); +typedef void (*HPMHOOK_post_script_errorwarning_sub) (StringBuf *buf, const char *src, const char *file, int start_line, const char *error_msg, const char *error_pos); +typedef int (*HPMHOOK_pre_script_set_reg) (struct script_state **st, struct map_session_data **sd, int64 *num, const char **name, const void **value, struct reg_db **ref); +typedef int (*HPMHOOK_post_script_set_reg) (int retVal___, struct script_state *st, struct map_session_data *sd, int64 num, const char *name, const void *value, struct reg_db *ref); +typedef void (*HPMHOOK_pre_script_set_reg_ref_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); +typedef void (*HPMHOOK_post_script_set_reg_ref_str) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); +typedef void (*HPMHOOK_pre_script_set_reg_pc_ref_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); +typedef void (*HPMHOOK_post_script_set_reg_pc_ref_str) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); +typedef void (*HPMHOOK_pre_script_set_reg_scope_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); +typedef void (*HPMHOOK_post_script_set_reg_scope_str) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); +typedef void (*HPMHOOK_pre_script_set_reg_npc_str) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); +typedef void (*HPMHOOK_post_script_set_reg_npc_str) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); +typedef void (*HPMHOOK_pre_script_set_reg_instance_str) (struct script_state **st, int64 *num, const char **name, const char **str); +typedef void (*HPMHOOK_post_script_set_reg_instance_str) (struct script_state *st, int64 num, const char *name, const char *str); +typedef void (*HPMHOOK_pre_script_set_reg_ref_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); +typedef void (*HPMHOOK_post_script_set_reg_ref_num) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); +typedef void (*HPMHOOK_pre_script_set_reg_pc_ref_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); +typedef void (*HPMHOOK_post_script_set_reg_pc_ref_num) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); +typedef void (*HPMHOOK_pre_script_set_reg_scope_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); +typedef void (*HPMHOOK_post_script_set_reg_scope_num) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); +typedef void (*HPMHOOK_pre_script_set_reg_npc_num) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); +typedef void (*HPMHOOK_post_script_set_reg_npc_num) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); +typedef void (*HPMHOOK_pre_script_set_reg_instance_num) (struct script_state **st, int64 *num, const char **name, int *val); +typedef void (*HPMHOOK_post_script_set_reg_instance_num) (struct script_state *st, int64 num, const char *name, int val); +typedef void (*HPMHOOK_pre_script_stack_expand) (struct script_stack **stack); +typedef void (*HPMHOOK_post_script_stack_expand) (struct script_stack *stack); +typedef struct script_data* (*HPMHOOK_pre_script_push_retinfo) (struct script_stack **stack, struct script_retinfo **ri, struct reg_db **ref); +typedef struct script_data* (*HPMHOOK_post_script_push_retinfo) (struct script_data* retVal___, struct script_stack *stack, struct script_retinfo *ri, struct reg_db *ref); +typedef void (*HPMHOOK_pre_script_op_3) (struct script_state **st, int *op); +typedef void (*HPMHOOK_post_script_op_3) (struct script_state *st, int op); +typedef void (*HPMHOOK_pre_script_op_2str) (struct script_state **st, int *op, const char **s1, const char **s2); +typedef void (*HPMHOOK_post_script_op_2str) (struct script_state *st, int op, const char *s1, const char *s2); +typedef void (*HPMHOOK_pre_script_op_2num) (struct script_state **st, int *op, int *i1, int *i2); +typedef void (*HPMHOOK_post_script_op_2num) (struct script_state *st, int op, int i1, int i2); +typedef void (*HPMHOOK_pre_script_op_2) (struct script_state **st, int *op); +typedef void (*HPMHOOK_post_script_op_2) (struct script_state *st, int op); +typedef void (*HPMHOOK_pre_script_op_1) (struct script_state **st, int *op); +typedef void (*HPMHOOK_post_script_op_1) (struct script_state *st, int op); +typedef bool (*HPMHOOK_pre_script_check_buildin_argtype) (struct script_state **st, int *func); +typedef bool (*HPMHOOK_post_script_check_buildin_argtype) (bool retVal___, struct script_state *st, int func); +typedef void (*HPMHOOK_pre_script_detach_state) (struct script_state **st, bool *dequeue_event); +typedef void (*HPMHOOK_post_script_detach_state) (struct script_state *st, bool dequeue_event); +typedef int (*HPMHOOK_pre_script_db_free_code_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_script_db_free_code_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef void (*HPMHOOK_pre_script_add_autobonus) (const char **autobonus); +typedef void (*HPMHOOK_post_script_add_autobonus) (const char *autobonus); +typedef int (*HPMHOOK_pre_script_menu_countoptions) (const char **str, int *max_count, int **total); +typedef int (*HPMHOOK_post_script_menu_countoptions) (int retVal___, const char *str, int max_count, int *total); +typedef int (*HPMHOOK_pre_script_buildin_recovery_sub) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_script_buildin_recovery_sub) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_script_buildin_recovery_pc_sub) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_recovery_pc_sub) (int retVal___, struct map_session_data *sd, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_recovery_bl_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_recovery_bl_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_areawarp_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_areawarp_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_areapercentheal_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_areapercentheal_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_script_buildin_delitem_delete) (struct map_session_data **sd, int *idx, int **amount, bool *delete_items); +typedef void (*HPMHOOK_post_script_buildin_delitem_delete) (struct map_session_data *sd, int idx, int *amount, bool delete_items); +typedef bool (*HPMHOOK_pre_script_buildin_delitem_search) (struct map_session_data **sd, struct item **it, bool *exact_match); +typedef bool (*HPMHOOK_post_script_buildin_delitem_search) (bool retVal___, struct map_session_data *sd, struct item *it, bool exact_match); +typedef int (*HPMHOOK_pre_script_buildin_killmonster_sub_strip) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_killmonster_sub_strip) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_killmonster_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_killmonster_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_killmonsterall_sub_strip) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_killmonsterall_sub_strip) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_killmonsterall_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_killmonsterall_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_announce_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_announce_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_getareausers_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_getareausers_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_getareadropitem_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_getareadropitem_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_mapflag_pvp_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_mapflag_pvp_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_pvpoff_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_pvpoff_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_maprespawnguildid_sub_pc) (struct map_session_data **sd, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_maprespawnguildid_sub_pc) (int retVal___, struct map_session_data *sd, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_maprespawnguildid_sub_mob) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_maprespawnguildid_sub_mob) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_mobcount_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_mobcount_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_playbgm_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_playbgm_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_playbgm_foreachpc_sub) (struct map_session_data **sd, va_list args); +typedef int (*HPMHOOK_post_script_playbgm_foreachpc_sub) (int retVal___, struct map_session_data *sd, va_list args); +typedef int (*HPMHOOK_pre_script_soundeffect_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_soundeffect_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_query_sql_sub) (struct script_state **st, struct Sql **handle); +typedef int (*HPMHOOK_post_script_buildin_query_sql_sub) (int retVal___, struct script_state *st, struct Sql *handle); +typedef int (*HPMHOOK_pre_script_buildin_instance_warpall_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_instance_warpall_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_buildin_mobuseskill_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_buildin_mobuseskill_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_cleanfloor_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_script_cleanfloor_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_script_run_func) (struct script_state **st); +typedef int (*HPMHOOK_post_script_run_func) (int retVal___, struct script_state *st); +typedef bool (*HPMHOOK_pre_script_sprintf_helper) (struct script_state **st, int *start, struct StringBuf **out); +typedef bool (*HPMHOOK_post_script_sprintf_helper) (bool retVal___, struct script_state *st, int start, struct StringBuf *out); +typedef const char* (*HPMHOOK_pre_script_getfuncname) (struct script_state **st); +typedef const char* (*HPMHOOK_post_script_getfuncname) (const char* retVal___, struct script_state *st); +typedef unsigned int (*HPMHOOK_pre_script_calc_hash_ci) (const char **p); +typedef unsigned int (*HPMHOOK_post_script_calc_hash_ci) (unsigned int retVal___, const char *p); +typedef struct reg_db* (*HPMHOOK_pre_script_array_src) (struct script_state **st, struct map_session_data **sd, const char **name, struct reg_db **ref); +typedef struct reg_db* (*HPMHOOK_post_script_array_src) (struct reg_db* retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); +typedef void (*HPMHOOK_pre_script_array_update) (struct reg_db **src, int64 *num, bool *empty); +typedef void (*HPMHOOK_post_script_array_update) (struct reg_db *src, int64 num, bool empty); +typedef void (*HPMHOOK_pre_script_array_delete) (struct reg_db **src, struct script_array **sa); +typedef void (*HPMHOOK_post_script_array_delete) (struct reg_db *src, struct script_array *sa); +typedef void (*HPMHOOK_pre_script_array_remove_member) (struct reg_db **src, struct script_array **sa, unsigned int *idx); +typedef void (*HPMHOOK_post_script_array_remove_member) (struct reg_db *src, struct script_array *sa, unsigned int idx); +typedef void (*HPMHOOK_pre_script_array_add_member) (struct script_array **sa, unsigned int *idx); +typedef void (*HPMHOOK_post_script_array_add_member) (struct script_array *sa, unsigned int idx); +typedef unsigned int (*HPMHOOK_pre_script_array_size) (struct script_state **st, struct map_session_data **sd, const char **name, struct reg_db **ref); +typedef unsigned int (*HPMHOOK_post_script_array_size) (unsigned int retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); +typedef unsigned int (*HPMHOOK_pre_script_array_highest_key) (struct script_state **st, struct map_session_data **sd, const char **name, struct reg_db **ref); +typedef unsigned int (*HPMHOOK_post_script_array_highest_key) (unsigned int retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); +typedef int (*HPMHOOK_pre_script_array_free_db) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_script_array_free_db) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef void (*HPMHOOK_pre_script_array_ensure_zero) (struct script_state **st, struct map_session_data **sd, int64 *uid, struct reg_db **ref); +typedef void (*HPMHOOK_post_script_array_ensure_zero) (struct script_state *st, struct map_session_data *sd, int64 uid, struct reg_db *ref); +typedef void (*HPMHOOK_pre_script_reg_destroy_single) (struct map_session_data **sd, int64 *reg, struct script_reg_state **data); +typedef void (*HPMHOOK_post_script_reg_destroy_single) (struct map_session_data *sd, int64 reg, struct script_reg_state *data); +typedef int (*HPMHOOK_pre_script_reg_destroy) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_script_reg_destroy) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef void (*HPMHOOK_pre_script_generic_ui_array_expand) (unsigned int *plus); +typedef void (*HPMHOOK_post_script_generic_ui_array_expand) (unsigned int plus); +typedef unsigned int* (*HPMHOOK_pre_script_array_cpy_list) (struct script_array **sa); +typedef unsigned int* (*HPMHOOK_post_script_array_cpy_list) (unsigned int* retVal___, struct script_array *sa); +typedef void (*HPMHOOK_pre_script_hardcoded_constants) (void); +typedef void (*HPMHOOK_post_script_hardcoded_constants) (void); +typedef unsigned short (*HPMHOOK_pre_script_mapindexname2id) (struct script_state **st, const char **name); +typedef unsigned short (*HPMHOOK_post_script_mapindexname2id) (unsigned short retVal___, struct script_state *st, const char *name); +typedef int (*HPMHOOK_pre_script_string_dup) (char **str); +typedef int (*HPMHOOK_post_script_string_dup) (int retVal___, char *str); +typedef void (*HPMHOOK_pre_script_load_translations) (void); +typedef void (*HPMHOOK_post_script_load_translations) (void); +typedef bool (*HPMHOOK_pre_script_load_translation_addstring) (const char **file, uint8 *lang_id, const char **msgctxt, const struct script_string_buf **msgid, const struct script_string_buf **msgstr); +typedef bool (*HPMHOOK_post_script_load_translation_addstring) (bool retVal___, const char *file, uint8 lang_id, const char *msgctxt, const struct script_string_buf *msgid, const struct script_string_buf *msgstr); +typedef int (*HPMHOOK_pre_script_load_translation_file) (const char **file, uint8 *lang_id); +typedef int (*HPMHOOK_post_script_load_translation_file) (int retVal___, const char *file, uint8 lang_id); +typedef int (*HPMHOOK_pre_script_load_translation) (const char **directory, uint8 *lang_id); +typedef int (*HPMHOOK_post_script_load_translation) (int retVal___, const char *directory, uint8 lang_id); +typedef int (*HPMHOOK_pre_script_translation_db_destroyer) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_script_translation_db_destroyer) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef void (*HPMHOOK_pre_script_clear_translations) (bool *reload); +typedef void (*HPMHOOK_post_script_clear_translations) (bool reload); +typedef int (*HPMHOOK_pre_script_parse_cleanup_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_script_parse_cleanup_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef uint8 (*HPMHOOK_pre_script_add_language) (const char **name); +typedef uint8 (*HPMHOOK_post_script_add_language) (uint8 retVal___, const char *name); +typedef const char* (*HPMHOOK_pre_script_get_translation_dir_name) (const char **directory); +typedef const char* (*HPMHOOK_post_script_get_translation_dir_name) (const char* retVal___, const char *directory); +typedef void (*HPMHOOK_pre_script_parser_clean_leftovers) (void); +typedef void (*HPMHOOK_post_script_parser_clean_leftovers) (void); +typedef void (*HPMHOOK_pre_script_run_use_script) (struct map_session_data **sd, struct item_data **data, int *oid); +typedef void (*HPMHOOK_post_script_run_use_script) (struct map_session_data *sd, struct item_data *data, int oid); +typedef void (*HPMHOOK_pre_script_run_item_equip_script) (struct map_session_data **sd, struct item_data **data, int *oid); +typedef void (*HPMHOOK_post_script_run_item_equip_script) (struct map_session_data *sd, struct item_data *data, int oid); +typedef void (*HPMHOOK_pre_script_run_item_unequip_script) (struct map_session_data **sd, struct item_data **data, int *oid); +typedef void (*HPMHOOK_post_script_run_item_unequip_script) (struct map_session_data *sd, struct item_data *data, int oid); +typedef void (*HPMHOOK_pre_script_run_item_rental_end_script) (struct map_session_data **sd, struct item_data **data, int *oid); +typedef void (*HPMHOOK_post_script_run_item_rental_end_script) (struct map_session_data *sd, struct item_data *data, int oid); +typedef void (*HPMHOOK_pre_script_run_item_rental_start_script) (struct map_session_data **sd, struct item_data **data, int *oid); +typedef void (*HPMHOOK_post_script_run_item_rental_start_script) (struct map_session_data *sd, struct item_data *data, int oid); +typedef void (*HPMHOOK_pre_script_run_item_lapineddukddak_script) (struct map_session_data **sd, struct item_data **data, int *oid); +typedef void (*HPMHOOK_post_script_run_item_lapineddukddak_script) (struct map_session_data *sd, struct item_data *data, int oid); +typedef bool (*HPMHOOK_pre_script_sellitemcurrency_add) (struct npc_data **nd, struct script_state **st, int *argIndex); +typedef bool (*HPMHOOK_post_script_sellitemcurrency_add) (bool retVal___, struct npc_data *nd, struct script_state *st, int argIndex); +#endif // MAP_SCRIPT_H +#ifdef MAP_SEARCHSTORE_H /* searchstore */ +typedef bool (*HPMHOOK_pre_searchstore_open) (struct map_session_data **sd, unsigned int *uses, unsigned short *effect); +typedef bool (*HPMHOOK_post_searchstore_open) (bool retVal___, struct map_session_data *sd, unsigned int uses, unsigned short effect); +typedef void (*HPMHOOK_pre_searchstore_query) (struct map_session_data **sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const uint32 **itemlist, unsigned int *item_count, const uint32 **cardlist, unsigned int *card_count); +typedef void (*HPMHOOK_post_searchstore_query) (struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const uint32 *itemlist, unsigned int item_count, const uint32 *cardlist, unsigned int card_count); +typedef bool (*HPMHOOK_pre_searchstore_querynext) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_searchstore_querynext) (bool retVal___, struct map_session_data *sd); +typedef void (*HPMHOOK_pre_searchstore_next) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_searchstore_next) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_searchstore_clear) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_searchstore_clear) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_searchstore_close) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_searchstore_close) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_searchstore_click) (struct map_session_data **sd, int *account_id, int *store_id, int *nameid); +typedef void (*HPMHOOK_post_searchstore_click) (struct map_session_data *sd, int account_id, int store_id, int nameid); +typedef bool (*HPMHOOK_pre_searchstore_queryremote) (struct map_session_data **sd, int *account_id); +typedef bool (*HPMHOOK_post_searchstore_queryremote) (bool retVal___, struct map_session_data *sd, int account_id); +typedef void (*HPMHOOK_pre_searchstore_clearremote) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_searchstore_clearremote) (struct map_session_data *sd); +typedef bool (*HPMHOOK_pre_searchstore_result) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine_level, const struct item_option **option); +typedef bool (*HPMHOOK_post_searchstore_result) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option); +#endif // MAP_SEARCHSTORE_H +#ifdef COMMON_SHOWMSG_H /* showmsg */ +typedef void (*HPMHOOK_pre_showmsg_init) (void); +typedef void (*HPMHOOK_post_showmsg_init) (void); +typedef void (*HPMHOOK_pre_showmsg_final) (void); +typedef void (*HPMHOOK_post_showmsg_final) (void); +typedef void (*HPMHOOK_pre_showmsg_clearScreen) (void); +typedef void (*HPMHOOK_post_showmsg_clearScreen) (void); +typedef int (*HPMHOOK_pre_showmsg_showMessageV) (const char **string, va_list ap); +typedef int (*HPMHOOK_post_showmsg_showMessageV) (int retVal___, const char *string, va_list ap); +#endif // COMMON_SHOWMSG_H +#ifdef MAP_SKILL_H /* skill */ +typedef int (*HPMHOOK_pre_skill_init) (bool *minimal); +typedef int (*HPMHOOK_post_skill_init) (int retVal___, bool minimal); +typedef int (*HPMHOOK_pre_skill_final) (void); +typedef int (*HPMHOOK_post_skill_final) (int retVal___); +typedef void (*HPMHOOK_pre_skill_reload) (void); +typedef void (*HPMHOOK_post_skill_reload) (void); +typedef void (*HPMHOOK_pre_skill_read_db) (bool *minimal); +typedef void (*HPMHOOK_post_skill_read_db) (bool minimal); +typedef int (*HPMHOOK_pre_skill_get_index) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_index) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_type) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_type) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_hit) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_hit) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_inf) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_inf) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_ele) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_ele) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_nk) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_nk) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_max) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_max) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_range) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_range) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_range2) (struct block_list **bl, int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_range2) (int retVal___, struct block_list *bl, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_splash) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_splash) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_hp) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_hp) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_mhp) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_mhp) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_sp) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_sp) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_hp_rate) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_hp_rate) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_sp_rate) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_sp_rate) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_state) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_state) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_spiritball) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_spiritball) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_itemid) (int *skill_id, int *item_idx); +typedef int (*HPMHOOK_post_skill_get_itemid) (int retVal___, int skill_id, int item_idx); +typedef int (*HPMHOOK_pre_skill_get_itemqty) (int *skill_id, int *item_idx); +typedef int (*HPMHOOK_post_skill_get_itemqty) (int retVal___, int skill_id, int item_idx); +typedef int (*HPMHOOK_pre_skill_get_zeny) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_zeny) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_num) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_num) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_cast) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_cast) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_delay) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_delay) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_walkdelay) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_walkdelay) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_time) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_time) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_time2) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_time2) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_castnodex) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_castnodex) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_delaynodex) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_delaynodex) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_castdef) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_castdef) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_weapontype) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_weapontype) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_ammotype) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_ammotype) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_ammo_qty) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_ammo_qty) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_unit_id) (int *skill_id, int *flag); +typedef int (*HPMHOOK_post_skill_get_unit_id) (int retVal___, int skill_id, int flag); +typedef int (*HPMHOOK_pre_skill_get_inf2) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_inf2) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_castcancel) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_castcancel) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_maxcount) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_maxcount) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_blewcount) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_blewcount) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_unit_flag) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_unit_flag) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_unit_target) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_unit_target) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_unit_interval) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_unit_interval) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_unit_bl_target) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_unit_bl_target) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_unit_layout_type) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_unit_layout_type) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_unit_range) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_unit_range) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_get_cooldown) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_cooldown) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_tree_get_max) (int *skill_id, int *class); +typedef int (*HPMHOOK_post_skill_tree_get_max) (int retVal___, int skill_id, int class); +typedef const char* (*HPMHOOK_pre_skill_get_name) (int *skill_id); +typedef const char* (*HPMHOOK_post_skill_get_name) (const char* retVal___, int skill_id); +typedef const char* (*HPMHOOK_pre_skill_get_desc) (int *skill_id); +typedef const char* (*HPMHOOK_post_skill_get_desc) (const char* retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_casttype) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_casttype) (int retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_get_casttype2) (int *index); +typedef int (*HPMHOOK_post_skill_get_casttype2) (int retVal___, int index); +typedef bool (*HPMHOOK_pre_skill_is_combo) (int *skill_id); +typedef bool (*HPMHOOK_post_skill_is_combo) (bool retVal___, int skill_id); +typedef int (*HPMHOOK_pre_skill_name2id) (const char **name); +typedef int (*HPMHOOK_post_skill_name2id) (int retVal___, const char *name); +typedef int (*HPMHOOK_pre_skill_isammotype) (struct map_session_data **sd, int *skill_id); +typedef int (*HPMHOOK_post_skill_isammotype) (int retVal___, struct map_session_data *sd, int skill_id); +typedef int (*HPMHOOK_pre_skill_castend_id) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_skill_castend_id) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_skill_castend_pos) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_skill_castend_pos) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_skill_castend_map) (struct map_session_data **sd, uint16 *skill_id, const char **mapname); +typedef int (*HPMHOOK_post_skill_castend_map) (int retVal___, struct map_session_data *sd, uint16 skill_id, const char *mapname); +typedef int (*HPMHOOK_pre_skill_cleartimerskill) (struct block_list **src); +typedef int (*HPMHOOK_post_skill_cleartimerskill) (int retVal___, struct block_list *src); +typedef int (*HPMHOOK_pre_skill_addtimerskill) (struct block_list **src, int64 *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag); +typedef int (*HPMHOOK_post_skill_addtimerskill) (int retVal___, struct block_list *src, int64 tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag); +typedef int (*HPMHOOK_pre_skill_additional_effect) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); +typedef int (*HPMHOOK_post_skill_additional_effect) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 tick); +typedef int (*HPMHOOK_pre_skill_counter_additional_effect) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); +typedef int (*HPMHOOK_post_skill_counter_additional_effect) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick); +typedef int (*HPMHOOK_pre_skill_blown) (struct block_list **src, struct block_list **target, int *count, enum unit_dir *dir, int *flag); +typedef int (*HPMHOOK_post_skill_blown) (int retVal___, struct block_list *src, struct block_list *target, int count, enum unit_dir dir, int flag); +typedef int (*HPMHOOK_pre_skill_break_equip) (struct block_list **bl, unsigned short *where, int *rate, int *flag); +typedef int (*HPMHOOK_post_skill_break_equip) (int retVal___, struct block_list *bl, unsigned short where, int rate, int flag); +typedef int (*HPMHOOK_pre_skill_strip_equip) (struct block_list **bl, unsigned short *where, int *rate, int *lv, int *time); +typedef int (*HPMHOOK_post_skill_strip_equip) (int retVal___, struct block_list *bl, unsigned short where, int rate, int lv, int time); +typedef struct skill_unit_group* (*HPMHOOK_pre_skill_id2group) (int *group_id); +typedef struct skill_unit_group* (*HPMHOOK_post_skill_id2group) (struct skill_unit_group* retVal___, int group_id); +typedef struct skill_unit_group* (*HPMHOOK_pre_skill_unitsetting) (struct block_list **src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag); +typedef struct skill_unit_group* (*HPMHOOK_post_skill_unitsetting) (struct skill_unit_group* retVal___, struct block_list *src, uint16 skill_id, uint16 skill_lv, short x, short y, int flag); +typedef struct skill_unit* (*HPMHOOK_pre_skill_initunit) (struct skill_unit_group **group, int *idx, int *x, int *y, int *val1, int *val2); +typedef struct skill_unit* (*HPMHOOK_post_skill_initunit) (struct skill_unit* retVal___, struct skill_unit_group *group, int idx, int x, int y, int val1, int val2); +typedef int (*HPMHOOK_pre_skill_delunit) (struct skill_unit **su); +typedef int (*HPMHOOK_post_skill_delunit) (int retVal___, struct skill_unit *su); +typedef struct skill_unit_group* (*HPMHOOK_pre_skill_init_unitgroup) (struct block_list **src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval); +typedef struct skill_unit_group* (*HPMHOOK_post_skill_init_unitgroup) (struct skill_unit_group* retVal___, struct block_list *src, int count, uint16 skill_id, uint16 skill_lv, int unit_id, int limit, int interval); +typedef int (*HPMHOOK_pre_skill_del_unitgroup) (struct skill_unit_group **group, const char **file, int *line, const char **func); +typedef int (*HPMHOOK_post_skill_del_unitgroup) (int retVal___, struct skill_unit_group *group, const char *file, int line, const char *func); +typedef int (*HPMHOOK_pre_skill_clear_unitgroup) (struct block_list **src); +typedef int (*HPMHOOK_post_skill_clear_unitgroup) (int retVal___, struct block_list *src); +typedef int (*HPMHOOK_pre_skill_clear_group) (struct block_list **bl, int *flag); +typedef int (*HPMHOOK_post_skill_clear_group) (int retVal___, struct block_list *bl, int flag); +typedef int (*HPMHOOK_pre_skill_unit_onplace) (struct skill_unit **src, struct block_list **bl, int64 *tick); +typedef int (*HPMHOOK_post_skill_unit_onplace) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 tick); +typedef int (*HPMHOOK_pre_skill_unit_ondamaged) (struct skill_unit **src, struct block_list **bl, int64 *damage, int64 *tick); +typedef int (*HPMHOOK_post_skill_unit_ondamaged) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 damage, int64 tick); +typedef int (*HPMHOOK_pre_skill_cast_fix) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_skill_cast_fix) (int retVal___, struct block_list *bl, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_skill_cast_fix_sc) (struct block_list **bl, int *time); +typedef int (*HPMHOOK_post_skill_cast_fix_sc) (int retVal___, struct block_list *bl, int time); +typedef int (*HPMHOOK_pre_skill_vf_cast_fix) (struct block_list **bl, double *time, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_skill_vf_cast_fix) (int retVal___, struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_skill_delay_fix) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_skill_delay_fix) (int retVal___, struct block_list *bl, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_skill_check_condition_castbegin) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_skill_check_condition_castbegin) (int retVal___, struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_skill_check_condition_castend) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_skill_check_condition_castend) (int retVal___, struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_skill_consume_requirement) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv, short *type); +typedef int (*HPMHOOK_post_skill_consume_requirement) (int retVal___, struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type); +typedef struct skill_condition (*HPMHOOK_pre_skill_get_requirement) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); +typedef struct skill_condition (*HPMHOOK_post_skill_get_requirement) (struct skill_condition retVal___, struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_skill_check_pc_partner) (struct map_session_data **sd, uint16 *skill_id, uint16 **skill_lv, int *range, int *cast_flag); +typedef int (*HPMHOOK_post_skill_check_pc_partner) (int retVal___, struct map_session_data *sd, uint16 skill_id, uint16 *skill_lv, int range, int cast_flag); +typedef int (*HPMHOOK_pre_skill_unit_move) (struct block_list **bl, int64 *tick, int *flag); +typedef int (*HPMHOOK_post_skill_unit_move) (int retVal___, struct block_list *bl, int64 tick, int flag); +typedef int (*HPMHOOK_pre_skill_unit_onleft) (uint16 *skill_id, struct block_list **bl, int64 *tick); +typedef int (*HPMHOOK_post_skill_unit_onleft) (int retVal___, uint16 skill_id, struct block_list *bl, int64 tick); +typedef int (*HPMHOOK_pre_skill_unit_onout) (struct skill_unit **src, struct block_list **bl, int64 *tick); +typedef int (*HPMHOOK_post_skill_unit_onout) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 tick); +typedef int (*HPMHOOK_pre_skill_unit_move_unit_group) (struct skill_unit_group **group, int16 *m, int16 *dx, int16 *dy); +typedef int (*HPMHOOK_post_skill_unit_move_unit_group) (int retVal___, struct skill_unit_group *group, int16 m, int16 dx, int16 dy); +typedef int (*HPMHOOK_pre_skill_sit) (struct map_session_data **sd, int *type); +typedef int (*HPMHOOK_post_skill_sit) (int retVal___, struct map_session_data *sd, int type); +typedef void (*HPMHOOK_pre_skill_brandishspear) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef void (*HPMHOOK_post_skill_brandishspear) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); +typedef void (*HPMHOOK_pre_skill_repairweapon) (struct map_session_data **sd, int *idx); +typedef void (*HPMHOOK_post_skill_repairweapon) (struct map_session_data *sd, int idx); +typedef void (*HPMHOOK_pre_skill_identify) (struct map_session_data **sd, int *idx); +typedef void (*HPMHOOK_post_skill_identify) (struct map_session_data *sd, int idx); +typedef void (*HPMHOOK_pre_skill_weaponrefine) (struct map_session_data **sd, int *idx); +typedef void (*HPMHOOK_post_skill_weaponrefine) (struct map_session_data *sd, int idx); +typedef int (*HPMHOOK_pre_skill_autospell) (struct map_session_data **md, uint16 *skill_id); +typedef int (*HPMHOOK_post_skill_autospell) (int retVal___, struct map_session_data *md, uint16 skill_id); +typedef int (*HPMHOOK_pre_skill_calc_heal) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, bool *heal); +typedef int (*HPMHOOK_post_skill_calc_heal) (int retVal___, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, bool heal); +typedef bool (*HPMHOOK_pre_skill_check_cloaking) (struct block_list **bl, struct status_change_entry **sce); +typedef bool (*HPMHOOK_post_skill_check_cloaking) (bool retVal___, struct block_list *bl, struct status_change_entry *sce); +typedef int (*HPMHOOK_pre_skill_check_cloaking_end) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_check_cloaking_end) (int retVal___, struct block_list *bl, va_list ap); +typedef bool (*HPMHOOK_pre_skill_can_cloak) (struct map_session_data **sd); +typedef bool (*HPMHOOK_post_skill_can_cloak) (bool retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_skill_enchant_elemental_end) (struct block_list **bl, int *type); +typedef int (*HPMHOOK_post_skill_enchant_elemental_end) (int retVal___, struct block_list *bl, int type); +typedef int (*HPMHOOK_pre_skill_not_ok) (uint16 *skill_id, struct map_session_data **sd); +typedef int (*HPMHOOK_post_skill_not_ok) (int retVal___, uint16 skill_id, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_skill_not_ok_unknown) (uint16 *skill_id, struct map_session_data **sd); +typedef int (*HPMHOOK_post_skill_not_ok_unknown) (int retVal___, uint16 skill_id, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_skill_not_ok_hom) (uint16 *skill_id, struct homun_data **hd); +typedef int (*HPMHOOK_post_skill_not_ok_hom) (int retVal___, uint16 skill_id, struct homun_data *hd); +typedef int (*HPMHOOK_pre_skill_not_ok_hom_unknown) (uint16 *skill_id, struct homun_data **hd); +typedef int (*HPMHOOK_post_skill_not_ok_hom_unknown) (int retVal___, uint16 skill_id, struct homun_data *hd); +typedef int (*HPMHOOK_pre_skill_not_ok_mercenary) (uint16 *skill_id, struct mercenary_data **md); +typedef int (*HPMHOOK_post_skill_not_ok_mercenary) (int retVal___, uint16 skill_id, struct mercenary_data *md); +typedef void (*HPMHOOK_pre_skill_validate_autocast_data) (struct map_session_data **sd, int *skill_id, int *skill_lv); +typedef void (*HPMHOOK_post_skill_validate_autocast_data) (struct map_session_data *sd, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_chastle_mob_changetarget) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_chastle_mob_changetarget) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_can_produce_mix) (struct map_session_data **sd, int *nameid, int *trigger, int *qty); +typedef int (*HPMHOOK_post_skill_can_produce_mix) (int retVal___, struct map_session_data *sd, int nameid, int trigger, int qty); +typedef int (*HPMHOOK_pre_skill_produce_mix) (struct map_session_data **sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty); +typedef int (*HPMHOOK_post_skill_produce_mix) (int retVal___, struct map_session_data *sd, uint16 skill_id, int nameid, int slot1, int slot2, int slot3, int qty); +typedef int (*HPMHOOK_pre_skill_arrow_create) (struct map_session_data **sd, int *nameid); +typedef int (*HPMHOOK_post_skill_arrow_create) (int retVal___, struct map_session_data *sd, int nameid); +typedef void (*HPMHOOK_pre_skill_castend_type) (int *type, struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef void (*HPMHOOK_post_skill_castend_type) (int type, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); +typedef int (*HPMHOOK_pre_skill_castend_nodamage_id) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef int (*HPMHOOK_post_skill_castend_nodamage_id) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); +typedef int (*HPMHOOK_pre_skill_castend_damage_id) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef int (*HPMHOOK_post_skill_castend_damage_id) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); +typedef int (*HPMHOOK_pre_skill_castend_pos2) (struct block_list **src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef int (*HPMHOOK_post_skill_castend_pos2) (int retVal___, struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); +typedef int (*HPMHOOK_pre_skill_blockpc_start) (struct map_session_data **sd, uint16 *skill_id, int *tick); +typedef int (*HPMHOOK_post_skill_blockpc_start) (int retVal___, struct map_session_data *sd, uint16 skill_id, int tick); +typedef int (*HPMHOOK_pre_skill_blockhomun_start) (struct homun_data **hd, uint16 *skill_id, int *tick); +typedef int (*HPMHOOK_post_skill_blockhomun_start) (int retVal___, struct homun_data *hd, uint16 skill_id, int tick); +typedef int (*HPMHOOK_pre_skill_blockmerc_start) (struct mercenary_data **md, uint16 *skill_id, int *tick); +typedef int (*HPMHOOK_post_skill_blockmerc_start) (int retVal___, struct mercenary_data *md, uint16 skill_id, int tick); +typedef int (*HPMHOOK_pre_skill_attack) (int *attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef int (*HPMHOOK_post_skill_attack) (int retVal___, int attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); +typedef int (*HPMHOOK_pre_skill_attack_area) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_attack_area) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_area_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_area_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_area_sub_count) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef int (*HPMHOOK_post_skill_area_sub_count) (int retVal___, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); +typedef int (*HPMHOOK_pre_skill_check_unit_range) (struct block_list **bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_skill_check_unit_range) (int retVal___, struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_skill_check_unit_range_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_check_unit_range_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_check_unit_range2) (struct block_list **bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_skill_check_unit_range2) (int retVal___, struct block_list *bl, int x, int y, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_skill_check_unit_range2_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_check_unit_range2_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_skill_toggle_magicpower) (struct block_list **bl, uint16 *skill_id); +typedef void (*HPMHOOK_post_skill_toggle_magicpower) (struct block_list *bl, uint16 skill_id); +typedef int (*HPMHOOK_pre_skill_magic_reflect) (struct block_list **src, struct block_list **bl, int *type); +typedef int (*HPMHOOK_post_skill_magic_reflect) (int retVal___, struct block_list *src, struct block_list *bl, int type); +typedef int (*HPMHOOK_pre_skill_onskillusage) (struct map_session_data **sd, struct block_list **bl, uint16 *skill_id, int64 *tick); +typedef int (*HPMHOOK_post_skill_onskillusage) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 skill_id, int64 tick); +typedef int (*HPMHOOK_pre_skill_cell_overlap) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_cell_overlap) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_timerskill) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_skill_timerskill) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_skill_trap_do_splash) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *bl_flag, int64 *tick); +typedef void (*HPMHOOK_post_skill_trap_do_splash) (struct block_list *bl, uint16 skill_id, uint16 skill_lv, int bl_flag, int64 tick); +typedef int (*HPMHOOK_pre_skill_trap_splash) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_trap_splash) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_check_condition_mercenary) (struct block_list **bl, int *skill_id, int *lv, int *type); +typedef int (*HPMHOOK_post_skill_check_condition_mercenary) (int retVal___, struct block_list *bl, int skill_id, int lv, int type); +typedef struct skill_unit_group* (*HPMHOOK_pre_skill_locate_element_field) (struct block_list **bl); +typedef struct skill_unit_group* (*HPMHOOK_post_skill_locate_element_field) (struct skill_unit_group* retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_skill_graffitiremover) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_graffitiremover) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_activate_reverberation) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_activate_reverberation) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_dance_overlap_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_dance_overlap_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_dance_overlap) (struct skill_unit **su, int *flag); +typedef int (*HPMHOOK_post_skill_dance_overlap) (int retVal___, struct skill_unit *su, int flag); +typedef struct s_skill_unit_layout* (*HPMHOOK_pre_skill_get_unit_layout) (uint16 *skill_id, uint16 *skill_lv, struct block_list **src, int *x, int *y); +typedef struct s_skill_unit_layout* (*HPMHOOK_post_skill_get_unit_layout) (struct s_skill_unit_layout* retVal___, uint16 skill_id, uint16 skill_lv, struct block_list *src, int x, int y); +typedef int (*HPMHOOK_pre_skill_frostjoke_scream) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_frostjoke_scream) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_greed) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_greed) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_destroy_trap) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_destroy_trap) (int retVal___, struct block_list *bl, va_list ap); +typedef struct skill_unit_group_tickset* (*HPMHOOK_pre_skill_unitgrouptickset_search) (struct block_list **bl, struct skill_unit_group **group, int64 *tick); +typedef struct skill_unit_group_tickset* (*HPMHOOK_post_skill_unitgrouptickset_search) (struct skill_unit_group_tickset* retVal___, struct block_list *bl, struct skill_unit_group *group, int64 tick); +typedef bool (*HPMHOOK_pre_skill_dance_switch) (struct skill_unit **su, int *flag); +typedef bool (*HPMHOOK_post_skill_dance_switch) (bool retVal___, struct skill_unit *su, int flag); +typedef int (*HPMHOOK_pre_skill_check_condition_char_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_check_condition_char_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_check_condition_mob_master_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_check_condition_mob_master_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_skill_brandishspear_first) (struct square **tc, enum unit_dir *dir, int16 *x, int16 *y); +typedef void (*HPMHOOK_post_skill_brandishspear_first) (struct square *tc, enum unit_dir dir, int16 x, int16 y); +typedef void (*HPMHOOK_pre_skill_brandishspear_dir) (struct square **tc, enum unit_dir *dir, int *are); +typedef void (*HPMHOOK_post_skill_brandishspear_dir) (struct square *tc, enum unit_dir dir, int are); +typedef int (*HPMHOOK_pre_skill_get_fixed_cast) (int *skill_id, int *skill_lv); +typedef int (*HPMHOOK_post_skill_get_fixed_cast) (int retVal___, int skill_id, int skill_lv); +typedef int (*HPMHOOK_pre_skill_sit_count) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_sit_count) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_sit_in) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_sit_in) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_sit_out) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_sit_out) (int retVal___, struct block_list *bl, va_list ap); +typedef void (*HPMHOOK_pre_skill_unitsetmapcell) (struct skill_unit **src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag); +typedef void (*HPMHOOK_post_skill_unitsetmapcell) (struct skill_unit *src, uint16 skill_id, uint16 skill_lv, cell_t cell, bool flag); +typedef int (*HPMHOOK_pre_skill_unit_onplace_timer) (struct skill_unit **src, struct block_list **bl, int64 *tick); +typedef int (*HPMHOOK_post_skill_unit_onplace_timer) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 tick); +typedef void (*HPMHOOK_pre_skill_unit_onplace_timer_unknown) (struct skill_unit **src, struct block_list **bl, int64 **tick); +typedef void (*HPMHOOK_post_skill_unit_onplace_timer_unknown) (struct skill_unit *src, struct block_list *bl, int64 *tick); +typedef int (*HPMHOOK_pre_skill_unit_effect) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_unit_effect) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_unit_timer_sub_onplace) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_unit_timer_sub_onplace) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_unit_move_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_unit_move_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_blockpc_end) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_skill_blockpc_end) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_skill_blockhomun_end) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_skill_blockhomun_end) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_skill_blockmerc_end) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_skill_blockmerc_end) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_skill_split_atoi) (char **str, int **val); +typedef int (*HPMHOOK_post_skill_split_atoi) (int retVal___, char *str, int *val); +typedef int (*HPMHOOK_pre_skill_unit_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_skill_unit_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_skill_unit_timer_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_skill_unit_timer_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +typedef void (*HPMHOOK_pre_skill_init_unit_layout) (void); +typedef void (*HPMHOOK_post_skill_init_unit_layout) (void); +typedef void (*HPMHOOK_pre_skill_init_unit_layout_unknown) (int *skill_idx, int *pos); +typedef void (*HPMHOOK_post_skill_init_unit_layout_unknown) (int skill_idx, int pos); +typedef void (*HPMHOOK_pre_skill_validate_hittype) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_hittype) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_skilltype) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_skilltype) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_attacktype) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_attacktype) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_element) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_element) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_skillinfo) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_skillinfo) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_damagetype) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_damagetype) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_castnodex) (struct config_setting_t **conf, struct s_skill_db **sk, bool *delay); +typedef void (*HPMHOOK_post_skill_validate_castnodex) (struct config_setting_t *conf, struct s_skill_db *sk, bool delay); +typedef void (*HPMHOOK_pre_skill_validate_weapontype) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_weapontype) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_ammotype) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_ammotype) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_state) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_state) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_item_requirements) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_item_requirements) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_unit_target) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_unit_target) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_unit_flag) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_unit_flag) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef void (*HPMHOOK_pre_skill_validate_additional_fields) (struct config_setting_t **conf, struct s_skill_db **sk); +typedef void (*HPMHOOK_post_skill_validate_additional_fields) (struct config_setting_t *conf, struct s_skill_db *sk); +typedef bool (*HPMHOOK_pre_skill_validate_skilldb) (struct s_skill_db **skt, const char **source); +typedef bool (*HPMHOOK_post_skill_validate_skilldb) (bool retVal___, struct s_skill_db *skt, const char *source); +typedef int (*HPMHOOK_pre_skill_validate_weapontype_sub) (const char **type, bool *on, struct s_skill_db **sk); +typedef int (*HPMHOOK_post_skill_validate_weapontype_sub) (int retVal___, const char *type, bool on, struct s_skill_db *sk); +typedef int (*HPMHOOK_pre_skill_validate_ammotype_sub) (const char **type, bool *on, struct s_skill_db **sk); +typedef int (*HPMHOOK_post_skill_validate_ammotype_sub) (int retVal___, const char *type, bool on, struct s_skill_db *sk); +typedef int (*HPMHOOK_pre_skill_validate_unit_flag_sub) (const char **type, bool *on, struct s_skill_db **sk); +typedef int (*HPMHOOK_post_skill_validate_unit_flag_sub) (int retVal___, const char *type, bool on, struct s_skill_db *sk); +typedef bool (*HPMHOOK_pre_skill_read_skilldb) (const char **filename); +typedef bool (*HPMHOOK_post_skill_read_skilldb) (bool retVal___, const char *filename); +typedef void (*HPMHOOK_pre_skill_config_set_level) (struct config_setting_t **conf, int **arr); +typedef void (*HPMHOOK_post_skill_config_set_level) (struct config_setting_t *conf, int *arr); +typedef void (*HPMHOOK_pre_skill_level_set_value) (int **arr, int *value); +typedef void (*HPMHOOK_post_skill_level_set_value) (int *arr, int value); +typedef bool (*HPMHOOK_pre_skill_parse_row_producedb) (char **split[], int *columns, int *current); +typedef bool (*HPMHOOK_post_skill_parse_row_producedb) (bool retVal___, char *split[], int columns, int current); +typedef bool (*HPMHOOK_pre_skill_parse_row_createarrowdb) (char **split[], int *columns, int *current); +typedef bool (*HPMHOOK_post_skill_parse_row_createarrowdb) (bool retVal___, char *split[], int columns, int current); +typedef bool (*HPMHOOK_pre_skill_parse_row_abradb) (char **split[], int *columns, int *current); +typedef bool (*HPMHOOK_post_skill_parse_row_abradb) (bool retVal___, char *split[], int columns, int current); +typedef bool (*HPMHOOK_pre_skill_parse_row_spellbookdb) (char **split[], int *columns, int *current); +typedef bool (*HPMHOOK_post_skill_parse_row_spellbookdb) (bool retVal___, char *split[], int columns, int current); +typedef bool (*HPMHOOK_pre_skill_parse_row_magicmushroomdb) (char **split[], int *column, int *current); +typedef bool (*HPMHOOK_post_skill_parse_row_magicmushroomdb) (bool retVal___, char *split[], int column, int current); +typedef bool (*HPMHOOK_pre_skill_parse_row_improvisedb) (char **split[], int *columns, int *current); +typedef bool (*HPMHOOK_post_skill_parse_row_improvisedb) (bool retVal___, char *split[], int columns, int current); +typedef bool (*HPMHOOK_pre_skill_parse_row_changematerialdb) (char **split[], int *columns, int *current); +typedef bool (*HPMHOOK_post_skill_parse_row_changematerialdb) (bool retVal___, char *split[], int columns, int current); +typedef void (*HPMHOOK_pre_skill_usave_add) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); +typedef void (*HPMHOOK_post_skill_usave_add) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv); +typedef void (*HPMHOOK_pre_skill_usave_trigger) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_skill_usave_trigger) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_skill_cooldown_load) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_skill_cooldown_load) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_skill_spellbook) (struct map_session_data **sd, int *nameid); +typedef int (*HPMHOOK_post_skill_spellbook) (int retVal___, struct map_session_data *sd, int nameid); +typedef int (*HPMHOOK_pre_skill_block_check) (struct block_list **bl, enum sc_type *type, uint16 *skill_id); +typedef int (*HPMHOOK_post_skill_block_check) (int retVal___, struct block_list *bl, enum sc_type type, uint16 skill_id); +typedef int (*HPMHOOK_pre_skill_detonator) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_detonator) (int retVal___, struct block_list *bl, va_list ap); +typedef bool (*HPMHOOK_pre_skill_check_camouflage) (struct block_list **bl, struct status_change_entry **sce); +typedef bool (*HPMHOOK_post_skill_check_camouflage) (bool retVal___, struct block_list *bl, struct status_change_entry *sce); +typedef int (*HPMHOOK_pre_skill_magicdecoy) (struct map_session_data **sd, int *nameid); +typedef int (*HPMHOOK_post_skill_magicdecoy) (int retVal___, struct map_session_data *sd, int nameid); +typedef int (*HPMHOOK_pre_skill_poisoningweapon) (struct map_session_data **sd, int *nameid); +typedef int (*HPMHOOK_post_skill_poisoningweapon) (int retVal___, struct map_session_data *sd, int nameid); +typedef int (*HPMHOOK_pre_skill_select_menu) (struct map_session_data **sd, uint16 *skill_id); +typedef int (*HPMHOOK_post_skill_select_menu) (int retVal___, struct map_session_data *sd, uint16 skill_id); +typedef int (*HPMHOOK_pre_skill_elementalanalysis) (struct map_session_data **sd, uint16 *skill_lv, const struct itemlist **item_list); +typedef int (*HPMHOOK_post_skill_elementalanalysis) (int retVal___, struct map_session_data *sd, uint16 skill_lv, const struct itemlist *item_list); +typedef int (*HPMHOOK_pre_skill_changematerial) (struct map_session_data **sd, const struct itemlist **item_list); +typedef int (*HPMHOOK_post_skill_changematerial) (int retVal___, struct map_session_data *sd, const struct itemlist *item_list); +typedef int (*HPMHOOK_pre_skill_get_elemental_type) (uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_skill_get_elemental_type) (int retVal___, uint16 skill_id, uint16 skill_lv); +typedef void (*HPMHOOK_pre_skill_cooldown_save) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_skill_cooldown_save) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_skill_get_new_group_id) (void); +typedef int (*HPMHOOK_post_skill_get_new_group_id) (int retVal___); +typedef bool (*HPMHOOK_pre_skill_check_shadowform) (struct block_list **bl, int64 *damage, int *hit); +typedef bool (*HPMHOOK_post_skill_check_shadowform) (bool retVal___, struct block_list *bl, int64 damage, int hit); +typedef bool (*HPMHOOK_pre_skill_castend_damage_id_unknown) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, struct status_data **tstatus, struct status_change **sc); +typedef bool (*HPMHOOK_post_skill_castend_damage_id_unknown) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc); +typedef void (*HPMHOOK_pre_skill_additional_effect_unknown) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int **attack_type, int **dmg_lv, int64 **tick); +typedef void (*HPMHOOK_post_skill_additional_effect_unknown) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); +typedef void (*HPMHOOK_pre_skill_counter_additional_effect_unknown) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int **attack_type, int64 **tick); +typedef void (*HPMHOOK_post_skill_counter_additional_effect_unknown) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); +typedef void (*HPMHOOK_pre_skill_attack_combo1_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, struct status_change_entry **sce, int **combo); +typedef void (*HPMHOOK_post_skill_attack_combo1_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo); +typedef void (*HPMHOOK_pre_skill_attack_combo2_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **combo); +typedef void (*HPMHOOK_post_skill_attack_combo2_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo); +typedef void (*HPMHOOK_pre_skill_attack_display_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage); +typedef void (*HPMHOOK_post_skill_attack_display_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage); +typedef int (*HPMHOOK_pre_skill_attack_copy_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); +typedef int (*HPMHOOK_post_skill_attack_copy_unknown) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef int (*HPMHOOK_pre_skill_attack_dir_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); +typedef int (*HPMHOOK_post_skill_attack_dir_unknown) (int retVal___, int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef void (*HPMHOOK_pre_skill_attack_blow_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage, enum unit_dir **dir); +typedef void (*HPMHOOK_post_skill_attack_blow_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, enum unit_dir *dir); +typedef void (*HPMHOOK_pre_skill_attack_post_unknown) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); +typedef void (*HPMHOOK_post_skill_attack_post_unknown) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef bool (*HPMHOOK_pre_skill_timerskill_dead_unknown) (struct block_list **src, struct unit_data **ud, struct skill_timerskill **skl); +typedef bool (*HPMHOOK_post_skill_timerskill_dead_unknown) (bool retVal___, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); +typedef void (*HPMHOOK_pre_skill_timerskill_target_unknown) (int *tid, int64 *tick, struct block_list **src, struct block_list **target, struct unit_data **ud, struct skill_timerskill **skl); +typedef void (*HPMHOOK_post_skill_timerskill_target_unknown) (int tid, int64 tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl); +typedef void (*HPMHOOK_pre_skill_timerskill_notarget_unknown) (int *tid, int64 *tick, struct block_list **src, struct unit_data **ud, struct skill_timerskill **skl); +typedef void (*HPMHOOK_post_skill_timerskill_notarget_unknown) (int tid, int64 tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); +typedef bool (*HPMHOOK_pre_skill_cleartimerskill_exception) (int *skill_id); +typedef bool (*HPMHOOK_post_skill_cleartimerskill_exception) (bool retVal___, int skill_id); +typedef bool (*HPMHOOK_pre_skill_castend_id_unknown) (struct unit_data **ud, struct block_list **src, struct block_list **target); +typedef bool (*HPMHOOK_post_skill_castend_id_unknown) (bool retVal___, struct unit_data *ud, struct block_list *src, struct block_list *target); +typedef bool (*HPMHOOK_pre_skill_castend_nodamage_id_dead_unknown) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); +typedef bool (*HPMHOOK_post_skill_castend_nodamage_id_dead_unknown) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef bool (*HPMHOOK_pre_skill_castend_nodamage_id_undead_unknown) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); +typedef bool (*HPMHOOK_post_skill_castend_nodamage_id_undead_unknown) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef bool (*HPMHOOK_pre_skill_castend_nodamage_id_mado_unknown) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); +typedef bool (*HPMHOOK_post_skill_castend_nodamage_id_mado_unknown) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef bool (*HPMHOOK_pre_skill_castend_nodamage_id_unknown) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); +typedef bool (*HPMHOOK_post_skill_castend_nodamage_id_unknown) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef void (*HPMHOOK_pre_skill_castend_pos2_effect_unknown) (struct block_list **src, int **x, int **y, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); +typedef void (*HPMHOOK_post_skill_castend_pos2_effect_unknown) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef bool (*HPMHOOK_pre_skill_castend_pos2_unknown) (struct block_list **src, int **x, int **y, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); +typedef bool (*HPMHOOK_post_skill_castend_pos2_unknown) (bool retVal___, struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef void (*HPMHOOK_pre_skill_unitsetting1_unknown) (struct block_list **src, uint16 **skill_id, uint16 **skill_lv, int16 **x, int16 **y, int **flag, int **val1, int **val2, int **val3); +typedef void (*HPMHOOK_post_skill_unitsetting1_unknown) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3); +typedef void (*HPMHOOK_pre_skill_unitsetting2_unknown) (struct block_list **src, uint16 **skill_id, uint16 **skill_lv, int16 **x, int16 **y, int **flag, int **unit_flag, int **val1, int **val2, int **val3, struct skill_unit_group **group); +typedef void (*HPMHOOK_post_skill_unitsetting2_unknown) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group); +typedef void (*HPMHOOK_pre_skill_unit_onplace_unknown) (struct skill_unit **src, struct block_list **bl, int64 **tick); +typedef void (*HPMHOOK_post_skill_unit_onplace_unknown) (struct skill_unit *src, struct block_list *bl, int64 *tick); +typedef int (*HPMHOOK_pre_skill_check_condition_castbegin_off_unknown) (struct status_change **sc, uint16 **skill_id); +typedef int (*HPMHOOK_post_skill_check_condition_castbegin_off_unknown) (int retVal___, struct status_change *sc, uint16 *skill_id); +typedef int (*HPMHOOK_pre_skill_check_condition_castbegin_mount_unknown) (struct status_change **sc, uint16 **skill_id); +typedef int (*HPMHOOK_post_skill_check_condition_castbegin_mount_unknown) (int retVal___, struct status_change *sc, uint16 *skill_id); +typedef int (*HPMHOOK_pre_skill_check_condition_castbegin_madogear_unknown) (struct status_change **sc, uint16 **skill_id); +typedef int (*HPMHOOK_post_skill_check_condition_castbegin_madogear_unknown) (int retVal___, struct status_change *sc, uint16 *skill_id); +typedef int (*HPMHOOK_pre_skill_check_condition_castbegin_unknown) (struct status_change **sc, uint16 **skill_id); +typedef int (*HPMHOOK_post_skill_check_condition_castbegin_unknown) (int retVal___, struct status_change *sc, uint16 *skill_id); +typedef bool (*HPMHOOK_pre_skill_check_condition_castend_unknown) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv); +typedef bool (*HPMHOOK_post_skill_check_condition_castend_unknown) (bool retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); +typedef bool (*HPMHOOK_pre_skill_get_requirement_off_unknown) (struct status_change **sc, uint16 **skill_id); +typedef bool (*HPMHOOK_post_skill_get_requirement_off_unknown) (bool retVal___, struct status_change *sc, uint16 *skill_id); +typedef bool (*HPMHOOK_pre_skill_get_requirement_item_unknown) (struct status_change **sc, struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv, uint16 **idx, int **i); +typedef bool (*HPMHOOK_post_skill_get_requirement_item_unknown) (bool retVal___, struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i); +typedef void (*HPMHOOK_pre_skill_get_requirement_unknown) (struct status_change **sc, struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv, struct skill_condition **req); +typedef void (*HPMHOOK_post_skill_get_requirement_unknown) (struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req); +typedef int (*HPMHOOK_pre_skill_splash_target) (struct block_list **bl); +typedef int (*HPMHOOK_post_skill_splash_target) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_skill_check_npc_chaospanic) (struct block_list **bl, va_list args); +typedef int (*HPMHOOK_post_skill_check_npc_chaospanic) (int retVal___, struct block_list *bl, va_list args); +typedef int (*HPMHOOK_pre_skill_count_wos) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_skill_count_wos) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_skill_get_linked_song_dance_id) (int *skill_id); +typedef int (*HPMHOOK_post_skill_get_linked_song_dance_id) (int retVal___, int skill_id); +#endif // MAP_SKILL_H +#ifdef COMMON_SOCKET_H /* sockt */ +typedef void (*HPMHOOK_pre_sockt_init) (void); +typedef void (*HPMHOOK_post_sockt_init) (void); +typedef void (*HPMHOOK_pre_sockt_final) (void); +typedef void (*HPMHOOK_post_sockt_final) (void); +typedef int (*HPMHOOK_pre_sockt_perform) (int *next); +typedef int (*HPMHOOK_post_sockt_perform) (int retVal___, int next); +typedef void (*HPMHOOK_pre_sockt_datasync) (int *fd, bool *send); +typedef void (*HPMHOOK_post_sockt_datasync) (int fd, bool send); +typedef int (*HPMHOOK_pre_sockt_make_listen_bind) (uint32 *ip, uint16 *port); +typedef int (*HPMHOOK_post_sockt_make_listen_bind) (int retVal___, uint32 ip, uint16 port); +typedef int (*HPMHOOK_pre_sockt_make_connection) (uint32 *ip, uint16 *port, struct hSockOpt **opt); +typedef int (*HPMHOOK_post_sockt_make_connection) (int retVal___, uint32 ip, uint16 port, struct hSockOpt *opt); +typedef int (*HPMHOOK_pre_sockt_realloc_fifo) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); +typedef int (*HPMHOOK_post_sockt_realloc_fifo) (int retVal___, int fd, unsigned int rfifo_size, unsigned int wfifo_size); +typedef int (*HPMHOOK_pre_sockt_realloc_writefifo) (int *fd, size_t *addition); +typedef int (*HPMHOOK_post_sockt_realloc_writefifo) (int retVal___, int fd, size_t addition); +typedef int (*HPMHOOK_pre_sockt_wfifoset) (int *fd, size_t *len, bool *validate); +typedef int (*HPMHOOK_post_sockt_wfifoset) (int retVal___, int fd, size_t len, bool validate); +typedef void (*HPMHOOK_pre_sockt_wfifohead) (int *fd, size_t *len); +typedef void (*HPMHOOK_post_sockt_wfifohead) (int fd, size_t len); +typedef int (*HPMHOOK_pre_sockt_rfifoskip) (int *fd, size_t *len); +typedef int (*HPMHOOK_post_sockt_rfifoskip) (int retVal___, int fd, size_t len); +typedef void (*HPMHOOK_pre_sockt_close) (int *fd); +typedef void (*HPMHOOK_post_sockt_close) (int fd); +typedef void (*HPMHOOK_pre_sockt_validateWfifo) (int *fd, size_t *len); +typedef void (*HPMHOOK_post_sockt_validateWfifo) (int fd, size_t len); +typedef bool (*HPMHOOK_pre_sockt_session_is_valid) (int *fd); +typedef bool (*HPMHOOK_post_sockt_session_is_valid) (bool retVal___, int fd); +typedef bool (*HPMHOOK_pre_sockt_session_is_active) (int *fd); +typedef bool (*HPMHOOK_post_sockt_session_is_active) (bool retVal___, int fd); +typedef void (*HPMHOOK_pre_sockt_flush) (int *fd); +typedef void (*HPMHOOK_post_sockt_flush) (int fd); +typedef void (*HPMHOOK_pre_sockt_flush_fifos) (void); +typedef void (*HPMHOOK_post_sockt_flush_fifos) (void); +typedef int (*HPMHOOK_pre_sockt_connect_client) (int *listen_fd); +typedef int (*HPMHOOK_post_sockt_connect_client) (int retVal___, int listen_fd); +typedef void (*HPMHOOK_pre_sockt_set_nonblocking) (int *fd, unsigned long *yes); +typedef void (*HPMHOOK_post_sockt_set_nonblocking) (int fd, unsigned long yes); +typedef void (*HPMHOOK_pre_sockt_set_defaultparse) (ParseFunc *defaultparse); +typedef void (*HPMHOOK_post_sockt_set_defaultparse) (ParseFunc defaultparse); +typedef uint32 (*HPMHOOK_pre_sockt_host2ip) (const char **hostname); +typedef uint32 (*HPMHOOK_post_sockt_host2ip) (uint32 retVal___, const char *hostname); +typedef const char* (*HPMHOOK_pre_sockt_ip2str) (uint32 *ip, char **ip_str); +typedef const char* (*HPMHOOK_post_sockt_ip2str) (const char* retVal___, uint32 ip, char *ip_str); +typedef uint32 (*HPMHOOK_pre_sockt_str2ip) (const char **ip_str); +typedef uint32 (*HPMHOOK_post_sockt_str2ip) (uint32 retVal___, const char *ip_str); +typedef uint16 (*HPMHOOK_pre_sockt_ntows) (uint16 *netshort); +typedef uint16 (*HPMHOOK_post_sockt_ntows) (uint16 retVal___, uint16 netshort); +typedef int (*HPMHOOK_pre_sockt_getips) (uint32 **ips, int *max); +typedef int (*HPMHOOK_post_sockt_getips) (int retVal___, uint32 *ips, int max); +typedef void (*HPMHOOK_pre_sockt_eof) (int *fd); +typedef void (*HPMHOOK_post_sockt_eof) (int fd); +typedef uint32 (*HPMHOOK_pre_sockt_lan_subnet_check) (uint32 *ip, struct s_subnet **info); +typedef uint32 (*HPMHOOK_post_sockt_lan_subnet_check) (uint32 retVal___, uint32 ip, struct s_subnet *info); +typedef bool (*HPMHOOK_pre_sockt_allowed_ip_check) (uint32 *ip); +typedef bool (*HPMHOOK_post_sockt_allowed_ip_check) (bool retVal___, uint32 ip); +typedef bool (*HPMHOOK_pre_sockt_trusted_ip_check) (uint32 *ip); +typedef bool (*HPMHOOK_post_sockt_trusted_ip_check) (bool retVal___, uint32 ip); +typedef int (*HPMHOOK_pre_sockt_net_config_read_sub) (struct config_setting_t **t, struct s_subnet_vector **list, const char **filename, const char **groupname); +typedef int (*HPMHOOK_post_sockt_net_config_read_sub) (int retVal___, struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname); +typedef void (*HPMHOOK_pre_sockt_net_config_read) (const char **filename); +typedef void (*HPMHOOK_post_sockt_net_config_read) (const char *filename); +#endif // COMMON_SOCKET_H +#ifdef COMMON_SQL_H /* SQL */ +typedef int (*HPMHOOK_pre_SQL_Connect) (struct Sql **self, const char **user, const char **passwd, const char **host, uint16 *port, const char **db); +typedef int (*HPMHOOK_post_SQL_Connect) (int retVal___, struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db); +typedef int (*HPMHOOK_pre_SQL_GetTimeout) (struct Sql **self, uint32 **out_timeout); +typedef int (*HPMHOOK_post_SQL_GetTimeout) (int retVal___, struct Sql *self, uint32 *out_timeout); +typedef int (*HPMHOOK_pre_SQL_GetColumnNames) (struct Sql **self, const char **table, char **out_buf, size_t *buf_len, char *sep); +typedef int (*HPMHOOK_post_SQL_GetColumnNames) (int retVal___, struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep); +typedef int (*HPMHOOK_pre_SQL_SetEncoding) (struct Sql **self, const char **encoding); +typedef int (*HPMHOOK_post_SQL_SetEncoding) (int retVal___, struct Sql *self, const char *encoding); +typedef int (*HPMHOOK_pre_SQL_Ping) (struct Sql **self); +typedef int (*HPMHOOK_post_SQL_Ping) (int retVal___, struct Sql *self); +typedef size_t (*HPMHOOK_pre_SQL_EscapeString) (struct Sql **self, char **out_to, const char **from); +typedef size_t (*HPMHOOK_post_SQL_EscapeString) (size_t retVal___, struct Sql *self, char *out_to, const char *from); +typedef size_t (*HPMHOOK_pre_SQL_EscapeStringLen) (struct Sql **self, char **out_to, const char **from, size_t *from_len); +typedef size_t (*HPMHOOK_post_SQL_EscapeStringLen) (size_t retVal___, struct Sql *self, char *out_to, const char *from, size_t from_len); +typedef int (*HPMHOOK_pre_SQL_QueryV) (struct Sql **self, const char **query, va_list args); +typedef int (*HPMHOOK_post_SQL_QueryV) (int retVal___, struct Sql *self, const char *query, va_list args); +typedef int (*HPMHOOK_pre_SQL_QueryStr) (struct Sql **self, const char **query); +typedef int (*HPMHOOK_post_SQL_QueryStr) (int retVal___, struct Sql *self, const char *query); +typedef uint64 (*HPMHOOK_pre_SQL_LastInsertId) (struct Sql **self); +typedef uint64 (*HPMHOOK_post_SQL_LastInsertId) (uint64 retVal___, struct Sql *self); +typedef uint32 (*HPMHOOK_pre_SQL_NumColumns) (struct Sql **self); +typedef uint32 (*HPMHOOK_post_SQL_NumColumns) (uint32 retVal___, struct Sql *self); +typedef uint64 (*HPMHOOK_pre_SQL_NumRows) (struct Sql **self); +typedef uint64 (*HPMHOOK_post_SQL_NumRows) (uint64 retVal___, struct Sql *self); +typedef int (*HPMHOOK_pre_SQL_NextRow) (struct Sql **self); +typedef int (*HPMHOOK_post_SQL_NextRow) (int retVal___, struct Sql *self); +typedef int (*HPMHOOK_pre_SQL_GetData) (struct Sql **self, size_t *col, char ***out_buf, size_t **out_len); +typedef int (*HPMHOOK_post_SQL_GetData) (int retVal___, struct Sql *self, size_t col, char **out_buf, size_t *out_len); +typedef void (*HPMHOOK_pre_SQL_FreeResult) (struct Sql **self); +typedef void (*HPMHOOK_post_SQL_FreeResult) (struct Sql *self); +typedef void (*HPMHOOK_pre_SQL_ShowDebug_) (struct Sql **self, const char **debug_file, const unsigned long *debug_line); +typedef void (*HPMHOOK_post_SQL_ShowDebug_) (struct Sql *self, const char *debug_file, const unsigned long debug_line); +typedef void (*HPMHOOK_pre_SQL_Free) (struct Sql **self); +typedef void (*HPMHOOK_post_SQL_Free) (struct Sql *self); +typedef struct Sql* (*HPMHOOK_pre_SQL_Malloc) (void); +typedef struct Sql* (*HPMHOOK_post_SQL_Malloc) (struct Sql* retVal___); +typedef struct SqlStmt* (*HPMHOOK_pre_SQL_StmtMalloc) (struct Sql **sql); +typedef struct SqlStmt* (*HPMHOOK_post_SQL_StmtMalloc) (struct SqlStmt* retVal___, struct Sql *sql); +typedef int (*HPMHOOK_pre_SQL_StmtPrepareV) (struct SqlStmt **self, const char **query, va_list args); +typedef int (*HPMHOOK_post_SQL_StmtPrepareV) (int retVal___, struct SqlStmt *self, const char *query, va_list args); +typedef int (*HPMHOOK_pre_SQL_StmtPrepareStr) (struct SqlStmt **self, const char **query); +typedef int (*HPMHOOK_post_SQL_StmtPrepareStr) (int retVal___, struct SqlStmt *self, const char *query); +typedef size_t (*HPMHOOK_pre_SQL_StmtNumParams) (struct SqlStmt **self); +typedef size_t (*HPMHOOK_post_SQL_StmtNumParams) (size_t retVal___, struct SqlStmt *self); +typedef int (*HPMHOOK_pre_SQL_StmtBindParam) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, const void **buffer, size_t *buffer_len); +typedef int (*HPMHOOK_post_SQL_StmtBindParam) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len); +typedef int (*HPMHOOK_pre_SQL_StmtExecute) (struct SqlStmt **self); +typedef int (*HPMHOOK_post_SQL_StmtExecute) (int retVal___, struct SqlStmt *self); +typedef uint64 (*HPMHOOK_pre_SQL_StmtLastInsertId) (struct SqlStmt **self); +typedef uint64 (*HPMHOOK_post_SQL_StmtLastInsertId) (uint64 retVal___, struct SqlStmt *self); +typedef size_t (*HPMHOOK_pre_SQL_StmtNumColumns) (struct SqlStmt **self); +typedef size_t (*HPMHOOK_post_SQL_StmtNumColumns) (size_t retVal___, struct SqlStmt *self); +typedef int (*HPMHOOK_pre_SQL_StmtBindColumn) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, void **buffer, size_t *buffer_len, uint32 **out_length, int8 **out_is_null); +typedef int (*HPMHOOK_post_SQL_StmtBindColumn) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null); +typedef uint64 (*HPMHOOK_pre_SQL_StmtNumRows) (struct SqlStmt **self); +typedef uint64 (*HPMHOOK_post_SQL_StmtNumRows) (uint64 retVal___, struct SqlStmt *self); +typedef int (*HPMHOOK_pre_SQL_StmtNextRow) (struct SqlStmt **self); +typedef int (*HPMHOOK_post_SQL_StmtNextRow) (int retVal___, struct SqlStmt *self); +typedef void (*HPMHOOK_pre_SQL_StmtFreeResult) (struct SqlStmt **self); +typedef void (*HPMHOOK_post_SQL_StmtFreeResult) (struct SqlStmt *self); +typedef void (*HPMHOOK_pre_SQL_StmtFree) (struct SqlStmt **self); +typedef void (*HPMHOOK_post_SQL_StmtFree) (struct SqlStmt *self); +typedef void (*HPMHOOK_pre_SQL_StmtShowDebug_) (struct SqlStmt **self, const char **debug_file, const unsigned long *debug_line); +typedef void (*HPMHOOK_post_SQL_StmtShowDebug_) (struct SqlStmt *self, const char *debug_file, const unsigned long debug_line); +#endif // COMMON_SQL_H +#ifdef MAP_STATUS_H /* status */ +typedef int (*HPMHOOK_pre_status_init) (bool *minimal); +typedef int (*HPMHOOK_post_status_init) (int retVal___, bool minimal); +typedef void (*HPMHOOK_pre_status_final) (void); +typedef void (*HPMHOOK_post_status_final) (void); +typedef sc_type (*HPMHOOK_pre_status_skill2sc) (int *skill_id); +typedef sc_type (*HPMHOOK_post_status_skill2sc) (sc_type retVal___, int skill_id); +typedef int (*HPMHOOK_pre_status_sc2skill) (sc_type *sc); +typedef int (*HPMHOOK_post_status_sc2skill) (int retVal___, sc_type sc); +typedef unsigned int (*HPMHOOK_pre_status_sc2scb_flag) (sc_type *sc); +typedef unsigned int (*HPMHOOK_post_status_sc2scb_flag) (unsigned int retVal___, sc_type sc); +typedef int (*HPMHOOK_pre_status_get_sc_relevant_bl_types) (sc_type *type); +typedef int (*HPMHOOK_post_status_get_sc_relevant_bl_types) (int retVal___, sc_type type); +typedef int (*HPMHOOK_pre_status_get_sc_type) (sc_type *idx); +typedef int (*HPMHOOK_post_status_get_sc_type) (int retVal___, sc_type idx); +typedef int (*HPMHOOK_pre_status_get_sc_icon) (sc_type *type); +typedef int (*HPMHOOK_post_status_get_sc_icon) (int retVal___, sc_type type); +typedef int (*HPMHOOK_pre_status_damage) (struct block_list **src, struct block_list **target, int64 *hp, int64 *sp, int *walkdelay, int *flag); +typedef int (*HPMHOOK_post_status_damage) (int retVal___, struct block_list *src, struct block_list *target, int64 hp, int64 sp, int walkdelay, int flag); +typedef int (*HPMHOOK_pre_status_charge) (struct block_list **bl, int64 *hp, int64 *sp); +typedef int (*HPMHOOK_post_status_charge) (int retVal___, struct block_list *bl, int64 hp, int64 sp); +typedef int (*HPMHOOK_pre_status_percent_change) (struct block_list **src, struct block_list **target, signed char *hp_rate, signed char *sp_rate, int *flag); +typedef int (*HPMHOOK_post_status_percent_change) (int retVal___, struct block_list *src, struct block_list *target, signed char hp_rate, signed char sp_rate, int flag); +typedef int (*HPMHOOK_pre_status_set_hp) (struct block_list **bl, unsigned int *hp, enum status_heal_flag *flag); +typedef int (*HPMHOOK_post_status_set_hp) (int retVal___, struct block_list *bl, unsigned int hp, enum status_heal_flag flag); +typedef int (*HPMHOOK_pre_status_set_sp) (struct block_list **bl, unsigned int *sp, enum status_heal_flag *flag); +typedef int (*HPMHOOK_post_status_set_sp) (int retVal___, struct block_list *bl, unsigned int sp, enum status_heal_flag flag); +typedef int (*HPMHOOK_pre_status_heal) (struct block_list **bl, int64 *hp, int64 *sp, enum status_heal_flag *flag); +typedef int (*HPMHOOK_post_status_heal) (int retVal___, struct block_list *bl, int64 hp, int64 sp, enum status_heal_flag flag); +typedef int (*HPMHOOK_pre_status_revive) (struct block_list **bl, unsigned char *per_hp, unsigned char *per_sp); +typedef int (*HPMHOOK_post_status_revive) (int retVal___, struct block_list *bl, unsigned char per_hp, unsigned char per_sp); +typedef int (*HPMHOOK_pre_status_fixed_revive) (struct block_list **bl, unsigned int *per_hp, unsigned int *per_sp); +typedef int (*HPMHOOK_post_status_fixed_revive) (int retVal___, struct block_list *bl, unsigned int per_hp, unsigned int per_sp); +typedef struct regen_data* (*HPMHOOK_pre_status_get_regen_data) (struct block_list **bl); +typedef struct regen_data* (*HPMHOOK_post_status_get_regen_data) (struct regen_data* retVal___, struct block_list *bl); +typedef struct status_data* (*HPMHOOK_pre_status_get_status_data) (struct block_list **bl); +typedef struct status_data* (*HPMHOOK_post_status_get_status_data) (struct status_data* retVal___, struct block_list *bl); +typedef struct status_data* (*HPMHOOK_pre_status_get_base_status) (struct block_list **bl); +typedef struct status_data* (*HPMHOOK_post_status_get_base_status) (struct status_data* retVal___, struct block_list *bl); +typedef const char* (*HPMHOOK_pre_status_get_name) (const struct block_list **bl); +typedef const char* (*HPMHOOK_post_status_get_name) (const char* retVal___, const struct block_list *bl); +typedef int (*HPMHOOK_pre_status_get_class) (const struct block_list **bl); +typedef int (*HPMHOOK_post_status_get_class) (int retVal___, const struct block_list *bl); +typedef int (*HPMHOOK_pre_status_get_lv) (const struct block_list **bl); +typedef int (*HPMHOOK_post_status_get_lv) (int retVal___, const struct block_list *bl); +typedef defType (*HPMHOOK_pre_status_get_def) (struct block_list **bl); +typedef defType (*HPMHOOK_post_status_get_def) (defType retVal___, struct block_list *bl); +typedef unsigned short (*HPMHOOK_pre_status_get_speed) (struct block_list **bl); +typedef unsigned short (*HPMHOOK_post_status_get_speed) (unsigned short retVal___, struct block_list *bl); +typedef unsigned char (*HPMHOOK_pre_status_calc_attack_element) (struct block_list **bl, struct status_change **sc, int *element); +typedef unsigned char (*HPMHOOK_post_status_calc_attack_element) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int element); +typedef int (*HPMHOOK_pre_status_get_party_id) (const struct block_list **bl); +typedef int (*HPMHOOK_post_status_get_party_id) (int retVal___, const struct block_list *bl); +typedef int (*HPMHOOK_pre_status_get_guild_id) (const struct block_list **bl); +typedef int (*HPMHOOK_post_status_get_guild_id) (int retVal___, const struct block_list *bl); +typedef int (*HPMHOOK_pre_status_get_emblem_id) (const struct block_list **bl); +typedef int (*HPMHOOK_post_status_get_emblem_id) (int retVal___, const struct block_list *bl); +typedef int (*HPMHOOK_pre_status_get_mexp) (const struct block_list **bl); +typedef int (*HPMHOOK_post_status_get_mexp) (int retVal___, const struct block_list *bl); +typedef int (*HPMHOOK_pre_status_get_race2) (const struct block_list **bl); +typedef int (*HPMHOOK_post_status_get_race2) (int retVal___, const struct block_list *bl); +typedef struct view_data* (*HPMHOOK_pre_status_get_viewdata) (struct block_list **bl); +typedef struct view_data* (*HPMHOOK_post_status_get_viewdata) (struct view_data* retVal___, struct block_list *bl); +typedef void (*HPMHOOK_pre_status_set_viewdata) (struct block_list **bl, int *class_); +typedef void (*HPMHOOK_post_status_set_viewdata) (struct block_list *bl, int class_); +typedef void (*HPMHOOK_pre_status_change_init) (struct block_list **bl); +typedef void (*HPMHOOK_post_status_change_init) (struct block_list *bl); +typedef struct status_change* (*HPMHOOK_pre_status_get_sc) (struct block_list **bl); +typedef struct status_change* (*HPMHOOK_post_status_get_sc) (struct status_change* retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_status_isdead) (struct block_list **bl); +typedef int (*HPMHOOK_post_status_isdead) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_status_isimmune) (struct block_list **bl); +typedef int (*HPMHOOK_post_status_isimmune) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_status_get_sc_def) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *rate, int *tick, int *flag); +typedef int (*HPMHOOK_post_status_get_sc_def) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int tick, int flag); +typedef int (*HPMHOOK_pre_status_change_start) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); +typedef int (*HPMHOOK_post_status_change_start) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int flag); +typedef int (*HPMHOOK_pre_status_change_start_sub) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *total_tick, int *flag); +typedef int (*HPMHOOK_post_status_change_start_sub) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int total_tick, int flag); +typedef int (*HPMHOOK_pre_status_change_end_) (struct block_list **bl, enum sc_type *type, int *tid, const char **file, int *line); +typedef int (*HPMHOOK_post_status_change_end_) (int retVal___, struct block_list *bl, enum sc_type type, int tid, const char *file, int line); +typedef bool (*HPMHOOK_pre_status_is_immune_to_status) (struct status_change **sc, enum sc_type *type); +typedef bool (*HPMHOOK_post_status_is_immune_to_status) (bool retVal___, struct status_change *sc, enum sc_type type); +typedef bool (*HPMHOOK_pre_status_is_boss_resist_sc) (enum sc_type *type); +typedef bool (*HPMHOOK_post_status_is_boss_resist_sc) (bool retVal___, enum sc_type type); +typedef bool (*HPMHOOK_pre_status_end_sc_before_start) (struct block_list **bl, struct status_data **st, struct status_change **sc, enum sc_type *type, int *undead_flag, int *val1, int *val2, int *val3, int *val4); +typedef bool (*HPMHOOK_post_status_end_sc_before_start) (bool retVal___, struct block_list *bl, struct status_data *st, struct status_change *sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4); +typedef void (*HPMHOOK_pre_status_change_start_stop_action) (struct block_list **bl, enum sc_type *type); +typedef void (*HPMHOOK_post_status_change_start_stop_action) (struct block_list *bl, enum sc_type type); +typedef int (*HPMHOOK_pre_status_change_start_set_option) (struct block_list **bl, struct status_change **sc, enum sc_type *type, int *val1, int *val2, int *val3, int *val4); +typedef int (*HPMHOOK_post_status_change_start_set_option) (int retVal___, struct block_list *bl, struct status_change *sc, enum sc_type type, int val1, int val2, int val3, int val4); +typedef int (*HPMHOOK_pre_status_get_val_flag) (enum sc_type *type); +typedef int (*HPMHOOK_post_status_get_val_flag) (int retVal___, enum sc_type type); +typedef void (*HPMHOOK_pre_status_change_start_display) (struct map_session_data **sd, enum sc_type *type, int *val1, int *val2, int *val3, int *val4); +typedef void (*HPMHOOK_post_status_change_start_display) (struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4); +typedef bool (*HPMHOOK_pre_status_change_start_unknown_sc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *total_tick, int *flag); +typedef bool (*HPMHOOK_post_status_change_start_unknown_sc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag); +typedef int (*HPMHOOK_pre_status_kaahi_heal_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_status_kaahi_heal_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_status_change_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_status_change_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_status_change_timer_sub) (struct block_list **bl, va_list ap); +typedef int (*HPMHOOK_post_status_change_timer_sub) (int retVal___, struct block_list *bl, va_list ap); +typedef int (*HPMHOOK_pre_status_change_clear) (struct block_list **bl, int *type); +typedef int (*HPMHOOK_post_status_change_clear) (int retVal___, struct block_list *bl, int type); +typedef int (*HPMHOOK_pre_status_change_clear_buffs) (struct block_list **bl, int *type); +typedef int (*HPMHOOK_post_status_change_clear_buffs) (int retVal___, struct block_list *bl, int type); +typedef void (*HPMHOOK_pre_status_calc_bl_) (struct block_list **bl, enum scb_flag *flag, enum e_status_calc_opt *opt); +typedef void (*HPMHOOK_post_status_calc_bl_) (struct block_list *bl, enum scb_flag flag, enum e_status_calc_opt opt); +typedef int (*HPMHOOK_pre_status_calc_mob_) (struct mob_data **md, enum e_status_calc_opt *opt); +typedef int (*HPMHOOK_post_status_calc_mob_) (int retVal___, struct mob_data *md, enum e_status_calc_opt opt); +typedef int (*HPMHOOK_pre_status_calc_pet_) (struct pet_data **pd, enum e_status_calc_opt *opt); +typedef int (*HPMHOOK_post_status_calc_pet_) (int retVal___, struct pet_data *pd, enum e_status_calc_opt opt); +typedef int (*HPMHOOK_pre_status_calc_pc_) (struct map_session_data **sd, enum e_status_calc_opt *opt); +typedef int (*HPMHOOK_post_status_calc_pc_) (int retVal___, struct map_session_data *sd, enum e_status_calc_opt opt); +typedef void (*HPMHOOK_pre_status_calc_pc_additional) (struct map_session_data **sd, enum e_status_calc_opt *opt); +typedef void (*HPMHOOK_post_status_calc_pc_additional) (struct map_session_data *sd, enum e_status_calc_opt opt); +typedef void (*HPMHOOK_pre_status_calc_pc_recover_hp) (struct map_session_data **sd, struct status_data **bstatus); +typedef void (*HPMHOOK_post_status_calc_pc_recover_hp) (struct map_session_data *sd, struct status_data *bstatus); +typedef int (*HPMHOOK_pre_status_calc_homunculus_) (struct homun_data **hd, enum e_status_calc_opt *opt); +typedef int (*HPMHOOK_post_status_calc_homunculus_) (int retVal___, struct homun_data *hd, enum e_status_calc_opt opt); +typedef int (*HPMHOOK_pre_status_calc_mercenary_) (struct mercenary_data **md, enum e_status_calc_opt *opt); +typedef int (*HPMHOOK_post_status_calc_mercenary_) (int retVal___, struct mercenary_data *md, enum e_status_calc_opt opt); +typedef int (*HPMHOOK_pre_status_calc_elemental_) (struct elemental_data **ed, enum e_status_calc_opt *opt); +typedef int (*HPMHOOK_post_status_calc_elemental_) (int retVal___, struct elemental_data *ed, enum e_status_calc_opt opt); +typedef void (*HPMHOOK_pre_status_calc_misc) (struct block_list **bl, struct status_data **st, int *level); +typedef void (*HPMHOOK_post_status_calc_misc) (struct block_list *bl, struct status_data *st, int level); +typedef void (*HPMHOOK_pre_status_calc_regen) (struct block_list **bl, struct status_data **st, struct regen_data **regen); +typedef void (*HPMHOOK_post_status_calc_regen) (struct block_list *bl, struct status_data *st, struct regen_data *regen); +typedef void (*HPMHOOK_pre_status_calc_regen_rate) (struct block_list **bl, struct regen_data **regen, struct status_change **sc); +typedef void (*HPMHOOK_post_status_calc_regen_rate) (struct block_list *bl, struct regen_data *regen, struct status_change *sc); +typedef int (*HPMHOOK_pre_status_check_skilluse) (struct block_list **src, struct block_list **target, uint16 *skill_id, int *flag); +typedef int (*HPMHOOK_post_status_check_skilluse) (int retVal___, struct block_list *src, struct block_list *target, uint16 skill_id, int flag); +typedef int (*HPMHOOK_pre_status_check_visibility) (struct block_list **src, struct block_list **target); +typedef int (*HPMHOOK_post_status_check_visibility) (int retVal___, struct block_list *src, struct block_list *target); +typedef int (*HPMHOOK_pre_status_change_spread) (struct block_list **src, struct block_list **bl); +typedef int (*HPMHOOK_post_status_change_spread) (int retVal___, struct block_list *src, struct block_list *bl); +typedef defType (*HPMHOOK_pre_status_calc_def) (struct block_list **bl, struct status_change **sc, int *def, bool *viewable); +typedef defType (*HPMHOOK_post_status_calc_def) (defType retVal___, struct block_list *bl, struct status_change *sc, int def, bool viewable); +typedef short (*HPMHOOK_pre_status_calc_def2) (struct block_list **bl, struct status_change **sc, int *def2, bool *viewable); +typedef short (*HPMHOOK_post_status_calc_def2) (short retVal___, struct block_list *bl, struct status_change *sc, int def2, bool viewable); +typedef defType (*HPMHOOK_pre_status_calc_mdef) (struct block_list **bl, struct status_change **sc, int *mdef, bool *viewable); +typedef defType (*HPMHOOK_post_status_calc_mdef) (defType retVal___, struct block_list *bl, struct status_change *sc, int mdef, bool viewable); +typedef short (*HPMHOOK_pre_status_calc_mdef2) (struct block_list **bl, struct status_change **sc, int *mdef2, bool *viewable); +typedef short (*HPMHOOK_post_status_calc_mdef2) (short retVal___, struct block_list *bl, struct status_change *sc, int mdef2, bool viewable); +typedef int (*HPMHOOK_pre_status_calc_batk) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); +typedef int (*HPMHOOK_post_status_calc_batk) (int retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable); +typedef int (*HPMHOOK_pre_status_base_matk) (struct block_list **bl, const struct status_data **st, int *level); +typedef int (*HPMHOOK_post_status_base_matk) (int retVal___, struct block_list *bl, const struct status_data *st, int level); +typedef int (*HPMHOOK_pre_status_get_weapon_atk) (struct block_list **src, struct weapon_atk **watk, int *flag); +typedef int (*HPMHOOK_post_status_get_weapon_atk) (int retVal___, struct block_list *src, struct weapon_atk *watk, int flag); +typedef int (*HPMHOOK_pre_status_get_total_mdef) (struct block_list **src); +typedef int (*HPMHOOK_post_status_get_total_mdef) (int retVal___, struct block_list *src); +typedef int (*HPMHOOK_pre_status_get_total_def) (struct block_list **src); +typedef int (*HPMHOOK_post_status_get_total_def) (int retVal___, struct block_list *src); +typedef int (*HPMHOOK_pre_status_get_matk) (struct block_list **src, int *flag); +typedef int (*HPMHOOK_post_status_get_matk) (int retVal___, struct block_list *src, int flag); +typedef void (*HPMHOOK_pre_status_update_matk) (struct block_list **bl); +typedef void (*HPMHOOK_post_status_update_matk) (struct block_list *bl); +typedef int (*HPMHOOK_pre_status_readdb) (void); +typedef int (*HPMHOOK_post_status_readdb) (int retVal___); +typedef void (*HPMHOOK_pre_status_initChangeTables) (void); +typedef void (*HPMHOOK_post_status_initChangeTables) (void); +typedef void (*HPMHOOK_pre_status_initDummyData) (void); +typedef void (*HPMHOOK_post_status_initDummyData) (void); +typedef int (*HPMHOOK_pre_status_base_amotion_pc) (struct map_session_data **sd, struct status_data **st); +typedef int (*HPMHOOK_post_status_base_amotion_pc) (int retVal___, struct map_session_data *sd, struct status_data *st); +typedef int (*HPMHOOK_pre_status_base_atk) (const struct block_list **bl, const struct status_data **st); +typedef int (*HPMHOOK_post_status_base_atk) (int retVal___, const struct block_list *bl, const struct status_data *st); +typedef unsigned int (*HPMHOOK_pre_status_get_base_maxhp) (const struct map_session_data **sd, const struct status_data **st); +typedef unsigned int (*HPMHOOK_post_status_get_base_maxhp) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); +typedef unsigned int (*HPMHOOK_pre_status_get_base_maxsp) (const struct map_session_data **sd, const struct status_data **st); +typedef unsigned int (*HPMHOOK_post_status_get_base_maxsp) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); +typedef unsigned int (*HPMHOOK_pre_status_get_restart_hp) (const struct map_session_data **sd, const struct status_data **st); +typedef unsigned int (*HPMHOOK_post_status_get_restart_hp) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); +typedef unsigned int (*HPMHOOK_pre_status_get_restart_sp) (const struct map_session_data **sd, const struct status_data **st); +typedef unsigned int (*HPMHOOK_post_status_get_restart_sp) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); +typedef int (*HPMHOOK_pre_status_calc_npc_) (struct npc_data **nd, enum e_status_calc_opt *opt); +typedef int (*HPMHOOK_post_status_calc_npc_) (int retVal___, struct npc_data *nd, enum e_status_calc_opt opt); +typedef unsigned short (*HPMHOOK_pre_status_calc_str) (struct block_list **bl, struct status_change **sc, int *str); +typedef unsigned short (*HPMHOOK_post_status_calc_str) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int str); +typedef unsigned short (*HPMHOOK_pre_status_calc_agi) (struct block_list **bl, struct status_change **sc, int *agi); +typedef unsigned short (*HPMHOOK_post_status_calc_agi) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int agi); +typedef unsigned short (*HPMHOOK_pre_status_calc_vit) (struct block_list **bl, struct status_change **sc, int *vit); +typedef unsigned short (*HPMHOOK_post_status_calc_vit) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int vit); +typedef unsigned short (*HPMHOOK_pre_status_calc_int) (struct block_list **bl, struct status_change **sc, int *int_); +typedef unsigned short (*HPMHOOK_post_status_calc_int) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int int_); +typedef unsigned short (*HPMHOOK_pre_status_calc_dex) (struct block_list **bl, struct status_change **sc, int *dex); +typedef unsigned short (*HPMHOOK_post_status_calc_dex) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int dex); +typedef unsigned short (*HPMHOOK_pre_status_calc_luk) (struct block_list **bl, struct status_change **sc, int *luk); +typedef unsigned short (*HPMHOOK_post_status_calc_luk) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int luk); +typedef int (*HPMHOOK_pre_status_calc_watk) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable); +typedef int (*HPMHOOK_post_status_calc_watk) (int retVal___, struct block_list *bl, struct status_change *sc, int watk, bool viewable); +typedef int (*HPMHOOK_pre_status_calc_matk) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable); +typedef int (*HPMHOOK_post_status_calc_matk) (int retVal___, struct block_list *bl, struct status_change *sc, int matk, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_hit) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_hit) (signed int retVal___, struct block_list *bl, struct status_change *sc, int hit, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_critical) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_critical) (signed int retVal___, struct block_list *bl, struct status_change *sc, int critical, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_flee) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_flee) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee, bool viewable); +typedef signed int (*HPMHOOK_pre_status_calc_flee2) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable); +typedef signed int (*HPMHOOK_post_status_calc_flee2) (signed int retVal___, struct block_list *bl, struct status_change *sc, int flee2, bool viewable); +typedef unsigned short (*HPMHOOK_pre_status_calc_speed) (struct block_list **bl, struct status_change **sc, int *speed); +typedef unsigned short (*HPMHOOK_post_status_calc_speed) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int speed); +typedef short (*HPMHOOK_pre_status_calc_aspd_rate) (struct block_list **bl, struct status_change **sc, int *aspd_rate); +typedef short (*HPMHOOK_post_status_calc_aspd_rate) (short retVal___, struct block_list *bl, struct status_change *sc, int aspd_rate); +typedef unsigned short (*HPMHOOK_pre_status_calc_dmotion) (struct block_list **bl, struct status_change **sc, int *dmotion); +typedef unsigned short (*HPMHOOK_post_status_calc_dmotion) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int dmotion); +typedef short (*HPMHOOK_pre_status_calc_aspd) (struct block_list **bl, struct status_change **sc, short *flag); +typedef short (*HPMHOOK_post_status_calc_aspd) (short retVal___, struct block_list *bl, struct status_change *sc, short flag); +typedef short (*HPMHOOK_pre_status_calc_fix_aspd) (struct block_list **bl, struct status_change **sc, int *aspd); +typedef short (*HPMHOOK_post_status_calc_fix_aspd) (short retVal___, struct block_list *bl, struct status_change *sc, int aspd); +typedef unsigned int (*HPMHOOK_pre_status_calc_maxhp) (struct block_list **bl, struct status_change **sc, uint64 *maxhp); +typedef unsigned int (*HPMHOOK_post_status_calc_maxhp) (unsigned int retVal___, struct block_list *bl, struct status_change *sc, uint64 maxhp); +typedef unsigned int (*HPMHOOK_pre_status_calc_maxsp) (struct block_list **bl, struct status_change **sc, unsigned int *maxsp); +typedef unsigned int (*HPMHOOK_post_status_calc_maxsp) (unsigned int retVal___, struct block_list *bl, struct status_change *sc, unsigned int maxsp); +typedef unsigned char (*HPMHOOK_pre_status_calc_element) (struct block_list **bl, struct status_change **sc, int *element); +typedef unsigned char (*HPMHOOK_post_status_calc_element) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int element); +typedef unsigned char (*HPMHOOK_pre_status_calc_element_lv) (struct block_list **bl, struct status_change **sc, int *lv); +typedef unsigned char (*HPMHOOK_post_status_calc_element_lv) (unsigned char retVal___, struct block_list *bl, struct status_change *sc, int lv); +typedef uint32 (*HPMHOOK_pre_status_calc_mode) (const struct block_list **bl, const struct status_change **sc, uint32 *mode); +typedef uint32 (*HPMHOOK_post_status_calc_mode) (uint32 retVal___, const struct block_list *bl, const struct status_change *sc, uint32 mode); +typedef int (*HPMHOOK_pre_status_calc_ematk) (struct block_list **bl, struct status_change **sc, int *matk); +typedef int (*HPMHOOK_post_status_calc_ematk) (int retVal___, struct block_list *bl, struct status_change *sc, int matk); +typedef void (*HPMHOOK_pre_status_calc_bl_main) (struct block_list **bl, int *flag); +typedef void (*HPMHOOK_post_status_calc_bl_main) (struct block_list *bl, int flag); +typedef void (*HPMHOOK_pre_status_display_add) (struct map_session_data **sd, enum sc_type *type, int *dval1, int *dval2, int *dval3); +typedef void (*HPMHOOK_post_status_display_add) (struct map_session_data *sd, enum sc_type type, int dval1, int dval2, int dval3); +typedef void (*HPMHOOK_pre_status_display_remove) (struct map_session_data **sd, enum sc_type *type); +typedef void (*HPMHOOK_post_status_display_remove) (struct map_session_data *sd, enum sc_type type); +typedef int (*HPMHOOK_pre_status_natural_heal) (struct block_list **bl, va_list args); +typedef int (*HPMHOOK_post_status_natural_heal) (int retVal___, struct block_list *bl, va_list args); +typedef int (*HPMHOOK_pre_status_natural_heal_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_status_natural_heal_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef bool (*HPMHOOK_pre_status_readdb_job2) (char **fields[], int *columns, int *current); +typedef bool (*HPMHOOK_post_status_readdb_job2) (bool retVal___, char *fields[], int columns, int current); +typedef bool (*HPMHOOK_pre_status_readdb_sizefix) (char **fields[], int *columns, int *current); +typedef bool (*HPMHOOK_post_status_readdb_sizefix) (bool retVal___, char *fields[], int columns, int current); +typedef bool (*HPMHOOK_pre_status_read_scdb_libconfig) (void); +typedef bool (*HPMHOOK_post_status_read_scdb_libconfig) (bool retVal___); +typedef bool (*HPMHOOK_pre_status_read_scdb_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source); +typedef bool (*HPMHOOK_post_status_read_scdb_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source); +typedef bool (*HPMHOOK_pre_status_read_scdb_libconfig_sub_flag) (struct config_setting_t **it, int *type, const char **source); +typedef bool (*HPMHOOK_post_status_read_scdb_libconfig_sub_flag) (bool retVal___, struct config_setting_t *it, int type, const char *source); +typedef bool (*HPMHOOK_pre_status_read_scdb_libconfig_sub_flag_additional) (struct config_setting_t **it, int *type, const char **source); +typedef bool (*HPMHOOK_post_status_read_scdb_libconfig_sub_flag_additional) (bool retVal___, struct config_setting_t *it, int type, const char *source); +typedef void (*HPMHOOK_pre_status_read_job_db) (void); +typedef void (*HPMHOOK_post_status_read_job_db) (void); +typedef void (*HPMHOOK_pre_status_read_job_db_sub) (int *idx, const char **name, struct config_setting_t **jdb); +typedef void (*HPMHOOK_post_status_read_job_db_sub) (int idx, const char *name, struct config_setting_t *jdb); +typedef void (*HPMHOOK_pre_status_set_sc) (uint16 *skill_id, sc_type *sc, unsigned int *flag); +typedef void (*HPMHOOK_post_status_set_sc) (uint16 skill_id, sc_type sc, unsigned int flag); +typedef void (*HPMHOOK_pre_status_copy) (struct status_data **a, const struct status_data **b); +typedef void (*HPMHOOK_post_status_copy) (struct status_data *a, const struct status_data *b); +typedef int (*HPMHOOK_pre_status_base_matk_min) (const struct status_data **st); +typedef int (*HPMHOOK_post_status_base_matk_min) (int retVal___, const struct status_data *st); +typedef int (*HPMHOOK_pre_status_base_matk_max) (const struct status_data **st); +typedef int (*HPMHOOK_post_status_base_matk_max) (int retVal___, const struct status_data *st); +#endif // MAP_STATUS_H +#ifdef MAP_STORAGE_H /* storage */ +typedef void (*HPMHOOK_pre_storage_reconnect) (void); +typedef void (*HPMHOOK_post_storage_reconnect) (void); +typedef int (*HPMHOOK_pre_storage_delitem) (struct map_session_data **sd, int *n, int *amount); +typedef int (*HPMHOOK_post_storage_delitem) (int retVal___, struct map_session_data *sd, int n, int amount); +typedef int (*HPMHOOK_pre_storage_open) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_storage_open) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_storage_add) (struct map_session_data **sd, int *index, int *amount); +typedef int (*HPMHOOK_post_storage_add) (int retVal___, struct map_session_data *sd, int index, int amount); +typedef int (*HPMHOOK_pre_storage_get) (struct map_session_data **sd, int *index, int *amount); +typedef int (*HPMHOOK_post_storage_get) (int retVal___, struct map_session_data *sd, int index, int amount); +typedef int (*HPMHOOK_pre_storage_additem) (struct map_session_data **sd, struct item **item_data, int *amount); +typedef int (*HPMHOOK_post_storage_additem) (int retVal___, struct map_session_data *sd, struct item *item_data, int amount); +typedef int (*HPMHOOK_pre_storage_addfromcart) (struct map_session_data **sd, int *index, int *amount); +typedef int (*HPMHOOK_post_storage_addfromcart) (int retVal___, struct map_session_data *sd, int index, int amount); +typedef int (*HPMHOOK_pre_storage_gettocart) (struct map_session_data **sd, int *index, int *amount); +typedef int (*HPMHOOK_post_storage_gettocart) (int retVal___, struct map_session_data *sd, int index, int amount); +typedef void (*HPMHOOK_pre_storage_close) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_storage_close) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_storage_pc_quit) (struct map_session_data **sd, int *flag); +typedef void (*HPMHOOK_post_storage_pc_quit) (struct map_session_data *sd, int flag); +typedef int (*HPMHOOK_pre_storage_comp_item) (const void **i1_, const void **i2_); +typedef int (*HPMHOOK_post_storage_comp_item) (int retVal___, const void *i1_, const void *i2_); +typedef void (*HPMHOOK_pre_storage_sortitem) (struct item **items, unsigned int *size); +typedef void (*HPMHOOK_post_storage_sortitem) (struct item *items, unsigned int size); +typedef int (*HPMHOOK_pre_storage_reconnect_sub) (union DBKey *key, struct DBData **data, va_list ap); +typedef int (*HPMHOOK_post_storage_reconnect_sub) (int retVal___, union DBKey key, struct DBData *data, va_list ap); +#endif // MAP_STORAGE_H +#ifdef COMMON_STRLIB_H /* StrBuf */ +typedef StringBuf* (*HPMHOOK_pre_StrBuf_Malloc) (void); +typedef StringBuf* (*HPMHOOK_post_StrBuf_Malloc) (StringBuf* retVal___); +typedef void (*HPMHOOK_pre_StrBuf_Init) (StringBuf **self); +typedef void (*HPMHOOK_post_StrBuf_Init) (StringBuf *self); +typedef int (*HPMHOOK_pre_StrBuf_Vprintf) (StringBuf **self, const char **fmt, va_list args); +typedef int (*HPMHOOK_post_StrBuf_Vprintf) (int retVal___, StringBuf *self, const char *fmt, va_list args); +typedef int (*HPMHOOK_pre_StrBuf_Append) (StringBuf **self, const StringBuf **sbuf); +typedef int (*HPMHOOK_post_StrBuf_Append) (int retVal___, StringBuf *self, const StringBuf *sbuf); +typedef int (*HPMHOOK_pre_StrBuf_AppendStr) (StringBuf **self, const char **str); +typedef int (*HPMHOOK_post_StrBuf_AppendStr) (int retVal___, StringBuf *self, const char *str); +typedef int (*HPMHOOK_pre_StrBuf_Length) (StringBuf **self); +typedef int (*HPMHOOK_post_StrBuf_Length) (int retVal___, StringBuf *self); +typedef char* (*HPMHOOK_pre_StrBuf_Value) (StringBuf **self); +typedef char* (*HPMHOOK_post_StrBuf_Value) (char* retVal___, StringBuf *self); +typedef void (*HPMHOOK_pre_StrBuf_Clear) (StringBuf **self); +typedef void (*HPMHOOK_post_StrBuf_Clear) (StringBuf *self); +typedef void (*HPMHOOK_pre_StrBuf_Destroy) (StringBuf **self); +typedef void (*HPMHOOK_post_StrBuf_Destroy) (StringBuf *self); +typedef void (*HPMHOOK_pre_StrBuf_Free) (StringBuf **self); +typedef void (*HPMHOOK_post_StrBuf_Free) (StringBuf *self); +#endif // COMMON_STRLIB_H +#ifdef COMMON_STRLIB_H /* strlib */ +typedef char* (*HPMHOOK_pre_strlib_jstrescape) (char **pt); +typedef char* (*HPMHOOK_post_strlib_jstrescape) (char* retVal___, char *pt); +typedef char* (*HPMHOOK_pre_strlib_jstrescapecpy) (char **pt, const char **spt); +typedef char* (*HPMHOOK_post_strlib_jstrescapecpy) (char* retVal___, char *pt, const char *spt); +typedef int (*HPMHOOK_pre_strlib_jmemescapecpy) (char **pt, const char **spt, int *size); +typedef int (*HPMHOOK_post_strlib_jmemescapecpy) (int retVal___, char *pt, const char *spt, int size); +typedef int (*HPMHOOK_pre_strlib_remove_control_chars_) (char **str); +typedef int (*HPMHOOK_post_strlib_remove_control_chars_) (int retVal___, char *str); +typedef char* (*HPMHOOK_pre_strlib_trim_) (char **str); +typedef char* (*HPMHOOK_post_strlib_trim_) (char* retVal___, char *str); +typedef char* (*HPMHOOK_pre_strlib_normalize_name_) (char **str, const char **delims); +typedef char* (*HPMHOOK_post_strlib_normalize_name_) (char* retVal___, char *str, const char *delims); +typedef const char* (*HPMHOOK_pre_strlib_stristr_) (const char **haystack, const char **needle); +typedef const char* (*HPMHOOK_post_strlib_stristr_) (const char* retVal___, const char *haystack, const char *needle); +typedef size_t (*HPMHOOK_pre_strlib_strnlen_) (const char **string, size_t *maxlen); +typedef size_t (*HPMHOOK_post_strlib_strnlen_) (size_t retVal___, const char *string, size_t maxlen); +typedef char* (*HPMHOOK_pre_strlib_strtok_r_) (char **s1, const char **s2, char ***lasts); +typedef char* (*HPMHOOK_post_strlib_strtok_r_) (char* retVal___, char *s1, const char *s2, char **lasts); +typedef int (*HPMHOOK_pre_strlib_e_mail_check_) (char **email); +typedef int (*HPMHOOK_post_strlib_e_mail_check_) (int retVal___, char *email); +typedef int (*HPMHOOK_pre_strlib_config_switch_) (const char **str); +typedef int (*HPMHOOK_post_strlib_config_switch_) (int retVal___, const char *str); +typedef char* (*HPMHOOK_pre_strlib_safestrncpy_) (char **dst, const char **src, size_t *n); +typedef char* (*HPMHOOK_post_strlib_safestrncpy_) (char* retVal___, char *dst, const char *src, size_t n); +typedef size_t (*HPMHOOK_pre_strlib_safestrnlen_) (const char **string, size_t *maxlen); +typedef size_t (*HPMHOOK_post_strlib_safestrnlen_) (size_t retVal___, const char *string, size_t maxlen); +typedef int (*HPMHOOK_pre_strlib_strline_) (const char **str, size_t *pos); +typedef int (*HPMHOOK_post_strlib_strline_) (int retVal___, const char *str, size_t pos); +typedef bool (*HPMHOOK_pre_strlib_bin2hex_) (char **output, const unsigned char **input, size_t *count); +typedef bool (*HPMHOOK_post_strlib_bin2hex_) (bool retVal___, char *output, const unsigned char *input, size_t count); +#endif // COMMON_STRLIB_H +#ifdef MAP_STYLIST_H /* stylist */ +typedef void (*HPMHOOK_pre_stylist_init) (bool *minimal); +typedef void (*HPMHOOK_post_stylist_init) (bool minimal); +typedef void (*HPMHOOK_pre_stylist_final) (void); +typedef void (*HPMHOOK_post_stylist_final) (void); +typedef void (*HPMHOOK_pre_stylist_vector_init) (void); +typedef void (*HPMHOOK_post_stylist_vector_init) (void); +typedef void (*HPMHOOK_pre_stylist_vector_clear) (void); +typedef void (*HPMHOOK_post_stylist_vector_clear) (void); +typedef bool (*HPMHOOK_pre_stylist_read_db_libconfig) (void); +typedef bool (*HPMHOOK_post_stylist_read_db_libconfig) (bool retVal___); +typedef bool (*HPMHOOK_pre_stylist_read_db_libconfig_sub) (struct config_setting_t **it, int *idx, const char **source); +typedef bool (*HPMHOOK_post_stylist_read_db_libconfig_sub) (bool retVal___, struct config_setting_t *it, int idx, const char *source); +typedef void (*HPMHOOK_pre_stylist_request_style_change) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem); +typedef void (*HPMHOOK_post_stylist_request_style_change) (struct map_session_data *sd, int type, int16 idx, bool isitem); +typedef bool (*HPMHOOK_pre_stylist_validate_requirements) (struct map_session_data **sd, int *type, int16 *idx); +typedef bool (*HPMHOOK_post_stylist_validate_requirements) (bool retVal___, struct map_session_data *sd, int type, int16 idx); +typedef void (*HPMHOOK_pre_stylist_send_rodexitem) (struct map_session_data **sd, int *itemid); +typedef void (*HPMHOOK_post_stylist_send_rodexitem) (struct map_session_data *sd, int itemid); +#endif // MAP_STYLIST_H +#ifdef COMMON_STRLIB_H /* sv */ +typedef int (*HPMHOOK_pre_sv_parse_next) (struct s_svstate **svstate); +typedef int (*HPMHOOK_post_sv_parse_next) (int retVal___, struct s_svstate *svstate); +typedef int (*HPMHOOK_pre_sv_parse) (const char **str, int *len, int *startoff, char *delim, int **out_pos, int *npos, enum e_svopt *opt); +typedef int (*HPMHOOK_post_sv_parse) (int retVal___, const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt); +typedef int (*HPMHOOK_pre_sv_split) (char **str, int *len, int *startoff, char *delim, char ***out_fields, int *nfields, enum e_svopt *opt); +typedef int (*HPMHOOK_post_sv_split) (int retVal___, char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt); +typedef size_t (*HPMHOOK_pre_sv_escape_c) (char **out_dest, const char **src, size_t *len, const char **escapes); +typedef size_t (*HPMHOOK_post_sv_escape_c) (size_t retVal___, char *out_dest, const char *src, size_t len, const char *escapes); +typedef size_t (*HPMHOOK_pre_sv_unescape_c) (char **out_dest, const char **src, size_t *len); +typedef size_t (*HPMHOOK_post_sv_unescape_c) (size_t retVal___, char *out_dest, const char *src, size_t len); +typedef const char* (*HPMHOOK_pre_sv_skip_escaped_c) (const char **p); +typedef const char* (*HPMHOOK_post_sv_skip_escaped_c) (const char* retVal___, const char *p); +typedef bool (*HPMHOOK_pre_sv_readdb) (const char **directory, const char **filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( **parseproc ) (char *fields[], int columns, int current)); +typedef bool (*HPMHOOK_post_sv_readdb) (bool retVal___, const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); +#endif // COMMON_STRLIB_H +#ifdef COMMON_SYSINFO_H /* sysinfo */ +typedef int (*HPMHOOK_pre_sysinfo_getpagesize) (void); +typedef int (*HPMHOOK_post_sysinfo_getpagesize) (int retVal___); +typedef const char* (*HPMHOOK_pre_sysinfo_platform) (void); +typedef const char* (*HPMHOOK_post_sysinfo_platform) (const char* retVal___); +typedef const char* (*HPMHOOK_pre_sysinfo_osversion) (void); +typedef const char* (*HPMHOOK_post_sysinfo_osversion) (const char* retVal___); +typedef const char* (*HPMHOOK_pre_sysinfo_cpu) (void); +typedef const char* (*HPMHOOK_post_sysinfo_cpu) (const char* retVal___); +typedef int (*HPMHOOK_pre_sysinfo_cpucores) (void); +typedef int (*HPMHOOK_post_sysinfo_cpucores) (int retVal___); +typedef const char* (*HPMHOOK_pre_sysinfo_arch) (void); +typedef const char* (*HPMHOOK_post_sysinfo_arch) (const char* retVal___); +typedef bool (*HPMHOOK_pre_sysinfo_is64bit) (void); +typedef bool (*HPMHOOK_post_sysinfo_is64bit) (bool retVal___); +typedef const char* (*HPMHOOK_pre_sysinfo_compiler) (void); +typedef const char* (*HPMHOOK_post_sysinfo_compiler) (const char* retVal___); +typedef const char* (*HPMHOOK_pre_sysinfo_cflags) (void); +typedef const char* (*HPMHOOK_post_sysinfo_cflags) (const char* retVal___); +typedef const char* (*HPMHOOK_pre_sysinfo_time) (void); +typedef const char* (*HPMHOOK_post_sysinfo_time) (const char* retVal___); +typedef const char* (*HPMHOOK_pre_sysinfo_vcstype) (void); +typedef const char* (*HPMHOOK_post_sysinfo_vcstype) (const char* retVal___); +typedef int (*HPMHOOK_pre_sysinfo_vcstypeid) (void); +typedef int (*HPMHOOK_post_sysinfo_vcstypeid) (int retVal___); +typedef const char* (*HPMHOOK_pre_sysinfo_vcsrevision_src) (void); +typedef const char* (*HPMHOOK_post_sysinfo_vcsrevision_src) (const char* retVal___); +typedef const char* (*HPMHOOK_pre_sysinfo_vcsrevision_scripts) (void); +typedef const char* (*HPMHOOK_post_sysinfo_vcsrevision_scripts) (const char* retVal___); +typedef void (*HPMHOOK_pre_sysinfo_vcsrevision_reload) (void); +typedef void (*HPMHOOK_post_sysinfo_vcsrevision_reload) (void); +typedef bool (*HPMHOOK_pre_sysinfo_is_superuser) (void); +typedef bool (*HPMHOOK_post_sysinfo_is_superuser) (bool retVal___); +typedef void (*HPMHOOK_pre_sysinfo_init) (void); +typedef void (*HPMHOOK_post_sysinfo_init) (void); +typedef void (*HPMHOOK_pre_sysinfo_final) (void); +typedef void (*HPMHOOK_post_sysinfo_final) (void); +#endif // COMMON_SYSINFO_H +#ifdef COMMON_THREAD_H /* thread */ +typedef void (*HPMHOOK_pre_thread_init) (void); +typedef void (*HPMHOOK_post_thread_init) (void); +typedef void (*HPMHOOK_pre_thread_final) (void); +typedef void (*HPMHOOK_post_thread_final) (void); +typedef struct thread_handle* (*HPMHOOK_pre_thread_create) (threadFunc *entry_point, void **param); +typedef struct thread_handle* (*HPMHOOK_post_thread_create) (struct thread_handle* retVal___, threadFunc entry_point, void *param); +typedef struct thread_handle* (*HPMHOOK_pre_thread_create_opt) (threadFunc *entry_point, void **param, size_t *stack_size, enum thread_priority *prio); +typedef struct thread_handle* (*HPMHOOK_post_thread_create_opt) (struct thread_handle* retVal___, threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio); +typedef void (*HPMHOOK_pre_thread_destroy) (struct thread_handle **handle); +typedef void (*HPMHOOK_post_thread_destroy) (struct thread_handle *handle); +typedef struct thread_handle* (*HPMHOOK_pre_thread_self) (void); +typedef struct thread_handle* (*HPMHOOK_post_thread_self) (struct thread_handle* retVal___); +typedef int (*HPMHOOK_pre_thread_get_tid) (void); +typedef int (*HPMHOOK_post_thread_get_tid) (int retVal___); +typedef bool (*HPMHOOK_pre_thread_wait) (struct thread_handle **handle, void ***out_exit_code); +typedef bool (*HPMHOOK_post_thread_wait) (bool retVal___, struct thread_handle *handle, void **out_exit_code); +typedef void (*HPMHOOK_pre_thread_prio_set) (struct thread_handle **handle, enum thread_priority *prio); +typedef void (*HPMHOOK_post_thread_prio_set) (struct thread_handle *handle, enum thread_priority prio); +typedef enum thread_priority (*HPMHOOK_pre_thread_prio_get) (struct thread_handle **handle); +typedef enum thread_priority (*HPMHOOK_post_thread_prio_get) (enum thread_priority retVal___, struct thread_handle *handle); +typedef void (*HPMHOOK_pre_thread_yield) (void); +typedef void (*HPMHOOK_post_thread_yield) (void); +#endif // COMMON_THREAD_H +#ifdef COMMON_TIMER_H /* timer */ +typedef int64 (*HPMHOOK_pre_timer_gettick) (void); +typedef int64 (*HPMHOOK_post_timer_gettick) (int64 retVal___); +typedef int64 (*HPMHOOK_pre_timer_gettick_nocache) (void); +typedef int64 (*HPMHOOK_post_timer_gettick_nocache) (int64 retVal___); +typedef int (*HPMHOOK_pre_timer_add) (int64 *tick, TimerFunc *func, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_timer_add) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data); +typedef int (*HPMHOOK_pre_timer_add_interval) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); +typedef int (*HPMHOOK_post_timer_add_interval) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data, int interval); +typedef const struct TimerData* (*HPMHOOK_pre_timer_get) (int *tid); +typedef const struct TimerData* (*HPMHOOK_post_timer_get) (const struct TimerData* retVal___, int tid); +typedef int (*HPMHOOK_pre_timer_delete) (int *tid, TimerFunc *func); +typedef int (*HPMHOOK_post_timer_delete) (int retVal___, int tid, TimerFunc func); +typedef int64 (*HPMHOOK_pre_timer_addtick) (int *tid, int64 *tick); +typedef int64 (*HPMHOOK_post_timer_addtick) (int64 retVal___, int tid, int64 tick); +typedef int64 (*HPMHOOK_pre_timer_settick) (int *tid, int64 *tick); +typedef int64 (*HPMHOOK_post_timer_settick) (int64 retVal___, int tid, int64 tick); +typedef int (*HPMHOOK_pre_timer_add_func_list) (TimerFunc *func, char **name); +typedef int (*HPMHOOK_post_timer_add_func_list) (int retVal___, TimerFunc func, char *name); +typedef unsigned long (*HPMHOOK_pre_timer_get_uptime) (void); +typedef unsigned long (*HPMHOOK_post_timer_get_uptime) (unsigned long retVal___); +typedef int (*HPMHOOK_pre_timer_perform) (int64 *tick); +typedef int (*HPMHOOK_post_timer_perform) (int retVal___, int64 tick); +typedef void (*HPMHOOK_pre_timer_init) (void); +typedef void (*HPMHOOK_post_timer_init) (void); +typedef void (*HPMHOOK_pre_timer_final) (void); +typedef void (*HPMHOOK_post_timer_final) (void); +#endif // COMMON_TIMER_H +#ifdef MAP_TRADE_H /* trade */ +typedef void (*HPMHOOK_pre_trade_request) (struct map_session_data **sd, struct map_session_data **target_sd); +typedef void (*HPMHOOK_post_trade_request) (struct map_session_data *sd, struct map_session_data *target_sd); +typedef void (*HPMHOOK_pre_trade_ack) (struct map_session_data **sd, int *type); +typedef void (*HPMHOOK_post_trade_ack) (struct map_session_data *sd, int type); +typedef int (*HPMHOOK_pre_trade_check_impossible) (struct map_session_data **sd); +typedef int (*HPMHOOK_post_trade_check_impossible) (int retVal___, struct map_session_data *sd); +typedef int (*HPMHOOK_pre_trade_check) (struct map_session_data **sd, struct map_session_data **tsd); +typedef int (*HPMHOOK_post_trade_check) (int retVal___, struct map_session_data *sd, struct map_session_data *tsd); +typedef void (*HPMHOOK_pre_trade_additem) (struct map_session_data **sd, short *index, short *amount); +typedef void (*HPMHOOK_post_trade_additem) (struct map_session_data *sd, short index, short amount); +typedef void (*HPMHOOK_pre_trade_addzeny) (struct map_session_data **sd, int *amount); +typedef void (*HPMHOOK_post_trade_addzeny) (struct map_session_data *sd, int amount); +typedef void (*HPMHOOK_pre_trade_ok) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_trade_ok) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_trade_cancel) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_trade_cancel) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_trade_commit) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_trade_commit) (struct map_session_data *sd); +#endif // MAP_TRADE_H +#ifdef MAP_UNIT_H /* unit */ +typedef int (*HPMHOOK_pre_unit_init) (bool *minimal); +typedef int (*HPMHOOK_post_unit_init) (int retVal___, bool minimal); +typedef int (*HPMHOOK_pre_unit_final) (void); +typedef int (*HPMHOOK_post_unit_final) (int retVal___); +typedef struct unit_data* (*HPMHOOK_pre_unit_bl2ud) (struct block_list **bl); +typedef struct unit_data* (*HPMHOOK_post_unit_bl2ud) (struct unit_data* retVal___, struct block_list *bl); +typedef const struct unit_data* (*HPMHOOK_pre_unit_cbl2ud) (const struct block_list **bl); +typedef const struct unit_data* (*HPMHOOK_post_unit_cbl2ud) (const struct unit_data* retVal___, const struct block_list *bl); +typedef struct unit_data* (*HPMHOOK_pre_unit_bl2ud2) (struct block_list **bl); +typedef struct unit_data* (*HPMHOOK_post_unit_bl2ud2) (struct unit_data* retVal___, struct block_list *bl); +typedef void (*HPMHOOK_pre_unit_init_ud) (struct unit_data **ud); +typedef void (*HPMHOOK_post_unit_init_ud) (struct unit_data *ud); +typedef int (*HPMHOOK_pre_unit_attack_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_unit_attack_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_unit_walk_toxy_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_unit_walk_toxy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_unit_walk_toxy_sub) (struct block_list **bl); +typedef int (*HPMHOOK_post_unit_walk_toxy_sub) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_unit_delay_walk_toxy_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_unit_delay_walk_toxy_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_unit_walk_toxy) (struct block_list **bl, short *x, short *y, int *flag); +typedef int (*HPMHOOK_post_unit_walk_toxy) (int retVal___, struct block_list *bl, short x, short y, int flag); +typedef int (*HPMHOOK_pre_unit_walktobl_timer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_unit_walktobl_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_unit_walktobl) (struct block_list **bl, struct block_list **tbl, int *range, int *flag); +typedef int (*HPMHOOK_post_unit_walktobl) (int retVal___, struct block_list *bl, struct block_list *tbl, int range, int flag); +typedef bool (*HPMHOOK_pre_unit_run) (struct block_list **bl, struct map_session_data **sd, enum sc_type *type); +typedef bool (*HPMHOOK_post_unit_run) (bool retVal___, struct block_list *bl, struct map_session_data *sd, enum sc_type type); +typedef void (*HPMHOOK_pre_unit_run_hit) (struct block_list **bl, struct status_change **sc, struct map_session_data **sd, enum sc_type *type); +typedef void (*HPMHOOK_post_unit_run_hit) (struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type type); +typedef int (*HPMHOOK_pre_unit_escape) (struct block_list **bl, struct block_list **target, short *dist); +typedef int (*HPMHOOK_post_unit_escape) (int retVal___, struct block_list *bl, struct block_list *target, short dist); +typedef int (*HPMHOOK_pre_unit_movepos) (struct block_list **bl, short *dst_x, short *dst_y, int *easy, bool *checkpath); +typedef int (*HPMHOOK_post_unit_movepos) (int retVal___, struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath); +typedef int (*HPMHOOK_pre_unit_set_dir) (struct block_list **bl, enum unit_dir *dir); +typedef int (*HPMHOOK_post_unit_set_dir) (int retVal___, struct block_list *bl, enum unit_dir dir); +typedef enum unit_dir (*HPMHOOK_pre_unit_getdir) (const struct block_list **bl); +typedef enum unit_dir (*HPMHOOK_post_unit_getdir) (enum unit_dir retVal___, const struct block_list *bl); +typedef int (*HPMHOOK_pre_unit_blown) (struct block_list **bl, int *dx, int *dy, int *count, int *flag); +typedef int (*HPMHOOK_post_unit_blown) (int retVal___, struct block_list *bl, int dx, int dy, int count, int flag); +typedef int (*HPMHOOK_pre_unit_warp) (struct block_list **bl, short *m, short *x, short *y, enum clr_type *type); +typedef int (*HPMHOOK_post_unit_warp) (int retVal___, struct block_list *bl, short m, short x, short y, enum clr_type type); +typedef int (*HPMHOOK_pre_unit_warpto_master) (struct block_list **master_bl, struct block_list **slave_bl); +typedef int (*HPMHOOK_post_unit_warpto_master) (int retVal___, struct block_list *master_bl, struct block_list *slave_bl); +typedef int (*HPMHOOK_pre_unit_stop_walking) (struct block_list **bl, int *type); +typedef int (*HPMHOOK_post_unit_stop_walking) (int retVal___, struct block_list *bl, int type); +typedef int (*HPMHOOK_pre_unit_skilluse_id) (struct block_list **src, int *target_id, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_unit_skilluse_id) (int retVal___, struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_unit_steptimer) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_unit_steptimer) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef void (*HPMHOOK_pre_unit_stop_stepaction) (struct block_list **bl); +typedef void (*HPMHOOK_post_unit_stop_stepaction) (struct block_list *bl); +typedef int (*HPMHOOK_pre_unit_is_walking) (struct block_list **bl); +typedef int (*HPMHOOK_post_unit_is_walking) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_unit_can_move) (struct block_list **bl); +typedef int (*HPMHOOK_post_unit_can_move) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_unit_resume_running) (int *tid, int64 *tick, int *id, intptr_t *data); +typedef int (*HPMHOOK_post_unit_resume_running) (int retVal___, int tid, int64 tick, int id, intptr_t data); +typedef int (*HPMHOOK_pre_unit_set_walkdelay) (struct block_list **bl, int64 *tick, int *delay, int *type); +typedef int (*HPMHOOK_post_unit_set_walkdelay) (int retVal___, struct block_list *bl, int64 tick, int delay, int type); +typedef int (*HPMHOOK_pre_unit_skilluse_id2) (struct block_list **src, int *target_id, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel); +typedef int (*HPMHOOK_post_unit_skilluse_id2) (int retVal___, struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv, int casttime, int castcancel); +typedef int (*HPMHOOK_pre_unit_skilluse_pos) (struct block_list **src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv); +typedef int (*HPMHOOK_post_unit_skilluse_pos) (int retVal___, struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv); +typedef int (*HPMHOOK_pre_unit_skilluse_pos2) (struct block_list **src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel); +typedef int (*HPMHOOK_post_unit_skilluse_pos2) (int retVal___, struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv, int casttime, int castcancel); +typedef int (*HPMHOOK_pre_unit_set_target) (struct unit_data **ud, int *target_id); +typedef int (*HPMHOOK_post_unit_set_target) (int retVal___, struct unit_data *ud, int target_id); +typedef void (*HPMHOOK_pre_unit_stop_attack) (struct block_list **bl); +typedef void (*HPMHOOK_post_unit_stop_attack) (struct block_list *bl); +typedef int (*HPMHOOK_pre_unit_unattackable) (struct block_list **bl); +typedef int (*HPMHOOK_post_unit_unattackable) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_unit_attack) (struct block_list **src, int *target_id, int *continuous); +typedef int (*HPMHOOK_post_unit_attack) (int retVal___, struct block_list *src, int target_id, int continuous); +typedef int (*HPMHOOK_pre_unit_cancel_combo) (struct block_list **bl); +typedef int (*HPMHOOK_post_unit_cancel_combo) (int retVal___, struct block_list *bl); +typedef bool (*HPMHOOK_pre_unit_can_reach_pos) (struct block_list **bl, int *x, int *y, int *easy); +typedef bool (*HPMHOOK_post_unit_can_reach_pos) (bool retVal___, struct block_list *bl, int x, int y, int easy); +typedef bool (*HPMHOOK_pre_unit_can_reach_bl) (struct block_list **bl, struct block_list **tbl, int *range, int *easy, short **x, short **y); +typedef bool (*HPMHOOK_post_unit_can_reach_bl) (bool retVal___, struct block_list *bl, struct block_list *tbl, int range, int easy, short *x, short *y); +typedef int (*HPMHOOK_pre_unit_calc_pos) (struct block_list **bl, int *tx, int *ty, enum unit_dir *dir); +typedef int (*HPMHOOK_post_unit_calc_pos) (int retVal___, struct block_list *bl, int tx, int ty, enum unit_dir dir); +typedef int (*HPMHOOK_pre_unit_attack_timer_sub) (struct block_list **src, int *tid, int64 *tick); +typedef int (*HPMHOOK_post_unit_attack_timer_sub) (int retVal___, struct block_list *src, int tid, int64 tick); +typedef int (*HPMHOOK_pre_unit_skillcastcancel) (struct block_list **bl, int *type); +typedef int (*HPMHOOK_post_unit_skillcastcancel) (int retVal___, struct block_list *bl, int type); +typedef void (*HPMHOOK_pre_unit_dataset) (struct block_list **bl); +typedef void (*HPMHOOK_post_unit_dataset) (struct block_list *bl); +typedef int (*HPMHOOK_pre_unit_counttargeted) (struct block_list **bl); +typedef int (*HPMHOOK_post_unit_counttargeted) (int retVal___, struct block_list *bl); +typedef int (*HPMHOOK_pre_unit_fixdamage) (struct block_list **src, struct block_list **target, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2); +typedef int (*HPMHOOK_post_unit_fixdamage) (int retVal___, struct block_list *src, struct block_list *target, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2); +typedef int (*HPMHOOK_pre_unit_changeviewsize) (struct block_list **bl, short *size); +typedef int (*HPMHOOK_post_unit_changeviewsize) (int retVal___, struct block_list *bl, short size); +typedef int (*HPMHOOK_pre_unit_remove_map) (struct block_list **bl, enum clr_type *clrtype, const char **file, int *line, const char **func); +typedef int (*HPMHOOK_post_unit_remove_map) (int retVal___, struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func); +typedef void (*HPMHOOK_pre_unit_remove_map_pc) (struct map_session_data **sd, enum clr_type *clrtype); +typedef void (*HPMHOOK_post_unit_remove_map_pc) (struct map_session_data *sd, enum clr_type clrtype); +typedef void (*HPMHOOK_pre_unit_free_pc) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_unit_free_pc) (struct map_session_data *sd); +typedef int (*HPMHOOK_pre_unit_free) (struct block_list **bl, enum clr_type *clrtype); +typedef int (*HPMHOOK_post_unit_free) (int retVal___, struct block_list *bl, enum clr_type clrtype); +#endif // MAP_UNIT_H +#ifdef MAP_VENDING_H /* vending */ +typedef void (*HPMHOOK_pre_vending_init) (bool *minimal); +typedef void (*HPMHOOK_post_vending_init) (bool minimal); +typedef void (*HPMHOOK_pre_vending_final) (void); +typedef void (*HPMHOOK_post_vending_final) (void); +typedef void (*HPMHOOK_pre_vending_close) (struct map_session_data **sd); +typedef void (*HPMHOOK_post_vending_close) (struct map_session_data *sd); +typedef void (*HPMHOOK_pre_vending_open) (struct map_session_data **sd, const char **message, const uint8 **data, int *count); +typedef void (*HPMHOOK_post_vending_open) (struct map_session_data *sd, const char *message, const uint8 *data, int count); +typedef void (*HPMHOOK_pre_vending_list) (struct map_session_data **sd, unsigned int *id); +typedef void (*HPMHOOK_post_vending_list) (struct map_session_data *sd, unsigned int id); +typedef void (*HPMHOOK_pre_vending_purchase) (struct map_session_data **sd, int *aid, unsigned int *uid, const uint8 **data, int *count); +typedef void (*HPMHOOK_post_vending_purchase) (struct map_session_data *sd, int aid, unsigned int uid, const uint8 *data, int count); +typedef bool (*HPMHOOK_pre_vending_search) (struct map_session_data **sd, int *nameid); +typedef bool (*HPMHOOK_post_vending_search) (bool retVal___, struct map_session_data *sd, int nameid); +typedef bool (*HPMHOOK_pre_vending_searchall) (struct map_session_data **sd, const struct s_search_store_search **s); +typedef bool (*HPMHOOK_post_vending_searchall) (bool retVal___, struct map_session_data *sd, const struct s_search_store_search *s); +#endif // MAP_VENDING_H diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc index 7210920e5..ab34a4f18 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,8 @@ * as it will get overwritten. */ +/* GENERATED FILE DO NOT EDIT */ + struct { struct HPMHookPoint *HP_HCache_init_pre; struct HPMHookPoint *HP_HCache_init_post; @@ -60,6 +62,8 @@ struct { struct HPMHookPoint *HP_chr_create_charstatus_post; struct HPMHookPoint *HP_chr_mmo_char_tosql_pre; struct HPMHookPoint *HP_chr_mmo_char_tosql_post; + struct HPMHookPoint *HP_chr_getitemdata_from_sql_pre; + struct HPMHookPoint *HP_chr_getitemdata_from_sql_post; struct HPMHookPoint *HP_chr_memitemdata_to_sql_pre; struct HPMHookPoint *HP_chr_memitemdata_to_sql_post; struct HPMHookPoint *HP_chr_mmo_gender_pre; @@ -74,6 +78,8 @@ struct { struct HPMHookPoint *HP_chr_char_slotchange_post; struct HPMHookPoint *HP_chr_rename_char_sql_pre; struct HPMHookPoint *HP_chr_rename_char_sql_post; + struct HPMHookPoint *HP_chr_name_exists_pre; + struct HPMHookPoint *HP_chr_name_exists_post; struct HPMHookPoint *HP_chr_check_char_name_pre; struct HPMHookPoint *HP_chr_check_char_name_post; struct HPMHookPoint *HP_chr_make_new_char_sql_pre; @@ -84,8 +90,10 @@ struct { struct HPMHookPoint *HP_chr_count_users_post; struct HPMHookPoint *HP_chr_mmo_char_tobuf_pre; struct HPMHookPoint *HP_chr_mmo_char_tobuf_post; - struct HPMHookPoint *HP_chr_mmo_char_send099d_pre; - struct HPMHookPoint *HP_chr_mmo_char_send099d_post; + struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre; + struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post; + struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre; + struct HPMHookPoint *HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post; struct HPMHookPoint *HP_chr_mmo_char_send_ban_list_pre; struct HPMHookPoint *HP_chr_mmo_char_send_ban_list_post; struct HPMHookPoint *HP_chr_mmo_char_send_slots_info_pre; @@ -230,8 +238,6 @@ struct { struct HPMHookPoint *HP_chr_parse_frommap_auth_request_post; struct HPMHookPoint *HP_chr_parse_frommap_update_ip_pre; struct HPMHookPoint *HP_chr_parse_frommap_update_ip_post; - struct HPMHookPoint *HP_chr_parse_frommap_request_stats_report_pre; - struct HPMHookPoint *HP_chr_parse_frommap_request_stats_report_post; struct HPMHookPoint *HP_chr_parse_frommap_scdata_update_pre; struct HPMHookPoint *HP_chr_parse_frommap_scdata_update_post; struct HPMHookPoint *HP_chr_parse_frommap_scdata_delete_pre; @@ -342,10 +348,38 @@ struct { struct HPMHookPoint *HP_chr_online_data_cleanup_post; struct HPMHookPoint *HP_chr_sql_config_read_pre; struct HPMHookPoint *HP_chr_sql_config_read_post; - struct HPMHookPoint *HP_chr_config_dispatch_pre; - struct HPMHookPoint *HP_chr_config_dispatch_post; + struct HPMHookPoint *HP_chr_sql_config_read_registry_pre; + struct HPMHookPoint *HP_chr_sql_config_read_registry_post; + struct HPMHookPoint *HP_chr_sql_config_read_pc_pre; + struct HPMHookPoint *HP_chr_sql_config_read_pc_post; + struct HPMHookPoint *HP_chr_sql_config_read_guild_pre; + struct HPMHookPoint *HP_chr_sql_config_read_guild_post; struct HPMHookPoint *HP_chr_config_read_pre; struct HPMHookPoint *HP_chr_config_read_post; + struct HPMHookPoint *HP_chr_config_read_database_pre; + struct HPMHookPoint *HP_chr_config_read_database_post; + struct HPMHookPoint *HP_chr_config_read_console_pre; + struct HPMHookPoint *HP_chr_config_read_console_post; + struct HPMHookPoint *HP_chr_config_read_player_fame_pre; + struct HPMHookPoint *HP_chr_config_read_player_fame_post; + struct HPMHookPoint *HP_chr_config_read_player_deletion_pre; + struct HPMHookPoint *HP_chr_config_read_player_deletion_post; + struct HPMHookPoint *HP_chr_config_read_player_name_pre; + struct HPMHookPoint *HP_chr_config_read_player_name_post; + struct HPMHookPoint *HP_chr_config_set_start_item_pre; + struct HPMHookPoint *HP_chr_config_set_start_item_post; + struct HPMHookPoint *HP_chr_config_read_player_new_pre; + struct HPMHookPoint *HP_chr_config_read_player_new_post; + struct HPMHookPoint *HP_chr_config_read_player_pre; + struct HPMHookPoint *HP_chr_config_read_player_post; + struct HPMHookPoint *HP_chr_config_read_permission_pre; + struct HPMHookPoint *HP_chr_config_read_permission_post; + struct HPMHookPoint *HP_chr_config_set_ip_pre; + struct HPMHookPoint *HP_chr_config_set_ip_post; + struct HPMHookPoint *HP_chr_config_read_inter_pre; + struct HPMHookPoint *HP_chr_config_read_inter_post; + struct HPMHookPoint *HP_chr_config_read_top_pre; + struct HPMHookPoint *HP_chr_config_read_top_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -406,12 +440,30 @@ struct { struct HPMHookPoint *HP_DB_init_post; struct HPMHookPoint *HP_DB_final_pre; struct HPMHookPoint *HP_DB_final_post; + struct HPMHookPoint *HP_des_decrypt_block_pre; + struct HPMHookPoint *HP_des_decrypt_block_post; + struct HPMHookPoint *HP_des_decrypt_pre; + struct HPMHookPoint *HP_des_decrypt_post; struct HPMHookPoint *HP_geoip_getcountry_pre; struct HPMHookPoint *HP_geoip_getcountry_post; struct HPMHookPoint *HP_geoip_final_pre; struct HPMHookPoint *HP_geoip_final_post; struct HPMHookPoint *HP_geoip_init_pre; struct HPMHookPoint *HP_geoip_init_post; + struct HPMHookPoint *HP_inter_achievement_sql_init_pre; + struct HPMHookPoint *HP_inter_achievement_sql_init_post; + struct HPMHookPoint *HP_inter_achievement_sql_final_pre; + struct HPMHookPoint *HP_inter_achievement_sql_final_post; + struct HPMHookPoint *HP_inter_achievement_tosql_pre; + struct HPMHookPoint *HP_inter_achievement_tosql_post; + struct HPMHookPoint *HP_inter_achievement_fromsql_pre; + struct HPMHookPoint *HP_inter_achievement_fromsql_post; + struct HPMHookPoint *HP_inter_achievement_ensure_char_achievements_pre; + struct HPMHookPoint *HP_inter_achievement_ensure_char_achievements_post; + struct HPMHookPoint *HP_inter_achievement_char_achievements_clear_pre; + struct HPMHookPoint *HP_inter_achievement_char_achievements_clear_post; + struct HPMHookPoint *HP_inter_achievement_parse_frommap_pre; + struct HPMHookPoint *HP_inter_achievement_parse_frommap_post; struct HPMHookPoint *HP_inter_auction_count_pre; struct HPMHookPoint *HP_inter_auction_count_post; struct HPMHookPoint *HP_inter_auction_save_pre; @@ -430,12 +482,26 @@ struct { struct HPMHookPoint *HP_inter_auction_sql_init_post; struct HPMHookPoint *HP_inter_auction_sql_final_pre; struct HPMHookPoint *HP_inter_auction_sql_final_post; + struct HPMHookPoint *HP_inter_clan_kick_inactive_members_pre; + struct HPMHookPoint *HP_inter_clan_kick_inactive_members_post; + struct HPMHookPoint *HP_inter_clan_count_members_pre; + struct HPMHookPoint *HP_inter_clan_count_members_post; + struct HPMHookPoint *HP_inter_clan_parse_frommap_pre; + struct HPMHookPoint *HP_inter_clan_parse_frommap_post; struct HPMHookPoint *HP_inter_elemental_sql_init_pre; struct HPMHookPoint *HP_inter_elemental_sql_init_post; struct HPMHookPoint *HP_inter_elemental_sql_final_pre; struct HPMHookPoint *HP_inter_elemental_sql_final_post; struct HPMHookPoint *HP_inter_elemental_parse_frommap_pre; struct HPMHookPoint *HP_inter_elemental_parse_frommap_post; + struct HPMHookPoint *HP_inter_elemental_create_pre; + struct HPMHookPoint *HP_inter_elemental_create_post; + struct HPMHookPoint *HP_inter_elemental_save_pre; + struct HPMHookPoint *HP_inter_elemental_save_post; + struct HPMHookPoint *HP_inter_elemental_load_pre; + struct HPMHookPoint *HP_inter_elemental_load_post; + struct HPMHookPoint *HP_inter_elemental_delete_pre; + struct HPMHookPoint *HP_inter_elemental_delete_post; struct HPMHookPoint *HP_inter_guild_save_timer_pre; struct HPMHookPoint *HP_inter_guild_save_timer_post; struct HPMHookPoint *HP_inter_guild_removemember_tosql_pre; @@ -476,16 +542,54 @@ struct { struct HPMHookPoint *HP_inter_guild_charname_changed_post; struct HPMHookPoint *HP_inter_guild_parse_frommap_pre; struct HPMHookPoint *HP_inter_guild_parse_frommap_post; - struct HPMHookPoint *HP_inter_guild_leave_pre; - struct HPMHookPoint *HP_inter_guild_leave_post; struct HPMHookPoint *HP_inter_guild_broken_pre; struct HPMHookPoint *HP_inter_guild_broken_post; + struct HPMHookPoint *HP_inter_guild_create_pre; + struct HPMHookPoint *HP_inter_guild_create_post; + struct HPMHookPoint *HP_inter_guild_add_member_pre; + struct HPMHookPoint *HP_inter_guild_add_member_post; + struct HPMHookPoint *HP_inter_guild_leave_pre; + struct HPMHookPoint *HP_inter_guild_leave_post; + struct HPMHookPoint *HP_inter_guild_update_member_info_short_pre; + struct HPMHookPoint *HP_inter_guild_update_member_info_short_post; + struct HPMHookPoint *HP_inter_guild_update_member_info_pre; + struct HPMHookPoint *HP_inter_guild_update_member_info_post; + struct HPMHookPoint *HP_inter_guild_disband_pre; + struct HPMHookPoint *HP_inter_guild_disband_post; + struct HPMHookPoint *HP_inter_guild_update_basic_info_pre; + struct HPMHookPoint *HP_inter_guild_update_basic_info_post; + struct HPMHookPoint *HP_inter_guild_update_position_pre; + struct HPMHookPoint *HP_inter_guild_update_position_post; + struct HPMHookPoint *HP_inter_guild_use_skill_point_pre; + struct HPMHookPoint *HP_inter_guild_use_skill_point_post; + struct HPMHookPoint *HP_inter_guild_remove_alliance_pre; + struct HPMHookPoint *HP_inter_guild_remove_alliance_post; + struct HPMHookPoint *HP_inter_guild_change_alliance_pre; + struct HPMHookPoint *HP_inter_guild_change_alliance_post; + struct HPMHookPoint *HP_inter_guild_update_notice_pre; + struct HPMHookPoint *HP_inter_guild_update_notice_post; + struct HPMHookPoint *HP_inter_guild_update_emblem_pre; + struct HPMHookPoint *HP_inter_guild_update_emblem_post; + struct HPMHookPoint *HP_inter_guild_update_castle_data_pre; + struct HPMHookPoint *HP_inter_guild_update_castle_data_post; + struct HPMHookPoint *HP_inter_guild_change_leader_pre; + struct HPMHookPoint *HP_inter_guild_change_leader_post; struct HPMHookPoint *HP_inter_homunculus_sql_init_pre; struct HPMHookPoint *HP_inter_homunculus_sql_init_post; struct HPMHookPoint *HP_inter_homunculus_sql_final_pre; struct HPMHookPoint *HP_inter_homunculus_sql_final_post; struct HPMHookPoint *HP_inter_homunculus_parse_frommap_pre; struct HPMHookPoint *HP_inter_homunculus_parse_frommap_post; + struct HPMHookPoint *HP_inter_homunculus_create_pre; + struct HPMHookPoint *HP_inter_homunculus_create_post; + struct HPMHookPoint *HP_inter_homunculus_save_pre; + struct HPMHookPoint *HP_inter_homunculus_save_post; + struct HPMHookPoint *HP_inter_homunculus_load_pre; + struct HPMHookPoint *HP_inter_homunculus_load_post; + struct HPMHookPoint *HP_inter_homunculus_delete_pre; + struct HPMHookPoint *HP_inter_homunculus_delete_post; + struct HPMHookPoint *HP_inter_homunculus_rename_pre; + struct HPMHookPoint *HP_inter_homunculus_rename_post; struct HPMHookPoint *HP_inter_msg_txt_pre; struct HPMHookPoint *HP_inter_msg_txt_post; struct HPMHookPoint *HP_inter_msg_config_read_pre; @@ -500,24 +604,28 @@ struct { struct HPMHookPoint *HP_inter_savereg_post; struct HPMHookPoint *HP_inter_accreg_fromsql_pre; struct HPMHookPoint *HP_inter_accreg_fromsql_post; - struct HPMHookPoint *HP_inter_config_read_pre; - struct HPMHookPoint *HP_inter_config_read_post; struct HPMHookPoint *HP_inter_vlog_pre; struct HPMHookPoint *HP_inter_vlog_post; struct HPMHookPoint *HP_inter_init_sql_pre; struct HPMHookPoint *HP_inter_init_sql_post; struct HPMHookPoint *HP_inter_mapif_init_pre; struct HPMHookPoint *HP_inter_mapif_init_post; - struct HPMHookPoint *HP_inter_check_ttl_wisdata_sub_pre; - struct HPMHookPoint *HP_inter_check_ttl_wisdata_sub_post; - struct HPMHookPoint *HP_inter_check_ttl_wisdata_pre; - struct HPMHookPoint *HP_inter_check_ttl_wisdata_post; struct HPMHookPoint *HP_inter_check_length_pre; struct HPMHookPoint *HP_inter_check_length_post; struct HPMHookPoint *HP_inter_parse_frommap_pre; struct HPMHookPoint *HP_inter_parse_frommap_post; struct HPMHookPoint *HP_inter_final_pre; struct HPMHookPoint *HP_inter_final_post; + struct HPMHookPoint *HP_inter_config_read_pre; + struct HPMHookPoint *HP_inter_config_read_post; + struct HPMHookPoint *HP_inter_config_read_log_pre; + struct HPMHookPoint *HP_inter_config_read_log_post; + struct HPMHookPoint *HP_inter_config_read_connection_pre; + struct HPMHookPoint *HP_inter_config_read_connection_post; + struct HPMHookPoint *HP_inter_accinfo_pre; + struct HPMHookPoint *HP_inter_accinfo_post; + struct HPMHookPoint *HP_inter_accinfo2_pre; + struct HPMHookPoint *HP_inter_accinfo2_post; struct HPMHookPoint *HP_inter_mail_sql_init_pre; struct HPMHookPoint *HP_inter_mail_sql_init_post; struct HPMHookPoint *HP_inter_mail_sql_final_pre; @@ -534,6 +642,16 @@ struct { struct HPMHookPoint *HP_inter_mail_DeleteAttach_post; struct HPMHookPoint *HP_inter_mail_sendmail_pre; struct HPMHookPoint *HP_inter_mail_sendmail_post; + struct HPMHookPoint *HP_inter_mail_mark_read_pre; + struct HPMHookPoint *HP_inter_mail_mark_read_post; + struct HPMHookPoint *HP_inter_mail_get_attachment_pre; + struct HPMHookPoint *HP_inter_mail_get_attachment_post; + struct HPMHookPoint *HP_inter_mail_delete_pre; + struct HPMHookPoint *HP_inter_mail_delete_post; + struct HPMHookPoint *HP_inter_mail_return_message_pre; + struct HPMHookPoint *HP_inter_mail_return_message_post; + struct HPMHookPoint *HP_inter_mail_send_pre; + struct HPMHookPoint *HP_inter_mail_send_post; struct HPMHookPoint *HP_inter_mercenary_owner_fromsql_pre; struct HPMHookPoint *HP_inter_mercenary_owner_fromsql_post; struct HPMHookPoint *HP_inter_mercenary_owner_tosql_pre; @@ -546,12 +664,24 @@ struct { struct HPMHookPoint *HP_inter_mercenary_sql_final_post; struct HPMHookPoint *HP_inter_mercenary_parse_frommap_pre; struct HPMHookPoint *HP_inter_mercenary_parse_frommap_post; + struct HPMHookPoint *HP_inter_mercenary_create_pre; + struct HPMHookPoint *HP_inter_mercenary_create_post; + struct HPMHookPoint *HP_inter_mercenary_save_pre; + struct HPMHookPoint *HP_inter_mercenary_save_post; + struct HPMHookPoint *HP_inter_mercenary_load_pre; + struct HPMHookPoint *HP_inter_mercenary_load_post; + struct HPMHookPoint *HP_inter_mercenary_delete_pre; + struct HPMHookPoint *HP_inter_mercenary_delete_post; struct HPMHookPoint *HP_inter_party_check_lv_pre; struct HPMHookPoint *HP_inter_party_check_lv_post; + struct HPMHookPoint *HP_inter_party_is_family_party_pre; + struct HPMHookPoint *HP_inter_party_is_family_party_post; struct HPMHookPoint *HP_inter_party_calc_state_pre; struct HPMHookPoint *HP_inter_party_calc_state_post; struct HPMHookPoint *HP_inter_party_tosql_pre; struct HPMHookPoint *HP_inter_party_tosql_post; + struct HPMHookPoint *HP_inter_party_del_nonexistent_party_pre; + struct HPMHookPoint *HP_inter_party_del_nonexistent_party_post; struct HPMHookPoint *HP_inter_party_fromsql_pre; struct HPMHookPoint *HP_inter_party_fromsql_post; struct HPMHookPoint *HP_inter_party_sql_init_pre; @@ -572,6 +702,18 @@ struct { struct HPMHookPoint *HP_inter_party_CharOnline_post; struct HPMHookPoint *HP_inter_party_CharOffline_pre; struct HPMHookPoint *HP_inter_party_CharOffline_post; + struct HPMHookPoint *HP_inter_party_create_pre; + struct HPMHookPoint *HP_inter_party_create_post; + struct HPMHookPoint *HP_inter_party_add_member_pre; + struct HPMHookPoint *HP_inter_party_add_member_post; + struct HPMHookPoint *HP_inter_party_change_option_pre; + struct HPMHookPoint *HP_inter_party_change_option_post; + struct HPMHookPoint *HP_inter_party_change_map_pre; + struct HPMHookPoint *HP_inter_party_change_map_post; + struct HPMHookPoint *HP_inter_party_disband_pre; + struct HPMHookPoint *HP_inter_party_disband_post; + struct HPMHookPoint *HP_inter_party_change_leader_pre; + struct HPMHookPoint *HP_inter_party_change_leader_post; struct HPMHookPoint *HP_inter_pet_tosql_pre; struct HPMHookPoint *HP_inter_pet_tosql_post; struct HPMHookPoint *HP_inter_pet_fromsql_pre; @@ -584,8 +726,42 @@ struct { struct HPMHookPoint *HP_inter_pet_delete__post; struct HPMHookPoint *HP_inter_pet_parse_frommap_pre; struct HPMHookPoint *HP_inter_pet_parse_frommap_post; + struct HPMHookPoint *HP_inter_pet_create_pre; + struct HPMHookPoint *HP_inter_pet_create_post; + struct HPMHookPoint *HP_inter_pet_load_pre; + struct HPMHookPoint *HP_inter_pet_load_post; struct HPMHookPoint *HP_inter_quest_parse_frommap_pre; struct HPMHookPoint *HP_inter_quest_parse_frommap_post; + struct HPMHookPoint *HP_inter_quest_fromsql_pre; + struct HPMHookPoint *HP_inter_quest_fromsql_post; + struct HPMHookPoint *HP_inter_quest_delete_pre; + struct HPMHookPoint *HP_inter_quest_delete_post; + struct HPMHookPoint *HP_inter_quest_add_pre; + struct HPMHookPoint *HP_inter_quest_add_post; + struct HPMHookPoint *HP_inter_quest_update_pre; + struct HPMHookPoint *HP_inter_quest_update_post; + struct HPMHookPoint *HP_inter_quest_save_pre; + struct HPMHookPoint *HP_inter_quest_save_post; + struct HPMHookPoint *HP_inter_rodex_sql_init_pre; + struct HPMHookPoint *HP_inter_rodex_sql_init_post; + struct HPMHookPoint *HP_inter_rodex_sql_final_pre; + struct HPMHookPoint *HP_inter_rodex_sql_final_post; + struct HPMHookPoint *HP_inter_rodex_parse_frommap_pre; + struct HPMHookPoint *HP_inter_rodex_parse_frommap_post; + struct HPMHookPoint *HP_inter_rodex_fromsql_pre; + struct HPMHookPoint *HP_inter_rodex_fromsql_post; + struct HPMHookPoint *HP_inter_rodex_hasnew_pre; + struct HPMHookPoint *HP_inter_rodex_hasnew_post; + struct HPMHookPoint *HP_inter_rodex_checkname_pre; + struct HPMHookPoint *HP_inter_rodex_checkname_post; + struct HPMHookPoint *HP_inter_rodex_savemessage_pre; + struct HPMHookPoint *HP_inter_rodex_savemessage_post; + struct HPMHookPoint *HP_inter_rodex_updatemail_pre; + struct HPMHookPoint *HP_inter_rodex_updatemail_post; + struct HPMHookPoint *HP_inter_rodex_getzeny_pre; + struct HPMHookPoint *HP_inter_rodex_getzeny_post; + struct HPMHookPoint *HP_inter_rodex_getitems_pre; + struct HPMHookPoint *HP_inter_rodex_getitems_post; struct HPMHookPoint *HP_inter_storage_tosql_pre; struct HPMHookPoint *HP_inter_storage_tosql_post; struct HPMHookPoint *HP_inter_storage_fromsql_pre; @@ -604,6 +780,12 @@ struct { struct HPMHookPoint *HP_inter_storage_guild_storage_delete_post; struct HPMHookPoint *HP_inter_storage_parse_frommap_pre; struct HPMHookPoint *HP_inter_storage_parse_frommap_post; + struct HPMHookPoint *HP_inter_storage_retrieve_bound_items_pre; + struct HPMHookPoint *HP_inter_storage_retrieve_bound_items_post; + struct HPMHookPoint *HP_libconfig_set_db_path_pre; + struct HPMHookPoint *HP_libconfig_set_db_path_post; + struct HPMHookPoint *HP_libconfig_format_db_path_pre; + struct HPMHookPoint *HP_libconfig_format_db_path_post; struct HPMHookPoint *HP_libconfig_read_pre; struct HPMHookPoint *HP_libconfig_read_post; struct HPMHookPoint *HP_libconfig_write_pre; @@ -766,34 +948,6 @@ struct { struct HPMHookPoint *HP_loginif_send_users_count_post; struct HPMHookPoint *HP_loginif_connect_to_server_pre; struct HPMHookPoint *HP_loginif_connect_to_server_post; - struct HPMHookPoint *HP_iMalloc_init_pre; - struct HPMHookPoint *HP_iMalloc_init_post; - struct HPMHookPoint *HP_iMalloc_final_pre; - struct HPMHookPoint *HP_iMalloc_final_post; - struct HPMHookPoint *HP_iMalloc_malloc_pre; - struct HPMHookPoint *HP_iMalloc_malloc_post; - struct HPMHookPoint *HP_iMalloc_calloc_pre; - struct HPMHookPoint *HP_iMalloc_calloc_post; - struct HPMHookPoint *HP_iMalloc_realloc_pre; - struct HPMHookPoint *HP_iMalloc_realloc_post; - struct HPMHookPoint *HP_iMalloc_reallocz_pre; - struct HPMHookPoint *HP_iMalloc_reallocz_post; - struct HPMHookPoint *HP_iMalloc_astrdup_pre; - struct HPMHookPoint *HP_iMalloc_astrdup_post; - struct HPMHookPoint *HP_iMalloc_astrndup_pre; - struct HPMHookPoint *HP_iMalloc_astrndup_post; - struct HPMHookPoint *HP_iMalloc_free_pre; - struct HPMHookPoint *HP_iMalloc_free_post; - struct HPMHookPoint *HP_iMalloc_memory_check_pre; - struct HPMHookPoint *HP_iMalloc_memory_check_post; - struct HPMHookPoint *HP_iMalloc_verify_ptr_pre; - struct HPMHookPoint *HP_iMalloc_verify_ptr_post; - struct HPMHookPoint *HP_iMalloc_usage_pre; - struct HPMHookPoint *HP_iMalloc_usage_post; - struct HPMHookPoint *HP_iMalloc_post_shutdown_pre; - struct HPMHookPoint *HP_iMalloc_post_shutdown_post; - struct HPMHookPoint *HP_iMalloc_init_messages_pre; - struct HPMHookPoint *HP_iMalloc_init_messages_post; struct HPMHookPoint *HP_mapif_ban_pre; struct HPMHookPoint *HP_mapif_ban_post; struct HPMHookPoint *HP_mapif_server_init_pre; @@ -816,6 +970,16 @@ struct { struct HPMHookPoint *HP_mapif_send_post; struct HPMHookPoint *HP_mapif_send_users_count_pre; struct HPMHookPoint *HP_mapif_send_users_count_post; + struct HPMHookPoint *HP_mapif_pLoadAchievements_pre; + struct HPMHookPoint *HP_mapif_pLoadAchievements_post; + struct HPMHookPoint *HP_mapif_sAchievementsToMap_pre; + struct HPMHookPoint *HP_mapif_sAchievementsToMap_post; + struct HPMHookPoint *HP_mapif_pSaveAchievements_pre; + struct HPMHookPoint *HP_mapif_pSaveAchievements_post; + struct HPMHookPoint *HP_mapif_achievement_load_pre; + struct HPMHookPoint *HP_mapif_achievement_load_post; + struct HPMHookPoint *HP_mapif_achievement_save_pre; + struct HPMHookPoint *HP_mapif_achievement_save_post; struct HPMHookPoint *HP_mapif_auction_message_pre; struct HPMHookPoint *HP_mapif_auction_message_post; struct HPMHookPoint *HP_mapif_auction_sendlist_pre; @@ -838,14 +1002,6 @@ struct { struct HPMHookPoint *HP_mapif_auction_bid_post; struct HPMHookPoint *HP_mapif_parse_auction_bid_pre; struct HPMHookPoint *HP_mapif_parse_auction_bid_post; - struct HPMHookPoint *HP_mapif_elemental_create_pre; - struct HPMHookPoint *HP_mapif_elemental_create_post; - struct HPMHookPoint *HP_mapif_elemental_save_pre; - struct HPMHookPoint *HP_mapif_elemental_save_post; - struct HPMHookPoint *HP_mapif_elemental_load_pre; - struct HPMHookPoint *HP_mapif_elemental_load_post; - struct HPMHookPoint *HP_mapif_elemental_delete_pre; - struct HPMHookPoint *HP_mapif_elemental_delete_post; struct HPMHookPoint *HP_mapif_elemental_send_pre; struct HPMHookPoint *HP_mapif_elemental_send_post; struct HPMHookPoint *HP_mapif_parse_elemental_create_pre; @@ -874,8 +1030,6 @@ struct { struct HPMHookPoint *HP_mapif_guild_memberinfoshort_post; struct HPMHookPoint *HP_mapif_guild_broken_pre; struct HPMHookPoint *HP_mapif_guild_broken_post; - struct HPMHookPoint *HP_mapif_guild_message_pre; - struct HPMHookPoint *HP_mapif_guild_message_post; struct HPMHookPoint *HP_mapif_guild_basicinfochanged_pre; struct HPMHookPoint *HP_mapif_guild_basicinfochanged_post; struct HPMHookPoint *HP_mapif_guild_memberinfochanged_pre; @@ -906,8 +1060,6 @@ struct { struct HPMHookPoint *HP_mapif_parse_GuildChangeMemberInfoShort_post; struct HPMHookPoint *HP_mapif_parse_BreakGuild_pre; struct HPMHookPoint *HP_mapif_parse_BreakGuild_post; - struct HPMHookPoint *HP_mapif_parse_GuildMessage_pre; - struct HPMHookPoint *HP_mapif_parse_GuildMessage_post; struct HPMHookPoint *HP_mapif_parse_GuildBasicInfoChange_pre; struct HPMHookPoint *HP_mapif_parse_GuildBasicInfoChange_post; struct HPMHookPoint *HP_mapif_parse_GuildMemberInfoChange_pre; @@ -916,8 +1068,6 @@ struct { struct HPMHookPoint *HP_mapif_parse_GuildPosition_post; struct HPMHookPoint *HP_mapif_parse_GuildSkillUp_pre; struct HPMHookPoint *HP_mapif_parse_GuildSkillUp_post; - struct HPMHookPoint *HP_mapif_parse_GuildDeleteAlliance_pre; - struct HPMHookPoint *HP_mapif_parse_GuildDeleteAlliance_post; struct HPMHookPoint *HP_mapif_parse_GuildAlliance_pre; struct HPMHookPoint *HP_mapif_parse_GuildAlliance_post; struct HPMHookPoint *HP_mapif_parse_GuildNotice_pre; @@ -940,16 +1090,6 @@ struct { struct HPMHookPoint *HP_mapif_homunculus_saved_post; struct HPMHookPoint *HP_mapif_homunculus_renamed_pre; struct HPMHookPoint *HP_mapif_homunculus_renamed_post; - struct HPMHookPoint *HP_mapif_homunculus_create_pre; - struct HPMHookPoint *HP_mapif_homunculus_create_post; - struct HPMHookPoint *HP_mapif_homunculus_save_pre; - struct HPMHookPoint *HP_mapif_homunculus_save_post; - struct HPMHookPoint *HP_mapif_homunculus_load_pre; - struct HPMHookPoint *HP_mapif_homunculus_load_post; - struct HPMHookPoint *HP_mapif_homunculus_delete_pre; - struct HPMHookPoint *HP_mapif_homunculus_delete_post; - struct HPMHookPoint *HP_mapif_homunculus_rename_pre; - struct HPMHookPoint *HP_mapif_homunculus_rename_post; struct HPMHookPoint *HP_mapif_parse_homunculus_create_pre; struct HPMHookPoint *HP_mapif_parse_homunculus_create_post; struct HPMHookPoint *HP_mapif_parse_homunculus_delete_pre; @@ -968,8 +1108,6 @@ struct { struct HPMHookPoint *HP_mapif_parse_mail_read_post; struct HPMHookPoint *HP_mapif_mail_sendattach_pre; struct HPMHookPoint *HP_mapif_mail_sendattach_post; - struct HPMHookPoint *HP_mapif_mail_getattach_pre; - struct HPMHookPoint *HP_mapif_mail_getattach_post; struct HPMHookPoint *HP_mapif_parse_mail_getattach_pre; struct HPMHookPoint *HP_mapif_parse_mail_getattach_post; struct HPMHookPoint *HP_mapif_mail_delete_pre; @@ -986,14 +1124,6 @@ struct { struct HPMHookPoint *HP_mapif_mail_send_post; struct HPMHookPoint *HP_mapif_parse_mail_send_pre; struct HPMHookPoint *HP_mapif_parse_mail_send_post; - struct HPMHookPoint *HP_mapif_mercenary_create_pre; - struct HPMHookPoint *HP_mapif_mercenary_create_post; - struct HPMHookPoint *HP_mapif_mercenary_save_pre; - struct HPMHookPoint *HP_mapif_mercenary_save_post; - struct HPMHookPoint *HP_mapif_mercenary_load_pre; - struct HPMHookPoint *HP_mapif_mercenary_load_post; - struct HPMHookPoint *HP_mapif_mercenary_delete_pre; - struct HPMHookPoint *HP_mapif_mercenary_delete_post; struct HPMHookPoint *HP_mapif_mercenary_send_pre; struct HPMHookPoint *HP_mapif_mercenary_send_post; struct HPMHookPoint *HP_mapif_parse_mercenary_create_pre; @@ -1024,8 +1154,6 @@ struct { struct HPMHookPoint *HP_mapif_party_membermoved_post; struct HPMHookPoint *HP_mapif_party_broken_pre; struct HPMHookPoint *HP_mapif_party_broken_post; - struct HPMHookPoint *HP_mapif_party_message_pre; - struct HPMHookPoint *HP_mapif_party_message_post; struct HPMHookPoint *HP_mapif_parse_CreateParty_pre; struct HPMHookPoint *HP_mapif_parse_CreateParty_post; struct HPMHookPoint *HP_mapif_parse_PartyInfo_pre; @@ -1040,8 +1168,6 @@ struct { struct HPMHookPoint *HP_mapif_parse_PartyChangeMap_post; struct HPMHookPoint *HP_mapif_parse_BreakParty_pre; struct HPMHookPoint *HP_mapif_parse_BreakParty_post; - struct HPMHookPoint *HP_mapif_parse_PartyMessage_pre; - struct HPMHookPoint *HP_mapif_parse_PartyMessage_post; struct HPMHookPoint *HP_mapif_parse_PartyLeaderChange_pre; struct HPMHookPoint *HP_mapif_parse_PartyLeaderChange_post; struct HPMHookPoint *HP_mapif_pet_created_pre; @@ -1054,10 +1180,6 @@ struct { struct HPMHookPoint *HP_mapif_save_pet_ack_post; struct HPMHookPoint *HP_mapif_delete_pet_ack_pre; struct HPMHookPoint *HP_mapif_delete_pet_ack_post; - struct HPMHookPoint *HP_mapif_create_pet_pre; - struct HPMHookPoint *HP_mapif_create_pet_post; - struct HPMHookPoint *HP_mapif_load_pet_pre; - struct HPMHookPoint *HP_mapif_load_pet_post; struct HPMHookPoint *HP_mapif_save_pet_pre; struct HPMHookPoint *HP_mapif_save_pet_post; struct HPMHookPoint *HP_mapif_delete_pet_pre; @@ -1070,14 +1192,6 @@ struct { struct HPMHookPoint *HP_mapif_parse_SavePet_post; struct HPMHookPoint *HP_mapif_parse_DeletePet_pre; struct HPMHookPoint *HP_mapif_parse_DeletePet_post; - struct HPMHookPoint *HP_mapif_quests_fromsql_pre; - struct HPMHookPoint *HP_mapif_quests_fromsql_post; - struct HPMHookPoint *HP_mapif_quest_delete_pre; - struct HPMHookPoint *HP_mapif_quest_delete_post; - struct HPMHookPoint *HP_mapif_quest_add_pre; - struct HPMHookPoint *HP_mapif_quest_add_post; - struct HPMHookPoint *HP_mapif_quest_update_pre; - struct HPMHookPoint *HP_mapif_quest_update_post; struct HPMHookPoint *HP_mapif_quest_save_ack_pre; struct HPMHookPoint *HP_mapif_quest_save_ack_post; struct HPMHookPoint *HP_mapif_parse_quest_save_pre; @@ -1086,6 +1200,28 @@ struct { struct HPMHookPoint *HP_mapif_send_quests_post; struct HPMHookPoint *HP_mapif_parse_quest_load_pre; struct HPMHookPoint *HP_mapif_parse_quest_load_post; + struct HPMHookPoint *HP_mapif_parse_rodex_requestinbox_pre; + struct HPMHookPoint *HP_mapif_parse_rodex_requestinbox_post; + struct HPMHookPoint *HP_mapif_rodex_sendinbox_pre; + struct HPMHookPoint *HP_mapif_rodex_sendinbox_post; + struct HPMHookPoint *HP_mapif_parse_rodex_checkhasnew_pre; + struct HPMHookPoint *HP_mapif_parse_rodex_checkhasnew_post; + struct HPMHookPoint *HP_mapif_rodex_sendhasnew_pre; + struct HPMHookPoint *HP_mapif_rodex_sendhasnew_post; + struct HPMHookPoint *HP_mapif_parse_rodex_updatemail_pre; + struct HPMHookPoint *HP_mapif_parse_rodex_updatemail_post; + struct HPMHookPoint *HP_mapif_parse_rodex_send_pre; + struct HPMHookPoint *HP_mapif_parse_rodex_send_post; + struct HPMHookPoint *HP_mapif_rodex_send_pre; + struct HPMHookPoint *HP_mapif_rodex_send_post; + struct HPMHookPoint *HP_mapif_parse_rodex_checkname_pre; + struct HPMHookPoint *HP_mapif_parse_rodex_checkname_post; + struct HPMHookPoint *HP_mapif_rodex_checkname_pre; + struct HPMHookPoint *HP_mapif_rodex_checkname_post; + struct HPMHookPoint *HP_mapif_rodex_getzenyack_pre; + struct HPMHookPoint *HP_mapif_rodex_getzenyack_post; + struct HPMHookPoint *HP_mapif_rodex_getitemsack_pre; + struct HPMHookPoint *HP_mapif_rodex_getitemsack_post; struct HPMHookPoint *HP_mapif_load_guild_storage_pre; struct HPMHookPoint *HP_mapif_load_guild_storage_post; struct HPMHookPoint *HP_mapif_save_guild_storage_ack_pre; @@ -1094,36 +1230,24 @@ struct { struct HPMHookPoint *HP_mapif_parse_LoadGuildStorage_post; struct HPMHookPoint *HP_mapif_parse_SaveGuildStorage_pre; struct HPMHookPoint *HP_mapif_parse_SaveGuildStorage_post; + struct HPMHookPoint *HP_mapif_account_storage_load_pre; + struct HPMHookPoint *HP_mapif_account_storage_load_post; + struct HPMHookPoint *HP_mapif_pAccountStorageLoad_pre; + struct HPMHookPoint *HP_mapif_pAccountStorageLoad_post; + struct HPMHookPoint *HP_mapif_pAccountStorageSave_pre; + struct HPMHookPoint *HP_mapif_pAccountStorageSave_post; + struct HPMHookPoint *HP_mapif_sAccountStorageSaveAck_pre; + struct HPMHookPoint *HP_mapif_sAccountStorageSaveAck_post; struct HPMHookPoint *HP_mapif_itembound_ack_pre; struct HPMHookPoint *HP_mapif_itembound_ack_post; - struct HPMHookPoint *HP_mapif_parse_ItemBoundRetrieve_sub_pre; - struct HPMHookPoint *HP_mapif_parse_ItemBoundRetrieve_sub_post; struct HPMHookPoint *HP_mapif_parse_ItemBoundRetrieve_pre; struct HPMHookPoint *HP_mapif_parse_ItemBoundRetrieve_post; struct HPMHookPoint *HP_mapif_parse_accinfo_pre; struct HPMHookPoint *HP_mapif_parse_accinfo_post; - struct HPMHookPoint *HP_mapif_parse_accinfo2_pre; - struct HPMHookPoint *HP_mapif_parse_accinfo2_post; - struct HPMHookPoint *HP_mapif_broadcast_pre; - struct HPMHookPoint *HP_mapif_broadcast_post; - struct HPMHookPoint *HP_mapif_wis_message_pre; - struct HPMHookPoint *HP_mapif_wis_message_post; - struct HPMHookPoint *HP_mapif_wis_response_pre; - struct HPMHookPoint *HP_mapif_wis_response_post; - struct HPMHookPoint *HP_mapif_wis_end_pre; - struct HPMHookPoint *HP_mapif_wis_end_post; struct HPMHookPoint *HP_mapif_account_reg_reply_pre; struct HPMHookPoint *HP_mapif_account_reg_reply_post; struct HPMHookPoint *HP_mapif_disconnectplayer_pre; struct HPMHookPoint *HP_mapif_disconnectplayer_post; - struct HPMHookPoint *HP_mapif_parse_broadcast_pre; - struct HPMHookPoint *HP_mapif_parse_broadcast_post; - struct HPMHookPoint *HP_mapif_parse_WisRequest_pre; - struct HPMHookPoint *HP_mapif_parse_WisRequest_post; - struct HPMHookPoint *HP_mapif_parse_WisReply_pre; - struct HPMHookPoint *HP_mapif_parse_WisReply_post; - struct HPMHookPoint *HP_mapif_parse_WisToGM_pre; - struct HPMHookPoint *HP_mapif_parse_WisToGM_post; struct HPMHookPoint *HP_mapif_parse_Registry_pre; struct HPMHookPoint *HP_mapif_parse_Registry_post; struct HPMHookPoint *HP_mapif_parse_RegistryRequest_pre; @@ -1132,6 +1256,14 @@ struct { struct HPMHookPoint *HP_mapif_namechange_ack_post; struct HPMHookPoint *HP_mapif_parse_NameChangeRequest_pre; struct HPMHookPoint *HP_mapif_parse_NameChangeRequest_post; + struct HPMHookPoint *HP_mapif_parse_ClanMemberKick_pre; + struct HPMHookPoint *HP_mapif_parse_ClanMemberKick_post; + struct HPMHookPoint *HP_mapif_parse_ClanMemberCount_pre; + struct HPMHookPoint *HP_mapif_parse_ClanMemberCount_post; + struct HPMHookPoint *HP_mapindex_config_read_dbpath_pre; + struct HPMHookPoint *HP_mapindex_config_read_dbpath_post; + struct HPMHookPoint *HP_mapindex_config_read_pre; + struct HPMHookPoint *HP_mapindex_config_read_post; struct HPMHookPoint *HP_mapindex_init_pre; struct HPMHookPoint *HP_mapindex_init_post; struct HPMHookPoint *HP_mapindex_final_pre; @@ -1150,8 +1282,46 @@ struct { struct HPMHookPoint *HP_mapindex_id2name_post; struct HPMHookPoint *HP_mapindex_check_default_pre; struct HPMHookPoint *HP_mapindex_check_default_post; + struct HPMHookPoint *HP_md5_string_pre; + struct HPMHookPoint *HP_md5_string_post; + struct HPMHookPoint *HP_md5_binary_pre; + struct HPMHookPoint *HP_md5_binary_post; + struct HPMHookPoint *HP_md5_salt_pre; + struct HPMHookPoint *HP_md5_salt_post; + struct HPMHookPoint *HP_mutex_create_pre; + struct HPMHookPoint *HP_mutex_create_post; + struct HPMHookPoint *HP_mutex_destroy_pre; + struct HPMHookPoint *HP_mutex_destroy_post; + struct HPMHookPoint *HP_mutex_lock_pre; + struct HPMHookPoint *HP_mutex_lock_post; + struct HPMHookPoint *HP_mutex_trylock_pre; + struct HPMHookPoint *HP_mutex_trylock_post; + struct HPMHookPoint *HP_mutex_unlock_pre; + struct HPMHookPoint *HP_mutex_unlock_post; + struct HPMHookPoint *HP_mutex_cond_create_pre; + struct HPMHookPoint *HP_mutex_cond_create_post; + struct HPMHookPoint *HP_mutex_cond_destroy_pre; + struct HPMHookPoint *HP_mutex_cond_destroy_post; + struct HPMHookPoint *HP_mutex_cond_wait_pre; + struct HPMHookPoint *HP_mutex_cond_wait_post; + struct HPMHookPoint *HP_mutex_cond_signal_pre; + struct HPMHookPoint *HP_mutex_cond_signal_post; + struct HPMHookPoint *HP_mutex_cond_broadcast_pre; + struct HPMHookPoint *HP_mutex_cond_broadcast_post; + struct HPMHookPoint *HP_nullpo_init_pre; + struct HPMHookPoint *HP_nullpo_init_post; + struct HPMHookPoint *HP_nullpo_final_pre; + struct HPMHookPoint *HP_nullpo_final_post; struct HPMHookPoint *HP_nullpo_assert_report_pre; struct HPMHookPoint *HP_nullpo_assert_report_post; + struct HPMHookPoint *HP_packets_init_pre; + struct HPMHookPoint *HP_packets_init_post; + struct HPMHookPoint *HP_packets_final_pre; + struct HPMHookPoint *HP_packets_final_post; + struct HPMHookPoint *HP_packets_addLens_pre; + struct HPMHookPoint *HP_packets_addLens_post; + struct HPMHookPoint *HP_packets_addLen_pre; + struct HPMHookPoint *HP_packets_addLen_post; struct HPMHookPoint *HP_pincode_handle_pre; struct HPMHookPoint *HP_pincode_handle_post; struct HPMHookPoint *HP_pincode_decrypt_pre; @@ -1160,18 +1330,46 @@ struct { struct HPMHookPoint *HP_pincode_error_post; struct HPMHookPoint *HP_pincode_update_pre; struct HPMHookPoint *HP_pincode_update_post; - struct HPMHookPoint *HP_pincode_sendstate_pre; - struct HPMHookPoint *HP_pincode_sendstate_post; + struct HPMHookPoint *HP_pincode_makestate_pre; + struct HPMHookPoint *HP_pincode_makestate_post; + struct HPMHookPoint *HP_pincode_editstate_pre; + struct HPMHookPoint *HP_pincode_editstate_post; + struct HPMHookPoint *HP_pincode_loginstate_pre; + struct HPMHookPoint *HP_pincode_loginstate_post; + struct HPMHookPoint *HP_pincode_loginstate2_pre; + struct HPMHookPoint *HP_pincode_loginstate2_post; struct HPMHookPoint *HP_pincode_setnew_pre; struct HPMHookPoint *HP_pincode_setnew_post; struct HPMHookPoint *HP_pincode_change_pre; struct HPMHookPoint *HP_pincode_change_post; + struct HPMHookPoint *HP_pincode_isBlacklisted_pre; + struct HPMHookPoint *HP_pincode_isBlacklisted_post; struct HPMHookPoint *HP_pincode_compare_pre; struct HPMHookPoint *HP_pincode_compare_post; struct HPMHookPoint *HP_pincode_check_pre; struct HPMHookPoint *HP_pincode_check_post; struct HPMHookPoint *HP_pincode_config_read_pre; struct HPMHookPoint *HP_pincode_config_read_post; + struct HPMHookPoint *HP_pincode_init_pre; + struct HPMHookPoint *HP_pincode_init_post; + struct HPMHookPoint *HP_pincode_final_pre; + struct HPMHookPoint *HP_pincode_final_post; + struct HPMHookPoint *HP_rnd_init_pre; + struct HPMHookPoint *HP_rnd_init_post; + struct HPMHookPoint *HP_rnd_final_pre; + struct HPMHookPoint *HP_rnd_final_post; + struct HPMHookPoint *HP_rnd_seed_pre; + struct HPMHookPoint *HP_rnd_seed_post; + struct HPMHookPoint *HP_rnd_random_pre; + struct HPMHookPoint *HP_rnd_random_post; + struct HPMHookPoint *HP_rnd_roll_pre; + struct HPMHookPoint *HP_rnd_roll_post; + struct HPMHookPoint *HP_rnd_value_pre; + struct HPMHookPoint *HP_rnd_value_post; + struct HPMHookPoint *HP_rnd_uniform_pre; + struct HPMHookPoint *HP_rnd_uniform_post; + struct HPMHookPoint *HP_rnd_uniform53_pre; + struct HPMHookPoint *HP_rnd_uniform53_post; struct HPMHookPoint *HP_showmsg_init_pre; struct HPMHookPoint *HP_showmsg_init_post; struct HPMHookPoint *HP_showmsg_final_pre; @@ -1198,10 +1396,14 @@ struct { struct HPMHookPoint *HP_sockt_realloc_writefifo_post; struct HPMHookPoint *HP_sockt_wfifoset_pre; struct HPMHookPoint *HP_sockt_wfifoset_post; + struct HPMHookPoint *HP_sockt_wfifohead_pre; + struct HPMHookPoint *HP_sockt_wfifohead_post; struct HPMHookPoint *HP_sockt_rfifoskip_pre; struct HPMHookPoint *HP_sockt_rfifoskip_post; struct HPMHookPoint *HP_sockt_close_pre; struct HPMHookPoint *HP_sockt_close_post; + struct HPMHookPoint *HP_sockt_validateWfifo_pre; + struct HPMHookPoint *HP_sockt_validateWfifo_post; struct HPMHookPoint *HP_sockt_session_is_valid_pre; struct HPMHookPoint *HP_sockt_session_is_valid_post; struct HPMHookPoint *HP_sockt_session_is_active_pre; @@ -1210,6 +1412,8 @@ struct { struct HPMHookPoint *HP_sockt_flush_post; struct HPMHookPoint *HP_sockt_flush_fifos_pre; struct HPMHookPoint *HP_sockt_flush_fifos_post; + struct HPMHookPoint *HP_sockt_connect_client_pre; + struct HPMHookPoint *HP_sockt_connect_client_post; struct HPMHookPoint *HP_sockt_set_nonblocking_pre; struct HPMHookPoint *HP_sockt_set_nonblocking_post; struct HPMHookPoint *HP_sockt_set_defaultparse_pre; @@ -1400,6 +1604,28 @@ struct { struct HPMHookPoint *HP_sysinfo_init_post; struct HPMHookPoint *HP_sysinfo_final_pre; struct HPMHookPoint *HP_sysinfo_final_post; + struct HPMHookPoint *HP_thread_init_pre; + struct HPMHookPoint *HP_thread_init_post; + struct HPMHookPoint *HP_thread_final_pre; + struct HPMHookPoint *HP_thread_final_post; + struct HPMHookPoint *HP_thread_create_pre; + struct HPMHookPoint *HP_thread_create_post; + struct HPMHookPoint *HP_thread_create_opt_pre; + struct HPMHookPoint *HP_thread_create_opt_post; + struct HPMHookPoint *HP_thread_destroy_pre; + struct HPMHookPoint *HP_thread_destroy_post; + struct HPMHookPoint *HP_thread_self_pre; + struct HPMHookPoint *HP_thread_self_post; + struct HPMHookPoint *HP_thread_get_tid_pre; + struct HPMHookPoint *HP_thread_get_tid_post; + struct HPMHookPoint *HP_thread_wait_pre; + struct HPMHookPoint *HP_thread_wait_post; + struct HPMHookPoint *HP_thread_prio_set_pre; + struct HPMHookPoint *HP_thread_prio_set_post; + struct HPMHookPoint *HP_thread_prio_get_pre; + struct HPMHookPoint *HP_thread_prio_get_post; + struct HPMHookPoint *HP_thread_yield_pre; + struct HPMHookPoint *HP_thread_yield_post; struct HPMHookPoint *HP_timer_gettick_pre; struct HPMHookPoint *HP_timer_gettick_post; struct HPMHookPoint *HP_timer_gettick_nocache_pre; @@ -1465,6 +1691,8 @@ struct { int HP_chr_create_charstatus_post; int HP_chr_mmo_char_tosql_pre; int HP_chr_mmo_char_tosql_post; + int HP_chr_getitemdata_from_sql_pre; + int HP_chr_getitemdata_from_sql_post; int HP_chr_memitemdata_to_sql_pre; int HP_chr_memitemdata_to_sql_post; int HP_chr_mmo_gender_pre; @@ -1479,6 +1707,8 @@ struct { int HP_chr_char_slotchange_post; int HP_chr_rename_char_sql_pre; int HP_chr_rename_char_sql_post; + int HP_chr_name_exists_pre; + int HP_chr_name_exists_post; int HP_chr_check_char_name_pre; int HP_chr_check_char_name_post; int HP_chr_make_new_char_sql_pre; @@ -1489,8 +1719,10 @@ struct { int HP_chr_count_users_post; int HP_chr_mmo_char_tobuf_pre; int HP_chr_mmo_char_tobuf_post; - int HP_chr_mmo_char_send099d_pre; - int HP_chr_mmo_char_send099d_post; + int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre; + int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post; + int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre; + int HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post; int HP_chr_mmo_char_send_ban_list_pre; int HP_chr_mmo_char_send_ban_list_post; int HP_chr_mmo_char_send_slots_info_pre; @@ -1635,8 +1867,6 @@ struct { int HP_chr_parse_frommap_auth_request_post; int HP_chr_parse_frommap_update_ip_pre; int HP_chr_parse_frommap_update_ip_post; - int HP_chr_parse_frommap_request_stats_report_pre; - int HP_chr_parse_frommap_request_stats_report_post; int HP_chr_parse_frommap_scdata_update_pre; int HP_chr_parse_frommap_scdata_update_post; int HP_chr_parse_frommap_scdata_delete_pre; @@ -1747,10 +1977,38 @@ struct { int HP_chr_online_data_cleanup_post; int HP_chr_sql_config_read_pre; int HP_chr_sql_config_read_post; - int HP_chr_config_dispatch_pre; - int HP_chr_config_dispatch_post; + int HP_chr_sql_config_read_registry_pre; + int HP_chr_sql_config_read_registry_post; + int HP_chr_sql_config_read_pc_pre; + int HP_chr_sql_config_read_pc_post; + int HP_chr_sql_config_read_guild_pre; + int HP_chr_sql_config_read_guild_post; int HP_chr_config_read_pre; int HP_chr_config_read_post; + int HP_chr_config_read_database_pre; + int HP_chr_config_read_database_post; + int HP_chr_config_read_console_pre; + int HP_chr_config_read_console_post; + int HP_chr_config_read_player_fame_pre; + int HP_chr_config_read_player_fame_post; + int HP_chr_config_read_player_deletion_pre; + int HP_chr_config_read_player_deletion_post; + int HP_chr_config_read_player_name_pre; + int HP_chr_config_read_player_name_post; + int HP_chr_config_set_start_item_pre; + int HP_chr_config_set_start_item_post; + int HP_chr_config_read_player_new_pre; + int HP_chr_config_read_player_new_post; + int HP_chr_config_read_player_pre; + int HP_chr_config_read_player_post; + int HP_chr_config_read_permission_pre; + int HP_chr_config_read_permission_post; + int HP_chr_config_set_ip_pre; + int HP_chr_config_set_ip_post; + int HP_chr_config_read_inter_pre; + int HP_chr_config_read_inter_post; + int HP_chr_config_read_top_pre; + int HP_chr_config_read_top_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; @@ -1811,12 +2069,30 @@ struct { int HP_DB_init_post; int HP_DB_final_pre; int HP_DB_final_post; + int HP_des_decrypt_block_pre; + int HP_des_decrypt_block_post; + int HP_des_decrypt_pre; + int HP_des_decrypt_post; int HP_geoip_getcountry_pre; int HP_geoip_getcountry_post; int HP_geoip_final_pre; int HP_geoip_final_post; int HP_geoip_init_pre; int HP_geoip_init_post; + int HP_inter_achievement_sql_init_pre; + int HP_inter_achievement_sql_init_post; + int HP_inter_achievement_sql_final_pre; + int HP_inter_achievement_sql_final_post; + int HP_inter_achievement_tosql_pre; + int HP_inter_achievement_tosql_post; + int HP_inter_achievement_fromsql_pre; + int HP_inter_achievement_fromsql_post; + int HP_inter_achievement_ensure_char_achievements_pre; + int HP_inter_achievement_ensure_char_achievements_post; + int HP_inter_achievement_char_achievements_clear_pre; + int HP_inter_achievement_char_achievements_clear_post; + int HP_inter_achievement_parse_frommap_pre; + int HP_inter_achievement_parse_frommap_post; int HP_inter_auction_count_pre; int HP_inter_auction_count_post; int HP_inter_auction_save_pre; @@ -1835,12 +2111,26 @@ struct { int HP_inter_auction_sql_init_post; int HP_inter_auction_sql_final_pre; int HP_inter_auction_sql_final_post; + int HP_inter_clan_kick_inactive_members_pre; + int HP_inter_clan_kick_inactive_members_post; + int HP_inter_clan_count_members_pre; + int HP_inter_clan_count_members_post; + int HP_inter_clan_parse_frommap_pre; + int HP_inter_clan_parse_frommap_post; int HP_inter_elemental_sql_init_pre; int HP_inter_elemental_sql_init_post; int HP_inter_elemental_sql_final_pre; int HP_inter_elemental_sql_final_post; int HP_inter_elemental_parse_frommap_pre; int HP_inter_elemental_parse_frommap_post; + int HP_inter_elemental_create_pre; + int HP_inter_elemental_create_post; + int HP_inter_elemental_save_pre; + int HP_inter_elemental_save_post; + int HP_inter_elemental_load_pre; + int HP_inter_elemental_load_post; + int HP_inter_elemental_delete_pre; + int HP_inter_elemental_delete_post; int HP_inter_guild_save_timer_pre; int HP_inter_guild_save_timer_post; int HP_inter_guild_removemember_tosql_pre; @@ -1881,16 +2171,54 @@ struct { int HP_inter_guild_charname_changed_post; int HP_inter_guild_parse_frommap_pre; int HP_inter_guild_parse_frommap_post; - int HP_inter_guild_leave_pre; - int HP_inter_guild_leave_post; int HP_inter_guild_broken_pre; int HP_inter_guild_broken_post; + int HP_inter_guild_create_pre; + int HP_inter_guild_create_post; + int HP_inter_guild_add_member_pre; + int HP_inter_guild_add_member_post; + int HP_inter_guild_leave_pre; + int HP_inter_guild_leave_post; + int HP_inter_guild_update_member_info_short_pre; + int HP_inter_guild_update_member_info_short_post; + int HP_inter_guild_update_member_info_pre; + int HP_inter_guild_update_member_info_post; + int HP_inter_guild_disband_pre; + int HP_inter_guild_disband_post; + int HP_inter_guild_update_basic_info_pre; + int HP_inter_guild_update_basic_info_post; + int HP_inter_guild_update_position_pre; + int HP_inter_guild_update_position_post; + int HP_inter_guild_use_skill_point_pre; + int HP_inter_guild_use_skill_point_post; + int HP_inter_guild_remove_alliance_pre; + int HP_inter_guild_remove_alliance_post; + int HP_inter_guild_change_alliance_pre; + int HP_inter_guild_change_alliance_post; + int HP_inter_guild_update_notice_pre; + int HP_inter_guild_update_notice_post; + int HP_inter_guild_update_emblem_pre; + int HP_inter_guild_update_emblem_post; + int HP_inter_guild_update_castle_data_pre; + int HP_inter_guild_update_castle_data_post; + int HP_inter_guild_change_leader_pre; + int HP_inter_guild_change_leader_post; int HP_inter_homunculus_sql_init_pre; int HP_inter_homunculus_sql_init_post; int HP_inter_homunculus_sql_final_pre; int HP_inter_homunculus_sql_final_post; int HP_inter_homunculus_parse_frommap_pre; int HP_inter_homunculus_parse_frommap_post; + int HP_inter_homunculus_create_pre; + int HP_inter_homunculus_create_post; + int HP_inter_homunculus_save_pre; + int HP_inter_homunculus_save_post; + int HP_inter_homunculus_load_pre; + int HP_inter_homunculus_load_post; + int HP_inter_homunculus_delete_pre; + int HP_inter_homunculus_delete_post; + int HP_inter_homunculus_rename_pre; + int HP_inter_homunculus_rename_post; int HP_inter_msg_txt_pre; int HP_inter_msg_txt_post; int HP_inter_msg_config_read_pre; @@ -1905,24 +2233,28 @@ struct { int HP_inter_savereg_post; int HP_inter_accreg_fromsql_pre; int HP_inter_accreg_fromsql_post; - int HP_inter_config_read_pre; - int HP_inter_config_read_post; int HP_inter_vlog_pre; int HP_inter_vlog_post; int HP_inter_init_sql_pre; int HP_inter_init_sql_post; int HP_inter_mapif_init_pre; int HP_inter_mapif_init_post; - int HP_inter_check_ttl_wisdata_sub_pre; - int HP_inter_check_ttl_wisdata_sub_post; - int HP_inter_check_ttl_wisdata_pre; - int HP_inter_check_ttl_wisdata_post; int HP_inter_check_length_pre; int HP_inter_check_length_post; int HP_inter_parse_frommap_pre; int HP_inter_parse_frommap_post; int HP_inter_final_pre; int HP_inter_final_post; + int HP_inter_config_read_pre; + int HP_inter_config_read_post; + int HP_inter_config_read_log_pre; + int HP_inter_config_read_log_post; + int HP_inter_config_read_connection_pre; + int HP_inter_config_read_connection_post; + int HP_inter_accinfo_pre; + int HP_inter_accinfo_post; + int HP_inter_accinfo2_pre; + int HP_inter_accinfo2_post; int HP_inter_mail_sql_init_pre; int HP_inter_mail_sql_init_post; int HP_inter_mail_sql_final_pre; @@ -1939,6 +2271,16 @@ struct { int HP_inter_mail_DeleteAttach_post; int HP_inter_mail_sendmail_pre; int HP_inter_mail_sendmail_post; + int HP_inter_mail_mark_read_pre; + int HP_inter_mail_mark_read_post; + int HP_inter_mail_get_attachment_pre; + int HP_inter_mail_get_attachment_post; + int HP_inter_mail_delete_pre; + int HP_inter_mail_delete_post; + int HP_inter_mail_return_message_pre; + int HP_inter_mail_return_message_post; + int HP_inter_mail_send_pre; + int HP_inter_mail_send_post; int HP_inter_mercenary_owner_fromsql_pre; int HP_inter_mercenary_owner_fromsql_post; int HP_inter_mercenary_owner_tosql_pre; @@ -1951,12 +2293,24 @@ struct { int HP_inter_mercenary_sql_final_post; int HP_inter_mercenary_parse_frommap_pre; int HP_inter_mercenary_parse_frommap_post; + int HP_inter_mercenary_create_pre; + int HP_inter_mercenary_create_post; + int HP_inter_mercenary_save_pre; + int HP_inter_mercenary_save_post; + int HP_inter_mercenary_load_pre; + int HP_inter_mercenary_load_post; + int HP_inter_mercenary_delete_pre; + int HP_inter_mercenary_delete_post; int HP_inter_party_check_lv_pre; int HP_inter_party_check_lv_post; + int HP_inter_party_is_family_party_pre; + int HP_inter_party_is_family_party_post; int HP_inter_party_calc_state_pre; int HP_inter_party_calc_state_post; int HP_inter_party_tosql_pre; int HP_inter_party_tosql_post; + int HP_inter_party_del_nonexistent_party_pre; + int HP_inter_party_del_nonexistent_party_post; int HP_inter_party_fromsql_pre; int HP_inter_party_fromsql_post; int HP_inter_party_sql_init_pre; @@ -1977,6 +2331,18 @@ struct { int HP_inter_party_CharOnline_post; int HP_inter_party_CharOffline_pre; int HP_inter_party_CharOffline_post; + int HP_inter_party_create_pre; + int HP_inter_party_create_post; + int HP_inter_party_add_member_pre; + int HP_inter_party_add_member_post; + int HP_inter_party_change_option_pre; + int HP_inter_party_change_option_post; + int HP_inter_party_change_map_pre; + int HP_inter_party_change_map_post; + int HP_inter_party_disband_pre; + int HP_inter_party_disband_post; + int HP_inter_party_change_leader_pre; + int HP_inter_party_change_leader_post; int HP_inter_pet_tosql_pre; int HP_inter_pet_tosql_post; int HP_inter_pet_fromsql_pre; @@ -1989,8 +2355,42 @@ struct { int HP_inter_pet_delete__post; int HP_inter_pet_parse_frommap_pre; int HP_inter_pet_parse_frommap_post; + int HP_inter_pet_create_pre; + int HP_inter_pet_create_post; + int HP_inter_pet_load_pre; + int HP_inter_pet_load_post; int HP_inter_quest_parse_frommap_pre; int HP_inter_quest_parse_frommap_post; + int HP_inter_quest_fromsql_pre; + int HP_inter_quest_fromsql_post; + int HP_inter_quest_delete_pre; + int HP_inter_quest_delete_post; + int HP_inter_quest_add_pre; + int HP_inter_quest_add_post; + int HP_inter_quest_update_pre; + int HP_inter_quest_update_post; + int HP_inter_quest_save_pre; + int HP_inter_quest_save_post; + int HP_inter_rodex_sql_init_pre; + int HP_inter_rodex_sql_init_post; + int HP_inter_rodex_sql_final_pre; + int HP_inter_rodex_sql_final_post; + int HP_inter_rodex_parse_frommap_pre; + int HP_inter_rodex_parse_frommap_post; + int HP_inter_rodex_fromsql_pre; + int HP_inter_rodex_fromsql_post; + int HP_inter_rodex_hasnew_pre; + int HP_inter_rodex_hasnew_post; + int HP_inter_rodex_checkname_pre; + int HP_inter_rodex_checkname_post; + int HP_inter_rodex_savemessage_pre; + int HP_inter_rodex_savemessage_post; + int HP_inter_rodex_updatemail_pre; + int HP_inter_rodex_updatemail_post; + int HP_inter_rodex_getzeny_pre; + int HP_inter_rodex_getzeny_post; + int HP_inter_rodex_getitems_pre; + int HP_inter_rodex_getitems_post; int HP_inter_storage_tosql_pre; int HP_inter_storage_tosql_post; int HP_inter_storage_fromsql_pre; @@ -2009,6 +2409,12 @@ struct { int HP_inter_storage_guild_storage_delete_post; int HP_inter_storage_parse_frommap_pre; int HP_inter_storage_parse_frommap_post; + int HP_inter_storage_retrieve_bound_items_pre; + int HP_inter_storage_retrieve_bound_items_post; + int HP_libconfig_set_db_path_pre; + int HP_libconfig_set_db_path_post; + int HP_libconfig_format_db_path_pre; + int HP_libconfig_format_db_path_post; int HP_libconfig_read_pre; int HP_libconfig_read_post; int HP_libconfig_write_pre; @@ -2171,34 +2577,6 @@ struct { int HP_loginif_send_users_count_post; int HP_loginif_connect_to_server_pre; int HP_loginif_connect_to_server_post; - int HP_iMalloc_init_pre; - int HP_iMalloc_init_post; - int HP_iMalloc_final_pre; - int HP_iMalloc_final_post; - int HP_iMalloc_malloc_pre; - int HP_iMalloc_malloc_post; - int HP_iMalloc_calloc_pre; - int HP_iMalloc_calloc_post; - int HP_iMalloc_realloc_pre; - int HP_iMalloc_realloc_post; - int HP_iMalloc_reallocz_pre; - int HP_iMalloc_reallocz_post; - int HP_iMalloc_astrdup_pre; - int HP_iMalloc_astrdup_post; - int HP_iMalloc_astrndup_pre; - int HP_iMalloc_astrndup_post; - int HP_iMalloc_free_pre; - int HP_iMalloc_free_post; - int HP_iMalloc_memory_check_pre; - int HP_iMalloc_memory_check_post; - int HP_iMalloc_verify_ptr_pre; - int HP_iMalloc_verify_ptr_post; - int HP_iMalloc_usage_pre; - int HP_iMalloc_usage_post; - int HP_iMalloc_post_shutdown_pre; - int HP_iMalloc_post_shutdown_post; - int HP_iMalloc_init_messages_pre; - int HP_iMalloc_init_messages_post; int HP_mapif_ban_pre; int HP_mapif_ban_post; int HP_mapif_server_init_pre; @@ -2221,6 +2599,16 @@ struct { int HP_mapif_send_post; int HP_mapif_send_users_count_pre; int HP_mapif_send_users_count_post; + int HP_mapif_pLoadAchievements_pre; + int HP_mapif_pLoadAchievements_post; + int HP_mapif_sAchievementsToMap_pre; + int HP_mapif_sAchievementsToMap_post; + int HP_mapif_pSaveAchievements_pre; + int HP_mapif_pSaveAchievements_post; + int HP_mapif_achievement_load_pre; + int HP_mapif_achievement_load_post; + int HP_mapif_achievement_save_pre; + int HP_mapif_achievement_save_post; int HP_mapif_auction_message_pre; int HP_mapif_auction_message_post; int HP_mapif_auction_sendlist_pre; @@ -2243,14 +2631,6 @@ struct { int HP_mapif_auction_bid_post; int HP_mapif_parse_auction_bid_pre; int HP_mapif_parse_auction_bid_post; - int HP_mapif_elemental_create_pre; - int HP_mapif_elemental_create_post; - int HP_mapif_elemental_save_pre; - int HP_mapif_elemental_save_post; - int HP_mapif_elemental_load_pre; - int HP_mapif_elemental_load_post; - int HP_mapif_elemental_delete_pre; - int HP_mapif_elemental_delete_post; int HP_mapif_elemental_send_pre; int HP_mapif_elemental_send_post; int HP_mapif_parse_elemental_create_pre; @@ -2279,8 +2659,6 @@ struct { int HP_mapif_guild_memberinfoshort_post; int HP_mapif_guild_broken_pre; int HP_mapif_guild_broken_post; - int HP_mapif_guild_message_pre; - int HP_mapif_guild_message_post; int HP_mapif_guild_basicinfochanged_pre; int HP_mapif_guild_basicinfochanged_post; int HP_mapif_guild_memberinfochanged_pre; @@ -2311,8 +2689,6 @@ struct { int HP_mapif_parse_GuildChangeMemberInfoShort_post; int HP_mapif_parse_BreakGuild_pre; int HP_mapif_parse_BreakGuild_post; - int HP_mapif_parse_GuildMessage_pre; - int HP_mapif_parse_GuildMessage_post; int HP_mapif_parse_GuildBasicInfoChange_pre; int HP_mapif_parse_GuildBasicInfoChange_post; int HP_mapif_parse_GuildMemberInfoChange_pre; @@ -2321,8 +2697,6 @@ struct { int HP_mapif_parse_GuildPosition_post; int HP_mapif_parse_GuildSkillUp_pre; int HP_mapif_parse_GuildSkillUp_post; - int HP_mapif_parse_GuildDeleteAlliance_pre; - int HP_mapif_parse_GuildDeleteAlliance_post; int HP_mapif_parse_GuildAlliance_pre; int HP_mapif_parse_GuildAlliance_post; int HP_mapif_parse_GuildNotice_pre; @@ -2345,16 +2719,6 @@ struct { int HP_mapif_homunculus_saved_post; int HP_mapif_homunculus_renamed_pre; int HP_mapif_homunculus_renamed_post; - int HP_mapif_homunculus_create_pre; - int HP_mapif_homunculus_create_post; - int HP_mapif_homunculus_save_pre; - int HP_mapif_homunculus_save_post; - int HP_mapif_homunculus_load_pre; - int HP_mapif_homunculus_load_post; - int HP_mapif_homunculus_delete_pre; - int HP_mapif_homunculus_delete_post; - int HP_mapif_homunculus_rename_pre; - int HP_mapif_homunculus_rename_post; int HP_mapif_parse_homunculus_create_pre; int HP_mapif_parse_homunculus_create_post; int HP_mapif_parse_homunculus_delete_pre; @@ -2373,8 +2737,6 @@ struct { int HP_mapif_parse_mail_read_post; int HP_mapif_mail_sendattach_pre; int HP_mapif_mail_sendattach_post; - int HP_mapif_mail_getattach_pre; - int HP_mapif_mail_getattach_post; int HP_mapif_parse_mail_getattach_pre; int HP_mapif_parse_mail_getattach_post; int HP_mapif_mail_delete_pre; @@ -2391,14 +2753,6 @@ struct { int HP_mapif_mail_send_post; int HP_mapif_parse_mail_send_pre; int HP_mapif_parse_mail_send_post; - int HP_mapif_mercenary_create_pre; - int HP_mapif_mercenary_create_post; - int HP_mapif_mercenary_save_pre; - int HP_mapif_mercenary_save_post; - int HP_mapif_mercenary_load_pre; - int HP_mapif_mercenary_load_post; - int HP_mapif_mercenary_delete_pre; - int HP_mapif_mercenary_delete_post; int HP_mapif_mercenary_send_pre; int HP_mapif_mercenary_send_post; int HP_mapif_parse_mercenary_create_pre; @@ -2429,8 +2783,6 @@ struct { int HP_mapif_party_membermoved_post; int HP_mapif_party_broken_pre; int HP_mapif_party_broken_post; - int HP_mapif_party_message_pre; - int HP_mapif_party_message_post; int HP_mapif_parse_CreateParty_pre; int HP_mapif_parse_CreateParty_post; int HP_mapif_parse_PartyInfo_pre; @@ -2445,8 +2797,6 @@ struct { int HP_mapif_parse_PartyChangeMap_post; int HP_mapif_parse_BreakParty_pre; int HP_mapif_parse_BreakParty_post; - int HP_mapif_parse_PartyMessage_pre; - int HP_mapif_parse_PartyMessage_post; int HP_mapif_parse_PartyLeaderChange_pre; int HP_mapif_parse_PartyLeaderChange_post; int HP_mapif_pet_created_pre; @@ -2459,10 +2809,6 @@ struct { int HP_mapif_save_pet_ack_post; int HP_mapif_delete_pet_ack_pre; int HP_mapif_delete_pet_ack_post; - int HP_mapif_create_pet_pre; - int HP_mapif_create_pet_post; - int HP_mapif_load_pet_pre; - int HP_mapif_load_pet_post; int HP_mapif_save_pet_pre; int HP_mapif_save_pet_post; int HP_mapif_delete_pet_pre; @@ -2475,14 +2821,6 @@ struct { int HP_mapif_parse_SavePet_post; int HP_mapif_parse_DeletePet_pre; int HP_mapif_parse_DeletePet_post; - int HP_mapif_quests_fromsql_pre; - int HP_mapif_quests_fromsql_post; - int HP_mapif_quest_delete_pre; - int HP_mapif_quest_delete_post; - int HP_mapif_quest_add_pre; - int HP_mapif_quest_add_post; - int HP_mapif_quest_update_pre; - int HP_mapif_quest_update_post; int HP_mapif_quest_save_ack_pre; int HP_mapif_quest_save_ack_post; int HP_mapif_parse_quest_save_pre; @@ -2491,6 +2829,28 @@ struct { int HP_mapif_send_quests_post; int HP_mapif_parse_quest_load_pre; int HP_mapif_parse_quest_load_post; + int HP_mapif_parse_rodex_requestinbox_pre; + int HP_mapif_parse_rodex_requestinbox_post; + int HP_mapif_rodex_sendinbox_pre; + int HP_mapif_rodex_sendinbox_post; + int HP_mapif_parse_rodex_checkhasnew_pre; + int HP_mapif_parse_rodex_checkhasnew_post; + int HP_mapif_rodex_sendhasnew_pre; + int HP_mapif_rodex_sendhasnew_post; + int HP_mapif_parse_rodex_updatemail_pre; + int HP_mapif_parse_rodex_updatemail_post; + int HP_mapif_parse_rodex_send_pre; + int HP_mapif_parse_rodex_send_post; + int HP_mapif_rodex_send_pre; + int HP_mapif_rodex_send_post; + int HP_mapif_parse_rodex_checkname_pre; + int HP_mapif_parse_rodex_checkname_post; + int HP_mapif_rodex_checkname_pre; + int HP_mapif_rodex_checkname_post; + int HP_mapif_rodex_getzenyack_pre; + int HP_mapif_rodex_getzenyack_post; + int HP_mapif_rodex_getitemsack_pre; + int HP_mapif_rodex_getitemsack_post; int HP_mapif_load_guild_storage_pre; int HP_mapif_load_guild_storage_post; int HP_mapif_save_guild_storage_ack_pre; @@ -2499,36 +2859,24 @@ struct { int HP_mapif_parse_LoadGuildStorage_post; int HP_mapif_parse_SaveGuildStorage_pre; int HP_mapif_parse_SaveGuildStorage_post; + int HP_mapif_account_storage_load_pre; + int HP_mapif_account_storage_load_post; + int HP_mapif_pAccountStorageLoad_pre; + int HP_mapif_pAccountStorageLoad_post; + int HP_mapif_pAccountStorageSave_pre; + int HP_mapif_pAccountStorageSave_post; + int HP_mapif_sAccountStorageSaveAck_pre; + int HP_mapif_sAccountStorageSaveAck_post; int HP_mapif_itembound_ack_pre; int HP_mapif_itembound_ack_post; - int HP_mapif_parse_ItemBoundRetrieve_sub_pre; - int HP_mapif_parse_ItemBoundRetrieve_sub_post; int HP_mapif_parse_ItemBoundRetrieve_pre; int HP_mapif_parse_ItemBoundRetrieve_post; int HP_mapif_parse_accinfo_pre; int HP_mapif_parse_accinfo_post; - int HP_mapif_parse_accinfo2_pre; - int HP_mapif_parse_accinfo2_post; - int HP_mapif_broadcast_pre; - int HP_mapif_broadcast_post; - int HP_mapif_wis_message_pre; - int HP_mapif_wis_message_post; - int HP_mapif_wis_response_pre; - int HP_mapif_wis_response_post; - int HP_mapif_wis_end_pre; - int HP_mapif_wis_end_post; int HP_mapif_account_reg_reply_pre; int HP_mapif_account_reg_reply_post; int HP_mapif_disconnectplayer_pre; int HP_mapif_disconnectplayer_post; - int HP_mapif_parse_broadcast_pre; - int HP_mapif_parse_broadcast_post; - int HP_mapif_parse_WisRequest_pre; - int HP_mapif_parse_WisRequest_post; - int HP_mapif_parse_WisReply_pre; - int HP_mapif_parse_WisReply_post; - int HP_mapif_parse_WisToGM_pre; - int HP_mapif_parse_WisToGM_post; int HP_mapif_parse_Registry_pre; int HP_mapif_parse_Registry_post; int HP_mapif_parse_RegistryRequest_pre; @@ -2537,6 +2885,14 @@ struct { int HP_mapif_namechange_ack_post; int HP_mapif_parse_NameChangeRequest_pre; int HP_mapif_parse_NameChangeRequest_post; + int HP_mapif_parse_ClanMemberKick_pre; + int HP_mapif_parse_ClanMemberKick_post; + int HP_mapif_parse_ClanMemberCount_pre; + int HP_mapif_parse_ClanMemberCount_post; + int HP_mapindex_config_read_dbpath_pre; + int HP_mapindex_config_read_dbpath_post; + int HP_mapindex_config_read_pre; + int HP_mapindex_config_read_post; int HP_mapindex_init_pre; int HP_mapindex_init_post; int HP_mapindex_final_pre; @@ -2555,8 +2911,46 @@ struct { int HP_mapindex_id2name_post; int HP_mapindex_check_default_pre; int HP_mapindex_check_default_post; + int HP_md5_string_pre; + int HP_md5_string_post; + int HP_md5_binary_pre; + int HP_md5_binary_post; + int HP_md5_salt_pre; + int HP_md5_salt_post; + int HP_mutex_create_pre; + int HP_mutex_create_post; + int HP_mutex_destroy_pre; + int HP_mutex_destroy_post; + int HP_mutex_lock_pre; + int HP_mutex_lock_post; + int HP_mutex_trylock_pre; + int HP_mutex_trylock_post; + int HP_mutex_unlock_pre; + int HP_mutex_unlock_post; + int HP_mutex_cond_create_pre; + int HP_mutex_cond_create_post; + int HP_mutex_cond_destroy_pre; + int HP_mutex_cond_destroy_post; + int HP_mutex_cond_wait_pre; + int HP_mutex_cond_wait_post; + int HP_mutex_cond_signal_pre; + int HP_mutex_cond_signal_post; + int HP_mutex_cond_broadcast_pre; + int HP_mutex_cond_broadcast_post; + int HP_nullpo_init_pre; + int HP_nullpo_init_post; + int HP_nullpo_final_pre; + int HP_nullpo_final_post; int HP_nullpo_assert_report_pre; int HP_nullpo_assert_report_post; + int HP_packets_init_pre; + int HP_packets_init_post; + int HP_packets_final_pre; + int HP_packets_final_post; + int HP_packets_addLens_pre; + int HP_packets_addLens_post; + int HP_packets_addLen_pre; + int HP_packets_addLen_post; int HP_pincode_handle_pre; int HP_pincode_handle_post; int HP_pincode_decrypt_pre; @@ -2565,18 +2959,46 @@ struct { int HP_pincode_error_post; int HP_pincode_update_pre; int HP_pincode_update_post; - int HP_pincode_sendstate_pre; - int HP_pincode_sendstate_post; + int HP_pincode_makestate_pre; + int HP_pincode_makestate_post; + int HP_pincode_editstate_pre; + int HP_pincode_editstate_post; + int HP_pincode_loginstate_pre; + int HP_pincode_loginstate_post; + int HP_pincode_loginstate2_pre; + int HP_pincode_loginstate2_post; int HP_pincode_setnew_pre; int HP_pincode_setnew_post; int HP_pincode_change_pre; int HP_pincode_change_post; + int HP_pincode_isBlacklisted_pre; + int HP_pincode_isBlacklisted_post; int HP_pincode_compare_pre; int HP_pincode_compare_post; int HP_pincode_check_pre; int HP_pincode_check_post; int HP_pincode_config_read_pre; int HP_pincode_config_read_post; + int HP_pincode_init_pre; + int HP_pincode_init_post; + int HP_pincode_final_pre; + int HP_pincode_final_post; + int HP_rnd_init_pre; + int HP_rnd_init_post; + int HP_rnd_final_pre; + int HP_rnd_final_post; + int HP_rnd_seed_pre; + int HP_rnd_seed_post; + int HP_rnd_random_pre; + int HP_rnd_random_post; + int HP_rnd_roll_pre; + int HP_rnd_roll_post; + int HP_rnd_value_pre; + int HP_rnd_value_post; + int HP_rnd_uniform_pre; + int HP_rnd_uniform_post; + int HP_rnd_uniform53_pre; + int HP_rnd_uniform53_post; int HP_showmsg_init_pre; int HP_showmsg_init_post; int HP_showmsg_final_pre; @@ -2603,10 +3025,14 @@ struct { int HP_sockt_realloc_writefifo_post; int HP_sockt_wfifoset_pre; int HP_sockt_wfifoset_post; + int HP_sockt_wfifohead_pre; + int HP_sockt_wfifohead_post; int HP_sockt_rfifoskip_pre; int HP_sockt_rfifoskip_post; int HP_sockt_close_pre; int HP_sockt_close_post; + int HP_sockt_validateWfifo_pre; + int HP_sockt_validateWfifo_post; int HP_sockt_session_is_valid_pre; int HP_sockt_session_is_valid_post; int HP_sockt_session_is_active_pre; @@ -2615,6 +3041,8 @@ struct { int HP_sockt_flush_post; int HP_sockt_flush_fifos_pre; int HP_sockt_flush_fifos_post; + int HP_sockt_connect_client_pre; + int HP_sockt_connect_client_post; int HP_sockt_set_nonblocking_pre; int HP_sockt_set_nonblocking_post; int HP_sockt_set_defaultparse_pre; @@ -2805,6 +3233,28 @@ struct { int HP_sysinfo_init_post; int HP_sysinfo_final_pre; int HP_sysinfo_final_post; + int HP_thread_init_pre; + int HP_thread_init_post; + int HP_thread_final_pre; + int HP_thread_final_post; + int HP_thread_create_pre; + int HP_thread_create_post; + int HP_thread_create_opt_pre; + int HP_thread_create_opt_post; + int HP_thread_destroy_pre; + int HP_thread_destroy_post; + int HP_thread_self_pre; + int HP_thread_self_post; + int HP_thread_get_tid_pre; + int HP_thread_get_tid_post; + int HP_thread_wait_pre; + int HP_thread_wait_post; + int HP_thread_prio_set_pre; + int HP_thread_prio_set_post; + int HP_thread_prio_get_pre; + int HP_thread_prio_get_post; + int HP_thread_yield_pre; + int HP_thread_yield_post; int HP_timer_gettick_pre; int HP_timer_gettick_post; int HP_timer_gettick_nocache_pre; @@ -2840,8 +3290,11 @@ struct { struct console_interface console; struct core_interface core; struct db_interface DB; + struct des_interface des; struct geoip_interface geoip; + struct inter_achievement_interface inter_achievement; struct inter_auction_interface inter_auction; + struct inter_clan_interface inter_clan; struct inter_elemental_interface inter_elemental; struct inter_guild_interface inter_guild; struct inter_homunculus_interface inter_homunculus; @@ -2851,14 +3304,18 @@ struct { struct inter_party_interface inter_party; struct inter_pet_interface inter_pet; struct inter_quest_interface inter_quest; + struct inter_rodex_interface inter_rodex; struct inter_storage_interface inter_storage; struct libconfig_interface libconfig; struct loginif_interface loginif; - struct malloc_interface iMalloc; struct mapif_interface mapif; struct mapindex_interface mapindex; + struct md5_interface md5; + struct mutex_interface mutex; struct nullpo_interface nullpo; + struct packets_interface packets; struct pincode_interface pincode; + struct rnd_interface rnd; struct showmsg_interface showmsg; struct socket_interface sockt; struct sql_interface SQL; @@ -2866,5 +3323,6 @@ struct { struct strlib_interface strlib; struct sv_interface sv; struct sysinfo_interface sysinfo; + struct thread_interface thread; struct timer_interface timer; } source; diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc index fbf332ffb..238580b83 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc @@ -1,7 +1,8 @@ /** * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,12 +23,14 @@ * as it will get overwritten. */ +/* GENERATED FILE DO NOT EDIT */ + struct HookingPointData HookingPoints[] = { -/* HCache */ +/* HCache_interface */ { HP_POP(HCache->init, HP_HCache_init) }, { HP_POP(HCache->check, HP_HCache_check) }, { HP_POP(HCache->open, HP_HCache_open) }, -/* chr */ +/* char_interface */ { HP_POP(chr->waiting_disconnect, HP_chr_waiting_disconnect) }, { HP_POP(chr->delete_char_sql, HP_chr_delete_char_sql) }, { HP_POP(chr->create_online_char_data, HP_chr_create_online_char_data) }, @@ -43,6 +46,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->set_all_offline_sql, HP_chr_set_all_offline_sql) }, { HP_POP(chr->create_charstatus, HP_chr_create_charstatus) }, { HP_POP(chr->mmo_char_tosql, HP_chr_mmo_char_tosql) }, + { HP_POP(chr->getitemdata_from_sql, HP_chr_getitemdata_from_sql) }, { HP_POP(chr->memitemdata_to_sql, HP_chr_memitemdata_to_sql) }, { HP_POP(chr->mmo_gender, HP_chr_mmo_gender) }, { HP_POP(chr->mmo_chars_fromsql, HP_chr_mmo_chars_fromsql) }, @@ -50,12 +54,14 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->mmo_char_sql_init, HP_chr_mmo_char_sql_init) }, { HP_POP(chr->char_slotchange, HP_chr_char_slotchange) }, { HP_POP(chr->rename_char_sql, HP_chr_rename_char_sql) }, + { HP_POP(chr->name_exists, HP_chr_name_exists) }, { HP_POP(chr->check_char_name, HP_chr_check_char_name) }, { HP_POP(chr->make_new_char_sql, HP_chr_make_new_char_sql) }, { HP_POP(chr->divorce_char_sql, HP_chr_divorce_char_sql) }, { HP_POP(chr->count_users, HP_chr_count_users) }, { HP_POP(chr->mmo_char_tobuf, HP_chr_mmo_char_tobuf) }, - { HP_POP(chr->mmo_char_send099d, HP_chr_mmo_char_send099d) }, + { HP_POP(chr->send_HC_ACK_CHARINFO_PER_PAGE, HP_chr_send_HC_ACK_CHARINFO_PER_PAGE) }, + { HP_POP(chr->send_HC_ACK_CHARINFO_PER_PAGE_tail, HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail) }, { HP_POP(chr->mmo_char_send_ban_list, HP_chr_mmo_char_send_ban_list) }, { HP_POP(chr->mmo_char_send_slots_info, HP_chr_mmo_char_send_slots_info) }, { HP_POP(chr->mmo_char_send_characters, HP_chr_mmo_char_send_characters) }, @@ -128,7 +134,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->map_auth_failed, HP_chr_map_auth_failed) }, { HP_POP(chr->parse_frommap_auth_request, HP_chr_parse_frommap_auth_request) }, { HP_POP(chr->parse_frommap_update_ip, HP_chr_parse_frommap_update_ip) }, - { HP_POP(chr->parse_frommap_request_stats_report, HP_chr_parse_frommap_request_stats_report) }, { HP_POP(chr->parse_frommap_scdata_update, HP_chr_parse_frommap_scdata_update) }, { HP_POP(chr->parse_frommap_scdata_delete, HP_chr_parse_frommap_scdata_delete) }, { HP_POP(chr->parse_frommap, HP_chr_parse_frommap) }, @@ -184,23 +189,37 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chr->online_data_cleanup_sub, HP_chr_online_data_cleanup_sub) }, { HP_POP(chr->online_data_cleanup, HP_chr_online_data_cleanup) }, { HP_POP(chr->sql_config_read, HP_chr_sql_config_read) }, - { HP_POP(chr->config_dispatch, HP_chr_config_dispatch) }, + { HP_POP(chr->sql_config_read_registry, HP_chr_sql_config_read_registry) }, + { HP_POP(chr->sql_config_read_pc, HP_chr_sql_config_read_pc) }, + { HP_POP(chr->sql_config_read_guild, HP_chr_sql_config_read_guild) }, { HP_POP(chr->config_read, HP_chr_config_read) }, -/* cmdline */ + { HP_POP(chr->config_read_database, HP_chr_config_read_database) }, + { HP_POP(chr->config_read_console, HP_chr_config_read_console) }, + { HP_POP(chr->config_read_player_fame, HP_chr_config_read_player_fame) }, + { HP_POP(chr->config_read_player_deletion, HP_chr_config_read_player_deletion) }, + { HP_POP(chr->config_read_player_name, HP_chr_config_read_player_name) }, + { HP_POP(chr->config_set_start_item, HP_chr_config_set_start_item) }, + { HP_POP(chr->config_read_player_new, HP_chr_config_read_player_new) }, + { HP_POP(chr->config_read_player, HP_chr_config_read_player) }, + { HP_POP(chr->config_read_permission, HP_chr_config_read_permission) }, + { HP_POP(chr->config_set_ip, HP_chr_config_set_ip) }, + { HP_POP(chr->config_read_inter, HP_chr_config_read_inter) }, + { HP_POP(chr->config_read_top, HP_chr_config_read_top) }, +/* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, { HP_POP(cmdline->arg_add, HP_cmdline_arg_add) }, { HP_POP(cmdline->exec, HP_cmdline_exec) }, { HP_POP(cmdline->arg_next_value, HP_cmdline_arg_next_value) }, { HP_POP(cmdline->arg_source, HP_cmdline_arg_source) }, -/* console */ +/* console_interface */ { HP_POP(console->init, HP_console_init) }, { HP_POP(console->final, HP_console_final) }, { HP_POP(console->display_title, HP_console_display_title) }, { HP_POP(console->display_gplnotice, HP_console_display_gplnotice) }, -/* core */ +/* core_interface */ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) }, -/* DB */ +/* db_interface */ { HP_POP(DB->fix_options, HP_DB_fix_options) }, { HP_POP(DB->default_cmp, HP_DB_default_cmp) }, { HP_POP(DB->default_hash, HP_DB_default_hash) }, @@ -220,11 +239,22 @@ struct HookingPointData HookingPoints[] = { { HP_POP(DB->data2ptr, HP_DB_data2ptr) }, { HP_POP(DB->init, HP_DB_init) }, { HP_POP(DB->final, HP_DB_final) }, -/* geoip */ +/* des_interface */ + { HP_POP(des->decrypt_block, HP_des_decrypt_block) }, + { HP_POP(des->decrypt, HP_des_decrypt) }, +/* geoip_interface */ { HP_POP(geoip->getcountry, HP_geoip_getcountry) }, { HP_POP(geoip->final, HP_geoip_final) }, { HP_POP(geoip->init, HP_geoip_init) }, -/* inter_auction */ +/* inter_achievement_interface */ + { HP_POP(inter_achievement->sql_init, HP_inter_achievement_sql_init) }, + { HP_POP(inter_achievement->sql_final, HP_inter_achievement_sql_final) }, + { HP_POP(inter_achievement->tosql, HP_inter_achievement_tosql) }, + { HP_POP(inter_achievement->fromsql, HP_inter_achievement_fromsql) }, + { HP_POP(inter_achievement->ensure_char_achievements, HP_inter_achievement_ensure_char_achievements) }, + { HP_POP(inter_achievement->char_achievements_clear, HP_inter_achievement_char_achievements_clear) }, + { HP_POP(inter_achievement->parse_frommap, HP_inter_achievement_parse_frommap) }, +/* inter_auction_interface */ { HP_POP(inter_auction->count, HP_inter_auction_count) }, { HP_POP(inter_auction->save, HP_inter_auction_save) }, { HP_POP(inter_auction->create, HP_inter_auction_create) }, @@ -234,11 +264,19 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_auction->parse_frommap, HP_inter_auction_parse_frommap) }, { HP_POP(inter_auction->sql_init, HP_inter_auction_sql_init) }, { HP_POP(inter_auction->sql_final, HP_inter_auction_sql_final) }, -/* inter_elemental */ +/* inter_clan_interface */ + { HP_POP(inter_clan->kick_inactive_members, HP_inter_clan_kick_inactive_members) }, + { HP_POP(inter_clan->count_members, HP_inter_clan_count_members) }, + { HP_POP(inter_clan->parse_frommap, HP_inter_clan_parse_frommap) }, +/* inter_elemental_interface */ { HP_POP(inter_elemental->sql_init, HP_inter_elemental_sql_init) }, { HP_POP(inter_elemental->sql_final, HP_inter_elemental_sql_final) }, { HP_POP(inter_elemental->parse_frommap, HP_inter_elemental_parse_frommap) }, -/* inter_guild */ + { HP_POP(inter_elemental->create, HP_inter_elemental_create) }, + { HP_POP(inter_elemental->save, HP_inter_elemental_save) }, + { HP_POP(inter_elemental->load, HP_inter_elemental_load) }, + { HP_POP(inter_elemental->delete, HP_inter_elemental_delete) }, +/* inter_guild_interface */ { HP_POP(inter_guild->save_timer, HP_inter_guild_save_timer) }, { HP_POP(inter_guild->removemember_tosql, HP_inter_guild_removemember_tosql) }, { HP_POP(inter_guild->tosql, HP_inter_guild_tosql) }, @@ -259,13 +297,32 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_guild->sex_changed, HP_inter_guild_sex_changed) }, { HP_POP(inter_guild->charname_changed, HP_inter_guild_charname_changed) }, { HP_POP(inter_guild->parse_frommap, HP_inter_guild_parse_frommap) }, - { HP_POP(inter_guild->leave, HP_inter_guild_leave) }, { HP_POP(inter_guild->broken, HP_inter_guild_broken) }, -/* inter_homunculus */ + { HP_POP(inter_guild->create, HP_inter_guild_create) }, + { HP_POP(inter_guild->add_member, HP_inter_guild_add_member) }, + { HP_POP(inter_guild->leave, HP_inter_guild_leave) }, + { HP_POP(inter_guild->update_member_info_short, HP_inter_guild_update_member_info_short) }, + { HP_POP(inter_guild->update_member_info, HP_inter_guild_update_member_info) }, + { HP_POP(inter_guild->disband, HP_inter_guild_disband) }, + { HP_POP(inter_guild->update_basic_info, HP_inter_guild_update_basic_info) }, + { HP_POP(inter_guild->update_position, HP_inter_guild_update_position) }, + { HP_POP(inter_guild->use_skill_point, HP_inter_guild_use_skill_point) }, + { HP_POP(inter_guild->remove_alliance, HP_inter_guild_remove_alliance) }, + { HP_POP(inter_guild->change_alliance, HP_inter_guild_change_alliance) }, + { HP_POP(inter_guild->update_notice, HP_inter_guild_update_notice) }, + { HP_POP(inter_guild->update_emblem, HP_inter_guild_update_emblem) }, + { HP_POP(inter_guild->update_castle_data, HP_inter_guild_update_castle_data) }, + { HP_POP(inter_guild->change_leader, HP_inter_guild_change_leader) }, +/* inter_homunculus_interface */ { HP_POP(inter_homunculus->sql_init, HP_inter_homunculus_sql_init) }, { HP_POP(inter_homunculus->sql_final, HP_inter_homunculus_sql_final) }, { HP_POP(inter_homunculus->parse_frommap, HP_inter_homunculus_parse_frommap) }, -/* inter */ + { HP_POP(inter_homunculus->create, HP_inter_homunculus_create) }, + { HP_POP(inter_homunculus->save, HP_inter_homunculus_save) }, + { HP_POP(inter_homunculus->load, HP_inter_homunculus_load) }, + { HP_POP(inter_homunculus->delete, HP_inter_homunculus_delete) }, + { HP_POP(inter_homunculus->rename, HP_inter_homunculus_rename) }, +/* inter_interface */ { HP_POP(inter->msg_txt, HP_inter_msg_txt) }, { HP_POP(inter->msg_config_read, HP_inter_msg_config_read) }, { HP_POP(inter->do_final_msg, HP_inter_do_final_msg) }, @@ -273,16 +330,18 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter->vmsg_to_fd, HP_inter_vmsg_to_fd) }, { HP_POP(inter->savereg, HP_inter_savereg) }, { HP_POP(inter->accreg_fromsql, HP_inter_accreg_fromsql) }, - { HP_POP(inter->config_read, HP_inter_config_read) }, { HP_POP(inter->vlog, HP_inter_vlog) }, { HP_POP(inter->init_sql, HP_inter_init_sql) }, { HP_POP(inter->mapif_init, HP_inter_mapif_init) }, - { HP_POP(inter->check_ttl_wisdata_sub, HP_inter_check_ttl_wisdata_sub) }, - { HP_POP(inter->check_ttl_wisdata, HP_inter_check_ttl_wisdata) }, { HP_POP(inter->check_length, HP_inter_check_length) }, { HP_POP(inter->parse_frommap, HP_inter_parse_frommap) }, { HP_POP(inter->final, HP_inter_final) }, -/* inter_mail */ + { HP_POP(inter->config_read, HP_inter_config_read) }, + { HP_POP(inter->config_read_log, HP_inter_config_read_log) }, + { HP_POP(inter->config_read_connection, HP_inter_config_read_connection) }, + { HP_POP(inter->accinfo, HP_inter_accinfo) }, + { HP_POP(inter->accinfo2, HP_inter_accinfo2) }, +/* inter_mail_interface */ { HP_POP(inter_mail->sql_init, HP_inter_mail_sql_init) }, { HP_POP(inter_mail->sql_final, HP_inter_mail_sql_final) }, { HP_POP(inter_mail->parse_frommap, HP_inter_mail_parse_frommap) }, @@ -291,17 +350,28 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_mail->loadmessage, HP_inter_mail_loadmessage) }, { HP_POP(inter_mail->DeleteAttach, HP_inter_mail_DeleteAttach) }, { HP_POP(inter_mail->sendmail, HP_inter_mail_sendmail) }, -/* inter_mercenary */ + { HP_POP(inter_mail->mark_read, HP_inter_mail_mark_read) }, + { HP_POP(inter_mail->get_attachment, HP_inter_mail_get_attachment) }, + { HP_POP(inter_mail->delete, HP_inter_mail_delete) }, + { HP_POP(inter_mail->return_message, HP_inter_mail_return_message) }, + { HP_POP(inter_mail->send, HP_inter_mail_send) }, +/* inter_mercenary_interface */ { HP_POP(inter_mercenary->owner_fromsql, HP_inter_mercenary_owner_fromsql) }, { HP_POP(inter_mercenary->owner_tosql, HP_inter_mercenary_owner_tosql) }, { HP_POP(inter_mercenary->owner_delete, HP_inter_mercenary_owner_delete) }, { HP_POP(inter_mercenary->sql_init, HP_inter_mercenary_sql_init) }, { HP_POP(inter_mercenary->sql_final, HP_inter_mercenary_sql_final) }, { HP_POP(inter_mercenary->parse_frommap, HP_inter_mercenary_parse_frommap) }, -/* inter_party */ + { HP_POP(inter_mercenary->create, HP_inter_mercenary_create) }, + { HP_POP(inter_mercenary->save, HP_inter_mercenary_save) }, + { HP_POP(inter_mercenary->load, HP_inter_mercenary_load) }, + { HP_POP(inter_mercenary->delete, HP_inter_mercenary_delete) }, +/* inter_party_interface */ { HP_POP(inter_party->check_lv, HP_inter_party_check_lv) }, + { HP_POP(inter_party->is_family_party, HP_inter_party_is_family_party) }, { HP_POP(inter_party->calc_state, HP_inter_party_calc_state) }, { HP_POP(inter_party->tosql, HP_inter_party_tosql) }, + { HP_POP(inter_party->del_nonexistent_party, HP_inter_party_del_nonexistent_party) }, { HP_POP(inter_party->fromsql, HP_inter_party_fromsql) }, { HP_POP(inter_party->sql_init, HP_inter_party_sql_init) }, { HP_POP(inter_party->sql_final, HP_inter_party_sql_final) }, @@ -312,16 +382,40 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_party->leave, HP_inter_party_leave) }, { HP_POP(inter_party->CharOnline, HP_inter_party_CharOnline) }, { HP_POP(inter_party->CharOffline, HP_inter_party_CharOffline) }, -/* inter_pet */ + { HP_POP(inter_party->create, HP_inter_party_create) }, + { HP_POP(inter_party->add_member, HP_inter_party_add_member) }, + { HP_POP(inter_party->change_option, HP_inter_party_change_option) }, + { HP_POP(inter_party->change_map, HP_inter_party_change_map) }, + { HP_POP(inter_party->disband, HP_inter_party_disband) }, + { HP_POP(inter_party->change_leader, HP_inter_party_change_leader) }, +/* inter_pet_interface */ { HP_POP(inter_pet->tosql, HP_inter_pet_tosql) }, { HP_POP(inter_pet->fromsql, HP_inter_pet_fromsql) }, { HP_POP(inter_pet->sql_init, HP_inter_pet_sql_init) }, { HP_POP(inter_pet->sql_final, HP_inter_pet_sql_final) }, { HP_POP(inter_pet->delete_, HP_inter_pet_delete_) }, { HP_POP(inter_pet->parse_frommap, HP_inter_pet_parse_frommap) }, -/* inter_quest */ + { HP_POP(inter_pet->create, HP_inter_pet_create) }, + { HP_POP(inter_pet->load, HP_inter_pet_load) }, +/* inter_quest_interface */ { HP_POP(inter_quest->parse_frommap, HP_inter_quest_parse_frommap) }, -/* inter_storage */ + { HP_POP(inter_quest->fromsql, HP_inter_quest_fromsql) }, + { HP_POP(inter_quest->delete, HP_inter_quest_delete) }, + { HP_POP(inter_quest->add, HP_inter_quest_add) }, + { HP_POP(inter_quest->update, HP_inter_quest_update) }, + { HP_POP(inter_quest->save, HP_inter_quest_save) }, +/* inter_rodex_interface */ + { HP_POP(inter_rodex->sql_init, HP_inter_rodex_sql_init) }, + { HP_POP(inter_rodex->sql_final, HP_inter_rodex_sql_final) }, + { HP_POP(inter_rodex->parse_frommap, HP_inter_rodex_parse_frommap) }, + { HP_POP(inter_rodex->fromsql, HP_inter_rodex_fromsql) }, + { HP_POP(inter_rodex->hasnew, HP_inter_rodex_hasnew) }, + { HP_POP(inter_rodex->checkname, HP_inter_rodex_checkname) }, + { HP_POP(inter_rodex->savemessage, HP_inter_rodex_savemessage) }, + { HP_POP(inter_rodex->updatemail, HP_inter_rodex_updatemail) }, + { HP_POP(inter_rodex->getzeny, HP_inter_rodex_getzeny) }, + { HP_POP(inter_rodex->getitems, HP_inter_rodex_getitems) }, +/* inter_storage_interface */ { HP_POP(inter_storage->tosql, HP_inter_storage_tosql) }, { HP_POP(inter_storage->fromsql, HP_inter_storage_fromsql) }, { HP_POP(inter_storage->guild_storage_tosql, HP_inter_storage_guild_storage_tosql) }, @@ -331,7 +425,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(inter_storage->delete_, HP_inter_storage_delete_) }, { HP_POP(inter_storage->guild_storage_delete, HP_inter_storage_guild_storage_delete) }, { HP_POP(inter_storage->parse_frommap, HP_inter_storage_parse_frommap) }, -/* libconfig */ + { HP_POP(inter_storage->retrieve_bound_items, HP_inter_storage_retrieve_bound_items) }, +/* libconfig_interface */ + { HP_POP(libconfig->set_db_path, HP_libconfig_set_db_path) }, + { HP_POP(libconfig->format_db_path, HP_libconfig_format_db_path) }, { HP_POP(libconfig->read, HP_libconfig_read) }, { HP_POP(libconfig->write, HP_libconfig_write) }, { HP_POP(libconfig->set_options, HP_libconfig_set_options) }, @@ -400,7 +497,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(libconfig->setting_lookup_int16, HP_libconfig_setting_lookup_int16) }, { HP_POP(libconfig->setting_lookup_mutable_string, HP_libconfig_setting_lookup_mutable_string) }, { HP_POP(libconfig->lookup_mutable_string, HP_libconfig_lookup_mutable_string) }, -/* loginif */ +/* loginif_interface */ { HP_POP(loginif->init, HP_loginif_init) }, { HP_POP(loginif->final, HP_loginif_final) }, { HP_POP(loginif->reset, HP_loginif_reset) }, @@ -414,22 +511,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(loginif->auth, HP_loginif_auth) }, { HP_POP(loginif->send_users_count, HP_loginif_send_users_count) }, { HP_POP(loginif->connect_to_server, HP_loginif_connect_to_server) }, -/* iMalloc */ - { HP_POP(iMalloc->init, HP_iMalloc_init) }, - { HP_POP(iMalloc->final, HP_iMalloc_final) }, - { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, - { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) }, - { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) }, - { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) }, - { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) }, - { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) }, - { HP_POP(iMalloc->free, HP_iMalloc_free) }, - { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) }, - { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) }, - { HP_POP(iMalloc->usage, HP_iMalloc_usage) }, - { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) }, - { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) }, -/* mapif */ +/* mapif_interface */ { HP_POP(mapif->ban, HP_mapif_ban) }, { HP_POP(mapif->server_init, HP_mapif_server_init) }, { HP_POP(mapif->server_destroy, HP_mapif_server_destroy) }, @@ -441,6 +523,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->sendallwos, HP_mapif_sendallwos) }, { HP_POP(mapif->send, HP_mapif_send) }, { HP_POP(mapif->send_users_count, HP_mapif_send_users_count) }, + { HP_POP(mapif->pLoadAchievements, HP_mapif_pLoadAchievements) }, + { HP_POP(mapif->sAchievementsToMap, HP_mapif_sAchievementsToMap) }, + { HP_POP(mapif->pSaveAchievements, HP_mapif_pSaveAchievements) }, + { HP_POP(mapif->achievement_load, HP_mapif_achievement_load) }, + { HP_POP(mapif->achievement_save, HP_mapif_achievement_save) }, { HP_POP(mapif->auction_message, HP_mapif_auction_message) }, { HP_POP(mapif->auction_sendlist, HP_mapif_auction_sendlist) }, { HP_POP(mapif->parse_auction_requestlist, HP_mapif_parse_auction_requestlist) }, @@ -452,10 +539,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->parse_auction_close, HP_mapif_parse_auction_close) }, { HP_POP(mapif->auction_bid, HP_mapif_auction_bid) }, { HP_POP(mapif->parse_auction_bid, HP_mapif_parse_auction_bid) }, - { HP_POP(mapif->elemental_create, HP_mapif_elemental_create) }, - { HP_POP(mapif->elemental_save, HP_mapif_elemental_save) }, - { HP_POP(mapif->elemental_load, HP_mapif_elemental_load) }, - { HP_POP(mapif->elemental_delete, HP_mapif_elemental_delete) }, { HP_POP(mapif->elemental_send, HP_mapif_elemental_send) }, { HP_POP(mapif->parse_elemental_create, HP_mapif_parse_elemental_create) }, { HP_POP(mapif->parse_elemental_load, HP_mapif_parse_elemental_load) }, @@ -470,7 +553,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->guild_withdraw, HP_mapif_guild_withdraw) }, { HP_POP(mapif->guild_memberinfoshort, HP_mapif_guild_memberinfoshort) }, { HP_POP(mapif->guild_broken, HP_mapif_guild_broken) }, - { HP_POP(mapif->guild_message, HP_mapif_guild_message) }, { HP_POP(mapif->guild_basicinfochanged, HP_mapif_guild_basicinfochanged) }, { HP_POP(mapif->guild_memberinfochanged, HP_mapif_guild_memberinfochanged) }, { HP_POP(mapif->guild_skillupack, HP_mapif_guild_skillupack) }, @@ -486,12 +568,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->parse_GuildLeave, HP_mapif_parse_GuildLeave) }, { HP_POP(mapif->parse_GuildChangeMemberInfoShort, HP_mapif_parse_GuildChangeMemberInfoShort) }, { HP_POP(mapif->parse_BreakGuild, HP_mapif_parse_BreakGuild) }, - { HP_POP(mapif->parse_GuildMessage, HP_mapif_parse_GuildMessage) }, { HP_POP(mapif->parse_GuildBasicInfoChange, HP_mapif_parse_GuildBasicInfoChange) }, { HP_POP(mapif->parse_GuildMemberInfoChange, HP_mapif_parse_GuildMemberInfoChange) }, { HP_POP(mapif->parse_GuildPosition, HP_mapif_parse_GuildPosition) }, { HP_POP(mapif->parse_GuildSkillUp, HP_mapif_parse_GuildSkillUp) }, - { HP_POP(mapif->parse_GuildDeleteAlliance, HP_mapif_parse_GuildDeleteAlliance) }, { HP_POP(mapif->parse_GuildAlliance, HP_mapif_parse_GuildAlliance) }, { HP_POP(mapif->parse_GuildNotice, HP_mapif_parse_GuildNotice) }, { HP_POP(mapif->parse_GuildEmblem, HP_mapif_parse_GuildEmblem) }, @@ -503,11 +583,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->homunculus_loaded, HP_mapif_homunculus_loaded) }, { HP_POP(mapif->homunculus_saved, HP_mapif_homunculus_saved) }, { HP_POP(mapif->homunculus_renamed, HP_mapif_homunculus_renamed) }, - { HP_POP(mapif->homunculus_create, HP_mapif_homunculus_create) }, - { HP_POP(mapif->homunculus_save, HP_mapif_homunculus_save) }, - { HP_POP(mapif->homunculus_load, HP_mapif_homunculus_load) }, - { HP_POP(mapif->homunculus_delete, HP_mapif_homunculus_delete) }, - { HP_POP(mapif->homunculus_rename, HP_mapif_homunculus_rename) }, { HP_POP(mapif->parse_homunculus_create, HP_mapif_parse_homunculus_create) }, { HP_POP(mapif->parse_homunculus_delete, HP_mapif_parse_homunculus_delete) }, { HP_POP(mapif->parse_homunculus_load, HP_mapif_parse_homunculus_load) }, @@ -517,7 +592,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->parse_mail_requestinbox, HP_mapif_parse_mail_requestinbox) }, { HP_POP(mapif->parse_mail_read, HP_mapif_parse_mail_read) }, { HP_POP(mapif->mail_sendattach, HP_mapif_mail_sendattach) }, - { HP_POP(mapif->mail_getattach, HP_mapif_mail_getattach) }, { HP_POP(mapif->parse_mail_getattach, HP_mapif_parse_mail_getattach) }, { HP_POP(mapif->mail_delete, HP_mapif_mail_delete) }, { HP_POP(mapif->parse_mail_delete, HP_mapif_parse_mail_delete) }, @@ -526,10 +600,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->parse_mail_return, HP_mapif_parse_mail_return) }, { HP_POP(mapif->mail_send, HP_mapif_mail_send) }, { HP_POP(mapif->parse_mail_send, HP_mapif_parse_mail_send) }, - { HP_POP(mapif->mercenary_create, HP_mapif_mercenary_create) }, - { HP_POP(mapif->mercenary_save, HP_mapif_mercenary_save) }, - { HP_POP(mapif->mercenary_load, HP_mapif_mercenary_load) }, - { HP_POP(mapif->mercenary_delete, HP_mapif_mercenary_delete) }, { HP_POP(mapif->mercenary_send, HP_mapif_mercenary_send) }, { HP_POP(mapif->parse_mercenary_create, HP_mapif_parse_mercenary_create) }, { HP_POP(mapif->parse_mercenary_load, HP_mapif_parse_mercenary_load) }, @@ -545,7 +615,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->party_withdraw, HP_mapif_party_withdraw) }, { HP_POP(mapif->party_membermoved, HP_mapif_party_membermoved) }, { HP_POP(mapif->party_broken, HP_mapif_party_broken) }, - { HP_POP(mapif->party_message, HP_mapif_party_message) }, { HP_POP(mapif->parse_CreateParty, HP_mapif_parse_CreateParty) }, { HP_POP(mapif->parse_PartyInfo, HP_mapif_parse_PartyInfo) }, { HP_POP(mapif->parse_PartyAddMember, HP_mapif_parse_PartyAddMember) }, @@ -553,53 +622,55 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapif->parse_PartyLeave, HP_mapif_parse_PartyLeave) }, { HP_POP(mapif->parse_PartyChangeMap, HP_mapif_parse_PartyChangeMap) }, { HP_POP(mapif->parse_BreakParty, HP_mapif_parse_BreakParty) }, - { HP_POP(mapif->parse_PartyMessage, HP_mapif_parse_PartyMessage) }, { HP_POP(mapif->parse_PartyLeaderChange, HP_mapif_parse_PartyLeaderChange) }, { HP_POP(mapif->pet_created, HP_mapif_pet_created) }, { HP_POP(mapif->pet_info, HP_mapif_pet_info) }, { HP_POP(mapif->pet_noinfo, HP_mapif_pet_noinfo) }, { HP_POP(mapif->save_pet_ack, HP_mapif_save_pet_ack) }, { HP_POP(mapif->delete_pet_ack, HP_mapif_delete_pet_ack) }, - { HP_POP(mapif->create_pet, HP_mapif_create_pet) }, - { HP_POP(mapif->load_pet, HP_mapif_load_pet) }, { HP_POP(mapif->save_pet, HP_mapif_save_pet) }, { HP_POP(mapif->delete_pet, HP_mapif_delete_pet) }, { HP_POP(mapif->parse_CreatePet, HP_mapif_parse_CreatePet) }, { HP_POP(mapif->parse_LoadPet, HP_mapif_parse_LoadPet) }, { HP_POP(mapif->parse_SavePet, HP_mapif_parse_SavePet) }, { HP_POP(mapif->parse_DeletePet, HP_mapif_parse_DeletePet) }, - { HP_POP(mapif->quests_fromsql, HP_mapif_quests_fromsql) }, - { HP_POP(mapif->quest_delete, HP_mapif_quest_delete) }, - { HP_POP(mapif->quest_add, HP_mapif_quest_add) }, - { HP_POP(mapif->quest_update, HP_mapif_quest_update) }, { HP_POP(mapif->quest_save_ack, HP_mapif_quest_save_ack) }, { HP_POP(mapif->parse_quest_save, HP_mapif_parse_quest_save) }, { HP_POP(mapif->send_quests, HP_mapif_send_quests) }, { HP_POP(mapif->parse_quest_load, HP_mapif_parse_quest_load) }, + { HP_POP(mapif->parse_rodex_requestinbox, HP_mapif_parse_rodex_requestinbox) }, + { HP_POP(mapif->rodex_sendinbox, HP_mapif_rodex_sendinbox) }, + { HP_POP(mapif->parse_rodex_checkhasnew, HP_mapif_parse_rodex_checkhasnew) }, + { HP_POP(mapif->rodex_sendhasnew, HP_mapif_rodex_sendhasnew) }, + { HP_POP(mapif->parse_rodex_updatemail, HP_mapif_parse_rodex_updatemail) }, + { HP_POP(mapif->parse_rodex_send, HP_mapif_parse_rodex_send) }, + { HP_POP(mapif->rodex_send, HP_mapif_rodex_send) }, + { HP_POP(mapif->parse_rodex_checkname, HP_mapif_parse_rodex_checkname) }, + { HP_POP(mapif->rodex_checkname, HP_mapif_rodex_checkname) }, + { HP_POP(mapif->rodex_getzenyack, HP_mapif_rodex_getzenyack) }, + { HP_POP(mapif->rodex_getitemsack, HP_mapif_rodex_getitemsack) }, { HP_POP(mapif->load_guild_storage, HP_mapif_load_guild_storage) }, { HP_POP(mapif->save_guild_storage_ack, HP_mapif_save_guild_storage_ack) }, { HP_POP(mapif->parse_LoadGuildStorage, HP_mapif_parse_LoadGuildStorage) }, { HP_POP(mapif->parse_SaveGuildStorage, HP_mapif_parse_SaveGuildStorage) }, + { HP_POP(mapif->account_storage_load, HP_mapif_account_storage_load) }, + { HP_POP(mapif->pAccountStorageLoad, HP_mapif_pAccountStorageLoad) }, + { HP_POP(mapif->pAccountStorageSave, HP_mapif_pAccountStorageSave) }, + { HP_POP(mapif->sAccountStorageSaveAck, HP_mapif_sAccountStorageSaveAck) }, { HP_POP(mapif->itembound_ack, HP_mapif_itembound_ack) }, - { HP_POP(mapif->parse_ItemBoundRetrieve_sub, HP_mapif_parse_ItemBoundRetrieve_sub) }, { HP_POP(mapif->parse_ItemBoundRetrieve, HP_mapif_parse_ItemBoundRetrieve) }, { HP_POP(mapif->parse_accinfo, HP_mapif_parse_accinfo) }, - { HP_POP(mapif->parse_accinfo2, HP_mapif_parse_accinfo2) }, - { HP_POP(mapif->broadcast, HP_mapif_broadcast) }, - { HP_POP(mapif->wis_message, HP_mapif_wis_message) }, - { HP_POP(mapif->wis_response, HP_mapif_wis_response) }, - { HP_POP(mapif->wis_end, HP_mapif_wis_end) }, { HP_POP(mapif->account_reg_reply, HP_mapif_account_reg_reply) }, { HP_POP(mapif->disconnectplayer, HP_mapif_disconnectplayer) }, - { HP_POP(mapif->parse_broadcast, HP_mapif_parse_broadcast) }, - { HP_POP(mapif->parse_WisRequest, HP_mapif_parse_WisRequest) }, - { HP_POP(mapif->parse_WisReply, HP_mapif_parse_WisReply) }, - { HP_POP(mapif->parse_WisToGM, HP_mapif_parse_WisToGM) }, { HP_POP(mapif->parse_Registry, HP_mapif_parse_Registry) }, { HP_POP(mapif->parse_RegistryRequest, HP_mapif_parse_RegistryRequest) }, { HP_POP(mapif->namechange_ack, HP_mapif_namechange_ack) }, { HP_POP(mapif->parse_NameChangeRequest, HP_mapif_parse_NameChangeRequest) }, -/* mapindex */ + { HP_POP(mapif->parse_ClanMemberKick, HP_mapif_parse_ClanMemberKick) }, + { HP_POP(mapif->parse_ClanMemberCount, HP_mapif_parse_ClanMemberCount) }, +/* mapindex_interface */ + { HP_POP(mapindex->config_read_dbpath, HP_mapindex_config_read_dbpath) }, + { HP_POP(mapindex->config_read, HP_mapindex_config_read) }, { HP_POP(mapindex->init, HP_mapindex_init) }, { HP_POP(mapindex->final, HP_mapindex_final) }, { HP_POP(mapindex->addmap, HP_mapindex_addmap) }, @@ -609,25 +680,62 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapindex->name2id, HP_mapindex_name2id) }, { HP_POP(mapindex->id2name, HP_mapindex_id2name) }, { HP_POP(mapindex->check_default, HP_mapindex_check_default) }, -/* nullpo */ +/* md5_interface */ + { HP_POP(md5->string, HP_md5_string) }, + { HP_POP(md5->binary, HP_md5_binary) }, + { HP_POP(md5->salt, HP_md5_salt) }, +/* mutex_interface */ + { HP_POP(mutex->create, HP_mutex_create) }, + { HP_POP(mutex->destroy, HP_mutex_destroy) }, + { HP_POP(mutex->lock, HP_mutex_lock) }, + { HP_POP(mutex->trylock, HP_mutex_trylock) }, + { HP_POP(mutex->unlock, HP_mutex_unlock) }, + { HP_POP(mutex->cond_create, HP_mutex_cond_create) }, + { HP_POP(mutex->cond_destroy, HP_mutex_cond_destroy) }, + { HP_POP(mutex->cond_wait, HP_mutex_cond_wait) }, + { HP_POP(mutex->cond_signal, HP_mutex_cond_signal) }, + { HP_POP(mutex->cond_broadcast, HP_mutex_cond_broadcast) }, +/* nullpo_interface */ + { HP_POP(nullpo->init, HP_nullpo_init) }, + { HP_POP(nullpo->final, HP_nullpo_final) }, { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, -/* pincode */ +/* packets_interface */ + { HP_POP(packets->init, HP_packets_init) }, + { HP_POP(packets->final, HP_packets_final) }, + { HP_POP(packets->addLens, HP_packets_addLens) }, + { HP_POP(packets->addLen, HP_packets_addLen) }, +/* pincode_interface */ { HP_POP(pincode->handle, HP_pincode_handle) }, { HP_POP(pincode->decrypt, HP_pincode_decrypt) }, { HP_POP(pincode->error, HP_pincode_error) }, { HP_POP(pincode->update, HP_pincode_update) }, - { HP_POP(pincode->sendstate, HP_pincode_sendstate) }, + { HP_POP(pincode->makestate, HP_pincode_makestate) }, + { HP_POP(pincode->editstate, HP_pincode_editstate) }, + { HP_POP(pincode->loginstate, HP_pincode_loginstate) }, + { HP_POP(pincode->loginstate2, HP_pincode_loginstate2) }, { HP_POP(pincode->setnew, HP_pincode_setnew) }, { HP_POP(pincode->change, HP_pincode_change) }, + { HP_POP(pincode->isBlacklisted, HP_pincode_isBlacklisted) }, { HP_POP(pincode->compare, HP_pincode_compare) }, { HP_POP(pincode->check, HP_pincode_check) }, { HP_POP(pincode->config_read, HP_pincode_config_read) }, -/* showmsg */ + { HP_POP(pincode->init, HP_pincode_init) }, + { HP_POP(pincode->final, HP_pincode_final) }, +/* rnd_interface */ + { HP_POP(rnd->init, HP_rnd_init) }, + { HP_POP(rnd->final, HP_rnd_final) }, + { HP_POP(rnd->seed, HP_rnd_seed) }, + { HP_POP(rnd->random, HP_rnd_random) }, + { HP_POP(rnd->roll, HP_rnd_roll) }, + { HP_POP(rnd->value, HP_rnd_value) }, + { HP_POP(rnd->uniform, HP_rnd_uniform) }, + { HP_POP(rnd->uniform53, HP_rnd_uniform53) }, +/* showmsg_interface */ { HP_POP(showmsg->init, HP_showmsg_init) }, { HP_POP(showmsg->final, HP_showmsg_final) }, { HP_POP(showmsg->clearScreen, HP_showmsg_clearScreen) }, { HP_POP(showmsg->showMessageV, HP_showmsg_showMessageV) }, -/* sockt */ +/* socket_interface */ { HP_POP(sockt->init, HP_sockt_init) }, { HP_POP(sockt->final, HP_sockt_final) }, { HP_POP(sockt->perform, HP_sockt_perform) }, @@ -637,12 +745,15 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) }, { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) }, { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) }, + { HP_POP(sockt->wfifohead, HP_sockt_wfifohead) }, { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) }, { HP_POP(sockt->close, HP_sockt_close) }, + { HP_POP(sockt->validateWfifo, HP_sockt_validateWfifo) }, { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) }, { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) }, { HP_POP(sockt->flush, HP_sockt_flush) }, { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) }, + { HP_POP(sockt->connect_client, HP_sockt_connect_client) }, { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) }, { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) }, { HP_POP(sockt->host2ip, HP_sockt_host2ip) }, @@ -656,7 +767,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sockt->trusted_ip_check, HP_sockt_trusted_ip_check) }, { HP_POP(sockt->net_config_read_sub, HP_sockt_net_config_read_sub) }, { HP_POP(sockt->net_config_read, HP_sockt_net_config_read) }, -/* SQL */ +/* sql_interface */ { HP_POP(SQL->Connect, HP_SQL_Connect) }, { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) }, { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) }, @@ -689,7 +800,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) }, { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) }, { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) }, -/* StrBuf */ +/* stringbuf_interface */ { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) }, { HP_POP(StrBuf->Init, HP_StrBuf_Init) }, { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) }, @@ -700,7 +811,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) }, { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) }, { HP_POP(StrBuf->Free, HP_StrBuf_Free) }, -/* strlib */ +/* strlib_interface */ { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) }, { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) }, { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) }, @@ -716,7 +827,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) }, { HP_POP(strlib->strline_, HP_strlib_strline_) }, { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) }, -/* sv */ +/* sv_interface */ { HP_POP(sv->parse_next, HP_sv_parse_next) }, { HP_POP(sv->parse, HP_sv_parse) }, { HP_POP(sv->split, HP_sv_split) }, @@ -724,7 +835,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sv->unescape_c, HP_sv_unescape_c) }, { HP_POP(sv->skip_escaped_c, HP_sv_skip_escaped_c) }, { HP_POP(sv->readdb, HP_sv_readdb) }, -/* sysinfo */ +/* sysinfo_interface */ { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) }, { HP_POP(sysinfo->platform, HP_sysinfo_platform) }, { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) }, @@ -743,7 +854,19 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) }, { HP_POP(sysinfo->init, HP_sysinfo_init) }, { HP_POP(sysinfo->final, HP_sysinfo_final) }, -/* timer */ +/* thread_interface */ + { HP_POP(thread->init, HP_thread_init) }, + { HP_POP(thread->final, HP_thread_final) }, + { HP_POP(thread->create, HP_thread_create) }, + { HP_POP(thread->create_opt, HP_thread_create_opt) }, + { HP_POP(thread->destroy, HP_thread_destroy) }, + { HP_POP(thread->self, HP_thread_self) }, + { HP_POP(thread->get_tid, HP_thread_get_tid) }, + { HP_POP(thread->wait, HP_thread_wait) }, + { HP_POP(thread->prio_set, HP_thread_prio_set) }, + { HP_POP(thread->prio_get, HP_thread_prio_get) }, + { HP_POP(thread->yield, HP_thread_yield) }, +/* timer_interface */ { HP_POP(timer->gettick, HP_timer_gettick) }, { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) }, { HP_POP(timer->add, HP_timer_add) }, @@ -759,4 +882,4 @@ struct HookingPointData HookingPoints[] = { { HP_POP(timer->final, HP_timer_final) }, }; -int HookingPointsLenMax = 42; +int HookingPointsLenMax = 43; diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index b06abebb7..8c1dec681 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,17 +23,19 @@ * as it will get overwritten. */ -/* HCache */ +/* GENERATED FILE DO NOT EDIT */ + +/* HCache_interface */ void HP_HCache_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_HCache_init_pre ) { + if (HPMHooks.count.HP_HCache_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41,9 +43,9 @@ void HP_HCache_init(void) { { HPMHooks.source.HCache.init(); } - if( HPMHooks.count.HP_HCache_init_post ) { + if (HPMHooks.count.HP_HCache_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func; postHookFunc(); } @@ -53,14 +55,14 @@ void HP_HCache_init(void) { bool HP_HCache_check(const char *file) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_HCache_check_pre ) { - bool (*preHookFunc) (const char *file); + if (HPMHooks.count.HP_HCache_check_pre > 0) { + bool (*preHookFunc) (const char **file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func; - retVal___ = preHookFunc(file); + retVal___ = preHookFunc(&file); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68,9 +70,9 @@ bool HP_HCache_check(const char *file) { { retVal___ = HPMHooks.source.HCache.check(file); } - if( HPMHooks.count.HP_HCache_check_post ) { + if (HPMHooks.count.HP_HCache_check_post > 0) { bool (*postHookFunc) (bool retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, file); } @@ -80,14 +82,14 @@ bool HP_HCache_check(const char *file) { FILE* HP_HCache_open(const char *file, const char *opt) { int hIndex = 0; FILE* retVal___ = NULL; - if( HPMHooks.count.HP_HCache_open_pre ) { - FILE* (*preHookFunc) (const char *file, const char *opt); + if (HPMHooks.count.HP_HCache_open_pre > 0) { + FILE* (*preHookFunc) (const char **file, const char **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func; - retVal___ = preHookFunc(file, opt); + retVal___ = preHookFunc(&file, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -95,27 +97,27 @@ FILE* HP_HCache_open(const char *file, const char *opt) { { retVal___ = HPMHooks.source.HCache.open(file, opt); } - if( HPMHooks.count.HP_HCache_open_post ) { + if (HPMHooks.count.HP_HCache_open_post > 0) { FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, file, opt); } } return retVal___; } -/* chr */ +/* char_interface */ int HP_chr_waiting_disconnect(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_waiting_disconnect_pre ) { + if (HPMHooks.count.HP_chr_waiting_disconnect_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_waiting_disconnect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_waiting_disconnect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_waiting_disconnect_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -123,11 +125,11 @@ int HP_chr_waiting_disconnect(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.chr.waiting_disconnect(tid, tick, id, data); } - if( HPMHooks.count.HP_chr_waiting_disconnect_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_waiting_disconnect_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_waiting_disconnect_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_waiting_disconnect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_waiting_disconnect_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -135,14 +137,14 @@ int HP_chr_waiting_disconnect(int tid, int64 tick, int id, intptr_t data) { int HP_chr_delete_char_sql(int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_delete_char_sql_pre ) { + if (HPMHooks.count.HP_chr_delete_char_sql_pre > 0) { int (*preHookFunc) (int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete_char_sql_pre[hIndex].func; retVal___ = preHookFunc(&char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -150,29 +152,28 @@ int HP_chr_delete_char_sql(int char_id) { { retVal___ = HPMHooks.source.chr.delete_char_sql(char_id); } - if( HPMHooks.count.HP_chr_delete_char_sql_post ) { - int (*postHookFunc) (int retVal___, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_sql_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_delete_char_sql_post > 0) { + int (*postHookFunc) (int retVal___, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete_char_sql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id); + retVal___ = postHookFunc(retVal___, char_id); } } return retVal___; } struct DBData HP_chr_create_online_char_data(union DBKey key, va_list args) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_chr_create_online_char_data_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_chr_create_online_char_data_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_online_char_data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_online_char_data_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_chr_create_online_char_data_pre[hIndex].func; retVal___ = preHookFunc(&key, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -182,12 +183,12 @@ struct DBData HP_chr_create_online_char_data(union DBKey key, va_list args) { retVal___ = HPMHooks.source.chr.create_online_char_data(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_chr_create_online_char_data_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_online_char_data_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_create_online_char_data_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_online_char_data_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_chr_create_online_char_data_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, args___copy); + retVal___ = postHookFunc(retVal___, key, args___copy); va_end(args___copy); } } @@ -195,14 +196,14 @@ struct DBData HP_chr_create_online_char_data(union DBKey key, va_list args) { } void HP_chr_set_account_online(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_account_online_pre ) { + if (HPMHooks.count.HP_chr_set_account_online_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_online_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_online_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_account_online_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -210,25 +211,25 @@ void HP_chr_set_account_online(int account_id) { { HPMHooks.source.chr.set_account_online(account_id); } - if( HPMHooks.count.HP_chr_set_account_online_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_online_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_set_account_online_post > 0) { + void (*postHookFunc) (int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_online_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_account_online_post[hIndex].func; - postHookFunc(&account_id); + postHookFunc(account_id); } } return; } void HP_chr_set_account_offline(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_account_offline_pre ) { + if (HPMHooks.count.HP_chr_set_account_offline_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_account_offline_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -236,25 +237,25 @@ void HP_chr_set_account_offline(int account_id) { { HPMHooks.source.chr.set_account_offline(account_id); } - if( HPMHooks.count.HP_chr_set_account_offline_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_offline_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_set_account_offline_post > 0) { + void (*postHookFunc) (int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_account_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_account_offline_post[hIndex].func; - postHookFunc(&account_id); + postHookFunc(account_id); } } return; } void HP_chr_set_char_charselect(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_char_charselect_pre ) { + if (HPMHooks.count.HP_chr_set_char_charselect_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_charselect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_charselect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_char_charselect_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -262,25 +263,25 @@ void HP_chr_set_char_charselect(int account_id) { { HPMHooks.source.chr.set_char_charselect(account_id); } - if( HPMHooks.count.HP_chr_set_char_charselect_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_charselect_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_set_char_charselect_post > 0) { + void (*postHookFunc) (int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_charselect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_char_charselect_post[hIndex].func; - postHookFunc(&account_id); + postHookFunc(account_id); } } return; } void HP_chr_set_char_online(int map_id, int char_id, int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_char_online_pre ) { + if (HPMHooks.count.HP_chr_set_char_online_pre > 0) { void (*preHookFunc) (int *map_id, int *char_id, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_online_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_online_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_char_online_pre[hIndex].func; preHookFunc(&map_id, &char_id, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -288,25 +289,25 @@ void HP_chr_set_char_online(int map_id, int char_id, int account_id) { { HPMHooks.source.chr.set_char_online(map_id, char_id, account_id); } - if( HPMHooks.count.HP_chr_set_char_online_post ) { - void (*postHookFunc) (int *map_id, int *char_id, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_online_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_set_char_online_post > 0) { + void (*postHookFunc) (int map_id, int char_id, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_online_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_char_online_post[hIndex].func; - postHookFunc(&map_id, &char_id, &account_id); + postHookFunc(map_id, char_id, account_id); } } return; } void HP_chr_set_char_offline(int char_id, int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_char_offline_pre ) { + if (HPMHooks.count.HP_chr_set_char_offline_pre > 0) { void (*preHookFunc) (int *char_id, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_char_offline_pre[hIndex].func; preHookFunc(&char_id, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -314,11 +315,11 @@ void HP_chr_set_char_offline(int char_id, int account_id) { { HPMHooks.source.chr.set_char_offline(char_id, account_id); } - if( HPMHooks.count.HP_chr_set_char_offline_post ) { - void (*postHookFunc) (int *char_id, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_offline_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_set_char_offline_post > 0) { + void (*postHookFunc) (int char_id, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_char_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_char_offline_post[hIndex].func; - postHookFunc(&char_id, &account_id); + postHookFunc(char_id, account_id); } } return; @@ -326,16 +327,16 @@ void HP_chr_set_char_offline(int char_id, int account_id) { int HP_chr_db_setoffline(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_db_setoffline_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_chr_db_setoffline_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_setoffline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_setoffline_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_chr_db_setoffline_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -345,12 +346,12 @@ int HP_chr_db_setoffline(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.chr.db_setoffline(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_chr_db_setoffline_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_setoffline_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_db_setoffline_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_setoffline_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_chr_db_setoffline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -359,16 +360,16 @@ int HP_chr_db_setoffline(union DBKey key, struct DBData *data, va_list ap) { int HP_chr_db_kickoffline(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_db_kickoffline_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_chr_db_kickoffline_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_kickoffline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_kickoffline_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_chr_db_kickoffline_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -378,12 +379,12 @@ int HP_chr_db_kickoffline(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.chr.db_kickoffline(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_chr_db_kickoffline_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_kickoffline_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_db_kickoffline_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_db_kickoffline_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_chr_db_kickoffline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -391,14 +392,14 @@ int HP_chr_db_kickoffline(union DBKey key, struct DBData *data, va_list ap) { } void HP_chr_set_login_all_offline(void) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_login_all_offline_pre ) { + if (HPMHooks.count.HP_chr_set_login_all_offline_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_login_all_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_login_all_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_login_all_offline_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -406,9 +407,9 @@ void HP_chr_set_login_all_offline(void) { { HPMHooks.source.chr.set_login_all_offline(); } - if( HPMHooks.count.HP_chr_set_login_all_offline_post ) { + if (HPMHooks.count.HP_chr_set_login_all_offline_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_login_all_offline_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_login_all_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_login_all_offline_post[hIndex].func; postHookFunc(); } @@ -417,14 +418,14 @@ void HP_chr_set_login_all_offline(void) { } void HP_chr_set_all_offline(int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_all_offline_pre ) { + if (HPMHooks.count.HP_chr_set_all_offline_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_all_offline_pre[hIndex].func; preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -432,25 +433,25 @@ void HP_chr_set_all_offline(int id) { { HPMHooks.source.chr.set_all_offline(id); } - if( HPMHooks.count.HP_chr_set_all_offline_post ) { - void (*postHookFunc) (int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_set_all_offline_post > 0) { + void (*postHookFunc) (int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_all_offline_post[hIndex].func; - postHookFunc(&id); + postHookFunc(id); } } return; } void HP_chr_set_all_offline_sql(void) { int hIndex = 0; - if( HPMHooks.count.HP_chr_set_all_offline_sql_pre ) { + if (HPMHooks.count.HP_chr_set_all_offline_sql_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_set_all_offline_sql_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -458,9 +459,9 @@ void HP_chr_set_all_offline_sql(void) { { HPMHooks.source.chr.set_all_offline_sql(); } - if( HPMHooks.count.HP_chr_set_all_offline_sql_post ) { + if (HPMHooks.count.HP_chr_set_all_offline_sql_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_sql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_set_all_offline_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_set_all_offline_sql_post[hIndex].func; postHookFunc(); } @@ -469,18 +470,17 @@ void HP_chr_set_all_offline_sql(void) { } struct DBData HP_chr_create_charstatus(union DBKey key, va_list args) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_chr_create_charstatus_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_chr_create_charstatus_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_charstatus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_charstatus_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_chr_create_charstatus_pre[hIndex].func; retVal___ = preHookFunc(&key, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -490,12 +490,12 @@ struct DBData HP_chr_create_charstatus(union DBKey key, va_list args) { retVal___ = HPMHooks.source.chr.create_charstatus(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_chr_create_charstatus_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_charstatus_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_create_charstatus_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_create_charstatus_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_chr_create_charstatus_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, args___copy); + retVal___ = postHookFunc(retVal___, key, args___copy); va_end(args___copy); } } @@ -504,14 +504,14 @@ struct DBData HP_chr_create_charstatus(union DBKey key, va_list args) { int HP_chr_mmo_char_tosql(int char_id, struct mmo_charstatus *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_char_tosql_pre ) { - int (*preHookFunc) (int *char_id, struct mmo_charstatus *p); + if (HPMHooks.count.HP_chr_mmo_char_tosql_pre > 0) { + int (*preHookFunc) (int *char_id, struct mmo_charstatus **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_tosql_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, p); + retVal___ = preHookFunc(&char_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -519,38 +519,65 @@ int HP_chr_mmo_char_tosql(int char_id, struct mmo_charstatus *p) { { retVal___ = HPMHooks.source.chr.mmo_char_tosql(char_id, p); } - if( HPMHooks.count.HP_chr_mmo_char_tosql_post ) { - int (*postHookFunc) (int retVal___, int *char_id, struct mmo_charstatus *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tosql_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_mmo_char_tosql_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, struct mmo_charstatus *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, p); + retVal___ = postHookFunc(retVal___, char_id, p); + } + } + return retVal___; +} +int HP_chr_getitemdata_from_sql(struct item *items, int max, int guid, enum inventory_table_type table) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_chr_getitemdata_from_sql_pre > 0) { + int (*preHookFunc) (struct item **items, int *max, int *guid, enum inventory_table_type *table); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_getitemdata_from_sql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_getitemdata_from_sql_pre[hIndex].func; + retVal___ = preHookFunc(&items, &max, &guid, &table); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.getitemdata_from_sql(items, max, guid, table); + } + if (HPMHooks.count.HP_chr_getitemdata_from_sql_post > 0) { + int (*postHookFunc) (int retVal___, struct item *items, int max, int guid, enum inventory_table_type table); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_getitemdata_from_sql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_getitemdata_from_sql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, items, max, guid, table); } } return retVal___; } -int HP_chr_memitemdata_to_sql(const struct item items[], int max, int id, int tableswitch) { +int HP_chr_memitemdata_to_sql(const struct item items[], int id, enum inventory_table_type table) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_memitemdata_to_sql_pre ) { - int (*preHookFunc) (const struct item *items[], int *max, int *id, int *tableswitch); + if (HPMHooks.count.HP_chr_memitemdata_to_sql_pre > 0) { + int (*preHookFunc) (const struct item *items[], int *id, enum inventory_table_type *table); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_memitemdata_to_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_memitemdata_to_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_memitemdata_to_sql_pre[hIndex].func; - retVal___ = preHookFunc(&items, &max, &id, &tableswitch); + retVal___ = preHookFunc(&items, &id, &table); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.chr.memitemdata_to_sql(items, max, id, tableswitch); + retVal___ = HPMHooks.source.chr.memitemdata_to_sql(items, id, table); } - if( HPMHooks.count.HP_chr_memitemdata_to_sql_post ) { - int (*postHookFunc) (int retVal___, const struct item *items[], int *max, int *id, int *tableswitch); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_memitemdata_to_sql_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_memitemdata_to_sql_post > 0) { + int (*postHookFunc) (int retVal___, const struct item items[], int id, enum inventory_table_type table); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_memitemdata_to_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_memitemdata_to_sql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &items, &max, &id, &tableswitch); + retVal___ = postHookFunc(retVal___, items, id, table); } } return retVal___; @@ -558,14 +585,14 @@ int HP_chr_memitemdata_to_sql(const struct item items[], int max, int id, int ta int HP_chr_mmo_gender(const struct char_session_data *sd, const struct mmo_charstatus *p, char sex) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_gender_pre ) { - int (*preHookFunc) (const struct char_session_data *sd, const struct mmo_charstatus *p, char *sex); + if (HPMHooks.count.HP_chr_mmo_gender_pre > 0) { + int (*preHookFunc) (const struct char_session_data **sd, const struct mmo_charstatus **p, char *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_gender_pre[hIndex].func; - retVal___ = preHookFunc(sd, p, &sex); + retVal___ = preHookFunc(&sd, &p, &sex); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -573,38 +600,38 @@ int HP_chr_mmo_gender(const struct char_session_data *sd, const struct mmo_chars { retVal___ = HPMHooks.source.chr.mmo_gender(sd, p, sex); } - if( HPMHooks.count.HP_chr_mmo_gender_post ) { - int (*postHookFunc) (int retVal___, const struct char_session_data *sd, const struct mmo_charstatus *p, char *sex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_mmo_gender_post > 0) { + int (*postHookFunc) (int retVal___, const struct char_session_data *sd, const struct mmo_charstatus *p, char sex); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_gender_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_gender_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, p, &sex); + retVal___ = postHookFunc(retVal___, sd, p, sex); } } return retVal___; } -int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf) { +int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf, int *count) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_chars_fromsql_pre ) { - int (*preHookFunc) (struct char_session_data *sd, uint8 *buf); + if (HPMHooks.count.HP_chr_mmo_chars_fromsql_pre > 0) { + int (*preHookFunc) (struct char_session_data **sd, uint8 **buf, int **count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_chars_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(sd, buf); + retVal___ = preHookFunc(&sd, &buf, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.chr.mmo_chars_fromsql(sd, buf); + retVal___ = HPMHooks.source.chr.mmo_chars_fromsql(sd, buf, count); } - if( HPMHooks.count.HP_chr_mmo_chars_fromsql_post ) { - int (*postHookFunc) (int retVal___, struct char_session_data *sd, uint8 *buf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_mmo_chars_fromsql_post > 0) { + int (*postHookFunc) (int retVal___, struct char_session_data *sd, uint8 *buf, int *count); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_chars_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_chars_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, buf); + retVal___ = postHookFunc(retVal___, sd, buf, count); } } return retVal___; @@ -612,14 +639,14 @@ int HP_chr_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf) { int HP_chr_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool load_everything) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_char_fromsql_pre ) { - int (*preHookFunc) (int *char_id, struct mmo_charstatus *p, bool *load_everything); + if (HPMHooks.count.HP_chr_mmo_char_fromsql_pre > 0) { + int (*preHookFunc) (int *char_id, struct mmo_charstatus **p, bool *load_everything); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, p, &load_everything); + retVal___ = preHookFunc(&char_id, &p, &load_everything); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -627,11 +654,11 @@ int HP_chr_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool load_eve { retVal___ = HPMHooks.source.chr.mmo_char_fromsql(char_id, p, load_everything); } - if( HPMHooks.count.HP_chr_mmo_char_fromsql_post ) { - int (*postHookFunc) (int retVal___, int *char_id, struct mmo_charstatus *p, bool *load_everything); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_fromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_mmo_char_fromsql_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, struct mmo_charstatus *p, bool load_everything); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, p, &load_everything); + retVal___ = postHookFunc(retVal___, char_id, p, load_everything); } } return retVal___; @@ -639,14 +666,14 @@ int HP_chr_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool load_eve int HP_chr_mmo_char_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_char_sql_init_pre ) { + if (HPMHooks.count.HP_chr_mmo_char_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -654,9 +681,9 @@ int HP_chr_mmo_char_sql_init(void) { { retVal___ = HPMHooks.source.chr.mmo_char_sql_init(); } - if( HPMHooks.count.HP_chr_mmo_char_sql_init_post ) { + if (HPMHooks.count.HP_chr_mmo_char_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -666,14 +693,14 @@ int HP_chr_mmo_char_sql_init(void) { bool HP_chr_char_slotchange(struct char_session_data *sd, int fd, unsigned short from, unsigned short to) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chr_char_slotchange_pre ) { - bool (*preHookFunc) (struct char_session_data *sd, int *fd, unsigned short *from, unsigned short *to); + if (HPMHooks.count.HP_chr_char_slotchange_pre > 0) { + bool (*preHookFunc) (struct char_session_data **sd, int *fd, unsigned short *from, unsigned short *to); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_slotchange_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_slotchange_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_char_slotchange_pre[hIndex].func; - retVal___ = preHookFunc(sd, &fd, &from, &to); + retVal___ = preHookFunc(&sd, &fd, &from, &to); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -681,11 +708,11 @@ bool HP_chr_char_slotchange(struct char_session_data *sd, int fd, unsigned short { retVal___ = HPMHooks.source.chr.char_slotchange(sd, fd, from, to); } - if( HPMHooks.count.HP_chr_char_slotchange_post ) { - bool (*postHookFunc) (bool retVal___, struct char_session_data *sd, int *fd, unsigned short *from, unsigned short *to); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_slotchange_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_char_slotchange_post > 0) { + bool (*postHookFunc) (bool retVal___, struct char_session_data *sd, int fd, unsigned short from, unsigned short to); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_slotchange_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_char_slotchange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &fd, &from, &to); + retVal___ = postHookFunc(retVal___, sd, fd, from, to); } } return retVal___; @@ -693,14 +720,14 @@ bool HP_chr_char_slotchange(struct char_session_data *sd, int fd, unsigned short int HP_chr_rename_char_sql(struct char_session_data *sd, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_rename_char_sql_pre ) { - int (*preHookFunc) (struct char_session_data *sd, int *char_id); + if (HPMHooks.count.HP_chr_rename_char_sql_pre > 0) { + int (*preHookFunc) (struct char_session_data **sd, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_rename_char_sql_pre[hIndex].func; - retVal___ = preHookFunc(sd, &char_id); + retVal___ = preHookFunc(&sd, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -708,26 +735,53 @@ int HP_chr_rename_char_sql(struct char_session_data *sd, int char_id) { { retVal___ = HPMHooks.source.chr.rename_char_sql(sd, char_id); } - if( HPMHooks.count.HP_chr_rename_char_sql_post ) { - int (*postHookFunc) (int retVal___, struct char_session_data *sd, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_sql_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_rename_char_sql_post > 0) { + int (*postHookFunc) (int retVal___, struct char_session_data *sd, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_rename_char_sql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &char_id); + retVal___ = postHookFunc(retVal___, sd, char_id); + } + } + return retVal___; +} +bool HP_chr_name_exists(const char *name, const char *esc_name) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_name_exists_pre > 0) { + bool (*preHookFunc) (const char **name, const char **esc_name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_name_exists_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_name_exists_pre[hIndex].func; + retVal___ = preHookFunc(&name, &esc_name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.name_exists(name, esc_name); + } + if (HPMHooks.count.HP_chr_name_exists_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *name, const char *esc_name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_name_exists_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_name_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, esc_name); } } return retVal___; } -int HP_chr_check_char_name(char *name, char *esc_name) { +int HP_chr_check_char_name(const char *name, const char *esc_name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_check_char_name_pre ) { - int (*preHookFunc) (char *name, char *esc_name); + if (HPMHooks.count.HP_chr_check_char_name_pre > 0) { + int (*preHookFunc) (const char **name, const char **esc_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_char_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_char_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_check_char_name_pre[hIndex].func; - retVal___ = preHookFunc(name, esc_name); + retVal___ = preHookFunc(&name, &esc_name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -735,38 +789,38 @@ int HP_chr_check_char_name(char *name, char *esc_name) { { retVal___ = HPMHooks.source.chr.check_char_name(name, esc_name); } - if( HPMHooks.count.HP_chr_check_char_name_post ) { - int (*postHookFunc) (int retVal___, char *name, char *esc_name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_char_name_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_check_char_name_post > 0) { + int (*postHookFunc) (int retVal___, const char *name, const char *esc_name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_char_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_check_char_name_post[hIndex].func; retVal___ = postHookFunc(retVal___, name, esc_name); } } return retVal___; } -int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style) { +int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_make_new_char_sql_pre ) { - int (*preHookFunc) (struct char_session_data *sd, const char *name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style); + if (HPMHooks.count.HP_chr_make_new_char_sql_pre > 0) { + int (*preHookFunc) (struct char_session_data **sd, const char **name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style, int *starting_job, uint8 *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_pre[hIndex].func; - retVal___ = preHookFunc(sd, name_, &str, &agi, &vit, &int_, &dex, &luk, &slot, &hair_color, &hair_style); + retVal___ = preHookFunc(&sd, &name_, &str, &agi, &vit, &int_, &dex, &luk, &slot, &hair_color, &hair_style, &starting_job, &sex); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.chr.make_new_char_sql(sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style); + retVal___ = HPMHooks.source.chr.make_new_char_sql(sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex); } - if( HPMHooks.count.HP_chr_make_new_char_sql_post ) { - int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int *str, int *agi, int *vit, int *int_, int *dex, int *luk, int *slot, int *hair_color, int *hair_style); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_make_new_char_sql_post > 0) { + int (*postHookFunc) (int retVal___, struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int starting_job, uint8 sex); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, name_, &str, &agi, &vit, &int_, &dex, &luk, &slot, &hair_color, &hair_style); + retVal___ = postHookFunc(retVal___, sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex); } } return retVal___; @@ -774,14 +828,14 @@ int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, in int HP_chr_divorce_char_sql(int partner_id1, int partner_id2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_divorce_char_sql_pre ) { + if (HPMHooks.count.HP_chr_divorce_char_sql_pre > 0) { int (*preHookFunc) (int *partner_id1, int *partner_id2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_divorce_char_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_divorce_char_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_divorce_char_sql_pre[hIndex].func; retVal___ = preHookFunc(&partner_id1, &partner_id2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -789,11 +843,11 @@ int HP_chr_divorce_char_sql(int partner_id1, int partner_id2) { { retVal___ = HPMHooks.source.chr.divorce_char_sql(partner_id1, partner_id2); } - if( HPMHooks.count.HP_chr_divorce_char_sql_post ) { - int (*postHookFunc) (int retVal___, int *partner_id1, int *partner_id2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_divorce_char_sql_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_divorce_char_sql_post > 0) { + int (*postHookFunc) (int retVal___, int partner_id1, int partner_id2); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_divorce_char_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_divorce_char_sql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &partner_id1, &partner_id2); + retVal___ = postHookFunc(retVal___, partner_id1, partner_id2); } } return retVal___; @@ -801,14 +855,14 @@ int HP_chr_divorce_char_sql(int partner_id1, int partner_id2) { int HP_chr_count_users(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_count_users_pre ) { + if (HPMHooks.count.HP_chr_count_users_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_count_users_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_count_users_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_count_users_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -816,9 +870,9 @@ int HP_chr_count_users(void) { { retVal___ = HPMHooks.source.chr.count_users(); } - if( HPMHooks.count.HP_chr_count_users_post ) { + if (HPMHooks.count.HP_chr_count_users_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_count_users_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_count_users_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_count_users_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -828,14 +882,14 @@ int HP_chr_count_users(void) { int HP_chr_mmo_char_tobuf(uint8 *buffer, struct mmo_charstatus *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_char_tobuf_pre ) { - int (*preHookFunc) (uint8 *buffer, struct mmo_charstatus *p); + if (HPMHooks.count.HP_chr_mmo_char_tobuf_pre > 0) { + int (*preHookFunc) (uint8 **buffer, struct mmo_charstatus **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tobuf_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tobuf_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_tobuf_pre[hIndex].func; - retVal___ = preHookFunc(buffer, p); + retVal___ = preHookFunc(&buffer, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -843,51 +897,77 @@ int HP_chr_mmo_char_tobuf(uint8 *buffer, struct mmo_charstatus *p) { { retVal___ = HPMHooks.source.chr.mmo_char_tobuf(buffer, p); } - if( HPMHooks.count.HP_chr_mmo_char_tobuf_post ) { + if (HPMHooks.count.HP_chr_mmo_char_tobuf_post > 0) { int (*postHookFunc) (int retVal___, uint8 *buffer, struct mmo_charstatus *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tobuf_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_tobuf_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_tobuf_post[hIndex].func; retVal___ = postHookFunc(retVal___, buffer, p); } } return retVal___; } -void HP_chr_mmo_char_send099d(int fd, struct char_session_data *sd) { +void HP_chr_send_HC_ACK_CHARINFO_PER_PAGE(int fd, struct char_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chr.send_HC_ACK_CHARINFO_PER_PAGE(fd, sd); + } + if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_mmo_char_send099d_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send099d_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_chr_mmo_char_send099d_pre[hIndex].func; - preHookFunc(&fd, sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_pre[hIndex].func; + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.chr.mmo_char_send099d(fd, sd); + HPMHooks.source.chr.send_HC_ACK_CHARINFO_PER_PAGE_tail(fd, sd); } - if( HPMHooks.count.HP_chr_mmo_char_send099d_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send099d_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_chr_mmo_char_send099d_post[hIndex].func; - postHookFunc(&fd, sd); + if (HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_send_HC_ACK_CHARINFO_PER_PAGE_tail_post[hIndex].func; + postHookFunc(fd, sd); } } return; } void HP_chr_mmo_char_send_ban_list(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_mmo_char_send_ban_list_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_mmo_char_send_ban_list_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_ban_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_ban_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_send_ban_list_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -895,25 +975,25 @@ void HP_chr_mmo_char_send_ban_list(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.mmo_char_send_ban_list(fd, sd); } - if( HPMHooks.count.HP_chr_mmo_char_send_ban_list_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_ban_list_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_mmo_char_send_ban_list_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_ban_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_send_ban_list_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_mmo_char_send_slots_info(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_mmo_char_send_slots_info_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_mmo_char_send_slots_info_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_slots_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_slots_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_send_slots_info_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -921,11 +1001,11 @@ void HP_chr_mmo_char_send_slots_info(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.mmo_char_send_slots_info(fd, sd); } - if( HPMHooks.count.HP_chr_mmo_char_send_slots_info_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_slots_info_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_mmo_char_send_slots_info_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_slots_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_send_slots_info_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; @@ -933,14 +1013,14 @@ void HP_chr_mmo_char_send_slots_info(int fd, struct char_session_data *sd) { int HP_chr_mmo_char_send_characters(int fd, struct char_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mmo_char_send_characters_pre ) { - int (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_mmo_char_send_characters_pre > 0) { + int (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_characters_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_characters_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mmo_char_send_characters_pre[hIndex].func; - retVal___ = preHookFunc(&fd, sd); + retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -948,11 +1028,11 @@ int HP_chr_mmo_char_send_characters(int fd, struct char_session_data *sd) { { retVal___ = HPMHooks.source.chr.mmo_char_send_characters(fd, sd); } - if( HPMHooks.count.HP_chr_mmo_char_send_characters_post ) { - int (*postHookFunc) (int retVal___, int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_characters_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_mmo_char_send_characters_post > 0) { + int (*postHookFunc) (int retVal___, int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mmo_char_send_characters_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mmo_char_send_characters_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, sd); + retVal___ = postHookFunc(retVal___, fd, sd); } } return retVal___; @@ -960,14 +1040,14 @@ int HP_chr_mmo_char_send_characters(int fd, struct char_session_data *sd) { int HP_chr_char_married(int pl1, int pl2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_char_married_pre ) { + if (HPMHooks.count.HP_chr_char_married_pre > 0) { int (*preHookFunc) (int *pl1, int *pl2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_married_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_married_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_char_married_pre[hIndex].func; retVal___ = preHookFunc(&pl1, &pl2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -975,11 +1055,11 @@ int HP_chr_char_married(int pl1, int pl2) { { retVal___ = HPMHooks.source.chr.char_married(pl1, pl2); } - if( HPMHooks.count.HP_chr_char_married_post ) { - int (*postHookFunc) (int retVal___, int *pl1, int *pl2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_married_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_char_married_post > 0) { + int (*postHookFunc) (int retVal___, int pl1, int pl2); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_married_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_char_married_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &pl1, &pl2); + retVal___ = postHookFunc(retVal___, pl1, pl2); } } return retVal___; @@ -987,14 +1067,14 @@ int HP_chr_char_married(int pl1, int pl2) { int HP_chr_char_child(int parent_id, int child_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_char_child_pre ) { + if (HPMHooks.count.HP_chr_char_child_pre > 0) { int (*preHookFunc) (int *parent_id, int *child_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_child_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_child_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_char_child_pre[hIndex].func; retVal___ = preHookFunc(&parent_id, &child_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1002,11 +1082,11 @@ int HP_chr_char_child(int parent_id, int child_id) { { retVal___ = HPMHooks.source.chr.char_child(parent_id, child_id); } - if( HPMHooks.count.HP_chr_char_child_post ) { - int (*postHookFunc) (int retVal___, int *parent_id, int *child_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_child_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_char_child_post > 0) { + int (*postHookFunc) (int retVal___, int parent_id, int child_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_child_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_char_child_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &parent_id, &child_id); + retVal___ = postHookFunc(retVal___, parent_id, child_id); } } return retVal___; @@ -1014,14 +1094,14 @@ int HP_chr_char_child(int parent_id, int child_id) { int HP_chr_char_family(int cid1, int cid2, int cid3) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_char_family_pre ) { + if (HPMHooks.count.HP_chr_char_family_pre > 0) { int (*preHookFunc) (int *cid1, int *cid2, int *cid3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_family_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_family_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_char_family_pre[hIndex].func; retVal___ = preHookFunc(&cid1, &cid2, &cid3); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1029,25 +1109,25 @@ int HP_chr_char_family(int cid1, int cid2, int cid3) { { retVal___ = HPMHooks.source.chr.char_family(cid1, cid2, cid3); } - if( HPMHooks.count.HP_chr_char_family_post ) { - int (*postHookFunc) (int retVal___, int *cid1, int *cid2, int *cid3); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_family_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_char_family_post > 0) { + int (*postHookFunc) (int retVal___, int cid1, int cid2, int cid3); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_family_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_char_family_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &cid1, &cid2, &cid3); + retVal___ = postHookFunc(retVal___, cid1, cid2, cid3); } } return retVal___; } void HP_chr_disconnect_player(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_disconnect_player_pre ) { + if (HPMHooks.count.HP_chr_disconnect_player_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_disconnect_player_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_disconnect_player_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_disconnect_player_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1055,25 +1135,25 @@ void HP_chr_disconnect_player(int account_id) { { HPMHooks.source.chr.disconnect_player(account_id); } - if( HPMHooks.count.HP_chr_disconnect_player_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_disconnect_player_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_disconnect_player_post > 0) { + void (*postHookFunc) (int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_disconnect_player_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_disconnect_player_post[hIndex].func; - postHookFunc(&account_id); + postHookFunc(account_id); } } return; } void HP_chr_authfail_fd(int fd, int type) { int hIndex = 0; - if( HPMHooks.count.HP_chr_authfail_fd_pre ) { + if (HPMHooks.count.HP_chr_authfail_fd_pre > 0) { void (*preHookFunc) (int *fd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_authfail_fd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_authfail_fd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_authfail_fd_pre[hIndex].func; preHookFunc(&fd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1081,25 +1161,25 @@ void HP_chr_authfail_fd(int fd, int type) { { HPMHooks.source.chr.authfail_fd(fd, type); } - if( HPMHooks.count.HP_chr_authfail_fd_post ) { - void (*postHookFunc) (int *fd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_authfail_fd_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_authfail_fd_post > 0) { + void (*postHookFunc) (int fd, int type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_authfail_fd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_authfail_fd_post[hIndex].func; - postHookFunc(&fd, &type); + postHookFunc(fd, type); } } return; } void HP_chr_request_account_data(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_request_account_data_pre ) { + if (HPMHooks.count.HP_chr_request_account_data_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_account_data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_account_data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_request_account_data_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1107,25 +1187,25 @@ void HP_chr_request_account_data(int account_id) { { HPMHooks.source.chr.request_account_data(account_id); } - if( HPMHooks.count.HP_chr_request_account_data_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_account_data_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_request_account_data_post > 0) { + void (*postHookFunc) (int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_account_data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_request_account_data_post[hIndex].func; - postHookFunc(&account_id); + postHookFunc(account_id); } } return; } void HP_chr_auth_ok(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_auth_ok_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_auth_ok_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_auth_ok_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1133,25 +1213,25 @@ void HP_chr_auth_ok(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.auth_ok(fd, sd); } - if( HPMHooks.count.HP_chr_auth_ok_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_ok_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_auth_ok_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_auth_ok_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_ping_login_server(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_ping_login_server_pre ) { + if (HPMHooks.count.HP_chr_ping_login_server_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ping_login_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ping_login_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_ping_login_server_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1159,11 +1239,11 @@ void HP_chr_ping_login_server(int fd) { { HPMHooks.source.chr.ping_login_server(fd); } - if( HPMHooks.count.HP_chr_ping_login_server_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ping_login_server_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_ping_login_server_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ping_login_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_ping_login_server_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -1171,14 +1251,14 @@ void HP_chr_ping_login_server(int fd) { int HP_chr_parse_fromlogin_connection_state(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_connection_state_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_connection_state_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_connection_state_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_connection_state_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_connection_state_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1186,25 +1266,25 @@ int HP_chr_parse_fromlogin_connection_state(int fd) { { retVal___ = HPMHooks.source.chr.parse_fromlogin_connection_state(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_connection_state_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_connection_state_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_connection_state_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_connection_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_connection_state_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } void HP_chr_auth_error(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_auth_error_pre ) { + if (HPMHooks.count.HP_chr_auth_error_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_error_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_error_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_auth_error_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1212,25 +1292,25 @@ void HP_chr_auth_error(int fd, unsigned char flag) { { HPMHooks.source.chr.auth_error(fd, flag); } - if( HPMHooks.count.HP_chr_auth_error_post ) { - void (*postHookFunc) (int *fd, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_error_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_auth_error_post > 0) { + void (*postHookFunc) (int fd, unsigned char flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_auth_error_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_auth_error_post[hIndex].func; - postHookFunc(&fd, &flag); + postHookFunc(fd, flag); } } return; } void HP_chr_parse_fromlogin_auth_state(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_auth_state_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_auth_state_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_auth_state_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_auth_state_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_auth_state_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1238,25 +1318,25 @@ void HP_chr_parse_fromlogin_auth_state(int fd) { { HPMHooks.source.chr.parse_fromlogin_auth_state(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_auth_state_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_auth_state_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_auth_state_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_auth_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_auth_state_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_fromlogin_account_data(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_account_data_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_account_data_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_account_data_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1264,25 +1344,25 @@ void HP_chr_parse_fromlogin_account_data(int fd) { { HPMHooks.source.chr.parse_fromlogin_account_data(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_account_data_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_data_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_account_data_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_account_data_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_fromlogin_login_pong(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_login_pong_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_login_pong_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_login_pong_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_login_pong_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_login_pong_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1290,25 +1370,25 @@ void HP_chr_parse_fromlogin_login_pong(int fd) { { HPMHooks.source.chr.parse_fromlogin_login_pong(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_login_pong_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_login_pong_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_login_pong_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_login_pong_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_login_pong_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_changesex(int account_id, int sex) { int hIndex = 0; - if( HPMHooks.count.HP_chr_changesex_pre ) { + if (HPMHooks.count.HP_chr_changesex_pre > 0) { void (*preHookFunc) (int *account_id, int *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changesex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_changesex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_changesex_pre[hIndex].func; preHookFunc(&account_id, &sex); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1316,11 +1396,11 @@ void HP_chr_changesex(int account_id, int sex) { { HPMHooks.source.chr.changesex(account_id, sex); } - if( HPMHooks.count.HP_chr_changesex_post ) { - void (*postHookFunc) (int *account_id, int *sex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changesex_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_changesex_post > 0) { + void (*postHookFunc) (int account_id, int sex); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_changesex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_changesex_post[hIndex].func; - postHookFunc(&account_id, &sex); + postHookFunc(account_id, sex); } } return; @@ -1328,14 +1408,14 @@ void HP_chr_changesex(int account_id, int sex) { int HP_chr_parse_fromlogin_changesex_reply(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_changesex_reply_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1343,25 +1423,25 @@ int HP_chr_parse_fromlogin_changesex_reply(int fd) { { retVal___ = HPMHooks.source.chr.parse_fromlogin_changesex_reply(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_changesex_reply_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_changesex_reply_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } void HP_chr_parse_fromlogin_account_reg2(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_account_reg2_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1369,25 +1449,25 @@ void HP_chr_parse_fromlogin_account_reg2(int fd) { { HPMHooks.source.chr.parse_fromlogin_account_reg2(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_account_reg2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_account_reg2_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_fromlogin_ban(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_ban_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_ban_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_ban_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1395,25 +1475,25 @@ void HP_chr_parse_fromlogin_ban(int fd) { { HPMHooks.source.chr.parse_fromlogin_ban(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_ban_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_ban_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_ban_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_ban_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_fromlogin_kick(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_kick_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_kick_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_kick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_kick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_kick_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1421,25 +1501,25 @@ void HP_chr_parse_fromlogin_kick(int fd) { { HPMHooks.source.chr.parse_fromlogin_kick(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_kick_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_kick_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_kick_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_kick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_kick_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_update_ip(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_update_ip_pre ) { + if (HPMHooks.count.HP_chr_update_ip_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_update_ip_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1447,25 +1527,25 @@ void HP_chr_update_ip(int fd) { { HPMHooks.source.chr.update_ip(fd); } - if( HPMHooks.count.HP_chr_update_ip_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_ip_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_update_ip_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_update_ip_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_fromlogin_update_ip(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_update_ip_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_update_ip_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_update_ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_update_ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_update_ip_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1473,25 +1553,25 @@ void HP_chr_parse_fromlogin_update_ip(int fd) { { HPMHooks.source.chr.parse_fromlogin_update_ip(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_update_ip_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_update_ip_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_update_ip_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_update_ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_update_ip_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_fromlogin_accinfo2_failed(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_accinfo2_failed_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1499,25 +1579,25 @@ void HP_chr_parse_fromlogin_accinfo2_failed(int fd) { { HPMHooks.source.chr.parse_fromlogin_accinfo2_failed(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_failed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_accinfo2_failed_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_fromlogin_accinfo2_ok(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_accinfo2_ok_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1525,11 +1605,11 @@ void HP_chr_parse_fromlogin_accinfo2_ok(int fd) { { HPMHooks.source.chr.parse_fromlogin_accinfo2_ok(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_accinfo2_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_accinfo2_ok_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -1537,14 +1617,14 @@ void HP_chr_parse_fromlogin_accinfo2_ok(int fd) { int HP_chr_parse_fromlogin(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_fromlogin_pre ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1552,11 +1632,11 @@ int HP_chr_parse_fromlogin(int fd) { { retVal___ = HPMHooks.source.chr.parse_fromlogin(fd); } - if( HPMHooks.count.HP_chr_parse_fromlogin_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_fromlogin_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_fromlogin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_fromlogin_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -1564,14 +1644,14 @@ int HP_chr_parse_fromlogin(int fd) { int HP_chr_request_accreg2(int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_request_accreg2_pre ) { + if (HPMHooks.count.HP_chr_request_accreg2_pre > 0) { int (*preHookFunc) (int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_accreg2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_accreg2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_request_accreg2_pre[hIndex].func; retVal___ = preHookFunc(&account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1579,25 +1659,25 @@ int HP_chr_request_accreg2(int account_id, int char_id) { { retVal___ = HPMHooks.source.chr.request_accreg2(account_id, char_id); } - if( HPMHooks.count.HP_chr_request_accreg2_post ) { - int (*postHookFunc) (int retVal___, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_accreg2_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_request_accreg2_post > 0) { + int (*postHookFunc) (int retVal___, int account_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_request_accreg2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_request_accreg2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id, &char_id); + retVal___ = postHookFunc(retVal___, account_id, char_id); } } return retVal___; } void HP_chr_global_accreg_to_login_start(int account_id, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_global_accreg_to_login_start_pre ) { + if (HPMHooks.count.HP_chr_global_accreg_to_login_start_pre > 0) { void (*preHookFunc) (int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_start_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_start_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_start_pre[hIndex].func; preHookFunc(&account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1605,25 +1685,25 @@ void HP_chr_global_accreg_to_login_start(int account_id, int char_id) { { HPMHooks.source.chr.global_accreg_to_login_start(account_id, char_id); } - if( HPMHooks.count.HP_chr_global_accreg_to_login_start_post ) { - void (*postHookFunc) (int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_start_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_global_accreg_to_login_start_post > 0) { + void (*postHookFunc) (int account_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_start_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_start_post[hIndex].func; - postHookFunc(&account_id, &char_id); + postHookFunc(account_id, char_id); } } return; } void HP_chr_global_accreg_to_login_send(void) { int hIndex = 0; - if( HPMHooks.count.HP_chr_global_accreg_to_login_send_pre ) { + if (HPMHooks.count.HP_chr_global_accreg_to_login_send_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_send_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1631,9 +1711,9 @@ void HP_chr_global_accreg_to_login_send(void) { { HPMHooks.source.chr.global_accreg_to_login_send(); } - if( HPMHooks.count.HP_chr_global_accreg_to_login_send_post ) { + if (HPMHooks.count.HP_chr_global_accreg_to_login_send_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_send_post[hIndex].func; postHookFunc(); } @@ -1642,14 +1722,14 @@ void HP_chr_global_accreg_to_login_send(void) { } void HP_chr_global_accreg_to_login_add(const char *key, unsigned int index, intptr_t val, bool is_string) { int hIndex = 0; - if( HPMHooks.count.HP_chr_global_accreg_to_login_add_pre ) { - void (*preHookFunc) (const char *key, unsigned int *index, intptr_t *val, bool *is_string); + if (HPMHooks.count.HP_chr_global_accreg_to_login_add_pre > 0) { + void (*preHookFunc) (const char **key, unsigned int *index, intptr_t *val, bool *is_string); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_add_pre[hIndex].func; - preHookFunc(key, &index, &val, &is_string); + preHookFunc(&key, &index, &val, &is_string); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1657,25 +1737,25 @@ void HP_chr_global_accreg_to_login_add(const char *key, unsigned int index, intp { HPMHooks.source.chr.global_accreg_to_login_add(key, index, val, is_string); } - if( HPMHooks.count.HP_chr_global_accreg_to_login_add_post ) { - void (*postHookFunc) (const char *key, unsigned int *index, intptr_t *val, bool *is_string); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_add_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_global_accreg_to_login_add_post > 0) { + void (*postHookFunc) (const char *key, unsigned int index, intptr_t val, bool is_string); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_global_accreg_to_login_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_global_accreg_to_login_add_post[hIndex].func; - postHookFunc(key, &index, &val, &is_string); + postHookFunc(key, index, val, is_string); } } return; } void HP_chr_read_fame_list(void) { int hIndex = 0; - if( HPMHooks.count.HP_chr_read_fame_list_pre ) { + if (HPMHooks.count.HP_chr_read_fame_list_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_read_fame_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_read_fame_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_read_fame_list_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1683,9 +1763,9 @@ void HP_chr_read_fame_list(void) { { HPMHooks.source.chr.read_fame_list(); } - if( HPMHooks.count.HP_chr_read_fame_list_post ) { + if (HPMHooks.count.HP_chr_read_fame_list_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_read_fame_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_read_fame_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_read_fame_list_post[hIndex].func; postHookFunc(); } @@ -1695,14 +1775,14 @@ void HP_chr_read_fame_list(void) { int HP_chr_send_fame_list(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_send_fame_list_pre ) { + if (HPMHooks.count.HP_chr_send_fame_list_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_fame_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_fame_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_fame_list_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1710,25 +1790,25 @@ int HP_chr_send_fame_list(int fd) { { retVal___ = HPMHooks.source.chr.send_fame_list(fd); } - if( HPMHooks.count.HP_chr_send_fame_list_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_fame_list_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_send_fame_list_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_fame_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_fame_list_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } void HP_chr_update_fame_list(int type, int index, int fame) { int hIndex = 0; - if( HPMHooks.count.HP_chr_update_fame_list_pre ) { + if (HPMHooks.count.HP_chr_update_fame_list_pre > 0) { void (*preHookFunc) (int *type, int *index, int *fame); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_fame_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_fame_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_update_fame_list_pre[hIndex].func; preHookFunc(&type, &index, &fame); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1736,11 +1816,11 @@ void HP_chr_update_fame_list(int type, int index, int fame) { { HPMHooks.source.chr.update_fame_list(type, index, fame); } - if( HPMHooks.count.HP_chr_update_fame_list_post ) { - void (*postHookFunc) (int *type, int *index, int *fame); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_fame_list_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_update_fame_list_post > 0) { + void (*postHookFunc) (int type, int index, int fame); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_update_fame_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_update_fame_list_post[hIndex].func; - postHookFunc(&type, &index, &fame); + postHookFunc(type, index, fame); } } return; @@ -1748,14 +1828,14 @@ void HP_chr_update_fame_list(int type, int index, int fame) { int HP_chr_loadName(int char_id, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_loadName_pre ) { - int (*preHookFunc) (int *char_id, char *name); + if (HPMHooks.count.HP_chr_loadName_pre > 0) { + int (*preHookFunc) (int *char_id, char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_loadName_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_loadName_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_loadName_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, name); + retVal___ = preHookFunc(&char_id, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1763,25 +1843,25 @@ int HP_chr_loadName(int char_id, char *name) { { retVal___ = HPMHooks.source.chr.loadName(char_id, name); } - if( HPMHooks.count.HP_chr_loadName_post ) { - int (*postHookFunc) (int retVal___, int *char_id, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_loadName_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_loadName_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_loadName_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_loadName_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, name); + retVal___ = postHookFunc(retVal___, char_id, name); } } return retVal___; } void HP_chr_parse_frommap_datasync(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_datasync_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_datasync_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_datasync_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_datasync_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_datasync_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1789,25 +1869,25 @@ void HP_chr_parse_frommap_datasync(int fd) { { HPMHooks.source.chr.parse_frommap_datasync(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_datasync_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_datasync_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_datasync_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_datasync_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_datasync_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_skillid2idx(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_skillid2idx_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_skillid2idx_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_skillid2idx_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_skillid2idx_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_skillid2idx_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1815,25 +1895,25 @@ void HP_chr_parse_frommap_skillid2idx(int fd) { { HPMHooks.source.chr.parse_frommap_skillid2idx(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_skillid2idx_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_skillid2idx_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_skillid2idx_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_skillid2idx_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_skillid2idx_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_map_received_ok(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_map_received_ok_pre ) { + if (HPMHooks.count.HP_chr_map_received_ok_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_received_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_received_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_map_received_ok_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1841,25 +1921,25 @@ void HP_chr_map_received_ok(int fd) { { HPMHooks.source.chr.map_received_ok(fd); } - if( HPMHooks.count.HP_chr_map_received_ok_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_received_ok_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_map_received_ok_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_received_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_map_received_ok_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_send_maps(int fd, int id, int j) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_maps_pre ) { + if (HPMHooks.count.HP_chr_send_maps_pre > 0) { void (*preHookFunc) (int *fd, int *id, int *j); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_maps_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_maps_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_maps_pre[hIndex].func; preHookFunc(&fd, &id, &j); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1867,25 +1947,25 @@ void HP_chr_send_maps(int fd, int id, int j) { { HPMHooks.source.chr.send_maps(fd, id, j); } - if( HPMHooks.count.HP_chr_send_maps_post ) { - void (*postHookFunc) (int *fd, int *id, int *j); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_maps_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_send_maps_post > 0) { + void (*postHookFunc) (int fd, int id, int j); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_maps_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_maps_post[hIndex].func; - postHookFunc(&fd, &id, &j); + postHookFunc(fd, id, j); } } return; } void HP_chr_parse_frommap_map_names(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_map_names_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_map_names_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_map_names_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_map_names_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_map_names_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1893,25 +1973,25 @@ void HP_chr_parse_frommap_map_names(int fd, int id) { { HPMHooks.source.chr.parse_frommap_map_names(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_map_names_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_map_names_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_map_names_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_map_names_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_map_names_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_chr_send_scdata(int fd, int aid, int cid) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_scdata_pre ) { + if (HPMHooks.count.HP_chr_send_scdata_pre > 0) { void (*preHookFunc) (int *fd, int *aid, int *cid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_scdata_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_scdata_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_scdata_pre[hIndex].func; preHookFunc(&fd, &aid, &cid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1919,25 +1999,25 @@ void HP_chr_send_scdata(int fd, int aid, int cid) { { HPMHooks.source.chr.send_scdata(fd, aid, cid); } - if( HPMHooks.count.HP_chr_send_scdata_post ) { - void (*postHookFunc) (int *fd, int *aid, int *cid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_scdata_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_send_scdata_post > 0) { + void (*postHookFunc) (int fd, int aid, int cid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_scdata_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_scdata_post[hIndex].func; - postHookFunc(&fd, &aid, &cid); + postHookFunc(fd, aid, cid); } } return; } void HP_chr_parse_frommap_request_scdata(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_request_scdata_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_request_scdata_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_scdata_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_scdata_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_scdata_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1945,25 +2025,25 @@ void HP_chr_parse_frommap_request_scdata(int fd) { { HPMHooks.source.chr.parse_frommap_request_scdata(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_request_scdata_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_scdata_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_request_scdata_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_scdata_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_scdata_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_set_users_count(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_set_users_count_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_users_count_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_count_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_count_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_users_count_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1971,25 +2051,25 @@ void HP_chr_parse_frommap_set_users_count(int fd, int id) { { HPMHooks.source.chr.parse_frommap_set_users_count(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_set_users_count_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_count_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_users_count_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_count_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_users_count_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_chr_parse_frommap_set_users(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_set_users_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_users_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_users_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1997,25 +2077,25 @@ void HP_chr_parse_frommap_set_users(int fd, int id) { { HPMHooks.source.chr.parse_frommap_set_users(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_set_users_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_users_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_users_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_users_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_chr_save_character_ack(int fd, int aid, int cid) { int hIndex = 0; - if( HPMHooks.count.HP_chr_save_character_ack_pre ) { + if (HPMHooks.count.HP_chr_save_character_ack_pre > 0) { void (*preHookFunc) (int *fd, int *aid, int *cid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_save_character_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_save_character_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_save_character_ack_pre[hIndex].func; preHookFunc(&fd, &aid, &cid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2023,25 +2103,25 @@ void HP_chr_save_character_ack(int fd, int aid, int cid) { { HPMHooks.source.chr.save_character_ack(fd, aid, cid); } - if( HPMHooks.count.HP_chr_save_character_ack_post ) { - void (*postHookFunc) (int *fd, int *aid, int *cid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_save_character_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_save_character_ack_post > 0) { + void (*postHookFunc) (int fd, int aid, int cid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_save_character_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_save_character_ack_post[hIndex].func; - postHookFunc(&fd, &aid, &cid); + postHookFunc(fd, aid, cid); } } return; } void HP_chr_parse_frommap_save_character(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_save_character_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_save_character_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_character_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_character_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_save_character_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2049,25 +2129,25 @@ void HP_chr_parse_frommap_save_character(int fd, int id) { { HPMHooks.source.chr.parse_frommap_save_character(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_save_character_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_character_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_save_character_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_character_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_save_character_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_chr_select_ack(int fd, int account_id, uint8 flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_select_ack_pre ) { + if (HPMHooks.count.HP_chr_select_ack_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, uint8 *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_select_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_select_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_select_ack_pre[hIndex].func; preHookFunc(&fd, &account_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2075,25 +2155,25 @@ void HP_chr_select_ack(int fd, int account_id, uint8 flag) { { HPMHooks.source.chr.select_ack(fd, account_id, flag); } - if( HPMHooks.count.HP_chr_select_ack_post ) { - void (*postHookFunc) (int *fd, int *account_id, uint8 *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_select_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_select_ack_post > 0) { + void (*postHookFunc) (int fd, int account_id, uint8 flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_select_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_select_ack_post[hIndex].func; - postHookFunc(&fd, &account_id, &flag); + postHookFunc(fd, account_id, flag); } } return; } void HP_chr_parse_frommap_char_select_req(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_char_select_req_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_char_select_req_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_select_req_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_select_req_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_char_select_req_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2101,25 +2181,25 @@ void HP_chr_parse_frommap_char_select_req(int fd) { { HPMHooks.source.chr.parse_frommap_char_select_req(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_char_select_req_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_select_req_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_char_select_req_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_select_req_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_char_select_req_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_change_map_server_ack(int fd, const uint8 *data, bool ok) { int hIndex = 0; - if( HPMHooks.count.HP_chr_change_map_server_ack_pre ) { - void (*preHookFunc) (int *fd, const uint8 *data, bool *ok); + if (HPMHooks.count.HP_chr_change_map_server_ack_pre > 0) { + void (*preHookFunc) (int *fd, const uint8 **data, bool *ok); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_map_server_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_map_server_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_change_map_server_ack_pre[hIndex].func; - preHookFunc(&fd, data, &ok); + preHookFunc(&fd, &data, &ok); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2127,25 +2207,25 @@ void HP_chr_change_map_server_ack(int fd, const uint8 *data, bool ok) { { HPMHooks.source.chr.change_map_server_ack(fd, data, ok); } - if( HPMHooks.count.HP_chr_change_map_server_ack_post ) { - void (*postHookFunc) (int *fd, const uint8 *data, bool *ok); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_map_server_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_change_map_server_ack_post > 0) { + void (*postHookFunc) (int fd, const uint8 *data, bool ok); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_map_server_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_change_map_server_ack_post[hIndex].func; - postHookFunc(&fd, data, &ok); + postHookFunc(fd, data, ok); } } return; } void HP_chr_parse_frommap_change_map_server(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_change_map_server_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_map_server_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_map_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_map_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_map_server_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2153,25 +2233,25 @@ void HP_chr_parse_frommap_change_map_server(int fd) { { HPMHooks.source.chr.parse_frommap_change_map_server(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_change_map_server_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_map_server_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_map_server_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_map_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_map_server_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_remove_friend(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_remove_friend_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_remove_friend_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_remove_friend_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_remove_friend_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_remove_friend_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2179,25 +2259,25 @@ void HP_chr_parse_frommap_remove_friend(int fd) { { HPMHooks.source.chr.parse_frommap_remove_friend(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_remove_friend_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_remove_friend_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_remove_friend_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_remove_friend_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_remove_friend_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_char_name_ack(int fd, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_char_name_ack_pre ) { + if (HPMHooks.count.HP_chr_char_name_ack_pre > 0) { void (*preHookFunc) (int *fd, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_name_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_name_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_char_name_ack_pre[hIndex].func; preHookFunc(&fd, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2205,25 +2285,25 @@ void HP_chr_char_name_ack(int fd, int char_id) { { HPMHooks.source.chr.char_name_ack(fd, char_id); } - if( HPMHooks.count.HP_chr_char_name_ack_post ) { - void (*postHookFunc) (int *fd, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_name_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_char_name_ack_post > 0) { + void (*postHookFunc) (int fd, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_char_name_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_char_name_ack_post[hIndex].func; - postHookFunc(&fd, &char_id); + postHookFunc(fd, char_id); } } return; } void HP_chr_parse_frommap_char_name_request(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_char_name_request_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_char_name_request_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_name_request_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_name_request_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_char_name_request_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2231,25 +2311,25 @@ void HP_chr_parse_frommap_char_name_request(int fd) { { HPMHooks.source.chr.parse_frommap_char_name_request(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_char_name_request_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_name_request_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_char_name_request_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_char_name_request_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_char_name_request_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_change_email(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_change_email_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_email_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_email_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_email_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_email_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2257,25 +2337,25 @@ void HP_chr_parse_frommap_change_email(int fd) { { HPMHooks.source.chr.parse_frommap_change_email(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_change_email_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_email_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_email_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_email_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_email_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_ban(int account_id, int char_id, time_t *unban_time, short year, short month, short day, short hour, short minute, short second) { int hIndex = 0; - if( HPMHooks.count.HP_chr_ban_pre ) { - void (*preHookFunc) (int *account_id, int *char_id, time_t *unban_time, short *year, short *month, short *day, short *hour, short *minute, short *second); + if (HPMHooks.count.HP_chr_ban_pre > 0) { + void (*preHookFunc) (int *account_id, int *char_id, time_t **unban_time, short *year, short *month, short *day, short *hour, short *minute, short *second); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_ban_pre[hIndex].func; - preHookFunc(&account_id, &char_id, unban_time, &year, &month, &day, &hour, &minute, &second); + preHookFunc(&account_id, &char_id, &unban_time, &year, &month, &day, &hour, &minute, &second); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2283,25 +2363,25 @@ void HP_chr_ban(int account_id, int char_id, time_t *unban_time, short year, sho { HPMHooks.source.chr.ban(account_id, char_id, unban_time, year, month, day, hour, minute, second); } - if( HPMHooks.count.HP_chr_ban_post ) { - void (*postHookFunc) (int *account_id, int *char_id, time_t *unban_time, short *year, short *month, short *day, short *hour, short *minute, short *second); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ban_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_ban_post > 0) { + void (*postHookFunc) (int account_id, int char_id, time_t *unban_time, short year, short month, short day, short hour, short minute, short second); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_ban_post[hIndex].func; - postHookFunc(&account_id, &char_id, unban_time, &year, &month, &day, &hour, &minute, &second); + postHookFunc(account_id, char_id, unban_time, year, month, day, hour, minute, second); } } return; } void HP_chr_unban(int char_id, int *result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_unban_pre ) { - void (*preHookFunc) (int *char_id, int *result); + if (HPMHooks.count.HP_chr_unban_pre > 0) { + void (*preHookFunc) (int *char_id, int **result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_unban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_unban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_unban_pre[hIndex].func; - preHookFunc(&char_id, result); + preHookFunc(&char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2309,25 +2389,25 @@ void HP_chr_unban(int char_id, int *result) { { HPMHooks.source.chr.unban(char_id, result); } - if( HPMHooks.count.HP_chr_unban_post ) { - void (*postHookFunc) (int *char_id, int *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_unban_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_unban_post > 0) { + void (*postHookFunc) (int char_id, int *result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_unban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_unban_post[hIndex].func; - postHookFunc(&char_id, result); + postHookFunc(char_id, result); } } return; } void HP_chr_ask_name_ack(int fd, int acc, const char *name, int type, int result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_ask_name_ack_pre ) { - void (*preHookFunc) (int *fd, int *acc, const char *name, int *type, int *result); + if (HPMHooks.count.HP_chr_ask_name_ack_pre > 0) { + void (*preHookFunc) (int *fd, int *acc, const char **name, int *type, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ask_name_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ask_name_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_ask_name_ack_pre[hIndex].func; - preHookFunc(&fd, &acc, name, &type, &result); + preHookFunc(&fd, &acc, &name, &type, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2335,11 +2415,11 @@ void HP_chr_ask_name_ack(int fd, int acc, const char *name, int type, int result { HPMHooks.source.chr.ask_name_ack(fd, acc, name, type, result); } - if( HPMHooks.count.HP_chr_ask_name_ack_post ) { - void (*postHookFunc) (int *fd, int *acc, const char *name, int *type, int *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_ask_name_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_ask_name_ack_post > 0) { + void (*postHookFunc) (int fd, int acc, const char *name, int type, int result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_ask_name_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_ask_name_ack_post[hIndex].func; - postHookFunc(&fd, &acc, name, &type, &result); + postHookFunc(fd, acc, name, type, result); } } return; @@ -2347,14 +2427,14 @@ void HP_chr_ask_name_ack(int fd, int acc, const char *name, int type, int result int HP_chr_changecharsex(int char_id, int sex) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_changecharsex_pre ) { + if (HPMHooks.count.HP_chr_changecharsex_pre > 0) { int (*preHookFunc) (int *char_id, int *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_changecharsex_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &sex); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2362,25 +2442,25 @@ int HP_chr_changecharsex(int char_id, int sex) { { retVal___ = HPMHooks.source.chr.changecharsex(char_id, sex); } - if( HPMHooks.count.HP_chr_changecharsex_post ) { - int (*postHookFunc) (int retVal___, int *char_id, int *sex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_changecharsex_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, int sex); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_changecharsex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_changecharsex_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &sex); + retVal___ = postHookFunc(retVal___, char_id, sex); } } return retVal___; } void HP_chr_parse_frommap_change_account(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_change_account_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_account_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_account_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_account_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_account_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2388,25 +2468,25 @@ void HP_chr_parse_frommap_change_account(int fd) { { HPMHooks.source.chr.parse_frommap_change_account(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_change_account_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_account_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_change_account_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_change_account_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_change_account_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_fame_list(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_fame_list_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_fame_list_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_fame_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_fame_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_fame_list_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2414,25 +2494,25 @@ void HP_chr_parse_frommap_fame_list(int fd) { { HPMHooks.source.chr.parse_frommap_fame_list(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_fame_list_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_fame_list_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_fame_list_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_fame_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_fame_list_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_divorce_char(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_divorce_char_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_divorce_char_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_divorce_char_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_divorce_char_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_divorce_char_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2440,25 +2520,25 @@ void HP_chr_parse_frommap_divorce_char(int fd) { { HPMHooks.source.chr.parse_frommap_divorce_char(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_divorce_char_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_divorce_char_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_divorce_char_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_divorce_char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_divorce_char_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_ragsrvinfo(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_ragsrvinfo_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2466,25 +2546,25 @@ void HP_chr_parse_frommap_ragsrvinfo(int fd) { { HPMHooks.source.chr.parse_frommap_ragsrvinfo(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ragsrvinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_ragsrvinfo_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_set_char_offline(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_set_char_offline_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_char_offline_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_char_offline_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2492,25 +2572,25 @@ void HP_chr_parse_frommap_set_char_offline(int fd) { { HPMHooks.source.chr.parse_frommap_set_char_offline(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_set_char_offline_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_offline_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_char_offline_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_char_offline_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_set_all_offline(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_set_all_offline_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_all_offline_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_all_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_all_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_all_offline_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2518,25 +2598,25 @@ void HP_chr_parse_frommap_set_all_offline(int fd, int id) { { HPMHooks.source.chr.parse_frommap_set_all_offline(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_set_all_offline_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_all_offline_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_all_offline_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_all_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_all_offline_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_chr_parse_frommap_set_char_online(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_set_char_online_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_char_online_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_online_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_online_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_char_online_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2544,25 +2624,25 @@ void HP_chr_parse_frommap_set_char_online(int fd, int id) { { HPMHooks.source.chr.parse_frommap_set_char_online(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_set_char_online_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_online_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_set_char_online_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_set_char_online_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_set_char_online_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_chr_parse_frommap_build_fame_list(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_build_fame_list_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_build_fame_list_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_build_fame_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_build_fame_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_build_fame_list_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2570,25 +2650,25 @@ void HP_chr_parse_frommap_build_fame_list(int fd) { { HPMHooks.source.chr.parse_frommap_build_fame_list(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_build_fame_list_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_build_fame_list_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_build_fame_list_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_build_fame_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_build_fame_list_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_save_status_change_data(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_save_status_change_data_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2596,25 +2676,25 @@ void HP_chr_parse_frommap_save_status_change_data(int fd) { { HPMHooks.source.chr.parse_frommap_save_status_change_data(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_save_status_change_data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_save_status_change_data_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_send_pong(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_pong_pre ) { + if (HPMHooks.count.HP_chr_send_pong_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_pong_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_pong_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_pong_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2622,25 +2702,25 @@ void HP_chr_send_pong(int fd) { { HPMHooks.source.chr.send_pong(fd); } - if( HPMHooks.count.HP_chr_send_pong_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_pong_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_send_pong_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_pong_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_pong_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_ping(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_ping_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_ping_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_ping_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2648,25 +2728,25 @@ void HP_chr_parse_frommap_ping(int fd) { { HPMHooks.source.chr.parse_frommap_ping(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_ping_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ping_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_ping_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_ping_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_map_auth_ok(int fd, int account_id, struct char_auth_node *node, struct mmo_charstatus *cd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_map_auth_ok_pre ) { - void (*preHookFunc) (int *fd, int *account_id, struct char_auth_node *node, struct mmo_charstatus *cd); + if (HPMHooks.count.HP_chr_map_auth_ok_pre > 0) { + void (*preHookFunc) (int *fd, int *account_id, struct char_auth_node **node, struct mmo_charstatus **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_map_auth_ok_pre[hIndex].func; - preHookFunc(&fd, &account_id, node, cd); + preHookFunc(&fd, &account_id, &node, &cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2674,25 +2754,25 @@ void HP_chr_map_auth_ok(int fd, int account_id, struct char_auth_node *node, str { HPMHooks.source.chr.map_auth_ok(fd, account_id, node, cd); } - if( HPMHooks.count.HP_chr_map_auth_ok_post ) { - void (*postHookFunc) (int *fd, int *account_id, struct char_auth_node *node, struct mmo_charstatus *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_ok_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_map_auth_ok_post > 0) { + void (*postHookFunc) (int fd, int account_id, struct char_auth_node *node, struct mmo_charstatus *cd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_map_auth_ok_post[hIndex].func; - postHookFunc(&fd, &account_id, node, cd); + postHookFunc(fd, account_id, node, cd); } } return; } void HP_chr_map_auth_failed(int fd, int account_id, int char_id, int login_id1, char sex, uint32 ip) { int hIndex = 0; - if( HPMHooks.count.HP_chr_map_auth_failed_pre ) { + if (HPMHooks.count.HP_chr_map_auth_failed_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, int *char_id, int *login_id1, char *sex, uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_failed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_failed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_map_auth_failed_pre[hIndex].func; preHookFunc(&fd, &account_id, &char_id, &login_id1, &sex, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2700,25 +2780,25 @@ void HP_chr_map_auth_failed(int fd, int account_id, int char_id, int login_id1, { HPMHooks.source.chr.map_auth_failed(fd, account_id, char_id, login_id1, sex, ip); } - if( HPMHooks.count.HP_chr_map_auth_failed_post ) { - void (*postHookFunc) (int *fd, int *account_id, int *char_id, int *login_id1, char *sex, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_failed_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_map_auth_failed_post > 0) { + void (*postHookFunc) (int fd, int account_id, int char_id, int login_id1, char sex, uint32 ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_map_auth_failed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_map_auth_failed_post[hIndex].func; - postHookFunc(&fd, &account_id, &char_id, &login_id1, &sex, &ip); + postHookFunc(fd, account_id, char_id, login_id1, sex, ip); } } return; } void HP_chr_parse_frommap_auth_request(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_auth_request_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_auth_request_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_auth_request_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_auth_request_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_auth_request_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2726,25 +2806,25 @@ void HP_chr_parse_frommap_auth_request(int fd, int id) { { HPMHooks.source.chr.parse_frommap_auth_request(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_auth_request_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_auth_request_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_auth_request_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_auth_request_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_auth_request_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_chr_parse_frommap_update_ip(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_update_ip_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_update_ip_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_update_ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_update_ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_update_ip_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2752,51 +2832,25 @@ void HP_chr_parse_frommap_update_ip(int fd, int id) { { HPMHooks.source.chr.parse_frommap_update_ip(fd, id); } - if( HPMHooks.count.HP_chr_parse_frommap_update_ip_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_update_ip_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_update_ip_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_update_ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_update_ip_post[hIndex].func; - postHookFunc(&fd, &id); - } - } - return; -} -void HP_chr_parse_frommap_request_stats_report(int fd) { - int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_request_stats_report_pre ) { - void (*preHookFunc) (int *fd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_stats_report_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_stats_report_pre[hIndex].func; - preHookFunc(&fd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.chr.parse_frommap_request_stats_report(fd); - } - if( HPMHooks.count.HP_chr_parse_frommap_request_stats_report_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_request_stats_report_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_chr_parse_frommap_request_stats_report_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd, id); } } return; } void HP_chr_parse_frommap_scdata_update(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_scdata_update_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_scdata_update_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_scdata_update_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2804,25 +2858,25 @@ void HP_chr_parse_frommap_scdata_update(int fd) { { HPMHooks.source.chr.parse_frommap_scdata_update(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_scdata_update_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_update_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_scdata_update_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_scdata_update_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_frommap_scdata_delete(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_frommap_scdata_delete_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_scdata_delete_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_scdata_delete_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2830,11 +2884,11 @@ void HP_chr_parse_frommap_scdata_delete(int fd) { { HPMHooks.source.chr.parse_frommap_scdata_delete(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_scdata_delete_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_scdata_delete_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_scdata_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_scdata_delete_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -2842,14 +2896,14 @@ void HP_chr_parse_frommap_scdata_delete(int fd) { int HP_chr_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_frommap_pre ) { + if (HPMHooks.count.HP_chr_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2857,11 +2911,11 @@ int HP_chr_parse_frommap(int fd) { { retVal___ = HPMHooks.source.chr.parse_frommap(fd); } - if( HPMHooks.count.HP_chr_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -2869,14 +2923,14 @@ int HP_chr_parse_frommap(int fd) { int HP_chr_search_mapserver(unsigned short map, uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_search_mapserver_pre ) { + if (HPMHooks.count.HP_chr_search_mapserver_pre > 0) { int (*preHookFunc) (unsigned short *map, uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_mapserver_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_mapserver_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_search_mapserver_pre[hIndex].func; retVal___ = preHookFunc(&map, &ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2884,11 +2938,11 @@ int HP_chr_search_mapserver(unsigned short map, uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.chr.search_mapserver(map, ip, port); } - if( HPMHooks.count.HP_chr_search_mapserver_post ) { - int (*postHookFunc) (int retVal___, unsigned short *map, uint32 *ip, uint16 *port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_mapserver_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_search_mapserver_post > 0) { + int (*postHookFunc) (int retVal___, unsigned short map, uint32 ip, uint16 port); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_mapserver_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_search_mapserver_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &map, &ip, &port); + retVal___ = postHookFunc(retVal___, map, ip, port); } } return retVal___; @@ -2896,14 +2950,14 @@ int HP_chr_search_mapserver(unsigned short map, uint32 ip, uint16 port) { int HP_chr_mapif_init(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_mapif_init_pre ) { + if (HPMHooks.count.HP_chr_mapif_init_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mapif_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mapif_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_mapif_init_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2911,11 +2965,11 @@ int HP_chr_mapif_init(int fd) { { retVal___ = HPMHooks.source.chr.mapif_init(fd); } - if( HPMHooks.count.HP_chr_mapif_init_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_mapif_init_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_mapif_init_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_mapif_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_mapif_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -2923,14 +2977,14 @@ int HP_chr_mapif_init(int fd) { uint32 HP_chr_lan_subnet_check(uint32 ip) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_chr_lan_subnet_check_pre ) { + if (HPMHooks.count.HP_chr_lan_subnet_check_pre > 0) { uint32 (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_lan_subnet_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2938,25 +2992,25 @@ uint32 HP_chr_lan_subnet_check(uint32 ip) { { retVal___ = HPMHooks.source.chr.lan_subnet_check(ip); } - if( HPMHooks.count.HP_chr_lan_subnet_check_post ) { - uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_lan_subnet_check_post > 0) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_lan_subnet_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip); + retVal___ = postHookFunc(retVal___, ip); } } return retVal___; } void HP_chr_delete2_ack(int fd, int char_id, uint32 result, time_t delete_date) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_ack_pre ) { + if (HPMHooks.count.HP_chr_delete2_ack_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, uint32 *result, time_t *delete_date); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_ack_pre[hIndex].func; preHookFunc(&fd, &char_id, &result, &delete_date); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2964,25 +3018,25 @@ void HP_chr_delete2_ack(int fd, int char_id, uint32 result, time_t delete_date) { HPMHooks.source.chr.delete2_ack(fd, char_id, result, delete_date); } - if( HPMHooks.count.HP_chr_delete2_ack_post ) { - void (*postHookFunc) (int *fd, int *char_id, uint32 *result, time_t *delete_date); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_delete2_ack_post > 0) { + void (*postHookFunc) (int fd, int char_id, uint32 result, time_t delete_date); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_ack_post[hIndex].func; - postHookFunc(&fd, &char_id, &result, &delete_date); + postHookFunc(fd, char_id, result, delete_date); } } return; } void HP_chr_delete2_accept_actual_ack(int fd, int char_id, uint32 result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_accept_actual_ack_pre ) { + if (HPMHooks.count.HP_chr_delete2_accept_actual_ack_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, uint32 *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_actual_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_actual_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_accept_actual_ack_pre[hIndex].func; preHookFunc(&fd, &char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2990,25 +3044,25 @@ void HP_chr_delete2_accept_actual_ack(int fd, int char_id, uint32 result) { { HPMHooks.source.chr.delete2_accept_actual_ack(fd, char_id, result); } - if( HPMHooks.count.HP_chr_delete2_accept_actual_ack_post ) { - void (*postHookFunc) (int *fd, int *char_id, uint32 *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_actual_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_delete2_accept_actual_ack_post > 0) { + void (*postHookFunc) (int fd, int char_id, uint32 result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_actual_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_accept_actual_ack_post[hIndex].func; - postHookFunc(&fd, &char_id, &result); + postHookFunc(fd, char_id, result); } } return; } void HP_chr_delete2_accept_ack(int fd, int char_id, uint32 result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_accept_ack_pre ) { + if (HPMHooks.count.HP_chr_delete2_accept_ack_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, uint32 *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_accept_ack_pre[hIndex].func; preHookFunc(&fd, &char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3016,25 +3070,25 @@ void HP_chr_delete2_accept_ack(int fd, int char_id, uint32 result) { { HPMHooks.source.chr.delete2_accept_ack(fd, char_id, result); } - if( HPMHooks.count.HP_chr_delete2_accept_ack_post ) { - void (*postHookFunc) (int *fd, int *char_id, uint32 *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_delete2_accept_ack_post > 0) { + void (*postHookFunc) (int fd, int char_id, uint32 result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_accept_ack_post[hIndex].func; - postHookFunc(&fd, &char_id, &result); + postHookFunc(fd, char_id, result); } } return; } void HP_chr_delete2_cancel_ack(int fd, int char_id, uint32 result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_cancel_ack_pre ) { + if (HPMHooks.count.HP_chr_delete2_cancel_ack_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, uint32 *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_cancel_ack_pre[hIndex].func; preHookFunc(&fd, &char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3042,25 +3096,25 @@ void HP_chr_delete2_cancel_ack(int fd, int char_id, uint32 result) { { HPMHooks.source.chr.delete2_cancel_ack(fd, char_id, result); } - if( HPMHooks.count.HP_chr_delete2_cancel_ack_post ) { - void (*postHookFunc) (int *fd, int *char_id, uint32 *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_delete2_cancel_ack_post > 0) { + void (*postHookFunc) (int fd, int char_id, uint32 result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_cancel_ack_post[hIndex].func; - postHookFunc(&fd, &char_id, &result); + postHookFunc(fd, char_id, result); } } return; } void HP_chr_delete2_req(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_req_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_delete2_req_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_req_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_req_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_req_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3068,25 +3122,25 @@ void HP_chr_delete2_req(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.delete2_req(fd, sd); } - if( HPMHooks.count.HP_chr_delete2_req_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_req_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_delete2_req_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_req_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_req_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_delete2_accept(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_accept_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_delete2_accept_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_accept_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3094,25 +3148,25 @@ void HP_chr_delete2_accept(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.delete2_accept(fd, sd); } - if( HPMHooks.count.HP_chr_delete2_accept_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_delete2_accept_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_accept_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_accept_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_delete2_cancel(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete2_cancel_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_delete2_cancel_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete2_cancel_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3120,25 +3174,25 @@ void HP_chr_delete2_cancel(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.delete2_cancel(fd, sd); } - if( HPMHooks.count.HP_chr_delete2_cancel_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_delete2_cancel_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete2_cancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete2_cancel_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_send_account_id(int fd, int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_account_id_pre ) { + if (HPMHooks.count.HP_chr_send_account_id_pre > 0) { void (*preHookFunc) (int *fd, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_account_id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_account_id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_account_id_pre[hIndex].func; preHookFunc(&fd, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3146,25 +3200,25 @@ void HP_chr_send_account_id(int fd, int account_id) { { HPMHooks.source.chr.send_account_id(fd, account_id); } - if( HPMHooks.count.HP_chr_send_account_id_post ) { - void (*postHookFunc) (int *fd, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_account_id_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_send_account_id_post > 0) { + void (*postHookFunc) (int fd, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_account_id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_account_id_post[hIndex].func; - postHookFunc(&fd, &account_id); + postHookFunc(fd, account_id); } } return; } void HP_chr_parse_char_connect(int fd, struct char_session_data *sd, uint32 ipl) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_connect_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd, uint32 *ipl); + if (HPMHooks.count.HP_chr_parse_char_connect_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_connect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_connect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_connect_pre[hIndex].func; - preHookFunc(&fd, sd, &ipl); + preHookFunc(&fd, &sd, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3172,51 +3226,51 @@ void HP_chr_parse_char_connect(int fd, struct char_session_data *sd, uint32 ipl) { HPMHooks.source.chr.parse_char_connect(fd, sd, ipl); } - if( HPMHooks.count.HP_chr_parse_char_connect_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd, uint32 *ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_connect_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_connect_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, uint32 ipl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_connect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_connect_post[hIndex].func; - postHookFunc(&fd, sd, &ipl); + postHookFunc(fd, sd, ipl); } } return; } -void HP_chr_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd) { +void HP_chr_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd, char *dnsHost) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_map_info_pre ) { - void (*preHookFunc) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus *cd); + if (HPMHooks.count.HP_chr_send_map_info_pre > 0) { + void (*preHookFunc) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus **cd, char **dnsHost); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_map_info_pre[hIndex].func; - preHookFunc(&fd, &i, &subnet_map_ip, cd); + preHookFunc(&fd, &i, &subnet_map_ip, &cd, &dnsHost); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.chr.send_map_info(fd, i, subnet_map_ip, cd); + HPMHooks.source.chr.send_map_info(fd, i, subnet_map_ip, cd, dnsHost); } - if( HPMHooks.count.HP_chr_send_map_info_post ) { - void (*postHookFunc) (int *fd, int *i, uint32 *subnet_map_ip, struct mmo_charstatus *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_send_map_info_post > 0) { + void (*postHookFunc) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd, char *dnsHost); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_map_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_map_info_post[hIndex].func; - postHookFunc(&fd, &i, &subnet_map_ip, cd); + postHookFunc(fd, i, subnet_map_ip, cd, dnsHost); } } return; } void HP_chr_send_wait_char_server(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_send_wait_char_server_pre ) { + if (HPMHooks.count.HP_chr_send_wait_char_server_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_wait_char_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_wait_char_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_wait_char_server_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3224,11 +3278,11 @@ void HP_chr_send_wait_char_server(int fd) { { HPMHooks.source.chr.send_wait_char_server(fd); } - if( HPMHooks.count.HP_chr_send_wait_char_server_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_wait_char_server_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_send_wait_char_server_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_wait_char_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_wait_char_server_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -3236,14 +3290,14 @@ void HP_chr_send_wait_char_server(int fd) { int HP_chr_search_default_maps_mapserver(struct mmo_charstatus *cd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_search_default_maps_mapserver_pre ) { - int (*preHookFunc) (struct mmo_charstatus *cd); + if (HPMHooks.count.HP_chr_search_default_maps_mapserver_pre > 0) { + int (*preHookFunc) (struct mmo_charstatus **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_default_maps_mapserver_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_default_maps_mapserver_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_search_default_maps_mapserver_pre[hIndex].func; - retVal___ = preHookFunc(cd); + retVal___ = preHookFunc(&cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3251,9 +3305,9 @@ int HP_chr_search_default_maps_mapserver(struct mmo_charstatus *cd) { { retVal___ = HPMHooks.source.chr.search_default_maps_mapserver(cd); } - if( HPMHooks.count.HP_chr_search_default_maps_mapserver_post ) { + if (HPMHooks.count.HP_chr_search_default_maps_mapserver_post > 0) { int (*postHookFunc) (int retVal___, struct mmo_charstatus *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_default_maps_mapserver_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_search_default_maps_mapserver_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_search_default_maps_mapserver_post[hIndex].func; retVal___ = postHookFunc(retVal___, cd); } @@ -3262,14 +3316,14 @@ int HP_chr_search_default_maps_mapserver(struct mmo_charstatus *cd) { } void HP_chr_parse_char_select(int fd, struct char_session_data *sd, uint32 ipl) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_select_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd, uint32 *ipl); + if (HPMHooks.count.HP_chr_parse_char_select_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_select_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_select_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_select_pre[hIndex].func; - preHookFunc(&fd, sd, &ipl); + preHookFunc(&fd, &sd, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3277,25 +3331,25 @@ void HP_chr_parse_char_select(int fd, struct char_session_data *sd, uint32 ipl) { HPMHooks.source.chr.parse_char_select(fd, sd, ipl); } - if( HPMHooks.count.HP_chr_parse_char_select_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd, uint32 *ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_select_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_select_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, uint32 ipl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_select_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_select_post[hIndex].func; - postHookFunc(&fd, sd, &ipl); + postHookFunc(fd, sd, ipl); } } return; } void HP_chr_creation_failed(int fd, int result) { int hIndex = 0; - if( HPMHooks.count.HP_chr_creation_failed_pre ) { + if (HPMHooks.count.HP_chr_creation_failed_pre > 0) { void (*preHookFunc) (int *fd, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_failed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_failed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_creation_failed_pre[hIndex].func; preHookFunc(&fd, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3303,25 +3357,25 @@ void HP_chr_creation_failed(int fd, int result) { { HPMHooks.source.chr.creation_failed(fd, result); } - if( HPMHooks.count.HP_chr_creation_failed_post ) { - void (*postHookFunc) (int *fd, int *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_failed_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_creation_failed_post > 0) { + void (*postHookFunc) (int fd, int result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_failed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_creation_failed_post[hIndex].func; - postHookFunc(&fd, &result); + postHookFunc(fd, result); } } return; } void HP_chr_creation_ok(int fd, struct mmo_charstatus *char_dat) { int hIndex = 0; - if( HPMHooks.count.HP_chr_creation_ok_pre ) { - void (*preHookFunc) (int *fd, struct mmo_charstatus *char_dat); + if (HPMHooks.count.HP_chr_creation_ok_pre > 0) { + void (*preHookFunc) (int *fd, struct mmo_charstatus **char_dat); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_creation_ok_pre[hIndex].func; - preHookFunc(&fd, char_dat); + preHookFunc(&fd, &char_dat); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3329,25 +3383,25 @@ void HP_chr_creation_ok(int fd, struct mmo_charstatus *char_dat) { { HPMHooks.source.chr.creation_ok(fd, char_dat); } - if( HPMHooks.count.HP_chr_creation_ok_post ) { - void (*postHookFunc) (int *fd, struct mmo_charstatus *char_dat); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_ok_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_creation_ok_post > 0) { + void (*postHookFunc) (int fd, struct mmo_charstatus *char_dat); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_creation_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_creation_ok_post[hIndex].func; - postHookFunc(&fd, char_dat); + postHookFunc(fd, char_dat); } } return; } void HP_chr_parse_char_create_new_char(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_create_new_char_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_create_new_char_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_create_new_char_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_create_new_char_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_create_new_char_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3355,25 +3409,25 @@ void HP_chr_parse_char_create_new_char(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_create_new_char(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_create_new_char_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_create_new_char_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_create_new_char_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_create_new_char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_create_new_char_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_delete_char_failed(int fd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete_char_failed_pre ) { + if (HPMHooks.count.HP_chr_delete_char_failed_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_failed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_failed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete_char_failed_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3381,25 +3435,25 @@ void HP_chr_delete_char_failed(int fd, int flag) { { HPMHooks.source.chr.delete_char_failed(fd, flag); } - if( HPMHooks.count.HP_chr_delete_char_failed_post ) { - void (*postHookFunc) (int *fd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_failed_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_delete_char_failed_post > 0) { + void (*postHookFunc) (int fd, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_failed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete_char_failed_post[hIndex].func; - postHookFunc(&fd, &flag); + postHookFunc(fd, flag); } } return; } void HP_chr_delete_char_ok(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_delete_char_ok_pre ) { + if (HPMHooks.count.HP_chr_delete_char_ok_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_delete_char_ok_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3407,25 +3461,25 @@ void HP_chr_delete_char_ok(int fd) { { HPMHooks.source.chr.delete_char_ok(fd); } - if( HPMHooks.count.HP_chr_delete_char_ok_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_ok_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_delete_char_ok_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_delete_char_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_delete_char_ok_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_char_delete_char(int fd, struct char_session_data *sd, unsigned short cmd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_delete_char_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd, unsigned short *cmd); + if (HPMHooks.count.HP_chr_parse_char_delete_char_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, unsigned short *cmd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete_char_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete_char_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_delete_char_pre[hIndex].func; - preHookFunc(&fd, sd, &cmd); + preHookFunc(&fd, &sd, &cmd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3433,25 +3487,25 @@ void HP_chr_parse_char_delete_char(int fd, struct char_session_data *sd, unsigne { HPMHooks.source.chr.parse_char_delete_char(fd, sd, cmd); } - if( HPMHooks.count.HP_chr_parse_char_delete_char_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd, unsigned short *cmd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete_char_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_delete_char_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, unsigned short cmd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete_char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_delete_char_post[hIndex].func; - postHookFunc(&fd, sd, &cmd); + postHookFunc(fd, sd, cmd); } } return; } void HP_chr_parse_char_ping(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_ping_pre ) { + if (HPMHooks.count.HP_chr_parse_char_ping_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_ping_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3459,25 +3513,25 @@ void HP_chr_parse_char_ping(int fd) { { HPMHooks.source.chr.parse_char_ping(fd); } - if( HPMHooks.count.HP_chr_parse_char_ping_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_ping_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_ping_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_ping_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_allow_rename(int fd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_allow_rename_pre ) { + if (HPMHooks.count.HP_chr_allow_rename_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_allow_rename_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_allow_rename_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_allow_rename_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3485,25 +3539,25 @@ void HP_chr_allow_rename(int fd, int flag) { { HPMHooks.source.chr.allow_rename(fd, flag); } - if( HPMHooks.count.HP_chr_allow_rename_post ) { - void (*postHookFunc) (int *fd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_allow_rename_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_allow_rename_post > 0) { + void (*postHookFunc) (int fd, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_allow_rename_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_allow_rename_post[hIndex].func; - postHookFunc(&fd, &flag); + postHookFunc(fd, flag); } } return; } void HP_chr_parse_char_rename_char(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_rename_char_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_rename_char_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3511,25 +3565,25 @@ void HP_chr_parse_char_rename_char(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_rename_char(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_rename_char_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_rename_char_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_parse_char_rename_char2(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_rename_char2_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_rename_char2_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char2_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3537,25 +3591,25 @@ void HP_chr_parse_char_rename_char2(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_rename_char2(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_rename_char2_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char2_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_rename_char2_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char2_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_rename_char_ack(int fd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_rename_char_ack_pre ) { + if (HPMHooks.count.HP_chr_rename_char_ack_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_rename_char_ack_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3563,25 +3617,25 @@ void HP_chr_rename_char_ack(int fd, int flag) { { HPMHooks.source.chr.rename_char_ack(fd, flag); } - if( HPMHooks.count.HP_chr_rename_char_ack_post ) { - void (*postHookFunc) (int *fd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_rename_char_ack_post > 0) { + void (*postHookFunc) (int fd, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_rename_char_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_rename_char_ack_post[hIndex].func; - postHookFunc(&fd, &flag); + postHookFunc(fd, flag); } } return; } void HP_chr_parse_char_rename_char_confirm(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_rename_char_confirm_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_rename_char_confirm_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_confirm_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_confirm_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char_confirm_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3589,25 +3643,25 @@ void HP_chr_parse_char_rename_char_confirm(int fd, struct char_session_data *sd) { HPMHooks.source.chr.parse_char_rename_char_confirm(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_rename_char_confirm_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_confirm_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_rename_char_confirm_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_rename_char_confirm_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_rename_char_confirm_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_captcha_notsupported(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_captcha_notsupported_pre ) { + if (HPMHooks.count.HP_chr_captcha_notsupported_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_captcha_notsupported_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_captcha_notsupported_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_captcha_notsupported_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3615,25 +3669,25 @@ void HP_chr_captcha_notsupported(int fd) { { HPMHooks.source.chr.captcha_notsupported(fd); } - if( HPMHooks.count.HP_chr_captcha_notsupported_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_captcha_notsupported_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_captcha_notsupported_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_captcha_notsupported_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_captcha_notsupported_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_char_request_captcha(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_request_captcha_pre ) { + if (HPMHooks.count.HP_chr_parse_char_request_captcha_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_captcha_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_captcha_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_request_captcha_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3641,25 +3695,25 @@ void HP_chr_parse_char_request_captcha(int fd) { { HPMHooks.source.chr.parse_char_request_captcha(fd); } - if( HPMHooks.count.HP_chr_parse_char_request_captcha_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_captcha_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_request_captcha_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_captcha_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_request_captcha_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_char_check_captcha(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_check_captcha_pre ) { + if (HPMHooks.count.HP_chr_parse_char_check_captcha_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_check_captcha_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_check_captcha_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_check_captcha_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3667,25 +3721,25 @@ void HP_chr_parse_char_check_captcha(int fd) { { HPMHooks.source.chr.parse_char_check_captcha(fd); } - if( HPMHooks.count.HP_chr_parse_char_check_captcha_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_check_captcha_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_check_captcha_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_check_captcha_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_check_captcha_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chr_parse_char_delete2_req(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_delete2_req_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_delete2_req_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_req_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_req_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_req_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3693,25 +3747,25 @@ void HP_chr_parse_char_delete2_req(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_delete2_req(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_delete2_req_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_req_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_delete2_req_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_req_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_req_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_parse_char_delete2_accept(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_delete2_accept_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_delete2_accept_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_accept_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_accept_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_accept_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3719,25 +3773,25 @@ void HP_chr_parse_char_delete2_accept(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_delete2_accept(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_delete2_accept_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_accept_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_delete2_accept_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_accept_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_accept_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_parse_char_delete2_cancel(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_delete2_cancel_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_delete2_cancel_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_cancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_cancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_cancel_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3745,25 +3799,25 @@ void HP_chr_parse_char_delete2_cancel(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_delete2_cancel(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_delete2_cancel_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_cancel_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_delete2_cancel_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_delete2_cancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_delete2_cancel_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_login_map_server_ack(int fd, uint8 flag) { int hIndex = 0; - if( HPMHooks.count.HP_chr_login_map_server_ack_pre ) { + if (HPMHooks.count.HP_chr_login_map_server_ack_pre > 0) { void (*preHookFunc) (int *fd, uint8 *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_login_map_server_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_login_map_server_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_login_map_server_ack_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3771,25 +3825,25 @@ void HP_chr_login_map_server_ack(int fd, uint8 flag) { { HPMHooks.source.chr.login_map_server_ack(fd, flag); } - if( HPMHooks.count.HP_chr_login_map_server_ack_post ) { - void (*postHookFunc) (int *fd, uint8 *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_login_map_server_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_login_map_server_ack_post > 0) { + void (*postHookFunc) (int fd, uint8 flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_login_map_server_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_login_map_server_ack_post[hIndex].func; - postHookFunc(&fd, &flag); + postHookFunc(fd, flag); } } return; } void HP_chr_parse_char_login_map_server(int fd, uint32 ipl) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_login_map_server_pre ) { + if (HPMHooks.count.HP_chr_parse_char_login_map_server_pre > 0) { void (*preHookFunc) (int *fd, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_login_map_server_pre[hIndex].func; preHookFunc(&fd, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3797,25 +3851,25 @@ void HP_chr_parse_char_login_map_server(int fd, uint32 ipl) { { HPMHooks.source.chr.parse_char_login_map_server(fd, ipl); } - if( HPMHooks.count.HP_chr_parse_char_login_map_server_post ) { - void (*postHookFunc) (int *fd, uint32 *ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_login_map_server_post > 0) { + void (*postHookFunc) (int fd, uint32 ipl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_login_map_server_post[hIndex].func; - postHookFunc(&fd, &ipl); + postHookFunc(fd, ipl); } } return; } void HP_chr_parse_char_pincode_check(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_pincode_check_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_pincode_check_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_check_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3823,25 +3877,25 @@ void HP_chr_parse_char_pincode_check(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_pincode_check(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_pincode_check_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_check_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_check_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_check_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_parse_char_pincode_window(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_pincode_window_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_pincode_window_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_window_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_window_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_window_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3849,25 +3903,25 @@ void HP_chr_parse_char_pincode_window(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_pincode_window(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_pincode_window_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_window_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_window_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_window_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_window_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_parse_char_pincode_change(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_pincode_change_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_pincode_change_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_change_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_change_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_change_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3875,25 +3929,25 @@ void HP_chr_parse_char_pincode_change(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_pincode_change(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_pincode_change_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_change_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_change_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_change_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_change_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_parse_char_pincode_first_pin(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_pincode_first_pin_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_pincode_first_pin_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_first_pin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_first_pin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_first_pin_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3901,25 +3955,25 @@ void HP_chr_parse_char_pincode_first_pin(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_pincode_first_pin(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_pincode_first_pin_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_first_pin_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_pincode_first_pin_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pincode_first_pin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_pincode_first_pin_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_parse_char_request_chars(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_request_chars_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_request_chars_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_chars_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_chars_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_request_chars_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3927,25 +3981,25 @@ void HP_chr_parse_char_request_chars(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_request_chars(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_request_chars_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_chars_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_request_chars_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_request_chars_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_request_chars_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_chr_change_character_slot_ack(int fd, bool ret) { int hIndex = 0; - if( HPMHooks.count.HP_chr_change_character_slot_ack_pre ) { + if (HPMHooks.count.HP_chr_change_character_slot_ack_pre > 0) { void (*preHookFunc) (int *fd, bool *ret); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_character_slot_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_character_slot_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_change_character_slot_ack_pre[hIndex].func; preHookFunc(&fd, &ret); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3953,25 +4007,25 @@ void HP_chr_change_character_slot_ack(int fd, bool ret) { { HPMHooks.source.chr.change_character_slot_ack(fd, ret); } - if( HPMHooks.count.HP_chr_change_character_slot_ack_post ) { - void (*postHookFunc) (int *fd, bool *ret); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_character_slot_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_change_character_slot_ack_post > 0) { + void (*postHookFunc) (int fd, bool ret); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_change_character_slot_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_change_character_slot_ack_post[hIndex].func; - postHookFunc(&fd, &ret); + postHookFunc(fd, ret); } } return; } void HP_chr_parse_char_move_character(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_chr_parse_char_move_character_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_chr_parse_char_move_character_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_move_character_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_move_character_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_move_character_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3979,11 +4033,11 @@ void HP_chr_parse_char_move_character(int fd, struct char_session_data *sd) { { HPMHooks.source.chr.parse_char_move_character(fd, sd); } - if( HPMHooks.count.HP_chr_parse_char_move_character_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_move_character_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_move_character_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_move_character_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_move_character_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; @@ -3991,14 +4045,14 @@ void HP_chr_parse_char_move_character(int fd, struct char_session_data *sd) { int HP_chr_parse_char_unknown_packet(int fd, uint32 ipl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_char_unknown_packet_pre ) { + if (HPMHooks.count.HP_chr_parse_char_unknown_packet_pre > 0) { int (*preHookFunc) (int *fd, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_unknown_packet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_unknown_packet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_unknown_packet_pre[hIndex].func; retVal___ = preHookFunc(&fd, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4006,11 +4060,11 @@ int HP_chr_parse_char_unknown_packet(int fd, uint32 ipl) { { retVal___ = HPMHooks.source.chr.parse_char_unknown_packet(fd, ipl); } - if( HPMHooks.count.HP_chr_parse_char_unknown_packet_post ) { - int (*postHookFunc) (int retVal___, int *fd, uint32 *ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_unknown_packet_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_unknown_packet_post > 0) { + int (*postHookFunc) (int retVal___, int fd, uint32 ipl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_unknown_packet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_unknown_packet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &ipl); + retVal___ = postHookFunc(retVal___, fd, ipl); } } return retVal___; @@ -4018,14 +4072,14 @@ int HP_chr_parse_char_unknown_packet(int fd, uint32 ipl) { int HP_chr_parse_char(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_parse_char_pre ) { + if (HPMHooks.count.HP_chr_parse_char_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_parse_char_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4033,11 +4087,11 @@ int HP_chr_parse_char(int fd) { { retVal___ = HPMHooks.source.chr.parse_char(fd); } - if( HPMHooks.count.HP_chr_parse_char_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_parse_char_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_parse_char_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -4045,14 +4099,14 @@ int HP_chr_parse_char(int fd) { int HP_chr_broadcast_user_count(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_broadcast_user_count_pre ) { + if (HPMHooks.count.HP_chr_broadcast_user_count_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_broadcast_user_count_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_broadcast_user_count_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_broadcast_user_count_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4060,11 +4114,11 @@ int HP_chr_broadcast_user_count(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.chr.broadcast_user_count(tid, tick, id, data); } - if( HPMHooks.count.HP_chr_broadcast_user_count_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_broadcast_user_count_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_broadcast_user_count_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_broadcast_user_count_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_broadcast_user_count_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -4072,16 +4126,16 @@ int HP_chr_broadcast_user_count(int tid, int64 tick, int id, intptr_t data) { int HP_chr_send_accounts_tologin_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_send_accounts_tologin_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_chr_send_accounts_tologin_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_sub_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_chr_send_accounts_tologin_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4091,12 +4145,12 @@ int HP_chr_send_accounts_tologin_sub(union DBKey key, struct DBData *data, va_li retVal___ = HPMHooks.source.chr.send_accounts_tologin_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_chr_send_accounts_tologin_sub_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_send_accounts_tologin_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_sub_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_chr_send_accounts_tologin_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -4105,14 +4159,14 @@ int HP_chr_send_accounts_tologin_sub(union DBKey key, struct DBData *data, va_li int HP_chr_send_accounts_tologin(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_send_accounts_tologin_pre ) { + if (HPMHooks.count.HP_chr_send_accounts_tologin_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_send_accounts_tologin_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4120,11 +4174,11 @@ int HP_chr_send_accounts_tologin(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.chr.send_accounts_tologin(tid, tick, id, data); } - if( HPMHooks.count.HP_chr_send_accounts_tologin_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_send_accounts_tologin_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_send_accounts_tologin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_send_accounts_tologin_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -4132,14 +4186,14 @@ int HP_chr_send_accounts_tologin(int tid, int64 tick, int id, intptr_t data) { int HP_chr_check_connect_login_server(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_check_connect_login_server_pre ) { + if (HPMHooks.count.HP_chr_check_connect_login_server_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_connect_login_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_connect_login_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_check_connect_login_server_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4147,11 +4201,11 @@ int HP_chr_check_connect_login_server(int tid, int64 tick, int id, intptr_t data { retVal___ = HPMHooks.source.chr.check_connect_login_server(tid, tick, id, data); } - if( HPMHooks.count.HP_chr_check_connect_login_server_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_connect_login_server_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_check_connect_login_server_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_check_connect_login_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_check_connect_login_server_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -4159,16 +4213,16 @@ int HP_chr_check_connect_login_server(int tid, int64 tick, int id, intptr_t data int HP_chr_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_online_data_cleanup_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_chr_online_data_cleanup_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_sub_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_chr_online_data_cleanup_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4178,12 +4232,12 @@ int HP_chr_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_list retVal___ = HPMHooks.source.chr.online_data_cleanup_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_chr_online_data_cleanup_sub_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_online_data_cleanup_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_sub_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_chr_online_data_cleanup_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -4192,14 +4246,14 @@ int HP_chr_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_list int HP_chr_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chr_online_data_cleanup_pre ) { + if (HPMHooks.count.HP_chr_online_data_cleanup_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_online_data_cleanup_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4207,105 +4261,484 @@ int HP_chr_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.chr.online_data_cleanup(tid, tick, id, data); } - if( HPMHooks.count.HP_chr_online_data_cleanup_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_online_data_cleanup_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_online_data_cleanup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_online_data_cleanup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } -void HP_chr_sql_config_read(const char *cfgName) { +bool HP_chr_sql_config_read(const char *filename, bool imported) { int hIndex = 0; - if( HPMHooks.count.HP_chr_sql_config_read_pre ) { - void (*preHookFunc) (const char *cfgName); + bool retVal___ = false; + if (HPMHooks.count.HP_chr_sql_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_sql_config_read_pre[hIndex].func; - preHookFunc(cfgName); + retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.chr.sql_config_read(cfgName); + retVal___ = HPMHooks.source.chr.sql_config_read(filename, imported); } - if( HPMHooks.count.HP_chr_sql_config_read_post ) { - void (*postHookFunc) (const char *cfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_sql_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_sql_config_read_post[hIndex].func; - postHookFunc(cfgName); + retVal___ = postHookFunc(retVal___, filename, imported); } } - return; + return retVal___; } -void HP_chr_config_dispatch(char *w1, char *w2) { +bool HP_chr_sql_config_read_registry(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; - if( HPMHooks.count.HP_chr_config_dispatch_pre ) { - void (*preHookFunc) (char *w1, char *w2); + bool retVal___ = false; + if (HPMHooks.count.HP_chr_sql_config_read_registry_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_dispatch_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_chr_config_dispatch_pre[hIndex].func; - preHookFunc(w1, w2); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_registry_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_sql_config_read_registry_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.chr.config_dispatch(w1, w2); + retVal___ = HPMHooks.source.chr.sql_config_read_registry(filename, config, imported); } - if( HPMHooks.count.HP_chr_config_dispatch_post ) { - void (*postHookFunc) (char *w1, char *w2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_dispatch_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_chr_config_dispatch_post[hIndex].func; - postHookFunc(w1, w2); + if (HPMHooks.count.HP_chr_sql_config_read_registry_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_registry_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_sql_config_read_registry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } - return; + return retVal___; } -int HP_chr_config_read(const char *cfgName) { +bool HP_chr_sql_config_read_pc(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_chr_config_read_pre ) { - int (*preHookFunc) (const char *cfgName); + bool retVal___ = false; + if (HPMHooks.count.HP_chr_sql_config_read_pc_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pc_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_sql_config_read_pc_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.sql_config_read_pc(filename, config, imported); + } + if (HPMHooks.count.HP_chr_sql_config_read_pc_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_pc_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_sql_config_read_pc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_chr_sql_config_read_guild(const char *filename, const struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_sql_config_read_guild_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_guild_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_sql_config_read_guild_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.sql_config_read_guild(filename, config, imported); + } + if (HPMHooks.count.HP_chr_sql_config_read_guild_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_sql_config_read_guild_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_sql_config_read_guild_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_chr_config_read(const char *filename, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_config_read_pre[hIndex].func; - retVal___ = preHookFunc(cfgName); + retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.chr.config_read(cfgName); + retVal___ = HPMHooks.source.chr.config_read(filename, imported); } - if( HPMHooks.count.HP_chr_config_read_post ) { - int (*postHookFunc) (int retVal___, const char *cfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_post; hIndex++ ) { + if (HPMHooks.count.HP_chr_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cfgName); + retVal___ = postHookFunc(retVal___, filename, imported); + } + } + return retVal___; +} +bool HP_chr_config_read_database(const char *filename, const struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_read_database_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_database_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_read_database_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.config_read_database(filename, config, imported); + } + if (HPMHooks.count.HP_chr_config_read_database_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_database_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_read_database_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_chr_config_read_console(const char *filename, const struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_read_console_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_console_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_read_console_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.config_read_console(filename, config, imported); + } + if (HPMHooks.count.HP_chr_config_read_console_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_console_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_read_console_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_chr_config_read_player_fame(const char *filename, const struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_read_player_fame_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_fame_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_read_player_fame_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.config_read_player_fame(filename, config, imported); + } + if (HPMHooks.count.HP_chr_config_read_player_fame_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_fame_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_read_player_fame_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_chr_config_read_player_deletion(const char *filename, const struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_read_player_deletion_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_deletion_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_read_player_deletion_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.config_read_player_deletion(filename, config, imported); + } + if (HPMHooks.count.HP_chr_config_read_player_deletion_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_deletion_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_read_player_deletion_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_chr_config_read_player_name(const char *filename, const struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_read_player_name_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_name_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_read_player_name_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.config_read_player_name(filename, config, imported); + } + if (HPMHooks.count.HP_chr_config_read_player_name_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_name_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_read_player_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +void HP_chr_config_set_start_item(const struct config_setting_t *setting) { + int hIndex = 0; + if (HPMHooks.count.HP_chr_config_set_start_item_pre > 0) { + void (*preHookFunc) (const struct config_setting_t **setting); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_start_item_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_set_start_item_pre[hIndex].func; + preHookFunc(&setting); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.chr.config_set_start_item(setting); + } + if (HPMHooks.count.HP_chr_config_set_start_item_post > 0) { + void (*postHookFunc) (const struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_start_item_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_set_start_item_post[hIndex].func; + postHookFunc(setting); + } + } + return; +} +bool HP_chr_config_read_player_new(const char *filename, const struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_read_player_new_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_new_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_read_player_new_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.config_read_player_new(filename, config, imported); + } + if (HPMHooks.count.HP_chr_config_read_player_new_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_new_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_read_player_new_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_chr_config_read_player(const char *filename, const struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_read_player_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_read_player_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.config_read_player(filename, config, imported); + } + if (HPMHooks.count.HP_chr_config_read_player_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_player_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_read_player_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_chr_config_read_permission(const char *filename, const struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_read_permission_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_permission_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_read_permission_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.config_read_permission(filename, config, imported); + } + if (HPMHooks.count.HP_chr_config_read_permission_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_permission_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_read_permission_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_chr_config_set_ip(const char *type, const char *value, uint32 *out_ip, char *out_ip_str) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_set_ip_pre > 0) { + bool (*preHookFunc) (const char **type, const char **value, uint32 **out_ip, char **out_ip_str); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_ip_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_set_ip_pre[hIndex].func; + retVal___ = preHookFunc(&type, &value, &out_ip, &out_ip_str); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.config_set_ip(type, value, out_ip, out_ip_str); + } + if (HPMHooks.count.HP_chr_config_set_ip_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *type, const char *value, uint32 *out_ip, char *out_ip_str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_set_ip_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_set_ip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type, value, out_ip, out_ip_str); + } + } + return retVal___; +} +bool HP_chr_config_read_inter(const char *filename, const struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_read_inter_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_inter_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_read_inter_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.config_read_inter(filename, config, imported); + } + if (HPMHooks.count.HP_chr_config_read_inter_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_inter_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_read_inter_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_chr_config_read_top(const char *filename, const struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_chr_config_read_top_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_top_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_chr_config_read_top_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.chr.config_read_top(filename, config, imported); + } + if (HPMHooks.count.HP_chr_config_read_top_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_config_read_top_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_chr_config_read_top_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -/* cmdline */ +/* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_init_pre ) { + if (HPMHooks.count.HP_cmdline_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4313,9 +4746,9 @@ void HP_cmdline_init(void) { { HPMHooks.source.cmdline.init(); } - if( HPMHooks.count.HP_cmdline_init_post ) { + if (HPMHooks.count.HP_cmdline_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func; postHookFunc(); } @@ -4324,14 +4757,14 @@ void HP_cmdline_init(void) { } void HP_cmdline_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_final_pre ) { + if (HPMHooks.count.HP_cmdline_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4339,9 +4772,9 @@ void HP_cmdline_final(void) { { HPMHooks.source.cmdline.final(); } - if( HPMHooks.count.HP_cmdline_final_post ) { + if (HPMHooks.count.HP_cmdline_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func; postHookFunc(); } @@ -4351,14 +4784,14 @@ void HP_cmdline_final(void) { bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_add_pre ) { - bool (*preHookFunc) (unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); + if (HPMHooks.count.HP_cmdline_arg_add_pre > 0) { + bool (*preHookFunc) (unsigned int *pluginID, const char **name, char *shortname, CmdlineExecFunc *func, const char **help, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func; - retVal___ = preHookFunc(&pluginID, name, &shortname, &func, help, &options); + retVal___ = preHookFunc(&pluginID, &name, &shortname, &func, &help, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4366,11 +4799,11 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, { retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options); } - if( HPMHooks.count.HP_cmdline_arg_add_post ) { - bool (*postHookFunc) (bool retVal___, unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) { + if (HPMHooks.count.HP_cmdline_arg_add_post > 0) { + bool (*postHookFunc) (bool retVal___, unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &pluginID, name, &shortname, &func, help, &options); + retVal___ = postHookFunc(retVal___, pluginID, name, shortname, func, help, options); } } return retVal___; @@ -4378,14 +4811,14 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, int HP_cmdline_exec(int argc, char **argv, unsigned int options) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_cmdline_exec_pre ) { - int (*preHookFunc) (int *argc, char **argv, unsigned int *options); + if (HPMHooks.count.HP_cmdline_exec_pre > 0) { + int (*preHookFunc) (int *argc, char ***argv, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func; - retVal___ = preHookFunc(&argc, argv, &options); + retVal___ = preHookFunc(&argc, &argv, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4393,11 +4826,11 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { { retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options); } - if( HPMHooks.count.HP_cmdline_exec_post ) { - int (*postHookFunc) (int retVal___, int *argc, char **argv, unsigned int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) { + if (HPMHooks.count.HP_cmdline_exec_post > 0) { + int (*postHookFunc) (int retVal___, int argc, char **argv, unsigned int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &argc, argv, &options); + retVal___ = postHookFunc(retVal___, argc, argv, options); } } return retVal___; @@ -4405,14 +4838,14 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) { - bool (*preHookFunc) (const char *name, int *current_arg, int *argc); + if (HPMHooks.count.HP_cmdline_arg_next_value_pre > 0) { + bool (*preHookFunc) (const char **name, int *current_arg, int *argc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func; - retVal___ = preHookFunc(name, ¤t_arg, &argc); + retVal___ = preHookFunc(&name, ¤t_arg, &argc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4420,11 +4853,11 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { { retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc); } - if( HPMHooks.count.HP_cmdline_arg_next_value_post ) { - bool (*postHookFunc) (bool retVal___, const char *name, int *current_arg, int *argc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) { + if (HPMHooks.count.HP_cmdline_arg_next_value_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *name, int current_arg, int argc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name, ¤t_arg, &argc); + retVal___ = postHookFunc(retVal___, name, current_arg, argc); } } return retVal___; @@ -4432,14 +4865,14 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_cmdline_arg_source_pre ) { - const char* (*preHookFunc) (struct CmdlineArgData *arg); + if (HPMHooks.count.HP_cmdline_arg_source_pre > 0) { + const char* (*preHookFunc) (struct CmdlineArgData **arg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func; - retVal___ = preHookFunc(arg); + retVal___ = preHookFunc(&arg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4447,26 +4880,26 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { { retVal___ = HPMHooks.source.cmdline.arg_source(arg); } - if( HPMHooks.count.HP_cmdline_arg_source_post ) { + if (HPMHooks.count.HP_cmdline_arg_source_post > 0) { const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func; retVal___ = postHookFunc(retVal___, arg); } } return retVal___; } -/* console */ +/* console_interface */ void HP_console_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_init_pre ) { + if (HPMHooks.count.HP_console_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4474,9 +4907,9 @@ void HP_console_init(void) { { HPMHooks.source.console.init(); } - if( HPMHooks.count.HP_console_init_post ) { + if (HPMHooks.count.HP_console_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func; postHookFunc(); } @@ -4485,14 +4918,14 @@ void HP_console_init(void) { } void HP_console_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_final_pre ) { + if (HPMHooks.count.HP_console_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4500,9 +4933,9 @@ void HP_console_final(void) { { HPMHooks.source.console.final(); } - if( HPMHooks.count.HP_console_final_post ) { + if (HPMHooks.count.HP_console_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func; postHookFunc(); } @@ -4511,14 +4944,14 @@ void HP_console_final(void) { } void HP_console_display_title(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_title_pre ) { + if (HPMHooks.count.HP_console_display_title_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4526,9 +4959,9 @@ void HP_console_display_title(void) { { HPMHooks.source.console.display_title(); } - if( HPMHooks.count.HP_console_display_title_post ) { + if (HPMHooks.count.HP_console_display_title_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func; postHookFunc(); } @@ -4537,14 +4970,14 @@ void HP_console_display_title(void) { } void HP_console_display_gplnotice(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_gplnotice_pre ) { + if (HPMHooks.count.HP_console_display_gplnotice_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_gplnotice_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4552,26 +4985,26 @@ void HP_console_display_gplnotice(void) { { HPMHooks.source.console.display_gplnotice(); } - if( HPMHooks.count.HP_console_display_gplnotice_post ) { + if (HPMHooks.count.HP_console_display_gplnotice_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_gplnotice_post[hIndex].func; postHookFunc(); } } return; } -/* core */ +/* core_interface */ void HP_core_shutdown_callback(void) { int hIndex = 0; - if( HPMHooks.count.HP_core_shutdown_callback_pre ) { + if (HPMHooks.count.HP_core_shutdown_callback_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4579,27 +5012,27 @@ void HP_core_shutdown_callback(void) { { HPMHooks.source.core.shutdown_callback(); } - if( HPMHooks.count.HP_core_shutdown_callback_post ) { + if (HPMHooks.count.HP_core_shutdown_callback_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++) { postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func; postHookFunc(); } } return; } -/* DB */ +/* db_interface */ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { int hIndex = 0; enum DBOptions retVal___ = DB_OPT_BASE; - if( HPMHooks.count.HP_DB_fix_options_pre ) { + if (HPMHooks.count.HP_DB_fix_options_pre > 0) { enum DBOptions (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4607,11 +5040,11 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.fix_options(type, options); } - if( HPMHooks.count.HP_DB_fix_options_post ) { - enum DBOptions (*postHookFunc) (enum DBOptions retVal___, enum DBType *type, enum DBOptions *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_fix_options_post > 0) { + enum DBOptions (*postHookFunc) (enum DBOptions retVal___, enum DBType type, enum DBOptions options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type, &options); + retVal___ = postHookFunc(retVal___, type, options); } } return retVal___; @@ -4619,14 +5052,14 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { DBComparator HP_DB_default_cmp(enum DBType type) { int hIndex = 0; DBComparator retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_cmp_pre ) { + if (HPMHooks.count.HP_DB_default_cmp_pre > 0) { DBComparator (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4634,11 +5067,11 @@ DBComparator HP_DB_default_cmp(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_cmp(type); } - if( HPMHooks.count.HP_DB_default_cmp_post ) { - DBComparator (*postHookFunc) (DBComparator retVal___, enum DBType *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_default_cmp_post > 0) { + DBComparator (*postHookFunc) (DBComparator retVal___, enum DBType type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type); + retVal___ = postHookFunc(retVal___, type); } } return retVal___; @@ -4646,14 +5079,14 @@ DBComparator HP_DB_default_cmp(enum DBType type) { DBHasher HP_DB_default_hash(enum DBType type) { int hIndex = 0; DBHasher retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_hash_pre ) { + if (HPMHooks.count.HP_DB_default_hash_pre > 0) { DBHasher (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4661,11 +5094,11 @@ DBHasher HP_DB_default_hash(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_hash(type); } - if( HPMHooks.count.HP_DB_default_hash_post ) { - DBHasher (*postHookFunc) (DBHasher retVal___, enum DBType *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_default_hash_post > 0) { + DBHasher (*postHookFunc) (DBHasher retVal___, enum DBType type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type); + retVal___ = postHookFunc(retVal___, type); } } return retVal___; @@ -4673,14 +5106,14 @@ DBHasher HP_DB_default_hash(enum DBType type) { DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_release_pre ) { + if (HPMHooks.count.HP_DB_default_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4688,11 +5121,11 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.default_release(type, options); } - if( HPMHooks.count.HP_DB_default_release_post ) { - DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBType *type, enum DBOptions *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_default_release_post > 0) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBType type, enum DBOptions options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type, &options); + retVal___ = postHookFunc(retVal___, type, options); } } return retVal___; @@ -4700,14 +5133,14 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_custom_release_pre ) { + if (HPMHooks.count.HP_DB_custom_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBReleaseOption *which); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func; retVal___ = preHookFunc(&which); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4715,11 +5148,11 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { { retVal___ = HPMHooks.source.DB.custom_release(which); } - if( HPMHooks.count.HP_DB_custom_release_post ) { - DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBReleaseOption *which); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_custom_release_post > 0) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBReleaseOption which); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &which); + retVal___ = postHookFunc(retVal___, which); } } return retVal___; @@ -4727,14 +5160,14 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen) { int hIndex = 0; struct DBMap* retVal___ = NULL; - if( HPMHooks.count.HP_DB_alloc_pre ) { - struct DBMap* (*preHookFunc) (const char *file, const char *func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); + if (HPMHooks.count.HP_DB_alloc_pre > 0) { + struct DBMap* (*preHookFunc) (const char **file, const char **func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func; - retVal___ = preHookFunc(file, func, &line, &type, &options, &maxlen); + retVal___ = preHookFunc(&file, &func, &line, &type, &options, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4742,27 +5175,26 @@ struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBT { retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen); } - if( HPMHooks.count.HP_DB_alloc_post ) { - struct DBMap* (*postHookFunc) (struct DBMap* retVal___, const char *file, const char *func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_alloc_post > 0) { + struct DBMap* (*postHookFunc) (struct DBMap* retVal___, const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, file, func, &line, &type, &options, &maxlen); + retVal___ = postHookFunc(retVal___, file, func, line, type, options, maxlen); } } return retVal___; } union DBKey HP_DB_i2key(int key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_i2key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_i2key_pre > 0) { union DBKey (*preHookFunc) (int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4770,27 +5202,26 @@ union DBKey HP_DB_i2key(int key) { { retVal___ = HPMHooks.source.DB.i2key(key); } - if( HPMHooks.count.HP_DB_i2key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, int *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_i2key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, int key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } union DBKey HP_DB_ui2key(unsigned int key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_ui2key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ui2key_pre > 0) { union DBKey (*preHookFunc) (unsigned int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4798,27 +5229,26 @@ union DBKey HP_DB_ui2key(unsigned int key) { { retVal___ = HPMHooks.source.DB.ui2key(key); } - if( HPMHooks.count.HP_DB_ui2key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, unsigned int *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_ui2key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, unsigned int key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } union DBKey HP_DB_str2key(const char *key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_str2key_pre ) { - union DBKey (*preHookFunc) (const char *key); + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_str2key_pre > 0) { + union DBKey (*preHookFunc) (const char **key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func; - retVal___ = preHookFunc(key); + retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4826,9 +5256,9 @@ union DBKey HP_DB_str2key(const char *key) { { retVal___ = HPMHooks.source.DB.str2key(key); } - if( HPMHooks.count.HP_DB_str2key_post ) { + if (HPMHooks.count.HP_DB_str2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, const char *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -4837,16 +5267,15 @@ union DBKey HP_DB_str2key(const char *key) { } union DBKey HP_DB_i642key(int64 key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_i642key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_i642key_pre > 0) { union DBKey (*preHookFunc) (int64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4854,27 +5283,26 @@ union DBKey HP_DB_i642key(int64 key) { { retVal___ = HPMHooks.source.DB.i642key(key); } - if( HPMHooks.count.HP_DB_i642key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, int64 *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_i642key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, int64 key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } union DBKey HP_DB_ui642key(uint64 key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_ui642key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ui642key_pre > 0) { union DBKey (*preHookFunc) (uint64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4882,27 +5310,26 @@ union DBKey HP_DB_ui642key(uint64 key) { { retVal___ = HPMHooks.source.DB.ui642key(key); } - if( HPMHooks.count.HP_DB_ui642key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, uint64 *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_ui642key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, uint64 key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } struct DBData HP_DB_i2data(int data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_DB_i2data_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_i2data_pre > 0) { struct DBData (*preHookFunc) (int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4910,27 +5337,26 @@ struct DBData HP_DB_i2data(int data) { { retVal___ = HPMHooks.source.DB.i2data(data); } - if( HPMHooks.count.HP_DB_i2data_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, int *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_i2data_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, int data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &data); + retVal___ = postHookFunc(retVal___, data); } } return retVal___; } struct DBData HP_DB_ui2data(unsigned int data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_DB_ui2data_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ui2data_pre > 0) { struct DBData (*preHookFunc) (unsigned int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4938,27 +5364,26 @@ struct DBData HP_DB_ui2data(unsigned int data) { { retVal___ = HPMHooks.source.DB.ui2data(data); } - if( HPMHooks.count.HP_DB_ui2data_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, unsigned int *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_ui2data_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, unsigned int data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &data); + retVal___ = postHookFunc(retVal___, data); } } return retVal___; } struct DBData HP_DB_ptr2data(void *data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_DB_ptr2data_pre ) { - struct DBData (*preHookFunc) (void *data); + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ptr2data_pre > 0) { + struct DBData (*preHookFunc) (void **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4966,9 +5391,9 @@ struct DBData HP_DB_ptr2data(void *data) { { retVal___ = HPMHooks.source.DB.ptr2data(data); } - if( HPMHooks.count.HP_DB_ptr2data_post ) { + if (HPMHooks.count.HP_DB_ptr2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, void *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -4978,14 +5403,14 @@ struct DBData HP_DB_ptr2data(void *data) { int HP_DB_data2i(struct DBData *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2i_pre ) { - int (*preHookFunc) (struct DBData *data); + if (HPMHooks.count.HP_DB_data2i_pre > 0) { + int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4993,9 +5418,9 @@ int HP_DB_data2i(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2i(data); } - if( HPMHooks.count.HP_DB_data2i_post ) { + if (HPMHooks.count.HP_DB_data2i_post > 0) { int (*postHookFunc) (int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -5005,14 +5430,14 @@ int HP_DB_data2i(struct DBData *data) { unsigned int HP_DB_data2ui(struct DBData *data) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2ui_pre ) { - unsigned int (*preHookFunc) (struct DBData *data); + if (HPMHooks.count.HP_DB_data2ui_pre > 0) { + unsigned int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5020,9 +5445,9 @@ unsigned int HP_DB_data2ui(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ui(data); } - if( HPMHooks.count.HP_DB_data2ui_post ) { + if (HPMHooks.count.HP_DB_data2ui_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -5032,14 +5457,14 @@ unsigned int HP_DB_data2ui(struct DBData *data) { void* HP_DB_data2ptr(struct DBData *data) { int hIndex = 0; void* retVal___ = NULL; - if( HPMHooks.count.HP_DB_data2ptr_pre ) { - void* (*preHookFunc) (struct DBData *data); + if (HPMHooks.count.HP_DB_data2ptr_pre > 0) { + void* (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5047,9 +5472,9 @@ void* HP_DB_data2ptr(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ptr(data); } - if( HPMHooks.count.HP_DB_data2ptr_post ) { + if (HPMHooks.count.HP_DB_data2ptr_post > 0) { void* (*postHookFunc) (void* retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -5058,14 +5483,14 @@ void* HP_DB_data2ptr(struct DBData *data) { } void HP_DB_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_init_pre ) { + if (HPMHooks.count.HP_DB_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5073,9 +5498,9 @@ void HP_DB_init(void) { { HPMHooks.source.DB.init(); } - if( HPMHooks.count.HP_DB_init_post ) { + if (HPMHooks.count.HP_DB_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func; postHookFunc(); } @@ -5084,14 +5509,14 @@ void HP_DB_init(void) { } void HP_DB_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_final_pre ) { + if (HPMHooks.count.HP_DB_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5099,27 +5524,80 @@ void HP_DB_final(void) { { HPMHooks.source.DB.final(); } - if( HPMHooks.count.HP_DB_final_post ) { + if (HPMHooks.count.HP_DB_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func; postHookFunc(); } } return; } -/* geoip */ +/* des_interface */ +void HP_des_decrypt_block(struct des_bit64 *block) { + int hIndex = 0; + if (HPMHooks.count.HP_des_decrypt_block_pre > 0) { + void (*preHookFunc) (struct des_bit64 **block); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_des_decrypt_block_pre[hIndex].func; + preHookFunc(&block); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.des.decrypt_block(block); + } + if (HPMHooks.count.HP_des_decrypt_block_post > 0) { + void (*postHookFunc) (struct des_bit64 *block); + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_des_decrypt_block_post[hIndex].func; + postHookFunc(block); + } + } + return; +} +void HP_des_decrypt(unsigned char *data, size_t size) { + int hIndex = 0; + if (HPMHooks.count.HP_des_decrypt_pre > 0) { + void (*preHookFunc) (unsigned char **data, size_t *size); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_des_decrypt_pre[hIndex].func; + preHookFunc(&data, &size); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.des.decrypt(data, size); + } + if (HPMHooks.count.HP_des_decrypt_post > 0) { + void (*postHookFunc) (unsigned char *data, size_t size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_des_decrypt_post[hIndex].func; + postHookFunc(data, size); + } + } + return; +} +/* geoip_interface */ const char* HP_geoip_getcountry(uint32 ipnum) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_geoip_getcountry_pre ) { + if (HPMHooks.count.HP_geoip_getcountry_pre > 0) { const char* (*preHookFunc) (uint32 *ipnum); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_geoip_getcountry_pre[hIndex].func; retVal___ = preHookFunc(&ipnum); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5127,25 +5605,25 @@ const char* HP_geoip_getcountry(uint32 ipnum) { { retVal___ = HPMHooks.source.geoip.getcountry(ipnum); } - if( HPMHooks.count.HP_geoip_getcountry_post ) { - const char* (*postHookFunc) (const char* retVal___, uint32 *ipnum); - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_post; hIndex++ ) { + if (HPMHooks.count.HP_geoip_getcountry_post > 0) { + const char* (*postHookFunc) (const char* retVal___, uint32 ipnum); + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_getcountry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_geoip_getcountry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ipnum); + retVal___ = postHookFunc(retVal___, ipnum); } } return retVal___; } void HP_geoip_final(bool shutdown) { int hIndex = 0; - if( HPMHooks.count.HP_geoip_final_pre ) { + if (HPMHooks.count.HP_geoip_final_pre > 0) { void (*preHookFunc) (bool *shutdown); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_geoip_final_pre[hIndex].func; preHookFunc(&shutdown); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5153,25 +5631,25 @@ void HP_geoip_final(bool shutdown) { { HPMHooks.source.geoip.final(shutdown); } - if( HPMHooks.count.HP_geoip_final_post ) { - void (*postHookFunc) (bool *shutdown); - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_post; hIndex++ ) { + if (HPMHooks.count.HP_geoip_final_post > 0) { + void (*postHookFunc) (bool shutdown); + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_geoip_final_post[hIndex].func; - postHookFunc(&shutdown); + postHookFunc(shutdown); } } return; } void HP_geoip_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_geoip_init_pre ) { + if (HPMHooks.count.HP_geoip_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_geoip_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5179,27 +5657,228 @@ void HP_geoip_init(void) { { HPMHooks.source.geoip.init(); } - if( HPMHooks.count.HP_geoip_init_post ) { + if (HPMHooks.count.HP_geoip_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_geoip_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_geoip_init_post[hIndex].func; postHookFunc(); } } return; } -/* inter_auction */ +/* inter_achievement_interface */ +int HP_inter_achievement_sql_init(void) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_achievement_sql_init_pre > 0) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_sql_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_achievement_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_achievement.sql_init(); + } + if (HPMHooks.count.HP_inter_achievement_sql_init_post > 0) { + int (*postHookFunc) (int retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_sql_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_achievement_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_inter_achievement_sql_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_inter_achievement_sql_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_sql_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_achievement_sql_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.inter_achievement.sql_final(); + } + if (HPMHooks.count.HP_inter_achievement_sql_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_sql_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_achievement_sql_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_inter_achievement_tosql(int char_id, struct char_achievements *cp, const struct char_achievements *p) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_achievement_tosql_pre > 0) { + int (*preHookFunc) (int *char_id, struct char_achievements **cp, const struct char_achievements **p); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_tosql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_achievement_tosql_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &cp, &p); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_achievement.tosql(char_id, cp, p); + } + if (HPMHooks.count.HP_inter_achievement_tosql_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, struct char_achievements *cp, const struct char_achievements *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_tosql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_achievement_tosql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, cp, p); + } + } + return retVal___; +} +bool HP_inter_achievement_fromsql(int char_id, struct char_achievements *a) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_achievement_fromsql_pre > 0) { + bool (*preHookFunc) (int *char_id, struct char_achievements **a); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_fromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_achievement_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &a); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_achievement.fromsql(char_id, a); + } + if (HPMHooks.count.HP_inter_achievement_fromsql_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, struct char_achievements *a); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_fromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_achievement_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, a); + } + } + return retVal___; +} +struct DBData HP_inter_achievement_ensure_char_achievements(union DBKey key, va_list args) { + int hIndex = 0; + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_inter_achievement_ensure_char_achievements_pre > 0) { + struct DBData (*preHookFunc) (union DBKey *key, va_list args); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_ensure_char_achievements_pre; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_inter_achievement_ensure_char_achievements_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.inter_achievement.ensure_char_achievements(key, args___copy); + va_end(args___copy); + } + if (HPMHooks.count.HP_inter_achievement_ensure_char_achievements_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_ensure_char_achievements_post; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_inter_achievement_ensure_char_achievements_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_inter_achievement_char_achievements_clear(union DBKey key, struct DBData *data, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_achievement_char_achievements_clear_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_char_achievements_clear_pre; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_inter_achievement_char_achievements_clear_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.inter_achievement.char_achievements_clear(key, data, args___copy); + va_end(args___copy); + } + if (HPMHooks.count.HP_inter_achievement_char_achievements_clear_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list args); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_char_achievements_clear_post; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_inter_achievement_char_achievements_clear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key, data, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_inter_achievement_parse_frommap(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_achievement_parse_frommap_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_parse_frommap_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_achievement_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_achievement.parse_frommap(fd); + } + if (HPMHooks.count.HP_inter_achievement_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_achievement_parse_frommap_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_achievement_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +/* inter_auction_interface */ int HP_inter_auction_count(int char_id, bool buy) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_count_pre ) { + if (HPMHooks.count.HP_inter_auction_count_pre > 0) { int (*preHookFunc) (int *char_id, bool *buy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_count_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &buy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5207,25 +5886,25 @@ int HP_inter_auction_count(int char_id, bool buy) { { retVal___ = HPMHooks.source.inter_auction.count(char_id, buy); } - if( HPMHooks.count.HP_inter_auction_count_post ) { - int (*postHookFunc) (int retVal___, int *char_id, bool *buy); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_auction_count_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, bool buy); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_count_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_count_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &buy); + retVal___ = postHookFunc(retVal___, char_id, buy); } } return retVal___; } void HP_inter_auction_save(struct auction_data *auction) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_save_pre ) { - void (*preHookFunc) (struct auction_data *auction); + if (HPMHooks.count.HP_inter_auction_save_pre > 0) { + void (*preHookFunc) (struct auction_data **auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_save_pre[hIndex].func; - preHookFunc(auction); + preHookFunc(&auction); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5233,9 +5912,9 @@ void HP_inter_auction_save(struct auction_data *auction) { { HPMHooks.source.inter_auction.save(auction); } - if( HPMHooks.count.HP_inter_auction_save_post ) { + if (HPMHooks.count.HP_inter_auction_save_post > 0) { void (*postHookFunc) (struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_save_post[hIndex].func; postHookFunc(auction); } @@ -5245,14 +5924,14 @@ void HP_inter_auction_save(struct auction_data *auction) { unsigned int HP_inter_auction_create(struct auction_data *auction) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_create_pre ) { - unsigned int (*preHookFunc) (struct auction_data *auction); + if (HPMHooks.count.HP_inter_auction_create_pre > 0) { + unsigned int (*preHookFunc) (struct auction_data **auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_create_pre[hIndex].func; - retVal___ = preHookFunc(auction); + retVal___ = preHookFunc(&auction); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5260,9 +5939,9 @@ unsigned int HP_inter_auction_create(struct auction_data *auction) { { retVal___ = HPMHooks.source.inter_auction.create(auction); } - if( HPMHooks.count.HP_inter_auction_create_post ) { + if (HPMHooks.count.HP_inter_auction_create_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, auction); } @@ -5272,14 +5951,14 @@ unsigned int HP_inter_auction_create(struct auction_data *auction) { int HP_inter_auction_end_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_end_timer_pre ) { + if (HPMHooks.count.HP_inter_auction_end_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_end_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5287,25 +5966,25 @@ int HP_inter_auction_end_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.inter_auction.end_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_inter_auction_end_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_auction_end_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_end_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_end_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } void HP_inter_auction_delete_(struct auction_data *auction) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_delete__pre ) { - void (*preHookFunc) (struct auction_data *auction); + if (HPMHooks.count.HP_inter_auction_delete__pre > 0) { + void (*preHookFunc) (struct auction_data **auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_delete__pre[hIndex].func; - preHookFunc(auction); + preHookFunc(&auction); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5313,9 +5992,9 @@ void HP_inter_auction_delete_(struct auction_data *auction) { { HPMHooks.source.inter_auction.delete_(auction); } - if( HPMHooks.count.HP_inter_auction_delete__post ) { + if (HPMHooks.count.HP_inter_auction_delete__post > 0) { void (*postHookFunc) (struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_delete__post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_delete__post[hIndex].func; postHookFunc(auction); } @@ -5324,14 +6003,14 @@ void HP_inter_auction_delete_(struct auction_data *auction) { } void HP_inter_auction_fromsql(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_fromsql_pre ) { + if (HPMHooks.count.HP_inter_auction_fromsql_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_fromsql_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5339,9 +6018,9 @@ void HP_inter_auction_fromsql(void) { { HPMHooks.source.inter_auction.fromsql(); } - if( HPMHooks.count.HP_inter_auction_fromsql_post ) { + if (HPMHooks.count.HP_inter_auction_fromsql_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_fromsql_post[hIndex].func; postHookFunc(); } @@ -5351,14 +6030,14 @@ void HP_inter_auction_fromsql(void) { int HP_inter_auction_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_auction_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5366,11 +6045,11 @@ int HP_inter_auction_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_auction.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_auction_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_auction_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -5378,14 +6057,14 @@ int HP_inter_auction_parse_frommap(int fd) { int HP_inter_auction_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_auction_sql_init_pre ) { + if (HPMHooks.count.HP_inter_auction_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5393,9 +6072,9 @@ int HP_inter_auction_sql_init(void) { { retVal___ = HPMHooks.source.inter_auction.sql_init(); } - if( HPMHooks.count.HP_inter_auction_sql_init_post ) { + if (HPMHooks.count.HP_inter_auction_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5404,14 +6083,14 @@ int HP_inter_auction_sql_init(void) { } void HP_inter_auction_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_auction_sql_final_pre ) { + if (HPMHooks.count.HP_inter_auction_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_auction_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5419,26 +6098,108 @@ void HP_inter_auction_sql_final(void) { { HPMHooks.source.inter_auction.sql_final(); } - if( HPMHooks.count.HP_inter_auction_sql_final_post ) { + if (HPMHooks.count.HP_inter_auction_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_auction_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_auction_sql_final_post[hIndex].func; postHookFunc(); } } return; } -/* inter_elemental */ +/* inter_clan_interface */ +int HP_inter_clan_kick_inactive_members(int clan_id, int kick_interval) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_clan_kick_inactive_members_pre > 0) { + int (*preHookFunc) (int *clan_id, int *kick_interval); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_clan_kick_inactive_members_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_clan_kick_inactive_members_pre[hIndex].func; + retVal___ = preHookFunc(&clan_id, &kick_interval); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_clan.kick_inactive_members(clan_id, kick_interval); + } + if (HPMHooks.count.HP_inter_clan_kick_inactive_members_post > 0) { + int (*postHookFunc) (int retVal___, int clan_id, int kick_interval); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_clan_kick_inactive_members_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_clan_kick_inactive_members_post[hIndex].func; + retVal___ = postHookFunc(retVal___, clan_id, kick_interval); + } + } + return retVal___; +} +int HP_inter_clan_count_members(int clan_id, int kick_interval) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_clan_count_members_pre > 0) { + int (*preHookFunc) (int *clan_id, int *kick_interval); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_clan_count_members_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_clan_count_members_pre[hIndex].func; + retVal___ = preHookFunc(&clan_id, &kick_interval); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_clan.count_members(clan_id, kick_interval); + } + if (HPMHooks.count.HP_inter_clan_count_members_post > 0) { + int (*postHookFunc) (int retVal___, int clan_id, int kick_interval); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_clan_count_members_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_clan_count_members_post[hIndex].func; + retVal___ = postHookFunc(retVal___, clan_id, kick_interval); + } + } + return retVal___; +} +int HP_inter_clan_parse_frommap(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_clan_parse_frommap_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_clan_parse_frommap_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_clan_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_clan.parse_frommap(fd); + } + if (HPMHooks.count.HP_inter_clan_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_clan_parse_frommap_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_clan_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +/* inter_elemental_interface */ void HP_inter_elemental_sql_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_elemental_sql_init_pre ) { + if (HPMHooks.count.HP_inter_elemental_sql_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_elemental_sql_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5446,9 +6207,9 @@ void HP_inter_elemental_sql_init(void) { { HPMHooks.source.inter_elemental.sql_init(); } - if( HPMHooks.count.HP_inter_elemental_sql_init_post ) { + if (HPMHooks.count.HP_inter_elemental_sql_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_elemental_sql_init_post[hIndex].func; postHookFunc(); } @@ -5457,14 +6218,14 @@ void HP_inter_elemental_sql_init(void) { } void HP_inter_elemental_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_elemental_sql_final_pre ) { + if (HPMHooks.count.HP_inter_elemental_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_elemental_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5472,9 +6233,9 @@ void HP_inter_elemental_sql_final(void) { { HPMHooks.source.inter_elemental.sql_final(); } - if( HPMHooks.count.HP_inter_elemental_sql_final_post ) { + if (HPMHooks.count.HP_inter_elemental_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_elemental_sql_final_post[hIndex].func; postHookFunc(); } @@ -5484,14 +6245,14 @@ void HP_inter_elemental_sql_final(void) { int HP_inter_elemental_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_elemental_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_elemental_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_elemental_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5499,27 +6260,135 @@ int HP_inter_elemental_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_elemental.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_elemental_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_elemental_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_elemental_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +bool HP_inter_elemental_create(struct s_elemental *ele) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_elemental_create_pre > 0) { + bool (*preHookFunc) (struct s_elemental **ele); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_elemental_create_pre[hIndex].func; + retVal___ = preHookFunc(&ele); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_elemental.create(ele); + } + if (HPMHooks.count.HP_inter_elemental_create_post > 0) { + bool (*postHookFunc) (bool retVal___, struct s_elemental *ele); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_elemental_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ele); + } + } + return retVal___; +} +bool HP_inter_elemental_save(const struct s_elemental *ele) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_elemental_save_pre > 0) { + bool (*preHookFunc) (const struct s_elemental **ele); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_save_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_elemental_save_pre[hIndex].func; + retVal___ = preHookFunc(&ele); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_elemental.save(ele); + } + if (HPMHooks.count.HP_inter_elemental_save_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct s_elemental *ele); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_save_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_elemental_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ele); + } + } + return retVal___; +} +bool HP_inter_elemental_load(int ele_id, int char_id, struct s_elemental *ele) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_elemental_load_pre > 0) { + bool (*preHookFunc) (int *ele_id, int *char_id, struct s_elemental **ele); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_load_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_elemental_load_pre[hIndex].func; + retVal___ = preHookFunc(&ele_id, &char_id, &ele); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_elemental.load(ele_id, char_id, ele); + } + if (HPMHooks.count.HP_inter_elemental_load_post > 0) { + bool (*postHookFunc) (bool retVal___, int ele_id, int char_id, struct s_elemental *ele); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_load_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_elemental_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ele_id, char_id, ele); + } + } + return retVal___; +} +bool HP_inter_elemental_delete(int ele_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_elemental_delete_pre > 0) { + bool (*preHookFunc) (int *ele_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_delete_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_elemental_delete_pre[hIndex].func; + retVal___ = preHookFunc(&ele_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_elemental.delete(ele_id); + } + if (HPMHooks.count.HP_inter_elemental_delete_post > 0) { + bool (*postHookFunc) (bool retVal___, int ele_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_elemental_delete_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_elemental_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ele_id); } } return retVal___; } -/* inter_guild */ +/* inter_guild_interface */ int HP_inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_save_timer_pre ) { + if (HPMHooks.count.HP_inter_guild_save_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_save_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5527,11 +6396,11 @@ int HP_inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.inter_guild.save_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_inter_guild_save_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_save_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_save_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_save_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -5539,14 +6408,14 @@ int HP_inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data) { int HP_inter_guild_removemember_tosql(int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_removemember_tosql_pre ) { + if (HPMHooks.count.HP_inter_guild_removemember_tosql_pre > 0) { int (*preHookFunc) (int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_removemember_tosql_pre[hIndex].func; retVal___ = preHookFunc(&account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5554,11 +6423,11 @@ int HP_inter_guild_removemember_tosql(int account_id, int char_id) { { retVal___ = HPMHooks.source.inter_guild.removemember_tosql(account_id, char_id); } - if( HPMHooks.count.HP_inter_guild_removemember_tosql_post ) { - int (*postHookFunc) (int retVal___, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_removemember_tosql_post > 0) { + int (*postHookFunc) (int retVal___, int account_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_removemember_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_removemember_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id, &char_id); + retVal___ = postHookFunc(retVal___, account_id, char_id); } } return retVal___; @@ -5566,14 +6435,14 @@ int HP_inter_guild_removemember_tosql(int account_id, int char_id) { int HP_inter_guild_tosql(struct guild *g, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_tosql_pre ) { - int (*preHookFunc) (struct guild *g, int *flag); + if (HPMHooks.count.HP_inter_guild_tosql_pre > 0) { + int (*preHookFunc) (struct guild **g, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_tosql_pre[hIndex].func; - retVal___ = preHookFunc(g, &flag); + retVal___ = preHookFunc(&g, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5581,11 +6450,11 @@ int HP_inter_guild_tosql(struct guild *g, int flag) { { retVal___ = HPMHooks.source.inter_guild.tosql(g, flag); } - if( HPMHooks.count.HP_inter_guild_tosql_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_tosql_post > 0) { + int (*postHookFunc) (int retVal___, struct guild *g, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &flag); + retVal___ = postHookFunc(retVal___, g, flag); } } return retVal___; @@ -5593,14 +6462,14 @@ int HP_inter_guild_tosql(struct guild *g, int flag) { struct guild* HP_inter_guild_fromsql(int guild_id) { int hIndex = 0; struct guild* retVal___ = NULL; - if( HPMHooks.count.HP_inter_guild_fromsql_pre ) { + if (HPMHooks.count.HP_inter_guild_fromsql_pre > 0) { struct guild* (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5608,11 +6477,11 @@ struct guild* HP_inter_guild_fromsql(int guild_id) { { retVal___ = HPMHooks.source.inter_guild.fromsql(guild_id); } - if( HPMHooks.count.HP_inter_guild_fromsql_post ) { - struct guild* (*postHookFunc) (struct guild* retVal___, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_fromsql_post > 0) { + struct guild* (*postHookFunc) (struct guild* retVal___, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id); + retVal___ = postHookFunc(retVal___, guild_id); } } return retVal___; @@ -5620,14 +6489,14 @@ struct guild* HP_inter_guild_fromsql(int guild_id) { int HP_inter_guild_castle_tosql(struct guild_castle *gc) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_castle_tosql_pre ) { - int (*preHookFunc) (struct guild_castle *gc); + if (HPMHooks.count.HP_inter_guild_castle_tosql_pre > 0) { + int (*preHookFunc) (struct guild_castle **gc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_castle_tosql_pre[hIndex].func; - retVal___ = preHookFunc(gc); + retVal___ = preHookFunc(&gc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5635,9 +6504,9 @@ int HP_inter_guild_castle_tosql(struct guild_castle *gc) { { retVal___ = HPMHooks.source.inter_guild.castle_tosql(gc); } - if( HPMHooks.count.HP_inter_guild_castle_tosql_post ) { + if (HPMHooks.count.HP_inter_guild_castle_tosql_post > 0) { int (*postHookFunc) (int retVal___, struct guild_castle *gc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_castle_tosql_post[hIndex].func; retVal___ = postHookFunc(retVal___, gc); } @@ -5647,14 +6516,14 @@ int HP_inter_guild_castle_tosql(struct guild_castle *gc) { struct guild_castle* HP_inter_guild_castle_fromsql(int castle_id) { int hIndex = 0; struct guild_castle* retVal___ = NULL; - if( HPMHooks.count.HP_inter_guild_castle_fromsql_pre ) { + if (HPMHooks.count.HP_inter_guild_castle_fromsql_pre > 0) { struct guild_castle* (*preHookFunc) (int *castle_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_castle_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&castle_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5662,11 +6531,11 @@ struct guild_castle* HP_inter_guild_castle_fromsql(int castle_id) { { retVal___ = HPMHooks.source.inter_guild.castle_fromsql(castle_id); } - if( HPMHooks.count.HP_inter_guild_castle_fromsql_post ) { - struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, int *castle_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_castle_fromsql_post > 0) { + struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, int castle_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_castle_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_castle_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &castle_id); + retVal___ = postHookFunc(retVal___, castle_id); } } return retVal___; @@ -5674,14 +6543,14 @@ struct guild_castle* HP_inter_guild_castle_fromsql(int castle_id) { bool HP_inter_guild_exp_parse_row(char *split[], int column, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_guild_exp_parse_row_pre ) { - bool (*preHookFunc) (char *split[], int *column, int *current); + if (HPMHooks.count.HP_inter_guild_exp_parse_row_pre > 0) { + bool (*preHookFunc) (char **split[], int *column, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_exp_parse_row_pre[hIndex].func; - retVal___ = preHookFunc(split, &column, ¤t); + retVal___ = preHookFunc(&split, &column, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5689,11 +6558,11 @@ bool HP_inter_guild_exp_parse_row(char *split[], int column, int current) { { retVal___ = HPMHooks.source.inter_guild.exp_parse_row(split, column, current); } - if( HPMHooks.count.HP_inter_guild_exp_parse_row_post ) { - bool (*postHookFunc) (bool retVal___, char *split[], int *column, int *current); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_exp_parse_row_post > 0) { + bool (*postHookFunc) (bool retVal___, char *split[], int column, int current); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_exp_parse_row_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_exp_parse_row_post[hIndex].func; - retVal___ = postHookFunc(retVal___, split, &column, ¤t); + retVal___ = postHookFunc(retVal___, split, column, current); } } return retVal___; @@ -5701,14 +6570,14 @@ bool HP_inter_guild_exp_parse_row(char *split[], int column, int current) { int HP_inter_guild_CharOnline(int char_id, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_CharOnline_pre ) { + if (HPMHooks.count.HP_inter_guild_CharOnline_pre > 0) { int (*preHookFunc) (int *char_id, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_CharOnline_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5716,11 +6585,11 @@ int HP_inter_guild_CharOnline(int char_id, int guild_id) { { retVal___ = HPMHooks.source.inter_guild.CharOnline(char_id, guild_id); } - if( HPMHooks.count.HP_inter_guild_CharOnline_post ) { - int (*postHookFunc) (int retVal___, int *char_id, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_CharOnline_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOnline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_CharOnline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &guild_id); + retVal___ = postHookFunc(retVal___, char_id, guild_id); } } return retVal___; @@ -5728,14 +6597,14 @@ int HP_inter_guild_CharOnline(int char_id, int guild_id) { int HP_inter_guild_CharOffline(int char_id, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_CharOffline_pre ) { + if (HPMHooks.count.HP_inter_guild_CharOffline_pre > 0) { int (*preHookFunc) (int *char_id, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_CharOffline_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5743,11 +6612,11 @@ int HP_inter_guild_CharOffline(int char_id, int guild_id) { { retVal___ = HPMHooks.source.inter_guild.CharOffline(char_id, guild_id); } - if( HPMHooks.count.HP_inter_guild_CharOffline_post ) { - int (*postHookFunc) (int retVal___, int *char_id, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_CharOffline_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_CharOffline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_CharOffline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &guild_id); + retVal___ = postHookFunc(retVal___, char_id, guild_id); } } return retVal___; @@ -5755,14 +6624,14 @@ int HP_inter_guild_CharOffline(int char_id, int guild_id) { int HP_inter_guild_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_sql_init_pre ) { + if (HPMHooks.count.HP_inter_guild_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5770,9 +6639,9 @@ int HP_inter_guild_sql_init(void) { { retVal___ = HPMHooks.source.inter_guild.sql_init(); } - if( HPMHooks.count.HP_inter_guild_sql_init_post ) { + if (HPMHooks.count.HP_inter_guild_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5782,16 +6651,16 @@ int HP_inter_guild_sql_init(void) { int HP_inter_guild_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_db_final_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_inter_guild_db_final_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_inter_guild_db_final_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5801,12 +6670,12 @@ int HP_inter_guild_db_final(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.inter_guild.db_final(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_inter_guild_db_final_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_db_final_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_db_final_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_inter_guild_db_final_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -5814,14 +6683,14 @@ int HP_inter_guild_db_final(union DBKey key, struct DBData *data, va_list ap) { } void HP_inter_guild_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_guild_sql_final_pre ) { + if (HPMHooks.count.HP_inter_guild_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5829,9 +6698,9 @@ void HP_inter_guild_sql_final(void) { { HPMHooks.source.inter_guild.sql_final(); } - if( HPMHooks.count.HP_inter_guild_sql_final_post ) { + if (HPMHooks.count.HP_inter_guild_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_sql_final_post[hIndex].func; postHookFunc(); } @@ -5841,14 +6710,14 @@ void HP_inter_guild_sql_final(void) { int HP_inter_guild_search_guildname(const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_search_guildname_pre ) { - int (*preHookFunc) (const char *str); + if (HPMHooks.count.HP_inter_guild_search_guildname_pre > 0) { + int (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_search_guildname_pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5856,9 +6725,9 @@ int HP_inter_guild_search_guildname(const char *str) { { retVal___ = HPMHooks.source.inter_guild.search_guildname(str); } - if( HPMHooks.count.HP_inter_guild_search_guildname_post ) { + if (HPMHooks.count.HP_inter_guild_search_guildname_post > 0) { int (*postHookFunc) (int retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_search_guildname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_search_guildname_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -5868,14 +6737,14 @@ int HP_inter_guild_search_guildname(const char *str) { bool HP_inter_guild_check_empty(struct guild *g) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_guild_check_empty_pre ) { - bool (*preHookFunc) (struct guild *g); + if (HPMHooks.count.HP_inter_guild_check_empty_pre > 0) { + bool (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_check_empty_pre[hIndex].func; - retVal___ = preHookFunc(g); + retVal___ = preHookFunc(&g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5883,9 +6752,9 @@ bool HP_inter_guild_check_empty(struct guild *g) { { retVal___ = HPMHooks.source.inter_guild.check_empty(g); } - if( HPMHooks.count.HP_inter_guild_check_empty_post ) { + if (HPMHooks.count.HP_inter_guild_check_empty_post > 0) { bool (*postHookFunc) (bool retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_check_empty_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_check_empty_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -5895,14 +6764,14 @@ bool HP_inter_guild_check_empty(struct guild *g) { unsigned int HP_inter_guild_nextexp(int level) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_nextexp_pre ) { + if (HPMHooks.count.HP_inter_guild_nextexp_pre > 0) { unsigned int (*preHookFunc) (int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_nextexp_pre[hIndex].func; retVal___ = preHookFunc(&level); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5910,11 +6779,11 @@ unsigned int HP_inter_guild_nextexp(int level) { { retVal___ = HPMHooks.source.inter_guild.nextexp(level); } - if( HPMHooks.count.HP_inter_guild_nextexp_post ) { - unsigned int (*postHookFunc) (unsigned int retVal___, int *level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_nextexp_post > 0) { + unsigned int (*postHookFunc) (unsigned int retVal___, int level); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_nextexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_nextexp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &level); + retVal___ = postHookFunc(retVal___, level); } } return retVal___; @@ -5922,14 +6791,14 @@ unsigned int HP_inter_guild_nextexp(int level) { int HP_inter_guild_checkskill(struct guild *g, int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_checkskill_pre ) { - int (*preHookFunc) (struct guild *g, int *id); + if (HPMHooks.count.HP_inter_guild_checkskill_pre > 0) { + int (*preHookFunc) (struct guild **g, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_checkskill_pre[hIndex].func; - retVal___ = preHookFunc(g, &id); + retVal___ = preHookFunc(&g, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5937,11 +6806,11 @@ int HP_inter_guild_checkskill(struct guild *g, int id) { { retVal___ = HPMHooks.source.inter_guild.checkskill(g, id); } - if( HPMHooks.count.HP_inter_guild_checkskill_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_checkskill_post > 0) { + int (*postHookFunc) (int retVal___, struct guild *g, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_checkskill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_checkskill_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &id); + retVal___ = postHookFunc(retVal___, g, id); } } return retVal___; @@ -5949,14 +6818,14 @@ int HP_inter_guild_checkskill(struct guild *g, int id) { int HP_inter_guild_calcinfo(struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_calcinfo_pre ) { - int (*preHookFunc) (struct guild *g); + if (HPMHooks.count.HP_inter_guild_calcinfo_pre > 0) { + int (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_calcinfo_pre[hIndex].func; - retVal___ = preHookFunc(g); + retVal___ = preHookFunc(&g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5964,9 +6833,9 @@ int HP_inter_guild_calcinfo(struct guild *g) { { retVal___ = HPMHooks.source.inter_guild.calcinfo(g); } - if( HPMHooks.count.HP_inter_guild_calcinfo_post ) { + if (HPMHooks.count.HP_inter_guild_calcinfo_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_calcinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_calcinfo_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -5976,14 +6845,14 @@ int HP_inter_guild_calcinfo(struct guild *g) { int HP_inter_guild_sex_changed(int guild_id, int account_id, int char_id, short gender) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_sex_changed_pre ) { + if (HPMHooks.count.HP_inter_guild_sex_changed_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, short *gender); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_sex_changed_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &gender); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5991,11 +6860,11 @@ int HP_inter_guild_sex_changed(int guild_id, int account_id, int char_id, short { retVal___ = HPMHooks.source.inter_guild.sex_changed(guild_id, account_id, char_id, gender); } - if( HPMHooks.count.HP_inter_guild_sex_changed_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, short *gender); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_sex_changed_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, short gender); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_sex_changed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_sex_changed_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &gender); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, gender); } } return retVal___; @@ -6003,14 +6872,14 @@ int HP_inter_guild_sex_changed(int guild_id, int account_id, int char_id, short int HP_inter_guild_charname_changed(int guild_id, int account_id, int char_id, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_charname_changed_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, char *name); + if (HPMHooks.count.HP_inter_guild_charname_changed_pre > 0) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_charname_changed_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id, name); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6018,11 +6887,11 @@ int HP_inter_guild_charname_changed(int guild_id, int account_id, int char_id, c { retVal___ = HPMHooks.source.inter_guild.charname_changed(guild_id, account_id, char_id, name); } - if( HPMHooks.count.HP_inter_guild_charname_changed_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_charname_changed_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_charname_changed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_charname_changed_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, name); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, name); } } return retVal___; @@ -6030,14 +6899,14 @@ int HP_inter_guild_charname_changed(int guild_id, int account_id, int char_id, c int HP_inter_guild_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_guild_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6045,81 +6914,459 @@ int HP_inter_guild_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_guild.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_guild_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -int HP_inter_guild_leave(int guild_id, int account_id, int char_id) { +int HP_inter_guild_broken(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_leave_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id); + if (HPMHooks.count.HP_inter_guild_broken_pre > 0) { + int (*preHookFunc) (int *guild_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_broken_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.broken(guild_id); + } + if (HPMHooks.count.HP_inter_guild_broken_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_broken_post[hIndex].func; + retVal___ = postHookFunc(retVal___, guild_id); + } + } + return retVal___; +} +struct guild* HP_inter_guild_create(const char *name, const struct guild_member *master) { + int hIndex = 0; + struct guild* retVal___ = NULL; + if (HPMHooks.count.HP_inter_guild_create_pre > 0) { + struct guild* (*preHookFunc) (const char **name, const struct guild_member **master); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_create_pre[hIndex].func; + retVal___ = preHookFunc(&name, &master); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.create(name, master); + } + if (HPMHooks.count.HP_inter_guild_create_post > 0) { + struct guild* (*postHookFunc) (struct guild* retVal___, const char *name, const struct guild_member *master); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, master); + } + } + return retVal___; +} +bool HP_inter_guild_add_member(int guild_id, const struct guild_member *member, int map_fd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_add_member_pre > 0) { + bool (*preHookFunc) (int *guild_id, const struct guild_member **member, int *map_fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_add_member_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_add_member_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &member, &map_fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.add_member(guild_id, member, map_fd); + } + if (HPMHooks.count.HP_inter_guild_add_member_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id, const struct guild_member *member, int map_fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_add_member_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_add_member_post[hIndex].func; + retVal___ = postHookFunc(retVal___, guild_id, member, map_fd); + } + } + return retVal___; +} +bool HP_inter_guild_leave(int guild_id, int account_id, int char_id, int flag, const char *mes, int map_fd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_leave_pre > 0) { + bool (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes, int *map_fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_leave_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, &mes, &map_fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.inter_guild.leave(guild_id, account_id, char_id); + retVal___ = HPMHooks.source.inter_guild.leave(guild_id, account_id, char_id, flag, mes, map_fd); } - if( HPMHooks.count.HP_inter_guild_leave_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_guild_leave_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes, int map_fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_leave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, flag, mes, map_fd); } } return retVal___; } -int HP_inter_guild_broken(int guild_id) { +bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int class) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_guild_broken_pre ) { - int (*preHookFunc) (int *guild_id); + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_update_member_info_short_pre > 0) { + bool (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_guild_broken_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_member_info_short_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_short_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.inter_guild.update_member_info_short(guild_id, account_id, char_id, online, lv, class); + } + if (HPMHooks.count.HP_inter_guild_update_member_info_short_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_member_info_short_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_short_post[hIndex].func; + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class); + } + } + return retVal___; +} +bool HP_inter_guild_update_member_info(int guild_id, int account_id, int char_id, int type, const char *data, int len) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_update_member_info_pre > 0) { + bool (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_member_info_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_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.inter_guild.update_member_info(guild_id, account_id, char_id, type, data, len); + } + if (HPMHooks.count.HP_inter_guild_update_member_info_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id, int account_id, int char_id, int type, const char *data, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_member_info_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, type, data, len); + } + } + return retVal___; +} +bool HP_inter_guild_disband(int guild_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_disband_pre > 0) { + bool (*preHookFunc) (int *guild_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_disband_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_disband_pre[hIndex].func; retVal___ = preHookFunc(&guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.inter_guild.broken(guild_id); + retVal___ = HPMHooks.source.inter_guild.disband(guild_id); } - if( HPMHooks.count.HP_inter_guild_broken_post ) { - int (*postHookFunc) (int retVal___, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_broken_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_guild_broken_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id); + if (HPMHooks.count.HP_inter_guild_disband_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_disband_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_disband_post[hIndex].func; + retVal___ = postHookFunc(retVal___, guild_id); + } + } + return retVal___; +} +bool HP_inter_guild_update_basic_info(int guild_id, int type, const void *data, int len) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_update_basic_info_pre > 0) { + bool (*preHookFunc) (int *guild_id, int *type, const void **data, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_basic_info_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_update_basic_info_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &type, &data, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.update_basic_info(guild_id, type, data, len); + } + if (HPMHooks.count.HP_inter_guild_update_basic_info_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id, int type, const void *data, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_basic_info_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_update_basic_info_post[hIndex].func; + retVal___ = postHookFunc(retVal___, guild_id, type, data, len); + } + } + return retVal___; +} +bool HP_inter_guild_update_position(int guild_id, int idx, const struct guild_position *p) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_update_position_pre > 0) { + bool (*preHookFunc) (int *guild_id, int *idx, const struct guild_position **p); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_position_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_update_position_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &idx, &p); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.update_position(guild_id, idx, p); + } + if (HPMHooks.count.HP_inter_guild_update_position_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id, int idx, const struct guild_position *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_position_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_update_position_post[hIndex].func; + retVal___ = postHookFunc(retVal___, guild_id, idx, p); + } + } + return retVal___; +} +bool HP_inter_guild_use_skill_point(int guild_id, uint16 skill_id, int account_id, int max) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_use_skill_point_pre > 0) { + bool (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id, int *max); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_use_skill_point_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_use_skill_point_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &skill_id, &account_id, &max); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.use_skill_point(guild_id, skill_id, account_id, max); + } + if (HPMHooks.count.HP_inter_guild_use_skill_point_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id, uint16 skill_id, int account_id, int max); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_use_skill_point_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_use_skill_point_post[hIndex].func; + retVal___ = postHookFunc(retVal___, guild_id, skill_id, account_id, max); + } + } + return retVal___; +} +bool HP_inter_guild_remove_alliance(struct guild *g, int guild_id, int account_id1, int account_id2, int flag) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_remove_alliance_pre > 0) { + bool (*preHookFunc) (struct guild **g, int *guild_id, int *account_id1, int *account_id2, int *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_remove_alliance_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_remove_alliance_pre[hIndex].func; + retVal___ = preHookFunc(&g, &guild_id, &account_id1, &account_id2, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.remove_alliance(g, guild_id, account_id1, account_id2, flag); + } + if (HPMHooks.count.HP_inter_guild_remove_alliance_post > 0) { + bool (*postHookFunc) (bool retVal___, struct guild *g, int guild_id, int account_id1, int account_id2, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_remove_alliance_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_remove_alliance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, g, guild_id, account_id1, account_id2, flag); + } + } + return retVal___; +} +bool HP_inter_guild_change_alliance(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_change_alliance_pre > 0) { + bool (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_change_alliance_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_change_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.inter_guild.change_alliance(guild_id1, guild_id2, account_id1, account_id2, flag); + } + if (HPMHooks.count.HP_inter_guild_change_alliance_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_change_alliance_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_change_alliance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, guild_id1, guild_id2, account_id1, account_id2, flag); + } + } + return retVal___; +} +bool HP_inter_guild_update_notice(int guild_id, const char *mes1, const char *mes2) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_update_notice_pre > 0) { + bool (*preHookFunc) (int *guild_id, const char **mes1, const char **mes2); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_notice_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_update_notice_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &mes1, &mes2); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.update_notice(guild_id, mes1, mes2); + } + if (HPMHooks.count.HP_inter_guild_update_notice_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id, const char *mes1, const char *mes2); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_notice_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_update_notice_post[hIndex].func; + retVal___ = postHookFunc(retVal___, guild_id, mes1, mes2); + } + } + return retVal___; +} +bool HP_inter_guild_update_emblem(int len, int guild_id, const char *data) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_update_emblem_pre > 0) { + bool (*preHookFunc) (int *len, int *guild_id, const char **data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_emblem_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_update_emblem_pre[hIndex].func; + retVal___ = preHookFunc(&len, &guild_id, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.update_emblem(len, guild_id, data); + } + if (HPMHooks.count.HP_inter_guild_update_emblem_post > 0) { + bool (*postHookFunc) (bool retVal___, int len, int guild_id, const char *data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_emblem_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_update_emblem_post[hIndex].func; + retVal___ = postHookFunc(retVal___, len, guild_id, data); + } + } + return retVal___; +} +bool HP_inter_guild_update_castle_data(int castle_id, int index, int value) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_update_castle_data_pre > 0) { + bool (*preHookFunc) (int *castle_id, int *index, int *value); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_castle_data_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_update_castle_data_pre[hIndex].func; + retVal___ = preHookFunc(&castle_id, &index, &value); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.update_castle_data(castle_id, index, value); + } + if (HPMHooks.count.HP_inter_guild_update_castle_data_post > 0) { + bool (*postHookFunc) (bool retVal___, int castle_id, int index, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_castle_data_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_update_castle_data_post[hIndex].func; + retVal___ = postHookFunc(retVal___, castle_id, index, value); + } + } + return retVal___; +} +bool HP_inter_guild_change_leader(int guild_id, const char *name, int len) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_guild_change_leader_pre > 0) { + bool (*preHookFunc) (int *guild_id, const char **name, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_change_leader_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_guild_change_leader_pre[hIndex].func; + retVal___ = preHookFunc(&guild_id, &name, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_guild.change_leader(guild_id, name, len); + } + if (HPMHooks.count.HP_inter_guild_change_leader_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id, const char *name, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_change_leader_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_guild_change_leader_post[hIndex].func; + retVal___ = postHookFunc(retVal___, guild_id, name, len); } } return retVal___; } -/* inter_homunculus */ +/* inter_homunculus_interface */ int HP_inter_homunculus_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_homunculus_sql_init_pre ) { + if (HPMHooks.count.HP_inter_homunculus_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_homunculus_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6127,9 +7374,9 @@ int HP_inter_homunculus_sql_init(void) { { retVal___ = HPMHooks.source.inter_homunculus.sql_init(); } - if( HPMHooks.count.HP_inter_homunculus_sql_init_post ) { + if (HPMHooks.count.HP_inter_homunculus_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_homunculus_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -6138,14 +7385,14 @@ int HP_inter_homunculus_sql_init(void) { } void HP_inter_homunculus_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_homunculus_sql_final_pre ) { + if (HPMHooks.count.HP_inter_homunculus_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_homunculus_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6153,9 +7400,9 @@ void HP_inter_homunculus_sql_final(void) { { HPMHooks.source.inter_homunculus.sql_final(); } - if( HPMHooks.count.HP_inter_homunculus_sql_final_post ) { + if (HPMHooks.count.HP_inter_homunculus_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_homunculus_sql_final_post[hIndex].func; postHookFunc(); } @@ -6165,14 +7412,14 @@ void HP_inter_homunculus_sql_final(void) { int HP_inter_homunculus_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_homunculus_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_homunculus_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_homunculus_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6180,27 +7427,162 @@ int HP_inter_homunculus_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_homunculus.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_homunculus_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_homunculus_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_homunculus_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +bool HP_inter_homunculus_create(struct s_homunculus *hd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_homunculus_create_pre > 0) { + bool (*preHookFunc) (struct s_homunculus **hd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_homunculus_create_pre[hIndex].func; + retVal___ = preHookFunc(&hd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_homunculus.create(hd); + } + if (HPMHooks.count.HP_inter_homunculus_create_post > 0) { + bool (*postHookFunc) (bool retVal___, struct s_homunculus *hd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_homunculus_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd); + } + } + return retVal___; +} +bool HP_inter_homunculus_save(const struct s_homunculus *hd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_homunculus_save_pre > 0) { + bool (*preHookFunc) (const struct s_homunculus **hd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_save_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_homunculus_save_pre[hIndex].func; + retVal___ = preHookFunc(&hd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_homunculus.save(hd); + } + if (HPMHooks.count.HP_inter_homunculus_save_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct s_homunculus *hd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_save_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_homunculus_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd); + } + } + return retVal___; +} +bool HP_inter_homunculus_load(int homun_id, struct s_homunculus *hd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_homunculus_load_pre > 0) { + bool (*preHookFunc) (int *homun_id, struct s_homunculus **hd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_load_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_homunculus_load_pre[hIndex].func; + retVal___ = preHookFunc(&homun_id, &hd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_homunculus.load(homun_id, hd); + } + if (HPMHooks.count.HP_inter_homunculus_load_post > 0) { + bool (*postHookFunc) (bool retVal___, int homun_id, struct s_homunculus *hd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_load_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_homunculus_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, homun_id, hd); + } + } + return retVal___; +} +bool HP_inter_homunculus_delete(int homun_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_homunculus_delete_pre > 0) { + bool (*preHookFunc) (int *homun_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_delete_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_homunculus_delete_pre[hIndex].func; + retVal___ = preHookFunc(&homun_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_homunculus.delete(homun_id); + } + if (HPMHooks.count.HP_inter_homunculus_delete_post > 0) { + bool (*postHookFunc) (bool retVal___, int homun_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_delete_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_homunculus_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, homun_id); + } + } + return retVal___; +} +bool HP_inter_homunculus_rename(const char *name) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_homunculus_rename_pre > 0) { + bool (*preHookFunc) (const char **name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_rename_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_homunculus_rename_pre[hIndex].func; + retVal___ = preHookFunc(&name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_homunculus.rename(name); + } + if (HPMHooks.count.HP_inter_homunculus_rename_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_homunculus_rename_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_homunculus_rename_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); } } return retVal___; } -/* inter */ +/* inter_interface */ const char* HP_inter_msg_txt(int msg_number) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_inter_msg_txt_pre ) { + if (HPMHooks.count.HP_inter_msg_txt_pre > 0) { const char* (*preHookFunc) (int *msg_number); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_msg_txt_pre[hIndex].func; retVal___ = preHookFunc(&msg_number); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6208,11 +7590,11 @@ const char* HP_inter_msg_txt(int msg_number) { { retVal___ = HPMHooks.source.inter.msg_txt(msg_number); } - if( HPMHooks.count.HP_inter_msg_txt_post ) { - const char* (*postHookFunc) (const char* retVal___, int *msg_number); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_msg_txt_post > 0) { + const char* (*postHookFunc) (const char* retVal___, int msg_number); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_txt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_msg_txt_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &msg_number); + retVal___ = postHookFunc(retVal___, msg_number); } } return retVal___; @@ -6220,14 +7602,14 @@ const char* HP_inter_msg_txt(int msg_number) { bool HP_inter_msg_config_read(const char *cfg_name, bool allow_override) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_msg_config_read_pre ) { - bool (*preHookFunc) (const char *cfg_name, bool *allow_override); + if (HPMHooks.count.HP_inter_msg_config_read_pre > 0) { + bool (*preHookFunc) (const char **cfg_name, bool *allow_override); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_msg_config_read_pre[hIndex].func; - retVal___ = preHookFunc(cfg_name, &allow_override); + retVal___ = preHookFunc(&cfg_name, &allow_override); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6235,25 +7617,25 @@ bool HP_inter_msg_config_read(const char *cfg_name, bool allow_override) { { retVal___ = HPMHooks.source.inter.msg_config_read(cfg_name, allow_override); } - if( HPMHooks.count.HP_inter_msg_config_read_post ) { - bool (*postHookFunc) (bool retVal___, const char *cfg_name, bool *allow_override); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_msg_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *cfg_name, bool allow_override); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_msg_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_msg_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cfg_name, &allow_override); + retVal___ = postHookFunc(retVal___, cfg_name, allow_override); } } return retVal___; } void HP_inter_do_final_msg(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_do_final_msg_pre ) { + if (HPMHooks.count.HP_inter_do_final_msg_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_do_final_msg_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6261,54 +7643,54 @@ void HP_inter_do_final_msg(void) { { HPMHooks.source.inter.do_final_msg(); } - if( HPMHooks.count.HP_inter_do_final_msg_post ) { + if (HPMHooks.count.HP_inter_do_final_msg_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_do_final_msg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_do_final_msg_post[hIndex].func; postHookFunc(); } } return; } -const char* HP_inter_job_name(int class_) { +const char* HP_inter_job_name(int class) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_inter_job_name_pre ) { - const char* (*preHookFunc) (int *class_); + if (HPMHooks.count.HP_inter_job_name_pre > 0) { + const char* (*preHookFunc) (int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_job_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_job_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_job_name_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + retVal___ = preHookFunc(&class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.inter.job_name(class_); + retVal___ = HPMHooks.source.inter.job_name(class); } - if( HPMHooks.count.HP_inter_job_name_post ) { - const char* (*postHookFunc) (const char* retVal___, int *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_job_name_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_job_name_post > 0) { + const char* (*postHookFunc) (const char* retVal___, int class); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_job_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_job_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &class_); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; } void HP_inter_vmsg_to_fd(int fd, int u_fd, int aid, char *msg, va_list ap) { int hIndex = 0; - if( HPMHooks.count.HP_inter_vmsg_to_fd_pre ) { - void (*preHookFunc) (int *fd, int *u_fd, int *aid, char *msg, va_list ap); + if (HPMHooks.count.HP_inter_vmsg_to_fd_pre > 0) { + void (*preHookFunc) (int *fd, int *u_fd, int *aid, char **msg, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_inter_vmsg_to_fd_pre[hIndex].func; - preHookFunc(&fd, &u_fd, &aid, msg, ap___copy); + preHookFunc(&fd, &u_fd, &aid, &msg, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6318,12 +7700,12 @@ void HP_inter_vmsg_to_fd(int fd, int u_fd, int aid, char *msg, va_list ap) { HPMHooks.source.inter.vmsg_to_fd(fd, u_fd, aid, msg, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_inter_vmsg_to_fd_post ) { - void (*postHookFunc) (int *fd, int *u_fd, int *aid, char *msg, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_vmsg_to_fd_post > 0) { + void (*postHookFunc) (int fd, int u_fd, int aid, char *msg, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_vmsg_to_fd_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_inter_vmsg_to_fd_post[hIndex].func; - postHookFunc(&fd, &u_fd, &aid, msg, ap___copy); + postHookFunc(fd, u_fd, aid, msg, ap___copy); va_end(ap___copy); } } @@ -6331,14 +7713,14 @@ void HP_inter_vmsg_to_fd(int fd, int u_fd, int aid, char *msg, va_list ap) { } void HP_inter_savereg(int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string) { int hIndex = 0; - if( HPMHooks.count.HP_inter_savereg_pre ) { - void (*preHookFunc) (int *account_id, int *char_id, const char *key, unsigned int *index, intptr_t *val, bool *is_string); + if (HPMHooks.count.HP_inter_savereg_pre > 0) { + void (*preHookFunc) (int *account_id, int *char_id, const char **key, unsigned int *index, intptr_t *val, bool *is_string); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_savereg_pre[hIndex].func; - preHookFunc(&account_id, &char_id, key, &index, &val, &is_string); + preHookFunc(&account_id, &char_id, &key, &index, &val, &is_string); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6346,11 +7728,11 @@ void HP_inter_savereg(int account_id, int char_id, const char *key, unsigned int { HPMHooks.source.inter.savereg(account_id, char_id, key, index, val, is_string); } - if( HPMHooks.count.HP_inter_savereg_post ) { - void (*postHookFunc) (int *account_id, int *char_id, const char *key, unsigned int *index, intptr_t *val, bool *is_string); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_savereg_post > 0) { + void (*postHookFunc) (int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_savereg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_savereg_post[hIndex].func; - postHookFunc(&account_id, &char_id, key, &index, &val, &is_string); + postHookFunc(account_id, char_id, key, index, val, is_string); } } return; @@ -6358,14 +7740,14 @@ void HP_inter_savereg(int account_id, int char_id, const char *key, unsigned int int HP_inter_accreg_fromsql(int account_id, int char_id, int fd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_accreg_fromsql_pre ) { + if (HPMHooks.count.HP_inter_accreg_fromsql_pre > 0) { int (*preHookFunc) (int *account_id, int *char_id, int *fd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_accreg_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&account_id, &char_id, &fd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6373,38 +7755,11 @@ int HP_inter_accreg_fromsql(int account_id, int char_id, int fd, int type) { { retVal___ = HPMHooks.source.inter.accreg_fromsql(account_id, char_id, fd, type); } - if( HPMHooks.count.HP_inter_accreg_fromsql_post ) { - int (*postHookFunc) (int retVal___, int *account_id, int *char_id, int *fd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_accreg_fromsql_post > 0) { + int (*postHookFunc) (int retVal___, int account_id, int char_id, int fd, int type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_accreg_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_accreg_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id, &char_id, &fd, &type); - } - } - return retVal___; -} -int HP_inter_config_read(const char *cfgName) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_config_read_pre ) { - int (*preHookFunc) (const char *cfgName); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_config_read_pre[hIndex].func; - retVal___ = preHookFunc(cfgName); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.inter.config_read(cfgName); - } - if( HPMHooks.count.HP_inter_config_read_post ) { - int (*postHookFunc) (int retVal___, const char *cfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cfgName); + retVal___ = postHookFunc(retVal___, account_id, char_id, fd, type); } } return retVal___; @@ -6412,16 +7767,16 @@ int HP_inter_config_read(const char *cfgName) { int HP_inter_vlog(char *fmt, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_vlog_pre ) { - int (*preHookFunc) (char *fmt, va_list ap); + if (HPMHooks.count.HP_inter_vlog_pre > 0) { + int (*preHookFunc) (char **fmt, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_inter_vlog_pre[hIndex].func; - retVal___ = preHookFunc(fmt, ap___copy); + retVal___ = preHookFunc(&fmt, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6431,9 +7786,9 @@ int HP_inter_vlog(char *fmt, va_list ap) { retVal___ = HPMHooks.source.inter.vlog(fmt, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_inter_vlog_post ) { + if (HPMHooks.count.HP_inter_vlog_post > 0) { int (*postHookFunc) (int retVal___, char *fmt, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_vlog_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_inter_vlog_post[hIndex].func; retVal___ = postHookFunc(retVal___, fmt, ap___copy); @@ -6445,14 +7800,14 @@ int HP_inter_vlog(char *fmt, va_list ap) { int HP_inter_init_sql(const char *file) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_init_sql_pre ) { - int (*preHookFunc) (const char *file); + if (HPMHooks.count.HP_inter_init_sql_pre > 0) { + int (*preHookFunc) (const char **file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_init_sql_pre[hIndex].func; - retVal___ = preHookFunc(file); + retVal___ = preHookFunc(&file); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6460,9 +7815,9 @@ int HP_inter_init_sql(const char *file) { { retVal___ = HPMHooks.source.inter.init_sql(file); } - if( HPMHooks.count.HP_inter_init_sql_post ) { + if (HPMHooks.count.HP_inter_init_sql_post > 0) { int (*postHookFunc) (int retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_init_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_init_sql_post[hIndex].func; retVal___ = postHookFunc(retVal___, file); } @@ -6472,14 +7827,14 @@ int HP_inter_init_sql(const char *file) { int HP_inter_mapif_init(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mapif_init_pre ) { + if (HPMHooks.count.HP_inter_mapif_init_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mapif_init_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6487,167 +7842,240 @@ int HP_inter_mapif_init(int fd) { { retVal___ = HPMHooks.source.inter.mapif_init(fd); } - if( HPMHooks.count.HP_inter_mapif_init_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_mapif_init_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mapif_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mapif_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -int HP_inter_check_ttl_wisdata_sub(union DBKey key, struct DBData *data, va_list ap) { +int HP_inter_check_length(int fd, int length) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_inter_check_length_pre > 0) { + int (*preHookFunc) (int *fd, int *length); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_pre; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); - va_end(ap___copy); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_check_length_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &length); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - va_list ap___copy; va_copy(ap___copy, ap); - retVal___ = HPMHooks.source.inter.check_ttl_wisdata_sub(key, data, ap___copy); - va_end(ap___copy); + retVal___ = HPMHooks.source.inter.check_length(fd, length); } - if( HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_sub_post; hIndex++ ) { - va_list ap___copy; va_copy(ap___copy, ap); - postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); - va_end(ap___copy); + if (HPMHooks.count.HP_inter_check_length_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int length); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_check_length_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, length); } } return retVal___; } -int HP_inter_check_ttl_wisdata(void) { +int HP_inter_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_check_ttl_wisdata_pre ) { - int (*preHookFunc) (void); + if (HPMHooks.count.HP_inter_parse_frommap_pre > 0) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_pre[hIndex].func; - retVal___ = preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.inter.check_ttl_wisdata(); + retVal___ = HPMHooks.source.inter.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_check_ttl_wisdata_post ) { - int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_ttl_wisdata_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_check_ttl_wisdata_post[hIndex].func; - retVal___ = postHookFunc(retVal___); + if (HPMHooks.count.HP_inter_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -int HP_inter_check_length(int fd, int length) { +void HP_inter_final(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_check_length_pre ) { - int (*preHookFunc) (int *fd, int *length); + if (HPMHooks.count.HP_inter_final_pre > 0) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_check_length_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &length); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.inter.final(); + } + if (HPMHooks.count.HP_inter_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_inter_config_read(const char *filename, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_config_read_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.inter.check_length(fd, length); + retVal___ = HPMHooks.source.inter.config_read(filename, imported); } - if( HPMHooks.count.HP_inter_check_length_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *length); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_check_length_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_check_length_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &length); + if (HPMHooks.count.HP_inter_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, imported); } } return retVal___; } -int HP_inter_parse_frommap(int fd) { +bool HP_inter_config_read_log(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_parse_frommap_pre ) { - int (*preHookFunc) (int *fd); + bool retVal___ = false; + if (HPMHooks.count.HP_inter_config_read_log_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_parse_frommap_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_log_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_config_read_log_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.inter.parse_frommap(fd); + retVal___ = HPMHooks.source.inter.config_read_log(filename, config, imported); } - if( HPMHooks.count.HP_inter_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_parse_frommap_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_inter_config_read_log_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_log_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_config_read_log_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -void HP_inter_final(void) { +bool HP_inter_config_read_connection(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; - if( HPMHooks.count.HP_inter_final_pre ) { - void (*preHookFunc) (void); + bool retVal___ = false; + if (HPMHooks.count.HP_inter_config_read_connection_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_inter_final_pre[hIndex].func; - preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_connection_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_config_read_connection_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter.config_read_connection(filename, config, imported); + } + if (HPMHooks.count.HP_inter_config_read_connection_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_config_read_connection_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_config_read_connection_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +void HP_inter_accinfo(int u_fd, int aid, int castergroup, const char *query, int map_fd) { + int hIndex = 0; + if (HPMHooks.count.HP_inter_accinfo_pre > 0) { + void (*preHookFunc) (int *u_fd, int *aid, int *castergroup, const char **query, int *map_fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_accinfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_accinfo_pre[hIndex].func; + preHookFunc(&u_fd, &aid, &castergroup, &query, &map_fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.inter.final(); + HPMHooks.source.inter.accinfo(u_fd, aid, castergroup, query, map_fd); } - if( HPMHooks.count.HP_inter_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_inter_final_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_inter_accinfo_post > 0) { + void (*postHookFunc) (int u_fd, int aid, int castergroup, const char *query, int map_fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_accinfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_accinfo_post[hIndex].func; + postHookFunc(u_fd, aid, castergroup, query, map_fd); + } + } + return; +} +void HP_inter_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int group_id, int logincount, int state) { + int hIndex = 0; + if (HPMHooks.count.HP_inter_accinfo2_pre > 0) { + void (*preHookFunc) (bool *success, int *map_fd, int *u_fd, int *u_aid, int *account_id, const char **userid, const char **user_pass, const char **email, const char **last_ip, const char **lastlogin, const char **pin_code, const char **birthdate, int *group_id, int *logincount, int *state); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_accinfo2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_accinfo2_pre[hIndex].func; + preHookFunc(&success, &map_fd, &u_fd, &u_aid, &account_id, &userid, &user_pass, &email, &last_ip, &lastlogin, &pin_code, &birthdate, &group_id, &logincount, &state); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.inter.accinfo2(success, map_fd, u_fd, u_aid, account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, group_id, logincount, state); + } + if (HPMHooks.count.HP_inter_accinfo2_post > 0) { + void (*postHookFunc) (bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int group_id, int logincount, int state); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_accinfo2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_accinfo2_post[hIndex].func; + postHookFunc(success, map_fd, u_fd, u_aid, account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, group_id, logincount, state); } } return; } -/* inter_mail */ +/* inter_mail_interface */ int HP_inter_mail_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_sql_init_pre ) { + if (HPMHooks.count.HP_inter_mail_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6655,9 +8083,9 @@ int HP_inter_mail_sql_init(void) { { retVal___ = HPMHooks.source.inter_mail.sql_init(); } - if( HPMHooks.count.HP_inter_mail_sql_init_post ) { + if (HPMHooks.count.HP_inter_mail_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -6666,14 +8094,14 @@ int HP_inter_mail_sql_init(void) { } void HP_inter_mail_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_mail_sql_final_pre ) { + if (HPMHooks.count.HP_inter_mail_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6681,9 +8109,9 @@ void HP_inter_mail_sql_final(void) { { HPMHooks.source.inter_mail.sql_final(); } - if( HPMHooks.count.HP_inter_mail_sql_final_post ) { + if (HPMHooks.count.HP_inter_mail_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_sql_final_post[hIndex].func; postHookFunc(); } @@ -6693,14 +8121,14 @@ void HP_inter_mail_sql_final(void) { int HP_inter_mail_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_mail_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6708,11 +8136,11 @@ int HP_inter_mail_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_mail.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_mail_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_mail_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -6720,14 +8148,14 @@ int HP_inter_mail_parse_frommap(int fd) { int HP_inter_mail_fromsql(int char_id, struct mail_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_fromsql_pre ) { - int (*preHookFunc) (int *char_id, struct mail_data *md); + if (HPMHooks.count.HP_inter_mail_fromsql_pre > 0) { + int (*preHookFunc) (int *char_id, struct mail_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, md); + retVal___ = preHookFunc(&char_id, &md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6735,11 +8163,11 @@ int HP_inter_mail_fromsql(int char_id, struct mail_data *md) { { retVal___ = HPMHooks.source.inter_mail.fromsql(char_id, md); } - if( HPMHooks.count.HP_inter_mail_fromsql_post ) { - int (*postHookFunc) (int retVal___, int *char_id, struct mail_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_mail_fromsql_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, struct mail_data *md); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, md); + retVal___ = postHookFunc(retVal___, char_id, md); } } return retVal___; @@ -6747,14 +8175,14 @@ int HP_inter_mail_fromsql(int char_id, struct mail_data *md) { int HP_inter_mail_savemessage(struct mail_message *msg) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mail_savemessage_pre ) { - int (*preHookFunc) (struct mail_message *msg); + if (HPMHooks.count.HP_inter_mail_savemessage_pre > 0) { + int (*preHookFunc) (struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_savemessage_pre[hIndex].func; - retVal___ = preHookFunc(msg); + retVal___ = preHookFunc(&msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6762,9 +8190,9 @@ int HP_inter_mail_savemessage(struct mail_message *msg) { { retVal___ = HPMHooks.source.inter_mail.savemessage(msg); } - if( HPMHooks.count.HP_inter_mail_savemessage_post ) { + if (HPMHooks.count.HP_inter_mail_savemessage_post > 0) { int (*postHookFunc) (int retVal___, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_savemessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_savemessage_post[hIndex].func; retVal___ = postHookFunc(retVal___, msg); } @@ -6774,14 +8202,14 @@ int HP_inter_mail_savemessage(struct mail_message *msg) { bool HP_inter_mail_loadmessage(int mail_id, struct mail_message *msg) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_mail_loadmessage_pre ) { - bool (*preHookFunc) (int *mail_id, struct mail_message *msg); + if (HPMHooks.count.HP_inter_mail_loadmessage_pre > 0) { + bool (*preHookFunc) (int *mail_id, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_loadmessage_pre[hIndex].func; - retVal___ = preHookFunc(&mail_id, msg); + retVal___ = preHookFunc(&mail_id, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6789,11 +8217,11 @@ bool HP_inter_mail_loadmessage(int mail_id, struct mail_message *msg) { { retVal___ = HPMHooks.source.inter_mail.loadmessage(mail_id, msg); } - if( HPMHooks.count.HP_inter_mail_loadmessage_post ) { - bool (*postHookFunc) (bool retVal___, int *mail_id, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_mail_loadmessage_post > 0) { + bool (*postHookFunc) (bool retVal___, int mail_id, struct mail_message *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_loadmessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_loadmessage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &mail_id, msg); + retVal___ = postHookFunc(retVal___, mail_id, msg); } } return retVal___; @@ -6801,14 +8229,14 @@ bool HP_inter_mail_loadmessage(int mail_id, struct mail_message *msg) { bool HP_inter_mail_DeleteAttach(int mail_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_mail_DeleteAttach_pre ) { + if (HPMHooks.count.HP_inter_mail_DeleteAttach_pre > 0) { bool (*preHookFunc) (int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_DeleteAttach_pre[hIndex].func; retVal___ = preHookFunc(&mail_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6816,25 +8244,25 @@ bool HP_inter_mail_DeleteAttach(int mail_id) { { retVal___ = HPMHooks.source.inter_mail.DeleteAttach(mail_id); } - if( HPMHooks.count.HP_inter_mail_DeleteAttach_post ) { - bool (*postHookFunc) (bool retVal___, int *mail_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_mail_DeleteAttach_post > 0) { + bool (*postHookFunc) (bool retVal___, int mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_DeleteAttach_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_DeleteAttach_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &mail_id); + retVal___ = postHookFunc(retVal___, mail_id); } } return retVal___; } void HP_inter_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) { int hIndex = 0; - if( HPMHooks.count.HP_inter_mail_sendmail_pre ) { - void (*preHookFunc) (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); + if (HPMHooks.count.HP_inter_mail_sendmail_pre > 0) { + void (*preHookFunc) (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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mail_sendmail_pre[hIndex].func; - preHookFunc(&send_id, send_name, &dest_id, dest_name, title, body, &zeny, item); + preHookFunc(&send_id, &send_name, &dest_id, &dest_name, &title, &body, &zeny, &item); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6842,27 +8270,162 @@ void HP_inter_mail_sendmail(int send_id, const char *send_name, int dest_id, con { HPMHooks.source.inter_mail.sendmail(send_id, send_name, dest_id, dest_name, title, body, zeny, item); } - if( HPMHooks.count.HP_inter_mail_sendmail_post ) { - void (*postHookFunc) (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); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_mail_sendmail_post > 0) { + void (*postHookFunc) (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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_sendmail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mail_sendmail_post[hIndex].func; - postHookFunc(&send_id, send_name, &dest_id, dest_name, title, body, &zeny, item); + postHookFunc(send_id, send_name, dest_id, dest_name, title, body, zeny, item); } } return; } -/* inter_mercenary */ +bool HP_inter_mail_mark_read(int mail_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_mail_mark_read_pre > 0) { + bool (*preHookFunc) (int *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_mark_read_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_mail_mark_read_pre[hIndex].func; + retVal___ = preHookFunc(&mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_mail.mark_read(mail_id); + } + if (HPMHooks.count.HP_inter_mail_mark_read_post > 0) { + bool (*postHookFunc) (bool retVal___, int mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_mark_read_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_mail_mark_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mail_id); + } + } + return retVal___; +} +bool HP_inter_mail_get_attachment(int char_id, int mail_id, struct mail_message *msg) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_mail_get_attachment_pre > 0) { + bool (*preHookFunc) (int *char_id, int *mail_id, struct mail_message **msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_get_attachment_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_mail_get_attachment_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &mail_id, &msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_mail.get_attachment(char_id, mail_id, msg); + } + if (HPMHooks.count.HP_inter_mail_get_attachment_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, int mail_id, struct mail_message *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_get_attachment_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_mail_get_attachment_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, mail_id, msg); + } + } + return retVal___; +} +bool HP_inter_mail_delete(int char_id, int mail_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_mail_delete_pre > 0) { + bool (*preHookFunc) (int *char_id, int *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_delete_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_mail_delete_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_mail.delete(char_id, mail_id); + } + if (HPMHooks.count.HP_inter_mail_delete_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, int mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_delete_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_mail_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, mail_id); + } + } + return retVal___; +} +bool HP_inter_mail_return_message(int char_id, int mail_id, int *new_mail) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_mail_return_message_pre > 0) { + bool (*preHookFunc) (int *char_id, int *mail_id, int **new_mail); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_return_message_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_mail_return_message_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &mail_id, &new_mail); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_mail.return_message(char_id, mail_id, new_mail); + } + if (HPMHooks.count.HP_inter_mail_return_message_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, int mail_id, int *new_mail); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_return_message_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_mail_return_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, mail_id, new_mail); + } + } + return retVal___; +} +bool HP_inter_mail_send(int account_id, struct mail_message *msg) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_mail_send_pre > 0) { + bool (*preHookFunc) (int *account_id, struct mail_message **msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_send_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_mail_send_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_mail.send(account_id, msg); + } + if (HPMHooks.count.HP_inter_mail_send_post > 0) { + bool (*postHookFunc) (bool retVal___, int account_id, struct mail_message *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mail_send_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_mail_send_post[hIndex].func; + retVal___ = postHookFunc(retVal___, account_id, msg); + } + } + return retVal___; +} +/* inter_mercenary_interface */ bool HP_inter_mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre ) { - bool (*preHookFunc) (int *char_id, struct mmo_charstatus *status); + if (HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre > 0) { + bool (*preHookFunc) (int *char_id, struct mmo_charstatus **status); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, status); + retVal___ = preHookFunc(&char_id, &status); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6870,11 +8433,11 @@ bool HP_inter_mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status { retVal___ = HPMHooks.source.inter_mercenary.owner_fromsql(char_id, status); } - if( HPMHooks.count.HP_inter_mercenary_owner_fromsql_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, struct mmo_charstatus *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_mercenary_owner_fromsql_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, struct mmo_charstatus *status); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, status); + retVal___ = postHookFunc(retVal___, char_id, status); } } return retVal___; @@ -6882,14 +8445,14 @@ bool HP_inter_mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status bool HP_inter_mercenary_owner_tosql(int char_id, struct mmo_charstatus *status) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_mercenary_owner_tosql_pre ) { - bool (*preHookFunc) (int *char_id, struct mmo_charstatus *status); + if (HPMHooks.count.HP_inter_mercenary_owner_tosql_pre > 0) { + bool (*preHookFunc) (int *char_id, struct mmo_charstatus **status); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_tosql_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, status); + retVal___ = preHookFunc(&char_id, &status); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6897,11 +8460,11 @@ bool HP_inter_mercenary_owner_tosql(int char_id, struct mmo_charstatus *status) { retVal___ = HPMHooks.source.inter_mercenary.owner_tosql(char_id, status); } - if( HPMHooks.count.HP_inter_mercenary_owner_tosql_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, struct mmo_charstatus *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_mercenary_owner_tosql_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, struct mmo_charstatus *status); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, status); + retVal___ = postHookFunc(retVal___, char_id, status); } } return retVal___; @@ -6909,14 +8472,14 @@ bool HP_inter_mercenary_owner_tosql(int char_id, struct mmo_charstatus *status) bool HP_inter_mercenary_owner_delete(int char_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_inter_mercenary_owner_delete_pre ) { + if (HPMHooks.count.HP_inter_mercenary_owner_delete_pre > 0) { bool (*preHookFunc) (int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_owner_delete_pre[hIndex].func; retVal___ = preHookFunc(&char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6924,11 +8487,11 @@ bool HP_inter_mercenary_owner_delete(int char_id) { { retVal___ = HPMHooks.source.inter_mercenary.owner_delete(char_id); } - if( HPMHooks.count.HP_inter_mercenary_owner_delete_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_mercenary_owner_delete_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_owner_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_owner_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id); + retVal___ = postHookFunc(retVal___, char_id); } } return retVal___; @@ -6936,14 +8499,14 @@ bool HP_inter_mercenary_owner_delete(int char_id) { int HP_inter_mercenary_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mercenary_sql_init_pre ) { + if (HPMHooks.count.HP_inter_mercenary_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6951,9 +8514,9 @@ int HP_inter_mercenary_sql_init(void) { { retVal___ = HPMHooks.source.inter_mercenary.sql_init(); } - if( HPMHooks.count.HP_inter_mercenary_sql_init_post ) { + if (HPMHooks.count.HP_inter_mercenary_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -6962,14 +8525,14 @@ int HP_inter_mercenary_sql_init(void) { } void HP_inter_mercenary_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_mercenary_sql_final_pre ) { + if (HPMHooks.count.HP_inter_mercenary_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6977,9 +8540,9 @@ void HP_inter_mercenary_sql_final(void) { { HPMHooks.source.inter_mercenary.sql_final(); } - if( HPMHooks.count.HP_inter_mercenary_sql_final_post ) { + if (HPMHooks.count.HP_inter_mercenary_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_sql_final_post[hIndex].func; postHookFunc(); } @@ -6989,14 +8552,14 @@ void HP_inter_mercenary_sql_final(void) { int HP_inter_mercenary_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_mercenary_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_mercenary_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_mercenary_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7004,27 +8567,135 @@ int HP_inter_mercenary_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_mercenary.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_mercenary_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_mercenary_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_mercenary_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +bool HP_inter_mercenary_create(struct s_mercenary *merc) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_mercenary_create_pre > 0) { + bool (*preHookFunc) (struct s_mercenary **merc); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_mercenary_create_pre[hIndex].func; + retVal___ = preHookFunc(&merc); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_mercenary.create(merc); + } + if (HPMHooks.count.HP_inter_mercenary_create_post > 0) { + bool (*postHookFunc) (bool retVal___, struct s_mercenary *merc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_mercenary_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, merc); + } + } + return retVal___; +} +bool HP_inter_mercenary_save(const struct s_mercenary *merc) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_mercenary_save_pre > 0) { + bool (*preHookFunc) (const struct s_mercenary **merc); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_save_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_mercenary_save_pre[hIndex].func; + retVal___ = preHookFunc(&merc); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_mercenary.save(merc); + } + if (HPMHooks.count.HP_inter_mercenary_save_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct s_mercenary *merc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_save_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_mercenary_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, merc); + } + } + return retVal___; +} +bool HP_inter_mercenary_load(int merc_id, int char_id, struct s_mercenary *merc) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_mercenary_load_pre > 0) { + bool (*preHookFunc) (int *merc_id, int *char_id, struct s_mercenary **merc); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_load_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_mercenary_load_pre[hIndex].func; + retVal___ = preHookFunc(&merc_id, &char_id, &merc); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_mercenary.load(merc_id, char_id, merc); + } + if (HPMHooks.count.HP_inter_mercenary_load_post > 0) { + bool (*postHookFunc) (bool retVal___, int merc_id, int char_id, struct s_mercenary *merc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_load_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_mercenary_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, merc_id, char_id, merc); + } + } + return retVal___; +} +bool HP_inter_mercenary_delete(int merc_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_mercenary_delete_pre > 0) { + bool (*preHookFunc) (int *merc_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_delete_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_mercenary_delete_pre[hIndex].func; + retVal___ = preHookFunc(&merc_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_mercenary.delete(merc_id); + } + if (HPMHooks.count.HP_inter_mercenary_delete_post > 0) { + bool (*postHookFunc) (bool retVal___, int merc_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_mercenary_delete_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_mercenary_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, merc_id); } } return retVal___; } -/* inter_party */ +/* inter_party_interface */ int HP_inter_party_check_lv(struct party_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_check_lv_pre ) { - int (*preHookFunc) (struct party_data *p); + if (HPMHooks.count.HP_inter_party_check_lv_pre > 0) { + int (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_check_lv_pre[hIndex].func; - retVal___ = preHookFunc(p); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7032,25 +8703,52 @@ int HP_inter_party_check_lv(struct party_data *p) { { retVal___ = HPMHooks.source.inter_party.check_lv(p); } - if( HPMHooks.count.HP_inter_party_check_lv_post ) { + if (HPMHooks.count.HP_inter_party_check_lv_post > 0) { int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_lv_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_check_lv_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } } return retVal___; } +int HP_inter_party_is_family_party(struct party_data *p) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_party_is_family_party_pre > 0) { + int (*preHookFunc) (struct party_data **p); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_is_family_party_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_is_family_party_pre[hIndex].func; + retVal___ = preHookFunc(&p); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.is_family_party(p); + } + if (HPMHooks.count.HP_inter_party_is_family_party_post > 0) { + int (*postHookFunc) (int retVal___, struct party_data *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_is_family_party_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_is_family_party_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} void HP_inter_party_calc_state(struct party_data *p) { int hIndex = 0; - if( HPMHooks.count.HP_inter_party_calc_state_pre ) { - void (*preHookFunc) (struct party_data *p); + if (HPMHooks.count.HP_inter_party_calc_state_pre > 0) { + void (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_calc_state_pre[hIndex].func; - preHookFunc(p); + preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7058,9 +8756,9 @@ void HP_inter_party_calc_state(struct party_data *p) { { HPMHooks.source.inter_party.calc_state(p); } - if( HPMHooks.count.HP_inter_party_calc_state_post ) { + if (HPMHooks.count.HP_inter_party_calc_state_post > 0) { void (*postHookFunc) (struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_calc_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_calc_state_post[hIndex].func; postHookFunc(p); } @@ -7070,14 +8768,14 @@ void HP_inter_party_calc_state(struct party_data *p) { int HP_inter_party_tosql(struct party *p, int flag, int index) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_tosql_pre ) { - int (*preHookFunc) (struct party *p, int *flag, int *index); + if (HPMHooks.count.HP_inter_party_tosql_pre > 0) { + int (*preHookFunc) (struct party **p, int *flag, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_tosql_pre[hIndex].func; - retVal___ = preHookFunc(p, &flag, &index); + retVal___ = preHookFunc(&p, &flag, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7085,11 +8783,38 @@ int HP_inter_party_tosql(struct party *p, int flag, int index) { { retVal___ = HPMHooks.source.inter_party.tosql(p, flag, index); } - if( HPMHooks.count.HP_inter_party_tosql_post ) { - int (*postHookFunc) (int retVal___, struct party *p, int *flag, int *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_party_tosql_post > 0) { + int (*postHookFunc) (int retVal___, struct party *p, int flag, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &flag, &index); + retVal___ = postHookFunc(retVal___, p, flag, index); + } + } + return retVal___; +} +int HP_inter_party_del_nonexistent_party(int party_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_party_del_nonexistent_party_pre > 0) { + int (*preHookFunc) (int *party_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_del_nonexistent_party_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_del_nonexistent_party_pre[hIndex].func; + retVal___ = preHookFunc(&party_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.del_nonexistent_party(party_id); + } + if (HPMHooks.count.HP_inter_party_del_nonexistent_party_post > 0) { + int (*postHookFunc) (int retVal___, int party_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_del_nonexistent_party_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_del_nonexistent_party_post[hIndex].func; + retVal___ = postHookFunc(retVal___, party_id); } } return retVal___; @@ -7097,14 +8822,14 @@ int HP_inter_party_tosql(struct party *p, int flag, int index) { struct party_data* HP_inter_party_fromsql(int party_id) { int hIndex = 0; struct party_data* retVal___ = NULL; - if( HPMHooks.count.HP_inter_party_fromsql_pre ) { + if (HPMHooks.count.HP_inter_party_fromsql_pre > 0) { struct party_data* (*preHookFunc) (int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_fromsql_pre[hIndex].func; retVal___ = preHookFunc(&party_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7112,11 +8837,11 @@ struct party_data* HP_inter_party_fromsql(int party_id) { { retVal___ = HPMHooks.source.inter_party.fromsql(party_id); } - if( HPMHooks.count.HP_inter_party_fromsql_post ) { - struct party_data* (*postHookFunc) (struct party_data* retVal___, int *party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_party_fromsql_post > 0) { + struct party_data* (*postHookFunc) (struct party_data* retVal___, int party_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id); + retVal___ = postHookFunc(retVal___, party_id); } } return retVal___; @@ -7124,14 +8849,14 @@ struct party_data* HP_inter_party_fromsql(int party_id) { int HP_inter_party_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_sql_init_pre ) { + if (HPMHooks.count.HP_inter_party_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7139,9 +8864,9 @@ int HP_inter_party_sql_init(void) { { retVal___ = HPMHooks.source.inter_party.sql_init(); } - if( HPMHooks.count.HP_inter_party_sql_init_post ) { + if (HPMHooks.count.HP_inter_party_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7150,14 +8875,14 @@ int HP_inter_party_sql_init(void) { } void HP_inter_party_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_party_sql_final_pre ) { + if (HPMHooks.count.HP_inter_party_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7165,9 +8890,9 @@ void HP_inter_party_sql_final(void) { { HPMHooks.source.inter_party.sql_final(); } - if( HPMHooks.count.HP_inter_party_sql_final_post ) { + if (HPMHooks.count.HP_inter_party_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_sql_final_post[hIndex].func; postHookFunc(); } @@ -7177,14 +8902,14 @@ void HP_inter_party_sql_final(void) { struct party_data* HP_inter_party_search_partyname(const char *str) { int hIndex = 0; struct party_data* retVal___ = NULL; - if( HPMHooks.count.HP_inter_party_search_partyname_pre ) { - struct party_data* (*preHookFunc) (const char *str); + if (HPMHooks.count.HP_inter_party_search_partyname_pre > 0) { + struct party_data* (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_search_partyname_pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7192,9 +8917,9 @@ struct party_data* HP_inter_party_search_partyname(const char *str) { { retVal___ = HPMHooks.source.inter_party.search_partyname(str); } - if( HPMHooks.count.HP_inter_party_search_partyname_post ) { + if (HPMHooks.count.HP_inter_party_search_partyname_post > 0) { struct party_data* (*postHookFunc) (struct party_data* retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_search_partyname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_search_partyname_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -7204,14 +8929,14 @@ struct party_data* HP_inter_party_search_partyname(const char *str) { int HP_inter_party_check_exp_share(struct party_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_check_exp_share_pre ) { - int (*preHookFunc) (struct party_data *p); + if (HPMHooks.count.HP_inter_party_check_exp_share_pre > 0) { + int (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_check_exp_share_pre[hIndex].func; - retVal___ = preHookFunc(p); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7219,9 +8944,9 @@ int HP_inter_party_check_exp_share(struct party_data *p) { { retVal___ = HPMHooks.source.inter_party.check_exp_share(p); } - if( HPMHooks.count.HP_inter_party_check_exp_share_post ) { + if (HPMHooks.count.HP_inter_party_check_exp_share_post > 0) { int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_exp_share_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_check_exp_share_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -7231,14 +8956,14 @@ int HP_inter_party_check_exp_share(struct party_data *p) { int HP_inter_party_check_empty(struct party_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_check_empty_pre ) { - int (*preHookFunc) (struct party_data *p); + if (HPMHooks.count.HP_inter_party_check_empty_pre > 0) { + int (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_check_empty_pre[hIndex].func; - retVal___ = preHookFunc(p); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7246,9 +8971,9 @@ int HP_inter_party_check_empty(struct party_data *p) { { retVal___ = HPMHooks.source.inter_party.check_empty(p); } - if( HPMHooks.count.HP_inter_party_check_empty_post ) { + if (HPMHooks.count.HP_inter_party_check_empty_post > 0) { int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_check_empty_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_check_empty_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -7258,14 +8983,14 @@ int HP_inter_party_check_empty(struct party_data *p) { int HP_inter_party_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_party_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7273,26 +8998,26 @@ int HP_inter_party_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_party.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_party_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_party_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -int HP_inter_party_leave(int party_id, int account_id, int char_id) { +bool HP_inter_party_leave(int party_id, int account_id, int char_id) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_leave_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, int *char_id); + bool retVal___ = false; + if (HPMHooks.count.HP_inter_party_leave_pre > 0) { + bool (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_leave_pre[hIndex].func; retVal___ = preHookFunc(&party_id, &account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7300,11 +9025,11 @@ int HP_inter_party_leave(int party_id, int account_id, int char_id) { { retVal___ = HPMHooks.source.inter_party.leave(party_id, account_id, char_id); } - if( HPMHooks.count.HP_inter_party_leave_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_party_leave_post > 0) { + bool (*postHookFunc) (bool retVal___, int party_id, int account_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_leave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); + retVal___ = postHookFunc(retVal___, party_id, account_id, char_id); } } return retVal___; @@ -7312,14 +9037,14 @@ int HP_inter_party_leave(int party_id, int account_id, int char_id) { int HP_inter_party_CharOnline(int char_id, int party_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_CharOnline_pre ) { + if (HPMHooks.count.HP_inter_party_CharOnline_pre > 0) { int (*preHookFunc) (int *char_id, int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_CharOnline_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &party_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7327,11 +9052,11 @@ int HP_inter_party_CharOnline(int char_id, int party_id) { { retVal___ = HPMHooks.source.inter_party.CharOnline(char_id, party_id); } - if( HPMHooks.count.HP_inter_party_CharOnline_post ) { - int (*postHookFunc) (int retVal___, int *char_id, int *party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_party_CharOnline_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, int party_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOnline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_CharOnline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &party_id); + retVal___ = postHookFunc(retVal___, char_id, party_id); } } return retVal___; @@ -7339,14 +9064,14 @@ int HP_inter_party_CharOnline(int char_id, int party_id) { int HP_inter_party_CharOffline(int char_id, int party_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_party_CharOffline_pre ) { + if (HPMHooks.count.HP_inter_party_CharOffline_pre > 0) { int (*preHookFunc) (int *char_id, int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_party_CharOffline_pre[hIndex].func; retVal___ = preHookFunc(&char_id, &party_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7354,27 +9079,189 @@ int HP_inter_party_CharOffline(int char_id, int party_id) { { retVal___ = HPMHooks.source.inter_party.CharOffline(char_id, party_id); } - if( HPMHooks.count.HP_inter_party_CharOffline_post ) { - int (*postHookFunc) (int retVal___, int *char_id, int *party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_party_CharOffline_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, int party_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_CharOffline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_party_CharOffline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &party_id); + retVal___ = postHookFunc(retVal___, char_id, party_id); + } + } + return retVal___; +} +struct party_data* HP_inter_party_create(const char *name, int item, int item2, const struct party_member *leader) { + int hIndex = 0; + struct party_data* retVal___ = NULL; + if (HPMHooks.count.HP_inter_party_create_pre > 0) { + struct party_data* (*preHookFunc) (const char **name, int *item, int *item2, const struct party_member **leader); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_create_pre[hIndex].func; + retVal___ = preHookFunc(&name, &item, &item2, &leader); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.create(name, item, item2, leader); + } + if (HPMHooks.count.HP_inter_party_create_post > 0) { + struct party_data* (*postHookFunc) (struct party_data* retVal___, const char *name, int item, int item2, const struct party_member *leader); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, item, item2, leader); + } + } + return retVal___; +} +bool HP_inter_party_add_member(int party_id, const struct party_member *member) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_party_add_member_pre > 0) { + bool (*preHookFunc) (int *party_id, const struct party_member **member); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_add_member_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_add_member_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &member); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.add_member(party_id, member); + } + if (HPMHooks.count.HP_inter_party_add_member_post > 0) { + bool (*postHookFunc) (bool retVal___, int party_id, const struct party_member *member); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_add_member_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_add_member_post[hIndex].func; + retVal___ = postHookFunc(retVal___, party_id, member); + } + } + return retVal___; +} +bool HP_inter_party_change_option(int party_id, int account_id, int exp, int item, int map_fd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_party_change_option_pre > 0) { + bool (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item, int *map_fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_change_option_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_change_option_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &exp, &item, &map_fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.change_option(party_id, account_id, exp, item, map_fd); + } + if (HPMHooks.count.HP_inter_party_change_option_post > 0) { + bool (*postHookFunc) (bool retVal___, int party_id, int account_id, int exp, int item, int map_fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_change_option_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_change_option_post[hIndex].func; + retVal___ = postHookFunc(retVal___, party_id, account_id, exp, item, map_fd); + } + } + return retVal___; +} +bool HP_inter_party_change_map(int party_id, int account_id, int char_id, unsigned short map, int online, int lv) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_party_change_map_pre > 0) { + bool (*preHookFunc) (int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, int *lv); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_change_map_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_change_map_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id, &map, &online, &lv); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.change_map(party_id, account_id, char_id, map, online, lv); + } + if (HPMHooks.count.HP_inter_party_change_map_post > 0) { + bool (*postHookFunc) (bool retVal___, int party_id, int account_id, int char_id, unsigned short map, int online, int lv); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_change_map_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_change_map_post[hIndex].func; + retVal___ = postHookFunc(retVal___, party_id, account_id, char_id, map, online, lv); } } return retVal___; } -/* inter_pet */ +bool HP_inter_party_disband(int party_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_party_disband_pre > 0) { + bool (*preHookFunc) (int *party_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_disband_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_disband_pre[hIndex].func; + retVal___ = preHookFunc(&party_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.disband(party_id); + } + if (HPMHooks.count.HP_inter_party_disband_post > 0) { + bool (*postHookFunc) (bool retVal___, int party_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_disband_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_disband_post[hIndex].func; + retVal___ = postHookFunc(retVal___, party_id); + } + } + return retVal___; +} +bool HP_inter_party_change_leader(int party_id, int account_id, int char_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_party_change_leader_pre > 0) { + bool (*preHookFunc) (int *party_id, int *account_id, int *char_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_change_leader_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_party_change_leader_pre[hIndex].func; + retVal___ = preHookFunc(&party_id, &account_id, &char_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_party.change_leader(party_id, account_id, char_id); + } + if (HPMHooks.count.HP_inter_party_change_leader_post > 0) { + bool (*postHookFunc) (bool retVal___, int party_id, int account_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_party_change_leader_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_party_change_leader_post[hIndex].func; + retVal___ = postHookFunc(retVal___, party_id, account_id, char_id); + } + } + return retVal___; +} +/* inter_pet_interface */ int HP_inter_pet_tosql(const struct s_pet *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_tosql_pre ) { - int (*preHookFunc) (const struct s_pet *p); + if (HPMHooks.count.HP_inter_pet_tosql_pre > 0) { + int (*preHookFunc) (const struct s_pet **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_tosql_pre[hIndex].func; - retVal___ = preHookFunc(p); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7382,9 +9269,9 @@ int HP_inter_pet_tosql(const struct s_pet *p) { { retVal___ = HPMHooks.source.inter_pet.tosql(p); } - if( HPMHooks.count.HP_inter_pet_tosql_post ) { + if (HPMHooks.count.HP_inter_pet_tosql_post > 0) { int (*postHookFunc) (int retVal___, const struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_tosql_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -7394,14 +9281,14 @@ int HP_inter_pet_tosql(const struct s_pet *p) { int HP_inter_pet_fromsql(int pet_id, struct s_pet *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_fromsql_pre ) { - int (*preHookFunc) (int *pet_id, struct s_pet *p); + if (HPMHooks.count.HP_inter_pet_fromsql_pre > 0) { + int (*preHookFunc) (int *pet_id, struct s_pet **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&pet_id, p); + retVal___ = preHookFunc(&pet_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7409,11 +9296,11 @@ int HP_inter_pet_fromsql(int pet_id, struct s_pet *p) { { retVal___ = HPMHooks.source.inter_pet.fromsql(pet_id, p); } - if( HPMHooks.count.HP_inter_pet_fromsql_post ) { - int (*postHookFunc) (int retVal___, int *pet_id, struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_pet_fromsql_post > 0) { + int (*postHookFunc) (int retVal___, int pet_id, struct s_pet *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &pet_id, p); + retVal___ = postHookFunc(retVal___, pet_id, p); } } return retVal___; @@ -7421,14 +9308,14 @@ int HP_inter_pet_fromsql(int pet_id, struct s_pet *p) { int HP_inter_pet_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_sql_init_pre ) { + if (HPMHooks.count.HP_inter_pet_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7436,9 +9323,9 @@ int HP_inter_pet_sql_init(void) { { retVal___ = HPMHooks.source.inter_pet.sql_init(); } - if( HPMHooks.count.HP_inter_pet_sql_init_post ) { + if (HPMHooks.count.HP_inter_pet_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7447,14 +9334,14 @@ int HP_inter_pet_sql_init(void) { } void HP_inter_pet_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_pet_sql_final_pre ) { + if (HPMHooks.count.HP_inter_pet_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7462,9 +9349,9 @@ void HP_inter_pet_sql_final(void) { { HPMHooks.source.inter_pet.sql_final(); } - if( HPMHooks.count.HP_inter_pet_sql_final_post ) { + if (HPMHooks.count.HP_inter_pet_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_sql_final_post[hIndex].func; postHookFunc(); } @@ -7474,14 +9361,14 @@ void HP_inter_pet_sql_final(void) { int HP_inter_pet_delete_(int pet_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_delete__pre ) { + if (HPMHooks.count.HP_inter_pet_delete__pre > 0) { int (*preHookFunc) (int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_delete__pre[hIndex].func; retVal___ = preHookFunc(&pet_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7489,11 +9376,11 @@ int HP_inter_pet_delete_(int pet_id) { { retVal___ = HPMHooks.source.inter_pet.delete_(pet_id); } - if( HPMHooks.count.HP_inter_pet_delete__post ) { - int (*postHookFunc) (int retVal___, int *pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__post; hIndex++ ) { + if (HPMHooks.count.HP_inter_pet_delete__post > 0) { + int (*postHookFunc) (int retVal___, int pet_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_delete__post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_delete__post[hIndex].func; - retVal___ = postHookFunc(retVal___, &pet_id); + retVal___ = postHookFunc(retVal___, pet_id); } } return retVal___; @@ -7501,14 +9388,14 @@ int HP_inter_pet_delete_(int pet_id) { int HP_inter_pet_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_pet_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_pet_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7516,27 +9403,81 @@ int HP_inter_pet_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_pet.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_pet_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_pet_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +struct s_pet* HP_inter_pet_create(int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) { + int hIndex = 0; + struct s_pet* retVal___ = NULL; + if (HPMHooks.count.HP_inter_pet_create_pre > 0) { + struct s_pet* (*preHookFunc) (int *account_id, int *char_id, int *pet_class, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_pet_create_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &char_id, &pet_class, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incubate, &pet_name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_pet.create(account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); + } + if (HPMHooks.count.HP_inter_pet_create_post > 0) { + struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_pet_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); + } + } + return retVal___; +} +struct s_pet* HP_inter_pet_load(int account_id, int char_id, int pet_id) { + int hIndex = 0; + struct s_pet* retVal___ = NULL; + if (HPMHooks.count.HP_inter_pet_load_pre > 0) { + struct s_pet* (*preHookFunc) (int *account_id, int *char_id, int *pet_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_load_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_pet_load_pre[hIndex].func; + retVal___ = preHookFunc(&account_id, &char_id, &pet_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_pet.load(account_id, char_id, pet_id); + } + if (HPMHooks.count.HP_inter_pet_load_post > 0) { + struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, int pet_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_load_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_pet_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, account_id, char_id, pet_id); } } return retVal___; } -/* inter_quest */ +/* inter_quest_interface */ int HP_inter_quest_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_quest_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_quest_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_quest_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7544,27 +9485,432 @@ int HP_inter_quest_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_quest.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_quest_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_quest_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_quest_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +struct quest* HP_inter_quest_fromsql(int char_id, int *count) { + int hIndex = 0; + struct quest* retVal___ = NULL; + if (HPMHooks.count.HP_inter_quest_fromsql_pre > 0) { + struct quest* (*preHookFunc) (int *char_id, int **count); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_fromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_quest_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &count); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_quest.fromsql(char_id, count); + } + if (HPMHooks.count.HP_inter_quest_fromsql_post > 0) { + struct quest* (*postHookFunc) (struct quest* retVal___, int char_id, int *count); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_fromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_quest_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, count); + } + } + return retVal___; +} +bool HP_inter_quest_delete(int char_id, int quest_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_quest_delete_pre > 0) { + bool (*preHookFunc) (int *char_id, int *quest_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_delete_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_quest_delete_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &quest_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_quest.delete(char_id, quest_id); + } + if (HPMHooks.count.HP_inter_quest_delete_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, int quest_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_delete_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_quest_delete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, quest_id); + } + } + return retVal___; +} +bool HP_inter_quest_add(int char_id, struct quest qd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_quest_add_pre > 0) { + bool (*preHookFunc) (int *char_id, struct quest *qd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_add_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_quest_add_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &qd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_quest.add(char_id, qd); + } + if (HPMHooks.count.HP_inter_quest_add_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, struct quest qd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_add_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_quest_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, qd); + } + } + return retVal___; +} +bool HP_inter_quest_update(int char_id, struct quest qd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_quest_update_pre > 0) { + bool (*preHookFunc) (int *char_id, struct quest *qd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_update_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_quest_update_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &qd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_quest.update(char_id, qd); + } + if (HPMHooks.count.HP_inter_quest_update_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, struct quest qd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_update_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_quest_update_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, qd); + } + } + return retVal___; +} +bool HP_inter_quest_save(int char_id, const struct quest *new_qd, int new_n) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_quest_save_pre > 0) { + bool (*preHookFunc) (int *char_id, const struct quest **new_qd, int *new_n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_save_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_quest_save_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &new_qd, &new_n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_quest.save(char_id, new_qd, new_n); + } + if (HPMHooks.count.HP_inter_quest_save_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, const struct quest *new_qd, int new_n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_quest_save_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_quest_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, new_qd, new_n); + } + } + return retVal___; +} +/* inter_rodex_interface */ +int HP_inter_rodex_sql_init(void) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_sql_init_pre > 0) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_sql_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.sql_init(); + } + if (HPMHooks.count.HP_inter_rodex_sql_init_post > 0) { + int (*postHookFunc) (int retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_sql_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_inter_rodex_sql_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_inter_rodex_sql_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_sql_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_sql_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.inter_rodex.sql_final(); + } + if (HPMHooks.count.HP_inter_rodex_sql_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_sql_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_sql_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_inter_rodex_parse_frommap(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_parse_frommap_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_parse_frommap_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_parse_frommap_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.parse_frommap(fd); + } + if (HPMHooks.count.HP_inter_rodex_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_parse_frommap_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_parse_frommap_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +int HP_inter_rodex_fromsql(int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_fromsql_pre > 0) { + int (*preHookFunc) (int *char_id, int *account_id, int8 *opentype, int64 *mail_id, struct rodex_maillist **mails); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_fromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &account_id, &opentype, &mail_id, &mails); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.fromsql(char_id, account_id, opentype, mail_id, mails); + } + if (HPMHooks.count.HP_inter_rodex_fromsql_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_fromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, account_id, opentype, mail_id, mails); + } + } + return retVal___; +} +bool HP_inter_rodex_hasnew(int char_id, int account_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_rodex_hasnew_pre > 0) { + bool (*preHookFunc) (int *char_id, int *account_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_hasnew_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_hasnew_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &account_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.hasnew(char_id, account_id); + } + if (HPMHooks.count.HP_inter_rodex_hasnew_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_hasnew_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_hasnew_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, account_id); + } + } + return retVal___; +} +bool HP_inter_rodex_checkname(const char *name, int *target_char_id, int *target_class, int *target_level) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_rodex_checkname_pre > 0) { + bool (*preHookFunc) (const char **name, int **target_char_id, int **target_class, int **target_level); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_checkname_pre[hIndex].func; + retVal___ = preHookFunc(&name, &target_char_id, &target_class, &target_level); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.checkname(name, target_char_id, target_class, target_level); + } + if (HPMHooks.count.HP_inter_rodex_checkname_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_checkname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name, target_char_id, target_class, target_level); + } + } + return retVal___; +} +int64 HP_inter_rodex_savemessage(struct rodex_message *msg) { + int hIndex = 0; + int64 retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_savemessage_pre > 0) { + int64 (*preHookFunc) (struct rodex_message **msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_savemessage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_savemessage_pre[hIndex].func; + retVal___ = preHookFunc(&msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.savemessage(msg); + } + if (HPMHooks.count.HP_inter_rodex_savemessage_post > 0) { + int64 (*postHookFunc) (int64 retVal___, struct rodex_message *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_savemessage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_savemessage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, msg); } } return retVal___; } -/* inter_storage */ -int HP_inter_storage_tosql(int account_id, struct storage_data *p) { +bool HP_inter_rodex_updatemail(int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_rodex_updatemail_pre > 0) { + bool (*preHookFunc) (int *fd, int *account_id, int *char_id, int64 *mail_id, uint8 *opentype, int8 *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_updatemail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_updatemail_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id, &char_id, &mail_id, &opentype, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.updatemail(fd, account_id, char_id, mail_id, opentype, flag); + } + if (HPMHooks.count.HP_inter_rodex_updatemail_post > 0) { + bool (*postHookFunc) (bool retVal___, int fd, int account_id, int char_id, int64 mail_id, uint8 opentype, int8 flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_updatemail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_updatemail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, account_id, char_id, mail_id, opentype, flag); + } + } + return retVal___; +} +int64 HP_inter_rodex_getzeny(int64 mail_id) { + int hIndex = 0; + int64 retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_getzeny_pre > 0) { + int64 (*preHookFunc) (int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getzeny_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_getzeny_pre[hIndex].func; + retVal___ = preHookFunc(&mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.getzeny(mail_id); + } + if (HPMHooks.count.HP_inter_rodex_getzeny_post > 0) { + int64 (*postHookFunc) (int64 retVal___, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getzeny_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_getzeny_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mail_id); + } + } + return retVal___; +} +int HP_inter_rodex_getitems(int64 mail_id, struct rodex_item *items) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_inter_rodex_getitems_pre > 0) { + int (*preHookFunc) (int64 *mail_id, struct rodex_item **items); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getitems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_rodex_getitems_pre[hIndex].func; + retVal___ = preHookFunc(&mail_id, &items); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_rodex.getitems(mail_id, items); + } + if (HPMHooks.count.HP_inter_rodex_getitems_post > 0) { + int (*postHookFunc) (int retVal___, int64 mail_id, struct rodex_item *items); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_getitems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_rodex_getitems_post[hIndex].func; + retVal___ = postHookFunc(retVal___, mail_id, items); + } + } + return retVal___; +} +/* inter_storage_interface */ +int HP_inter_storage_tosql(int account_id, const struct storage_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_tosql_pre ) { - int (*preHookFunc) (int *account_id, struct storage_data *p); + if (HPMHooks.count.HP_inter_storage_tosql_pre > 0) { + int (*preHookFunc) (int *account_id, const struct storage_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_tosql_pre[hIndex].func; - retVal___ = preHookFunc(&account_id, p); + retVal___ = preHookFunc(&account_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7572,11 +9918,11 @@ int HP_inter_storage_tosql(int account_id, struct storage_data *p) { { retVal___ = HPMHooks.source.inter_storage.tosql(account_id, p); } - if( HPMHooks.count.HP_inter_storage_tosql_post ) { - int (*postHookFunc) (int retVal___, int *account_id, struct storage_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_storage_tosql_post > 0) { + int (*postHookFunc) (int retVal___, int account_id, const struct storage_data *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id, p); + retVal___ = postHookFunc(retVal___, account_id, p); } } return retVal___; @@ -7584,14 +9930,14 @@ int HP_inter_storage_tosql(int account_id, struct storage_data *p) { int HP_inter_storage_fromsql(int account_id, struct storage_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_fromsql_pre ) { - int (*preHookFunc) (int *account_id, struct storage_data *p); + if (HPMHooks.count.HP_inter_storage_fromsql_pre > 0) { + int (*preHookFunc) (int *account_id, struct storage_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&account_id, p); + retVal___ = preHookFunc(&account_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7599,26 +9945,26 @@ int HP_inter_storage_fromsql(int account_id, struct storage_data *p) { { retVal___ = HPMHooks.source.inter_storage.fromsql(account_id, p); } - if( HPMHooks.count.HP_inter_storage_fromsql_post ) { - int (*postHookFunc) (int retVal___, int *account_id, struct storage_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_storage_fromsql_post > 0) { + int (*postHookFunc) (int retVal___, int account_id, struct storage_data *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id, p); + retVal___ = postHookFunc(retVal___, account_id, p); } } return retVal___; } -int HP_inter_storage_guild_storage_tosql(int guild_id, const struct guild_storage *p) { +bool HP_inter_storage_guild_storage_tosql(int guild_id, const struct guild_storage *p) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre ) { - int (*preHookFunc) (int *guild_id, const struct guild_storage *p); + bool retVal___ = false; + if (HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre > 0) { + bool (*preHookFunc) (int *guild_id, const struct guild_storage **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_tosql_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, p); + retVal___ = preHookFunc(&guild_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7626,11 +9972,11 @@ int HP_inter_storage_guild_storage_tosql(int guild_id, const struct guild_storag { retVal___ = HPMHooks.source.inter_storage.guild_storage_tosql(guild_id, p); } - if( HPMHooks.count.HP_inter_storage_guild_storage_tosql_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, const struct guild_storage *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_storage_guild_storage_tosql_post > 0) { + bool (*postHookFunc) (bool retVal___, int guild_id, const struct guild_storage *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_tosql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, p); + retVal___ = postHookFunc(retVal___, guild_id, p); } } return retVal___; @@ -7638,14 +9984,14 @@ int HP_inter_storage_guild_storage_tosql(int guild_id, const struct guild_storag int HP_inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre ) { - int (*preHookFunc) (int *guild_id, struct guild_storage *p); + if (HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre > 0) { + int (*preHookFunc) (int *guild_id, struct guild_storage **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, p); + retVal___ = preHookFunc(&guild_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7653,11 +9999,11 @@ int HP_inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage *p { retVal___ = HPMHooks.source.inter_storage.guild_storage_fromsql(guild_id, p); } - if( HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, struct guild_storage *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, struct guild_storage *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, p); + retVal___ = postHookFunc(retVal___, guild_id, p); } } return retVal___; @@ -7665,14 +10011,14 @@ int HP_inter_storage_guild_storage_fromsql(int guild_id, struct guild_storage *p int HP_inter_storage_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_sql_init_pre ) { + if (HPMHooks.count.HP_inter_storage_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_sql_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7680,9 +10026,9 @@ int HP_inter_storage_sql_init(void) { { retVal___ = HPMHooks.source.inter_storage.sql_init(); } - if( HPMHooks.count.HP_inter_storage_sql_init_post ) { + if (HPMHooks.count.HP_inter_storage_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_sql_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7691,14 +10037,14 @@ int HP_inter_storage_sql_init(void) { } void HP_inter_storage_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_inter_storage_sql_final_pre ) { + if (HPMHooks.count.HP_inter_storage_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_sql_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7706,9 +10052,9 @@ void HP_inter_storage_sql_final(void) { { HPMHooks.source.inter_storage.sql_final(); } - if( HPMHooks.count.HP_inter_storage_sql_final_post ) { + if (HPMHooks.count.HP_inter_storage_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_sql_final_post[hIndex].func; postHookFunc(); } @@ -7718,14 +10064,14 @@ void HP_inter_storage_sql_final(void) { int HP_inter_storage_delete_(int account_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_delete__pre ) { + if (HPMHooks.count.HP_inter_storage_delete__pre > 0) { int (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_delete__pre[hIndex].func; retVal___ = preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7733,11 +10079,11 @@ int HP_inter_storage_delete_(int account_id) { { retVal___ = HPMHooks.source.inter_storage.delete_(account_id); } - if( HPMHooks.count.HP_inter_storage_delete__post ) { - int (*postHookFunc) (int retVal___, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__post; hIndex++ ) { + if (HPMHooks.count.HP_inter_storage_delete__post > 0) { + int (*postHookFunc) (int retVal___, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_delete__post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_delete__post[hIndex].func; - retVal___ = postHookFunc(retVal___, &account_id); + retVal___ = postHookFunc(retVal___, account_id); } } return retVal___; @@ -7745,14 +10091,14 @@ int HP_inter_storage_delete_(int account_id) { int HP_inter_storage_guild_storage_delete(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_guild_storage_delete_pre ) { + if (HPMHooks.count.HP_inter_storage_guild_storage_delete_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_delete_pre[hIndex].func; retVal___ = preHookFunc(&guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7760,11 +10106,11 @@ int HP_inter_storage_guild_storage_delete(int guild_id) { { retVal___ = HPMHooks.source.inter_storage.guild_storage_delete(guild_id); } - if( HPMHooks.count.HP_inter_storage_guild_storage_delete_post ) { - int (*postHookFunc) (int retVal___, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_storage_guild_storage_delete_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_guild_storage_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_guild_storage_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id); + retVal___ = postHookFunc(retVal___, guild_id); } } return retVal___; @@ -7772,14 +10118,14 @@ int HP_inter_storage_guild_storage_delete(int guild_id) { int HP_inter_storage_parse_frommap(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_inter_storage_parse_frommap_pre ) { + if (HPMHooks.count.HP_inter_storage_parse_frommap_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_storage_parse_frommap_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7787,27 +10133,106 @@ int HP_inter_storage_parse_frommap(int fd) { { retVal___ = HPMHooks.source.inter_storage.parse_frommap(fd); } - if( HPMHooks.count.HP_inter_storage_parse_frommap_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_post; hIndex++ ) { + if (HPMHooks.count.HP_inter_storage_parse_frommap_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_parse_frommap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_storage_parse_frommap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +bool HP_inter_storage_retrieve_bound_items(int char_id, int account_id, int guild_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_inter_storage_retrieve_bound_items_pre > 0) { + bool (*preHookFunc) (int *char_id, int *account_id, int *guild_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_retrieve_bound_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_inter_storage_retrieve_bound_items_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &account_id, &guild_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.inter_storage.retrieve_bound_items(char_id, account_id, guild_id); + } + if (HPMHooks.count.HP_inter_storage_retrieve_bound_items_post > 0) { + bool (*postHookFunc) (bool retVal___, int char_id, int account_id, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_storage_retrieve_bound_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_inter_storage_retrieve_bound_items_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, account_id, guild_id); } } return retVal___; } -/* libconfig */ +/* libconfig_interface */ +void HP_libconfig_set_db_path(const char *db_path) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_set_db_path_pre > 0) { + void (*preHookFunc) (const char **db_path); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_set_db_path_pre[hIndex].func; + preHookFunc(&db_path); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.set_db_path(db_path); + } + if (HPMHooks.count.HP_libconfig_set_db_path_post > 0) { + void (*postHookFunc) (const char *db_path); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_set_db_path_post[hIndex].func; + postHookFunc(db_path); + } + } + return; +} +void HP_libconfig_format_db_path(const char *filename, char *path_buf, int buffer_len) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_format_db_path_pre > 0) { + void (*preHookFunc) (const char **filename, char **path_buf, int *buffer_len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_format_db_path_pre[hIndex].func; + preHookFunc(&filename, &path_buf, &buffer_len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.format_db_path(filename, path_buf, buffer_len); + } + if (HPMHooks.count.HP_libconfig_format_db_path_post > 0) { + void (*postHookFunc) (const char *filename, char *path_buf, int buffer_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_format_db_path_post[hIndex].func; + postHookFunc(filename, path_buf, buffer_len); + } + } + return; +} int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_pre ) { - int (*preHookFunc) (struct config_t *config, FILE *stream); + if (HPMHooks.count.HP_libconfig_read_pre > 0) { + int (*preHookFunc) (struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func; - retVal___ = preHookFunc(config, stream); + retVal___ = preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7815,9 +10240,9 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { { retVal___ = HPMHooks.source.libconfig.read(config, stream); } - if( HPMHooks.count.HP_libconfig_read_post ) { + if (HPMHooks.count.HP_libconfig_read_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, stream); } @@ -7826,14 +10251,14 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { } void HP_libconfig_write(const struct config_t *config, FILE *stream) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_write_pre ) { - void (*preHookFunc) (const struct config_t *config, FILE *stream); + if (HPMHooks.count.HP_libconfig_write_pre > 0) { + void (*preHookFunc) (const struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func; - preHookFunc(config, stream); + preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7841,9 +10266,9 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { { HPMHooks.source.libconfig.write(config, stream); } - if( HPMHooks.count.HP_libconfig_write_post ) { + if (HPMHooks.count.HP_libconfig_write_post > 0) { void (*postHookFunc) (const struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func; postHookFunc(config, stream); } @@ -7852,14 +10277,14 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { } void HP_libconfig_set_options(struct config_t *config, int options) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_options_pre ) { - void (*preHookFunc) (struct config_t *config, int *options); + if (HPMHooks.count.HP_libconfig_set_options_pre > 0) { + void (*preHookFunc) (struct config_t **config, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_options_pre[hIndex].func; - preHookFunc(config, &options); + preHookFunc(&config, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7867,11 +10292,11 @@ void HP_libconfig_set_options(struct config_t *config, int options) { { HPMHooks.source.libconfig.set_options(config, options); } - if( HPMHooks.count.HP_libconfig_set_options_post ) { - void (*postHookFunc) (struct config_t *config, int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_set_options_post > 0) { + void (*postHookFunc) (struct config_t *config, int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_options_post[hIndex].func; - postHookFunc(config, &options); + postHookFunc(config, options); } } return; @@ -7879,14 +10304,14 @@ void HP_libconfig_set_options(struct config_t *config, int options) { int HP_libconfig_get_options(const struct config_t *config) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_get_options_pre ) { - int (*preHookFunc) (const struct config_t *config); + if (HPMHooks.count.HP_libconfig_get_options_pre > 0) { + int (*preHookFunc) (const struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_get_options_pre[hIndex].func; - retVal___ = preHookFunc(config); + retVal___ = preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7894,9 +10319,9 @@ int HP_libconfig_get_options(const struct config_t *config) { { retVal___ = HPMHooks.source.libconfig.get_options(config); } - if( HPMHooks.count.HP_libconfig_get_options_post ) { + if (HPMHooks.count.HP_libconfig_get_options_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_get_options_post[hIndex].func; retVal___ = postHookFunc(retVal___, config); } @@ -7906,14 +10331,14 @@ int HP_libconfig_get_options(const struct config_t *config) { int HP_libconfig_read_string(struct config_t *config, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_string_pre ) { - int (*preHookFunc) (struct config_t *config, const char *str); + if (HPMHooks.count.HP_libconfig_read_string_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func; - retVal___ = preHookFunc(config, str); + retVal___ = preHookFunc(&config, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7921,9 +10346,9 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { { retVal___ = HPMHooks.source.libconfig.read_string(config, str); } - if( HPMHooks.count.HP_libconfig_read_string_post ) { + if (HPMHooks.count.HP_libconfig_read_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, str); } @@ -7933,14 +10358,14 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_file_src_pre ) { - int (*preHookFunc) (struct config_t *config, const char *filename); + if (HPMHooks.count.HP_libconfig_read_file_src_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func; - retVal___ = preHookFunc(config, filename); + retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7948,9 +10373,9 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename); } - if( HPMHooks.count.HP_libconfig_read_file_src_post ) { + if (HPMHooks.count.HP_libconfig_read_file_src_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -7960,14 +10385,14 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int HP_libconfig_write_file(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_write_file_pre ) { - int (*preHookFunc) (struct config_t *config, const char *filename); + if (HPMHooks.count.HP_libconfig_write_file_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func; - retVal___ = preHookFunc(config, filename); + retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7975,9 +10400,9 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.write_file(config, filename); } - if( HPMHooks.count.HP_libconfig_write_file_post ) { + if (HPMHooks.count.HP_libconfig_write_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -7986,14 +10411,14 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { } void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) (void *)) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_destructor_pre ) { - void (*preHookFunc) (struct config_t *config, void ( *destructor ) (void *)); + if (HPMHooks.count.HP_libconfig_set_destructor_pre > 0) { + void (*preHookFunc) (struct config_t **config, void ( **destructor ) (void *)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func; - preHookFunc(config, destructor); + preHookFunc(&config, &destructor); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8001,9 +10426,9 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( { HPMHooks.source.libconfig.set_destructor(config, destructor); } - if( HPMHooks.count.HP_libconfig_set_destructor_post ) { + if (HPMHooks.count.HP_libconfig_set_destructor_post > 0) { void (*postHookFunc) (struct config_t *config, void ( *destructor ) (void *)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func; postHookFunc(config, destructor); } @@ -8012,14 +10437,14 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( } void HP_libconfig_set_include_dir(struct config_t *config, const char *include_dir) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) { - void (*preHookFunc) (struct config_t *config, const char *include_dir); + if (HPMHooks.count.HP_libconfig_set_include_dir_pre > 0) { + void (*preHookFunc) (struct config_t **config, const char **include_dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func; - preHookFunc(config, include_dir); + preHookFunc(&config, &include_dir); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8027,9 +10452,9 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d { HPMHooks.source.libconfig.set_include_dir(config, include_dir); } - if( HPMHooks.count.HP_libconfig_set_include_dir_post ) { + if (HPMHooks.count.HP_libconfig_set_include_dir_post > 0) { void (*postHookFunc) (struct config_t *config, const char *include_dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func; postHookFunc(config, include_dir); } @@ -8038,14 +10463,14 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d } void HP_libconfig_init(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_init_pre ) { - void (*preHookFunc) (struct config_t *config); + if (HPMHooks.count.HP_libconfig_init_pre > 0) { + void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func; - preHookFunc(config); + preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8053,9 +10478,9 @@ void HP_libconfig_init(struct config_t *config) { { HPMHooks.source.libconfig.init(config); } - if( HPMHooks.count.HP_libconfig_init_post ) { + if (HPMHooks.count.HP_libconfig_init_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func; postHookFunc(config); } @@ -8064,14 +10489,14 @@ void HP_libconfig_init(struct config_t *config) { } void HP_libconfig_destroy(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_destroy_pre ) { - void (*preHookFunc) (struct config_t *config); + if (HPMHooks.count.HP_libconfig_destroy_pre > 0) { + void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func; - preHookFunc(config); + preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8079,9 +10504,9 @@ void HP_libconfig_destroy(struct config_t *config) { { HPMHooks.source.libconfig.destroy(config); } - if( HPMHooks.count.HP_libconfig_destroy_post ) { + if (HPMHooks.count.HP_libconfig_destroy_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func; postHookFunc(config); } @@ -8091,14 +10516,14 @@ void HP_libconfig_destroy(struct config_t *config) { int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_int_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8106,26 +10531,26 @@ int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } } return retVal___; } -long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { +int64 HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) { - long long (*preHookFunc) (const struct config_setting_t *setting); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8133,9 +10558,9 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -8145,14 +10570,14 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) { - double (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_float_pre > 0) { + double (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8160,9 +10585,9 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_float(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_post > 0) { double (*postHookFunc) (double retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -8172,14 +10597,14 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_bool_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8187,9 +10612,9 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -8199,14 +10624,14 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { const char* HP_libconfig_setting_get_string(const struct config_setting_t *setting) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) { - const char* (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_string_pre > 0) { + const char* (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8214,9 +10639,9 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti { retVal___ = HPMHooks.source.libconfig.setting_get_string(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -8226,14 +10651,14 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_lookup_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, const char *name); + if (HPMHooks.count.HP_libconfig_setting_lookup_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_pre[hIndex].func; - retVal___ = preHookFunc(setting, name); + retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8241,9 +10666,9 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_lookup_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -8253,14 +10678,14 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, int *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8268,26 +10693,26 @@ int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, cons { retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } } return retVal___; } -int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, long long *value) { +int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, long long *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8295,9 +10720,9 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -8307,14 +10732,14 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, const char *name, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, double *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_float_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8322,9 +10747,9 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -8334,14 +10759,14 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, int *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8349,9 +10774,9 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -8361,14 +10786,14 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, const char *name, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, const char **value); + if (HPMHooks.count.HP_libconfig_setting_lookup_string_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8376,9 +10801,9 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -8388,14 +10813,14 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_int_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8403,26 +10828,26 @@ int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; } -int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long value) { +int HP_libconfig_setting_set_int64(struct config_setting_t *setting, int64 value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8430,11 +10855,11 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v { retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; @@ -8442,14 +10867,14 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v int HP_libconfig_setting_set_float(struct config_setting_t *setting, double value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, double *value); + if (HPMHooks.count.HP_libconfig_setting_set_float_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8457,11 +10882,11 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu { retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, double value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; @@ -8469,14 +10894,14 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_bool_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8484,11 +10909,11 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; @@ -8496,14 +10921,14 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, const char *value); + if (HPMHooks.count.HP_libconfig_setting_set_string_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func; - retVal___ = preHookFunc(setting, value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8511,9 +10936,9 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char { retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -8523,14 +10948,14 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char int HP_libconfig_setting_set_format(struct config_setting_t *setting, short format) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, short *format); + if (HPMHooks.count.HP_libconfig_setting_set_format_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, short *format); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func; - retVal___ = preHookFunc(setting, &format); + retVal___ = preHookFunc(&setting, &format); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8538,11 +10963,11 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form { retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format); } - if( HPMHooks.count.HP_libconfig_setting_set_format_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, short *format); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_format_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, short format); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &format); + retVal___ = postHookFunc(retVal___, setting, format); } } return retVal___; @@ -8550,14 +10975,14 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) { - short (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_format_pre > 0) { + short (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8565,9 +10990,9 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_format(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_format_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_format_post > 0) { short (*postHookFunc) (short retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -8577,14 +11002,14 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8592,26 +11017,26 @@ int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, in { retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; } -long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { +int64 HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) { - long long (*preHookFunc) (const struct config_setting_t *setting, int *idx); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8619,11 +11044,11 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set { retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -8631,14 +11056,14 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set double HP_libconfig_setting_get_float_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) { - double (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_pre > 0) { + double (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8646,11 +11071,11 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin { retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) { - double (*postHookFunc) (double retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_post > 0) { + double (*postHookFunc) (double retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -8658,14 +11083,14 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8673,11 +11098,11 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i { retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -8685,14 +11110,14 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) { - const char* (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_pre > 0) { + const char* (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8700,11 +11125,11 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * { retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) { - const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -8712,14 +11137,14 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8727,26 +11152,26 @@ struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting { retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; } -struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, long long value) { +struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, int64 value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8754,11 +11179,11 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -8766,14 +11191,14 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setting_t *setting, int idx, double value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, double *value); + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8781,11 +11206,11 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, double value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -8793,14 +11218,14 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8808,11 +11233,11 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin { retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -8820,14 +11245,14 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_setting_t *setting, int idx, const char *value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, const char *value); + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8835,11 +11260,11 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett { retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, const char *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -8847,14 +11272,14 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett int HP_libconfig_setting_index(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_index_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_index_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8862,9 +11287,9 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_index(setting); } - if( HPMHooks.count.HP_libconfig_setting_index_post ) { + if (HPMHooks.count.HP_libconfig_setting_index_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -8874,14 +11299,14 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { int HP_libconfig_setting_length(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_length_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_length_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8889,9 +11314,9 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_length(setting); } - if( HPMHooks.count.HP_libconfig_setting_length_post ) { + if (HPMHooks.count.HP_libconfig_setting_length_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -8901,14 +11326,14 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setting_t *setting, unsigned int idx) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) { - struct config_setting_t* (*preHookFunc) (const struct config_setting_t *setting, unsigned int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8916,11 +11341,11 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, unsigned int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, unsigned int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -8928,14 +11353,14 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti struct config_setting_t* HP_libconfig_setting_get_member(const struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) { - struct config_setting_t* (*preHookFunc) (const struct config_setting_t *setting, const char *name); + if (HPMHooks.count.HP_libconfig_setting_get_member_pre > 0) { + struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func; - retVal___ = preHookFunc(setting, name); + retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8943,9 +11368,9 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set { retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_get_member_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_member_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -8955,14 +11380,14 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *parent, const char *name, int type) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_add_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *parent, const char *name, int *type); + if (HPMHooks.count.HP_libconfig_setting_add_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **parent, const char **name, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func; - retVal___ = preHookFunc(parent, name, &type); + retVal___ = preHookFunc(&parent, &name, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8970,11 +11395,11 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren { retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type); } - if( HPMHooks.count.HP_libconfig_setting_add_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *parent, const char *name, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_add_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *parent, const char *name, int type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, parent, name, &type); + retVal___ = postHookFunc(retVal___, parent, name, type); } } return retVal___; @@ -8982,14 +11407,14 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_pre ) { - int (*preHookFunc) (struct config_setting_t *parent, const char *name); + if (HPMHooks.count.HP_libconfig_setting_remove_pre > 0) { + int (*preHookFunc) (struct config_setting_t **parent, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func; - retVal___ = preHookFunc(parent, name); + retVal___ = preHookFunc(&parent, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8997,9 +11422,9 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam { retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name); } - if( HPMHooks.count.HP_libconfig_setting_remove_post ) { + if (HPMHooks.count.HP_libconfig_setting_remove_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, name); } @@ -9009,14 +11434,14 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) { - int (*preHookFunc) (struct config_setting_t *parent, unsigned int *idx); + if (HPMHooks.count.HP_libconfig_setting_remove_elem_pre > 0) { + int (*preHookFunc) (struct config_setting_t **parent, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func; - retVal___ = preHookFunc(parent, &idx); + retVal___ = preHookFunc(&parent, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9024,25 +11449,25 @@ int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned i { retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx); } - if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *parent, unsigned int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_remove_elem_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *parent, unsigned int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, parent, &idx); + retVal___ = postHookFunc(retVal___, parent, idx); } } return retVal___; } void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) { - void (*preHookFunc) (struct config_setting_t *setting, void *hook); + if (HPMHooks.count.HP_libconfig_setting_set_hook_pre > 0) { + void (*preHookFunc) (struct config_setting_t **setting, void **hook); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func; - preHookFunc(setting, hook); + preHookFunc(&setting, &hook); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9050,9 +11475,9 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { HPMHooks.source.libconfig.setting_set_hook(setting, hook); } - if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_hook_post > 0) { void (*postHookFunc) (struct config_setting_t *setting, void *hook); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func; postHookFunc(setting, hook); } @@ -9062,14 +11487,14 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, const char *filepath) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_lookup_pre ) { - struct config_setting_t* (*preHookFunc) (const struct config_t *config, const char *filepath); + if (HPMHooks.count.HP_libconfig_lookup_pre > 0) { + struct config_setting_t* (*preHookFunc) (const struct config_t **config, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath); + retVal___ = preHookFunc(&config, &filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9077,9 +11502,9 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons { retVal___ = HPMHooks.source.libconfig.lookup(config, filepath); } - if( HPMHooks.count.HP_libconfig_lookup_post ) { + if (HPMHooks.count.HP_libconfig_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_t *config, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath); } @@ -9089,14 +11514,14 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, int *value); + if (HPMHooks.count.HP_libconfig_lookup_int_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9104,26 +11529,26 @@ int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, { retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } } return retVal___; } -int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, long long *value) { +int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, long long *value); + if (HPMHooks.count.HP_libconfig_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9131,9 +11556,9 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -9143,14 +11568,14 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat int HP_libconfig_lookup_float(const struct config_t *config, const char *filepath, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_float_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, double *value); + if (HPMHooks.count.HP_libconfig_lookup_float_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9158,9 +11583,9 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -9170,14 +11595,14 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, int *value); + if (HPMHooks.count.HP_libconfig_lookup_bool_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9185,9 +11610,9 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath { retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -9197,14 +11622,14 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath int HP_libconfig_lookup_string(const struct config_t *config, const char *filepath, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_string_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, const char **value); + if (HPMHooks.count.HP_libconfig_lookup_string_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9212,9 +11637,9 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa { retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -9224,14 +11649,14 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_load_file_pre ) { - int (*preHookFunc) (struct config_t *config, const char *config_filename); + if (HPMHooks.count.HP_libconfig_load_file_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_load_file_pre[hIndex].func; - retVal___ = preHookFunc(config, config_filename); + retVal___ = preHookFunc(&config, &config_filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9239,9 +11664,9 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { retVal___ = HPMHooks.source.libconfig.load_file(config, config_filename); } - if( HPMHooks.count.HP_libconfig_load_file_post ) { + if (HPMHooks.count.HP_libconfig_load_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_load_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, config_filename); } @@ -9250,14 +11675,14 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) } void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) { - void (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_simple_pre > 0) { + void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func; - preHookFunc(parent, src); + preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9265,9 +11690,9 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str { HPMHooks.source.libconfig.setting_copy_simple(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_simple_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func; postHookFunc(parent, src); } @@ -9276,14 +11701,14 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str } void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) { - void (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_elem_pre > 0) { + void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func; - preHookFunc(parent, src); + preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9291,9 +11716,9 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc { HPMHooks.source.libconfig.setting_copy_elem(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_elem_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func; postHookFunc(parent, src); } @@ -9302,14 +11727,14 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc } void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) { - void (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre > 0) { + void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func; - preHookFunc(parent, src); + preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9317,9 +11742,9 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const { HPMHooks.source.libconfig.setting_copy_aggregate(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func; postHookFunc(parent, src); } @@ -9329,14 +11754,14 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_pre ) { - int (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_pre > 0) { + int (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func; - retVal___ = preHookFunc(parent, src); + retVal___ = preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9344,9 +11769,9 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf { retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, src); } @@ -9356,14 +11781,14 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_pre ) { - bool (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9371,9 +11796,9 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_bool_real(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -9383,14 +11808,14 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint32_pre ) { - uint32 (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_uint32_pre > 0) { + uint32 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9398,9 +11823,9 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint32(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint32_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -9410,14 +11835,14 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint16_pre ) { - uint16 (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_uint16_pre > 0) { + uint16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9425,9 +11850,9 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint16_post > 0) { uint16 (*postHookFunc) (uint16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -9437,14 +11862,14 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int hIndex = 0; int16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int16_pre ) { - int16 (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_int16_pre > 0) { + int16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9452,9 +11877,9 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int16_post > 0) { int16 (*postHookFunc) (int16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -9464,14 +11889,14 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting, const char *name, bool *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, bool *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, bool **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9479,9 +11904,9 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool_real(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, bool *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -9491,14 +11916,14 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, const char *name, uint32 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, uint32 *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint32 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9506,9 +11931,9 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint32(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint32 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -9518,14 +11943,14 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, const char *name, uint16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, uint16 *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9533,9 +11958,9 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -9545,14 +11970,14 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, const char *name, int16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, int16 *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9560,9 +11985,9 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -9572,14 +11997,14 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *setting, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, char *out, size_t *out_size); + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, out, &out_size); + retVal___ = preHookFunc(&setting, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9587,11 +12012,11 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup_mutable_string(setting, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, char *out, size_t *out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, char *out, size_t out_size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, name, out, &out_size); + retVal___ = postHookFunc(retVal___, setting, name, out, out_size); } } return retVal___; @@ -9599,14 +12024,14 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *name, char *out, size_t *out_size); + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_pre[hIndex].func; - retVal___ = preHookFunc(config, name, out, &out_size); + retVal___ = preHookFunc(&config, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9614,26 +12039,26 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char { retVal___ = HPMHooks.source.libconfig.lookup_mutable_string(config, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_post ) { - int (*postHookFunc) (int retVal___, const struct config_t *config, const char *name, char *out, size_t *out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_t *config, const char *name, char *out, size_t out_size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_post[hIndex].func; - retVal___ = postHookFunc(retVal___, config, name, out, &out_size); + retVal___ = postHookFunc(retVal___, config, name, out, out_size); } } return retVal___; } -/* loginif */ +/* loginif_interface */ void HP_loginif_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_init_pre ) { + if (HPMHooks.count.HP_loginif_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9641,9 +12066,9 @@ void HP_loginif_init(void) { { HPMHooks.source.loginif.init(); } - if( HPMHooks.count.HP_loginif_init_post ) { + if (HPMHooks.count.HP_loginif_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_init_post[hIndex].func; postHookFunc(); } @@ -9652,14 +12077,14 @@ void HP_loginif_init(void) { } void HP_loginif_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_final_pre ) { + if (HPMHooks.count.HP_loginif_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9667,9 +12092,9 @@ void HP_loginif_final(void) { { HPMHooks.source.loginif.final(); } - if( HPMHooks.count.HP_loginif_final_post ) { + if (HPMHooks.count.HP_loginif_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_final_post[hIndex].func; postHookFunc(); } @@ -9678,14 +12103,14 @@ void HP_loginif_final(void) { } void HP_loginif_reset(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_reset_pre ) { + if (HPMHooks.count.HP_loginif_reset_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_reset_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9693,9 +12118,9 @@ void HP_loginif_reset(void) { { HPMHooks.source.loginif.reset(); } - if( HPMHooks.count.HP_loginif_reset_post ) { + if (HPMHooks.count.HP_loginif_reset_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_reset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_reset_post[hIndex].func; postHookFunc(); } @@ -9704,14 +12129,14 @@ void HP_loginif_reset(void) { } void HP_loginif_check_shutdown(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_check_shutdown_pre ) { + if (HPMHooks.count.HP_loginif_check_shutdown_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_check_shutdown_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9719,9 +12144,9 @@ void HP_loginif_check_shutdown(void) { { HPMHooks.source.loginif.check_shutdown(); } - if( HPMHooks.count.HP_loginif_check_shutdown_post ) { + if (HPMHooks.count.HP_loginif_check_shutdown_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_check_shutdown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_check_shutdown_post[hIndex].func; postHookFunc(); } @@ -9730,14 +12155,14 @@ void HP_loginif_check_shutdown(void) { } void HP_loginif_on_disconnect(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_on_disconnect_pre ) { + if (HPMHooks.count.HP_loginif_on_disconnect_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_on_disconnect_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9745,9 +12170,9 @@ void HP_loginif_on_disconnect(void) { { HPMHooks.source.loginif.on_disconnect(); } - if( HPMHooks.count.HP_loginif_on_disconnect_post ) { + if (HPMHooks.count.HP_loginif_on_disconnect_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_disconnect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_on_disconnect_post[hIndex].func; postHookFunc(); } @@ -9756,14 +12181,14 @@ void HP_loginif_on_disconnect(void) { } void HP_loginif_on_ready(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_on_ready_pre ) { + if (HPMHooks.count.HP_loginif_on_ready_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_on_ready_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9771,9 +12196,9 @@ void HP_loginif_on_ready(void) { { HPMHooks.source.loginif.on_ready(); } - if( HPMHooks.count.HP_loginif_on_ready_post ) { + if (HPMHooks.count.HP_loginif_on_ready_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_on_ready_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_on_ready_post[hIndex].func; postHookFunc(); } @@ -9782,14 +12207,14 @@ void HP_loginif_on_ready(void) { } void HP_loginif_block_account(int account_id, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_block_account_pre ) { + if (HPMHooks.count.HP_loginif_block_account_pre > 0) { void (*preHookFunc) (int *account_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_block_account_pre[hIndex].func; preHookFunc(&account_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9797,25 +12222,25 @@ void HP_loginif_block_account(int account_id, int flag) { { HPMHooks.source.loginif.block_account(account_id, flag); } - if( HPMHooks.count.HP_loginif_block_account_post ) { - void (*postHookFunc) (int *account_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_post; hIndex++ ) { + if (HPMHooks.count.HP_loginif_block_account_post > 0) { + void (*postHookFunc) (int account_id, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_block_account_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_block_account_post[hIndex].func; - postHookFunc(&account_id, &flag); + postHookFunc(account_id, flag); } } return; } void HP_loginif_ban_account(int account_id, short year, short month, short day, short hour, short minute, short second) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_ban_account_pre ) { + if (HPMHooks.count.HP_loginif_ban_account_pre > 0) { void (*preHookFunc) (int *account_id, short *year, short *month, short *day, short *hour, short *minute, short *second); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_ban_account_pre[hIndex].func; preHookFunc(&account_id, &year, &month, &day, &hour, &minute, &second); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9823,25 +12248,25 @@ void HP_loginif_ban_account(int account_id, short year, short month, short day, { HPMHooks.source.loginif.ban_account(account_id, year, month, day, hour, minute, second); } - if( HPMHooks.count.HP_loginif_ban_account_post ) { - void (*postHookFunc) (int *account_id, short *year, short *month, short *day, short *hour, short *minute, short *second); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_post; hIndex++ ) { + if (HPMHooks.count.HP_loginif_ban_account_post > 0) { + void (*postHookFunc) (int account_id, short year, short month, short day, short hour, short minute, short second); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_ban_account_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_ban_account_post[hIndex].func; - postHookFunc(&account_id, &year, &month, &day, &hour, &minute, &second); + postHookFunc(account_id, year, month, day, hour, minute, second); } } return; } void HP_loginif_unban_account(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_unban_account_pre ) { + if (HPMHooks.count.HP_loginif_unban_account_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_unban_account_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9849,25 +12274,25 @@ void HP_loginif_unban_account(int account_id) { { HPMHooks.source.loginif.unban_account(account_id); } - if( HPMHooks.count.HP_loginif_unban_account_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_post; hIndex++ ) { + if (HPMHooks.count.HP_loginif_unban_account_post > 0) { + void (*postHookFunc) (int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_unban_account_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_unban_account_post[hIndex].func; - postHookFunc(&account_id); + postHookFunc(account_id); } } return; } void HP_loginif_changesex(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_changesex_pre ) { + if (HPMHooks.count.HP_loginif_changesex_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_changesex_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9875,25 +12300,25 @@ void HP_loginif_changesex(int account_id) { { HPMHooks.source.loginif.changesex(account_id); } - if( HPMHooks.count.HP_loginif_changesex_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_post; hIndex++ ) { + if (HPMHooks.count.HP_loginif_changesex_post > 0) { + void (*postHookFunc) (int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_changesex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_changesex_post[hIndex].func; - postHookFunc(&account_id); + postHookFunc(account_id); } } return; } void HP_loginif_auth(int fd, struct char_session_data *sd, uint32 ipl) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_auth_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd, uint32 *ipl); + if (HPMHooks.count.HP_loginif_auth_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_auth_pre[hIndex].func; - preHookFunc(&fd, sd, &ipl); + preHookFunc(&fd, &sd, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9901,25 +12326,25 @@ void HP_loginif_auth(int fd, struct char_session_data *sd, uint32 ipl) { { HPMHooks.source.loginif.auth(fd, sd, ipl); } - if( HPMHooks.count.HP_loginif_auth_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd, uint32 *ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_post; hIndex++ ) { + if (HPMHooks.count.HP_loginif_auth_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, uint32 ipl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_auth_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_auth_post[hIndex].func; - postHookFunc(&fd, sd, &ipl); + postHookFunc(fd, sd, ipl); } } return; } void HP_loginif_send_users_count(int users) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_send_users_count_pre ) { + if (HPMHooks.count.HP_loginif_send_users_count_pre > 0) { void (*preHookFunc) (int *users); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_send_users_count_pre[hIndex].func; preHookFunc(&users); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9927,25 +12352,25 @@ void HP_loginif_send_users_count(int users) { { HPMHooks.source.loginif.send_users_count(users); } - if( HPMHooks.count.HP_loginif_send_users_count_post ) { - void (*postHookFunc) (int *users); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_post; hIndex++ ) { + if (HPMHooks.count.HP_loginif_send_users_count_post > 0) { + void (*postHookFunc) (int users); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_send_users_count_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_send_users_count_post[hIndex].func; - postHookFunc(&users); + postHookFunc(users); } } return; } void HP_loginif_connect_to_server(void) { int hIndex = 0; - if( HPMHooks.count.HP_loginif_connect_to_server_pre ) { + if (HPMHooks.count.HP_loginif_connect_to_server_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_loginif_connect_to_server_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9953,399 +12378,26 @@ void HP_loginif_connect_to_server(void) { { HPMHooks.source.loginif.connect_to_server(); } - if( HPMHooks.count.HP_loginif_connect_to_server_post ) { + if (HPMHooks.count.HP_loginif_connect_to_server_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginif_connect_to_server_post; hIndex++) { postHookFunc = HPMHooks.list.HP_loginif_connect_to_server_post[hIndex].func; postHookFunc(); } } return; } -/* iMalloc */ -void HP_iMalloc_init(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.init(); - } - if( HPMHooks.count.HP_iMalloc_init_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func; - postHookFunc(); - } - } - return; -} -void HP_iMalloc_final(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_final_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.final(); - } - if( HPMHooks.count.HP_iMalloc_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func; - postHookFunc(); - } - } - return; -} -void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_malloc_pre ) { - void* (*preHookFunc) (size_t *size, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func; - retVal___ = preHookFunc(&size, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_malloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &size, file, &line, func); - } - } - return retVal___; -} -void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_calloc_pre ) { - void* (*preHookFunc) (size_t *num, size_t *size, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func; - retVal___ = preHookFunc(&num, &size, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_calloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t *num, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &num, &size, file, &line, func); - } - } - return retVal___; -} -void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_realloc_pre ) { - void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func; - retVal___ = preHookFunc(p, &size, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_realloc_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); - } - } - return retVal___; -} -void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_reallocz_pre ) { - void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func; - retVal___ = preHookFunc(p, &size, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_reallocz_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); - } - } - return retVal___; -} -char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) { - int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrdup_pre ) { - char* (*preHookFunc) (const char *p, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func; - retVal___ = preHookFunc(p, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_astrdup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, file, &line, func); - } - } - return retVal___; -} -char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrndup_pre ) { - char* (*preHookFunc) (const char *p, size_t *size, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func; - retVal___ = preHookFunc(p, &size, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_astrndup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); - } - } - return retVal___; -} -void HP_iMalloc_free(void *p, const char *file, int line, const char *func) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_free_pre ) { - void (*preHookFunc) (void *p, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func; - preHookFunc(p, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.free(p, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_free_post ) { - void (*postHookFunc) (void *p, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func; - postHookFunc(p, file, &line, func); - } - } - return; -} -void HP_iMalloc_memory_check(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_memory_check_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.memory_check(); - } - if( HPMHooks.count.HP_iMalloc_memory_check_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func; - postHookFunc(); - } - } - return; -} -bool HP_iMalloc_verify_ptr(void *ptr) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) { - bool (*preHookFunc) (void *ptr); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func; - retVal___ = preHookFunc(ptr); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr); - } - if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) { - bool (*postHookFunc) (bool retVal___, void *ptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ptr); - } - } - return retVal___; -} -size_t HP_iMalloc_usage(void) { - int hIndex = 0; - size_t retVal___ = 0; - if( HPMHooks.count.HP_iMalloc_usage_pre ) { - size_t (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func; - retVal___ = preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.usage(); - } - if( HPMHooks.count.HP_iMalloc_usage_post ) { - size_t (*postHookFunc) (size_t retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func; - retVal___ = postHookFunc(retVal___); - } - } - return retVal___; -} -void HP_iMalloc_post_shutdown(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.post_shutdown(); - } - if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func; - postHookFunc(); - } - } - return; -} -void HP_iMalloc_init_messages(void) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_messages_pre ) { - void (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func; - preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.iMalloc.init_messages(); - } - if( HPMHooks.count.HP_iMalloc_init_messages_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func; - postHookFunc(); - } - } - return; -} -/* mapif */ +/* mapif_interface */ void HP_mapif_ban(int id, unsigned int flag, int status) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_ban_pre ) { + if (HPMHooks.count.HP_mapif_ban_pre > 0) { void (*preHookFunc) (int *id, unsigned int *flag, int *status); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_ban_pre[hIndex].func; preHookFunc(&id, &flag, &status); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10353,25 +12405,25 @@ void HP_mapif_ban(int id, unsigned int flag, int status) { { HPMHooks.source.mapif.ban(id, flag, status); } - if( HPMHooks.count.HP_mapif_ban_post ) { - void (*postHookFunc) (int *id, unsigned int *flag, int *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_ban_post > 0) { + void (*postHookFunc) (int id, unsigned int flag, int status); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_ban_post[hIndex].func; - postHookFunc(&id, &flag, &status); + postHookFunc(id, flag, status); } } return; } void HP_mapif_server_init(int id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_server_init_pre ) { + if (HPMHooks.count.HP_mapif_server_init_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_server_init_pre[hIndex].func; preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10379,25 +12431,25 @@ void HP_mapif_server_init(int id) { { HPMHooks.source.mapif.server_init(id); } - if( HPMHooks.count.HP_mapif_server_init_post ) { - void (*postHookFunc) (int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_server_init_post > 0) { + void (*postHookFunc) (int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_server_init_post[hIndex].func; - postHookFunc(&id); + postHookFunc(id); } } return; } void HP_mapif_server_destroy(int id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_server_destroy_pre ) { + if (HPMHooks.count.HP_mapif_server_destroy_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_server_destroy_pre[hIndex].func; preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10405,25 +12457,25 @@ void HP_mapif_server_destroy(int id) { { HPMHooks.source.mapif.server_destroy(id); } - if( HPMHooks.count.HP_mapif_server_destroy_post ) { - void (*postHookFunc) (int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_server_destroy_post > 0) { + void (*postHookFunc) (int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_server_destroy_post[hIndex].func; - postHookFunc(&id); + postHookFunc(id); } } return; } void HP_mapif_server_reset(int id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_server_reset_pre ) { + if (HPMHooks.count.HP_mapif_server_reset_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_server_reset_pre[hIndex].func; preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10431,25 +12483,25 @@ void HP_mapif_server_reset(int id) { { HPMHooks.source.mapif.server_reset(id); } - if( HPMHooks.count.HP_mapif_server_reset_post ) { - void (*postHookFunc) (int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_server_reset_post > 0) { + void (*postHookFunc) (int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_server_reset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_server_reset_post[hIndex].func; - postHookFunc(&id); + postHookFunc(id); } } return; } void HP_mapif_on_disconnect(int id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_on_disconnect_pre ) { + if (HPMHooks.count.HP_mapif_on_disconnect_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_on_disconnect_pre[hIndex].func; preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10457,25 +12509,25 @@ void HP_mapif_on_disconnect(int id) { { HPMHooks.source.mapif.on_disconnect(id); } - if( HPMHooks.count.HP_mapif_on_disconnect_post ) { - void (*postHookFunc) (int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_on_disconnect_post > 0) { + void (*postHookFunc) (int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_disconnect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_on_disconnect_post[hIndex].func; - postHookFunc(&id); + postHookFunc(id); } } return; } void HP_mapif_on_parse_accinfo(int account_id, int u_fd, int u_aid, int u_group, int map_fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_on_parse_accinfo_pre ) { + if (HPMHooks.count.HP_mapif_on_parse_accinfo_pre > 0) { void (*preHookFunc) (int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_on_parse_accinfo_pre[hIndex].func; preHookFunc(&account_id, &u_fd, &u_aid, &u_group, &map_fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10483,25 +12535,25 @@ void HP_mapif_on_parse_accinfo(int account_id, int u_fd, int u_aid, int u_group, { HPMHooks.source.mapif.on_parse_accinfo(account_id, u_fd, u_aid, u_group, map_fd); } - if( HPMHooks.count.HP_mapif_on_parse_accinfo_post ) { - void (*postHookFunc) (int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_on_parse_accinfo_post > 0) { + void (*postHookFunc) (int account_id, int u_fd, int u_aid, int u_group, int map_fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_on_parse_accinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_on_parse_accinfo_post[hIndex].func; - postHookFunc(&account_id, &u_fd, &u_aid, &u_group, &map_fd); + postHookFunc(account_id, u_fd, u_aid, u_group, map_fd); } } return; } void HP_mapif_char_ban(int char_id, time_t timestamp) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_char_ban_pre ) { + if (HPMHooks.count.HP_mapif_char_ban_pre > 0) { void (*preHookFunc) (int *char_id, time_t *timestamp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_char_ban_pre[hIndex].func; preHookFunc(&char_id, ×tamp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10509,11 +12561,11 @@ void HP_mapif_char_ban(int char_id, time_t timestamp) { { HPMHooks.source.mapif.char_ban(char_id, timestamp); } - if( HPMHooks.count.HP_mapif_char_ban_post ) { - void (*postHookFunc) (int *char_id, time_t *timestamp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_char_ban_post > 0) { + void (*postHookFunc) (int char_id, time_t timestamp); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_char_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_char_ban_post[hIndex].func; - postHookFunc(&char_id, ×tamp); + postHookFunc(char_id, timestamp); } } return; @@ -10521,14 +12573,14 @@ void HP_mapif_char_ban(int char_id, time_t timestamp) { int HP_mapif_sendall(const unsigned char *buf, unsigned int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_sendall_pre ) { - int (*preHookFunc) (const unsigned char *buf, unsigned int *len); + if (HPMHooks.count.HP_mapif_sendall_pre > 0) { + int (*preHookFunc) (const unsigned char **buf, unsigned int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_sendall_pre[hIndex].func; - retVal___ = preHookFunc(buf, &len); + retVal___ = preHookFunc(&buf, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10536,11 +12588,11 @@ int HP_mapif_sendall(const unsigned char *buf, unsigned int len) { { retVal___ = HPMHooks.source.mapif.sendall(buf, len); } - if( HPMHooks.count.HP_mapif_sendall_post ) { - int (*postHookFunc) (int retVal___, const unsigned char *buf, unsigned int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_sendall_post > 0) { + int (*postHookFunc) (int retVal___, const unsigned char *buf, unsigned int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendall_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_sendall_post[hIndex].func; - retVal___ = postHookFunc(retVal___, buf, &len); + retVal___ = postHookFunc(retVal___, buf, len); } } return retVal___; @@ -10548,14 +12600,14 @@ int HP_mapif_sendall(const unsigned char *buf, unsigned int len) { int HP_mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_sendallwos_pre ) { - int (*preHookFunc) (int *sfd, unsigned char *buf, unsigned int *len); + if (HPMHooks.count.HP_mapif_sendallwos_pre > 0) { + int (*preHookFunc) (int *sfd, unsigned char **buf, unsigned int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_sendallwos_pre[hIndex].func; - retVal___ = preHookFunc(&sfd, buf, &len); + retVal___ = preHookFunc(&sfd, &buf, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10563,11 +12615,11 @@ int HP_mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) { { retVal___ = HPMHooks.source.mapif.sendallwos(sfd, buf, len); } - if( HPMHooks.count.HP_mapif_sendallwos_post ) { - int (*postHookFunc) (int retVal___, int *sfd, unsigned char *buf, unsigned int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_sendallwos_post > 0) { + int (*postHookFunc) (int retVal___, int sfd, unsigned char *buf, unsigned int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sendallwos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_sendallwos_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &sfd, buf, &len); + retVal___ = postHookFunc(retVal___, sfd, buf, len); } } return retVal___; @@ -10575,14 +12627,14 @@ int HP_mapif_sendallwos(int sfd, unsigned char *buf, unsigned int len) { int HP_mapif_send(int fd, unsigned char *buf, unsigned int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_send_pre ) { - int (*preHookFunc) (int *fd, unsigned char *buf, unsigned int *len); + if (HPMHooks.count.HP_mapif_send_pre > 0) { + int (*preHookFunc) (int *fd, unsigned char **buf, unsigned int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_send_pre[hIndex].func; - retVal___ = preHookFunc(&fd, buf, &len); + retVal___ = preHookFunc(&fd, &buf, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10590,25 +12642,25 @@ int HP_mapif_send(int fd, unsigned char *buf, unsigned int len) { { retVal___ = HPMHooks.source.mapif.send(fd, buf, len); } - if( HPMHooks.count.HP_mapif_send_post ) { - int (*postHookFunc) (int retVal___, int *fd, unsigned char *buf, unsigned int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_send_post > 0) { + int (*postHookFunc) (int retVal___, int fd, unsigned char *buf, unsigned int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_send_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, buf, &len); + retVal___ = postHookFunc(retVal___, fd, buf, len); } } return retVal___; } void HP_mapif_send_users_count(int users) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_send_users_count_pre ) { + if (HPMHooks.count.HP_mapif_send_users_count_pre > 0) { void (*preHookFunc) (int *users); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_send_users_count_pre[hIndex].func; preHookFunc(&users); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10616,25 +12668,155 @@ void HP_mapif_send_users_count(int users) { { HPMHooks.source.mapif.send_users_count(users); } - if( HPMHooks.count.HP_mapif_send_users_count_post ) { - void (*postHookFunc) (int *users); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_send_users_count_post > 0) { + void (*postHookFunc) (int users); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_users_count_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_send_users_count_post[hIndex].func; - postHookFunc(&users); + postHookFunc(users); + } + } + return; +} +void HP_mapif_pLoadAchievements(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_pLoadAchievements_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pLoadAchievements_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_pLoadAchievements_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.pLoadAchievements(fd); + } + if (HPMHooks.count.HP_mapif_pLoadAchievements_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pLoadAchievements_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_pLoadAchievements_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_mapif_sAchievementsToMap(int fd, int char_id, const struct char_achievements *p) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_sAchievementsToMap_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, const struct char_achievements **p); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sAchievementsToMap_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_sAchievementsToMap_pre[hIndex].func; + preHookFunc(&fd, &char_id, &p); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.sAchievementsToMap(fd, char_id, p); + } + if (HPMHooks.count.HP_mapif_sAchievementsToMap_post > 0) { + void (*postHookFunc) (int fd, int char_id, const struct char_achievements *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sAchievementsToMap_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_sAchievementsToMap_post[hIndex].func; + postHookFunc(fd, char_id, p); + } + } + return; +} +void HP_mapif_pSaveAchievements(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_pSaveAchievements_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pSaveAchievements_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_pSaveAchievements_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.pSaveAchievements(fd); + } + if (HPMHooks.count.HP_mapif_pSaveAchievements_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pSaveAchievements_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_pSaveAchievements_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_mapif_achievement_load(int fd, int char_id) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_achievement_load_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_achievement_load_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_achievement_load_pre[hIndex].func; + preHookFunc(&fd, &char_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.achievement_load(fd, char_id); + } + if (HPMHooks.count.HP_mapif_achievement_load_post > 0) { + void (*postHookFunc) (int fd, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_achievement_load_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_achievement_load_post[hIndex].func; + postHookFunc(fd, char_id); + } + } + return; +} +void HP_mapif_achievement_save(int char_id, struct char_achievements *p) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_achievement_save_pre > 0) { + void (*preHookFunc) (int *char_id, struct char_achievements **p); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_achievement_save_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_achievement_save_pre[hIndex].func; + preHookFunc(&char_id, &p); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.achievement_save(char_id, p); + } + if (HPMHooks.count.HP_mapif_achievement_save_post > 0) { + void (*postHookFunc) (int char_id, struct char_achievements *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_achievement_save_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_achievement_save_post[hIndex].func; + postHookFunc(char_id, p); } } return; } void HP_mapif_auction_message(int char_id, unsigned char result) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_message_pre ) { + if (HPMHooks.count.HP_mapif_auction_message_pre > 0) { void (*preHookFunc) (int *char_id, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_message_pre[hIndex].func; preHookFunc(&char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10642,25 +12824,25 @@ void HP_mapif_auction_message(int char_id, unsigned char result) { { HPMHooks.source.mapif.auction_message(char_id, result); } - if( HPMHooks.count.HP_mapif_auction_message_post ) { - void (*postHookFunc) (int *char_id, unsigned char *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_auction_message_post > 0) { + void (*postHookFunc) (int char_id, unsigned char result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_message_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_message_post[hIndex].func; - postHookFunc(&char_id, &result); + postHookFunc(char_id, result); } } return; } void HP_mapif_auction_sendlist(int fd, int char_id, short count, short pages, unsigned char *buf) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_sendlist_pre ) { - void (*preHookFunc) (int *fd, int *char_id, short *count, short *pages, unsigned char *buf); + if (HPMHooks.count.HP_mapif_auction_sendlist_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, short *count, short *pages, unsigned char **buf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_sendlist_pre[hIndex].func; - preHookFunc(&fd, &char_id, &count, &pages, buf); + preHookFunc(&fd, &char_id, &count, &pages, &buf); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10668,25 +12850,25 @@ void HP_mapif_auction_sendlist(int fd, int char_id, short count, short pages, un { HPMHooks.source.mapif.auction_sendlist(fd, char_id, count, pages, buf); } - if( HPMHooks.count.HP_mapif_auction_sendlist_post ) { - void (*postHookFunc) (int *fd, int *char_id, short *count, short *pages, unsigned char *buf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_auction_sendlist_post > 0) { + void (*postHookFunc) (int fd, int char_id, short count, short pages, unsigned char *buf); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_sendlist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_sendlist_post[hIndex].func; - postHookFunc(&fd, &char_id, &count, &pages, buf); + postHookFunc(fd, char_id, count, pages, buf); } } return; } void HP_mapif_parse_auction_requestlist(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_requestlist_pre ) { + if (HPMHooks.count.HP_mapif_parse_auction_requestlist_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_auction_requestlist_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10694,25 +12876,25 @@ void HP_mapif_parse_auction_requestlist(int fd) { { HPMHooks.source.mapif.parse_auction_requestlist(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_requestlist_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_auction_requestlist_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_requestlist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_auction_requestlist_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_mapif_auction_register(int fd, struct auction_data *auction) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_register_pre ) { - void (*preHookFunc) (int *fd, struct auction_data *auction); + if (HPMHooks.count.HP_mapif_auction_register_pre > 0) { + void (*preHookFunc) (int *fd, struct auction_data **auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_register_pre[hIndex].func; - preHookFunc(&fd, auction); + preHookFunc(&fd, &auction); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10720,25 +12902,25 @@ void HP_mapif_auction_register(int fd, struct auction_data *auction) { { HPMHooks.source.mapif.auction_register(fd, auction); } - if( HPMHooks.count.HP_mapif_auction_register_post ) { - void (*postHookFunc) (int *fd, struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_auction_register_post > 0) { + void (*postHookFunc) (int fd, struct auction_data *auction); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_register_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_register_post[hIndex].func; - postHookFunc(&fd, auction); + postHookFunc(fd, auction); } } return; } void HP_mapif_parse_auction_register(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_register_pre ) { + if (HPMHooks.count.HP_mapif_parse_auction_register_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_auction_register_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10746,25 +12928,25 @@ void HP_mapif_parse_auction_register(int fd) { { HPMHooks.source.mapif.parse_auction_register(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_register_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_auction_register_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_register_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_auction_register_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_mapif_auction_cancel(int fd, int char_id, unsigned char result) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_cancel_pre ) { + if (HPMHooks.count.HP_mapif_auction_cancel_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_cancel_pre[hIndex].func; preHookFunc(&fd, &char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10772,25 +12954,25 @@ void HP_mapif_auction_cancel(int fd, int char_id, unsigned char result) { { HPMHooks.source.mapif.auction_cancel(fd, char_id, result); } - if( HPMHooks.count.HP_mapif_auction_cancel_post ) { - void (*postHookFunc) (int *fd, int *char_id, unsigned char *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_auction_cancel_post > 0) { + void (*postHookFunc) (int fd, int char_id, unsigned char result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_cancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_cancel_post[hIndex].func; - postHookFunc(&fd, &char_id, &result); + postHookFunc(fd, char_id, result); } } return; } void HP_mapif_parse_auction_cancel(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_cancel_pre ) { + if (HPMHooks.count.HP_mapif_parse_auction_cancel_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_auction_cancel_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10798,25 +12980,25 @@ void HP_mapif_parse_auction_cancel(int fd) { { HPMHooks.source.mapif.parse_auction_cancel(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_cancel_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_auction_cancel_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_cancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_auction_cancel_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_mapif_auction_close(int fd, int char_id, unsigned char result) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_close_pre ) { + if (HPMHooks.count.HP_mapif_auction_close_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_close_pre[hIndex].func; preHookFunc(&fd, &char_id, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10824,25 +13006,25 @@ void HP_mapif_auction_close(int fd, int char_id, unsigned char result) { { HPMHooks.source.mapif.auction_close(fd, char_id, result); } - if( HPMHooks.count.HP_mapif_auction_close_post ) { - void (*postHookFunc) (int *fd, int *char_id, unsigned char *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_auction_close_post > 0) { + void (*postHookFunc) (int fd, int char_id, unsigned char result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_close_post[hIndex].func; - postHookFunc(&fd, &char_id, &result); + postHookFunc(fd, char_id, result); } } return; } void HP_mapif_parse_auction_close(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_close_pre ) { + if (HPMHooks.count.HP_mapif_parse_auction_close_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_auction_close_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10850,25 +13032,25 @@ void HP_mapif_parse_auction_close(int fd) { { HPMHooks.source.mapif.parse_auction_close(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_close_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_auction_close_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_auction_close_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_mapif_auction_bid(int fd, int char_id, int bid, unsigned char result) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_auction_bid_pre ) { + if (HPMHooks.count.HP_mapif_auction_bid_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, int *bid, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_auction_bid_pre[hIndex].func; preHookFunc(&fd, &char_id, &bid, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10876,25 +13058,25 @@ void HP_mapif_auction_bid(int fd, int char_id, int bid, unsigned char result) { { HPMHooks.source.mapif.auction_bid(fd, char_id, bid, result); } - if( HPMHooks.count.HP_mapif_auction_bid_post ) { - void (*postHookFunc) (int *fd, int *char_id, int *bid, unsigned char *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_auction_bid_post > 0) { + void (*postHookFunc) (int fd, int char_id, int bid, unsigned char result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_auction_bid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_auction_bid_post[hIndex].func; - postHookFunc(&fd, &char_id, &bid, &result); + postHookFunc(fd, char_id, bid, result); } } return; } void HP_mapif_parse_auction_bid(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_auction_bid_pre ) { + if (HPMHooks.count.HP_mapif_parse_auction_bid_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_auction_bid_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10902,133 +13084,25 @@ void HP_mapif_parse_auction_bid(int fd) { { HPMHooks.source.mapif.parse_auction_bid(fd); } - if( HPMHooks.count.HP_mapif_parse_auction_bid_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_auction_bid_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_auction_bid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_auction_bid_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } -bool HP_mapif_elemental_create(struct s_elemental *ele) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_elemental_create_pre ) { - bool (*preHookFunc) (struct s_elemental *ele); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_elemental_create_pre[hIndex].func; - retVal___ = preHookFunc(ele); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.elemental_create(ele); - } - if( HPMHooks.count.HP_mapif_elemental_create_post ) { - bool (*postHookFunc) (bool retVal___, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_elemental_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ele); - } - } - return retVal___; -} -bool HP_mapif_elemental_save(const struct s_elemental *ele) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_elemental_save_pre ) { - bool (*preHookFunc) (const struct s_elemental *ele); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_elemental_save_pre[hIndex].func; - retVal___ = preHookFunc(ele); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.elemental_save(ele); - } - if( HPMHooks.count.HP_mapif_elemental_save_post ) { - bool (*postHookFunc) (bool retVal___, const struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_elemental_save_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ele); - } - } - return retVal___; -} -bool HP_mapif_elemental_load(int ele_id, int char_id, struct s_elemental *ele) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_elemental_load_pre ) { - bool (*preHookFunc) (int *ele_id, int *char_id, struct s_elemental *ele); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_elemental_load_pre[hIndex].func; - retVal___ = preHookFunc(&ele_id, &char_id, ele); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.elemental_load(ele_id, char_id, ele); - } - if( HPMHooks.count.HP_mapif_elemental_load_post ) { - bool (*postHookFunc) (bool retVal___, int *ele_id, int *char_id, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_elemental_load_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ele_id, &char_id, ele); - } - } - return retVal___; -} -bool HP_mapif_elemental_delete(int ele_id) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_elemental_delete_pre ) { - bool (*preHookFunc) (int *ele_id); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_elemental_delete_pre[hIndex].func; - retVal___ = preHookFunc(&ele_id); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.elemental_delete(ele_id); - } - if( HPMHooks.count.HP_mapif_elemental_delete_post ) { - bool (*postHookFunc) (bool retVal___, int *ele_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_elemental_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ele_id); - } - } - return retVal___; -} void HP_mapif_elemental_send(int fd, struct s_elemental *ele, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_elemental_send_pre ) { - void (*preHookFunc) (int *fd, struct s_elemental *ele, unsigned char *flag); + if (HPMHooks.count.HP_mapif_elemental_send_pre > 0) { + void (*preHookFunc) (int *fd, struct s_elemental **ele, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_elemental_send_pre[hIndex].func; - preHookFunc(&fd, ele, &flag); + preHookFunc(&fd, &ele, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11036,25 +13110,25 @@ void HP_mapif_elemental_send(int fd, struct s_elemental *ele, unsigned char flag { HPMHooks.source.mapif.elemental_send(fd, ele, flag); } - if( HPMHooks.count.HP_mapif_elemental_send_post ) { - void (*postHookFunc) (int *fd, struct s_elemental *ele, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_elemental_send_post > 0) { + void (*postHookFunc) (int fd, struct s_elemental *ele, unsigned char flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_elemental_send_post[hIndex].func; - postHookFunc(&fd, ele, &flag); + postHookFunc(fd, ele, flag); } } return; } void HP_mapif_parse_elemental_create(int fd, const struct s_elemental *ele) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_create_pre ) { - void (*preHookFunc) (int *fd, const struct s_elemental *ele); + if (HPMHooks.count.HP_mapif_parse_elemental_create_pre > 0) { + void (*preHookFunc) (int *fd, const struct s_elemental **ele); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_create_pre[hIndex].func; - preHookFunc(&fd, ele); + preHookFunc(&fd, &ele); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11062,25 +13136,25 @@ void HP_mapif_parse_elemental_create(int fd, const struct s_elemental *ele) { { HPMHooks.source.mapif.parse_elemental_create(fd, ele); } - if( HPMHooks.count.HP_mapif_parse_elemental_create_post ) { - void (*postHookFunc) (int *fd, const struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_elemental_create_post > 0) { + void (*postHookFunc) (int fd, const struct s_elemental *ele); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_create_post[hIndex].func; - postHookFunc(&fd, ele); + postHookFunc(fd, ele); } } return; } void HP_mapif_parse_elemental_load(int fd, int ele_id, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_load_pre ) { + if (HPMHooks.count.HP_mapif_parse_elemental_load_pre > 0) { void (*preHookFunc) (int *fd, int *ele_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_load_pre[hIndex].func; preHookFunc(&fd, &ele_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11088,25 +13162,25 @@ void HP_mapif_parse_elemental_load(int fd, int ele_id, int char_id) { { HPMHooks.source.mapif.parse_elemental_load(fd, ele_id, char_id); } - if( HPMHooks.count.HP_mapif_parse_elemental_load_post ) { - void (*postHookFunc) (int *fd, int *ele_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_elemental_load_post > 0) { + void (*postHookFunc) (int fd, int ele_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_load_post[hIndex].func; - postHookFunc(&fd, &ele_id, &char_id); + postHookFunc(fd, ele_id, char_id); } } return; } void HP_mapif_elemental_deleted(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_elemental_deleted_pre ) { + if (HPMHooks.count.HP_mapif_elemental_deleted_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_elemental_deleted_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11114,25 +13188,25 @@ void HP_mapif_elemental_deleted(int fd, unsigned char flag) { { HPMHooks.source.mapif.elemental_deleted(fd, flag); } - if( HPMHooks.count.HP_mapif_elemental_deleted_post ) { - void (*postHookFunc) (int *fd, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_elemental_deleted_post > 0) { + void (*postHookFunc) (int fd, unsigned char flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_deleted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_elemental_deleted_post[hIndex].func; - postHookFunc(&fd, &flag); + postHookFunc(fd, flag); } } return; } void HP_mapif_parse_elemental_delete(int fd, int ele_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_delete_pre ) { + if (HPMHooks.count.HP_mapif_parse_elemental_delete_pre > 0) { void (*preHookFunc) (int *fd, int *ele_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_delete_pre[hIndex].func; preHookFunc(&fd, &ele_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11140,25 +13214,25 @@ void HP_mapif_parse_elemental_delete(int fd, int ele_id) { { HPMHooks.source.mapif.parse_elemental_delete(fd, ele_id); } - if( HPMHooks.count.HP_mapif_parse_elemental_delete_post ) { - void (*postHookFunc) (int *fd, int *ele_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_elemental_delete_post > 0) { + void (*postHookFunc) (int fd, int ele_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_delete_post[hIndex].func; - postHookFunc(&fd, &ele_id); + postHookFunc(fd, ele_id); } } return; } void HP_mapif_elemental_saved(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_elemental_saved_pre ) { + if (HPMHooks.count.HP_mapif_elemental_saved_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_elemental_saved_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11166,25 +13240,25 @@ void HP_mapif_elemental_saved(int fd, unsigned char flag) { { HPMHooks.source.mapif.elemental_saved(fd, flag); } - if( HPMHooks.count.HP_mapif_elemental_saved_post ) { - void (*postHookFunc) (int *fd, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_elemental_saved_post > 0) { + void (*postHookFunc) (int fd, unsigned char flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_elemental_saved_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_elemental_saved_post[hIndex].func; - postHookFunc(&fd, &flag); + postHookFunc(fd, flag); } } return; } void HP_mapif_parse_elemental_save(int fd, const struct s_elemental *ele) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_elemental_save_pre ) { - void (*preHookFunc) (int *fd, const struct s_elemental *ele); + if (HPMHooks.count.HP_mapif_parse_elemental_save_pre > 0) { + void (*preHookFunc) (int *fd, const struct s_elemental **ele); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_elemental_save_pre[hIndex].func; - preHookFunc(&fd, ele); + preHookFunc(&fd, &ele); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11192,11 +13266,11 @@ void HP_mapif_parse_elemental_save(int fd, const struct s_elemental *ele) { { HPMHooks.source.mapif.parse_elemental_save(fd, ele); } - if( HPMHooks.count.HP_mapif_parse_elemental_save_post ) { - void (*postHookFunc) (int *fd, const struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_elemental_save_post > 0) { + void (*postHookFunc) (int fd, const struct s_elemental *ele); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_elemental_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_elemental_save_post[hIndex].func; - postHookFunc(&fd, ele); + postHookFunc(fd, ele); } } return; @@ -11204,14 +13278,14 @@ void HP_mapif_parse_elemental_save(int fd, const struct s_elemental *ele) { int HP_mapif_guild_created(int fd, int account_id, struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_created_pre ) { - int (*preHookFunc) (int *fd, int *account_id, struct guild *g); + if (HPMHooks.count.HP_mapif_guild_created_pre > 0) { + int (*preHookFunc) (int *fd, int *account_id, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_created_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, g); + retVal___ = preHookFunc(&fd, &account_id, &g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11219,11 +13293,11 @@ int HP_mapif_guild_created(int fd, int account_id, struct guild *g) { { retVal___ = HPMHooks.source.mapif.guild_created(fd, account_id, g); } - if( HPMHooks.count.HP_mapif_guild_created_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_created_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id, struct guild *g); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_created_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_created_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, g); + retVal___ = postHookFunc(retVal___, fd, account_id, g); } } return retVal___; @@ -11231,14 +13305,14 @@ int HP_mapif_guild_created(int fd, int account_id, struct guild *g) { int HP_mapif_guild_noinfo(int fd, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_noinfo_pre ) { + if (HPMHooks.count.HP_mapif_guild_noinfo_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_noinfo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11246,11 +13320,11 @@ int HP_mapif_guild_noinfo(int fd, int guild_id) { { retVal___ = HPMHooks.source.mapif.guild_noinfo(fd, guild_id); } - if( HPMHooks.count.HP_mapif_guild_noinfo_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_noinfo_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_noinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_noinfo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id); + retVal___ = postHookFunc(retVal___, fd, guild_id); } } return retVal___; @@ -11258,14 +13332,14 @@ int HP_mapif_guild_noinfo(int fd, int guild_id) { int HP_mapif_guild_info(int fd, struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_info_pre ) { - int (*preHookFunc) (int *fd, struct guild *g); + if (HPMHooks.count.HP_mapif_guild_info_pre > 0) { + int (*preHookFunc) (int *fd, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_info_pre[hIndex].func; - retVal___ = preHookFunc(&fd, g); + retVal___ = preHookFunc(&fd, &g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11273,11 +13347,11 @@ int HP_mapif_guild_info(int fd, struct guild *g) { { retVal___ = HPMHooks.source.mapif.guild_info(fd, g); } - if( HPMHooks.count.HP_mapif_guild_info_post ) { - int (*postHookFunc) (int retVal___, int *fd, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_info_post > 0) { + int (*postHookFunc) (int retVal___, int fd, struct guild *g); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_info_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, g); + retVal___ = postHookFunc(retVal___, fd, g); } } return retVal___; @@ -11285,14 +13359,14 @@ int HP_mapif_guild_info(int fd, struct guild *g) { int HP_mapif_guild_memberadded(int fd, int guild_id, int account_id, int char_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_memberadded_pre ) { + if (HPMHooks.count.HP_mapif_guild_memberadded_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_memberadded_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11300,11 +13374,11 @@ int HP_mapif_guild_memberadded(int fd, int guild_id, int account_id, int char_id { retVal___ = HPMHooks.source.mapif.guild_memberadded(fd, guild_id, account_id, char_id, flag); } - if( HPMHooks.count.HP_mapif_guild_memberadded_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, int *char_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_memberadded_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberadded_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_memberadded_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, &char_id, &flag); + retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, flag); } } return retVal___; @@ -11312,14 +13386,14 @@ int HP_mapif_guild_memberadded(int fd, int guild_id, int account_id, int char_id int HP_mapif_guild_withdraw(int guild_id, int account_id, int char_id, int flag, const char *name, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_withdraw_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char *name, const char *mes); + if (HPMHooks.count.HP_mapif_guild_withdraw_pre > 0) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char **name, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_withdraw_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_withdraw_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_withdraw_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, name, mes); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, &name, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11327,11 +13401,11 @@ int HP_mapif_guild_withdraw(int guild_id, int account_id, int char_id, int flag, { retVal___ = HPMHooks.source.mapif.guild_withdraw(guild_id, account_id, char_id, flag, name, mes); } - if( HPMHooks.count.HP_mapif_guild_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_mapif_guild_withdraw_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_withdraw_post > 0) { + 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_mapif_guild_withdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_withdraw_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &flag, name, mes); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, flag, name, mes); } } return retVal___; @@ -11339,14 +13413,14 @@ int HP_mapif_guild_withdraw(int guild_id, int account_id, int char_id, int flag, int HP_mapif_guild_memberinfoshort(struct guild *g, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_memberinfoshort_pre ) { - int (*preHookFunc) (struct guild *g, int *idx); + if (HPMHooks.count.HP_mapif_guild_memberinfoshort_pre > 0) { + int (*preHookFunc) (struct guild **g, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_memberinfoshort_pre[hIndex].func; - retVal___ = preHookFunc(g, &idx); + retVal___ = preHookFunc(&g, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11354,11 +13428,11 @@ int HP_mapif_guild_memberinfoshort(struct guild *g, int idx) { { retVal___ = HPMHooks.source.mapif.guild_memberinfoshort(g, idx); } - if( HPMHooks.count.HP_mapif_guild_memberinfoshort_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_memberinfoshort_post > 0) { + int (*postHookFunc) (int retVal___, struct guild *g, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfoshort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_memberinfoshort_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &idx); + retVal___ = postHookFunc(retVal___, g, idx); } } return retVal___; @@ -11366,14 +13440,14 @@ int HP_mapif_guild_memberinfoshort(struct guild *g, int idx) { int HP_mapif_guild_broken(int guild_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_broken_pre ) { + if (HPMHooks.count.HP_mapif_guild_broken_pre > 0) { int (*preHookFunc) (int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_broken_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11381,38 +13455,11 @@ int HP_mapif_guild_broken(int guild_id, int flag) { { retVal___ = HPMHooks.source.mapif.guild_broken(guild_id, flag); } - if( HPMHooks.count.HP_mapif_guild_broken_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_broken_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_broken_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_broken_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &flag); - } - } - return retVal___; -} -int HP_mapif_guild_message(int guild_id, int account_id, const char *mes, int len, int sfd) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_message_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, const char *mes, int *len, int *sfd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_guild_message_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, mes, &len, &sfd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.guild_message(guild_id, account_id, mes, len, sfd); - } - if( HPMHooks.count.HP_mapif_guild_message_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *account_id, const char *mes, int *len, int *sfd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_message_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_guild_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, mes, &len, &sfd); + retVal___ = postHookFunc(retVal___, guild_id, flag); } } return retVal___; @@ -11420,14 +13467,14 @@ int HP_mapif_guild_message(int guild_id, int account_id, const char *mes, int le int HP_mapif_guild_basicinfochanged(int guild_id, int type, const void *data, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_basicinfochanged_pre ) { - int (*preHookFunc) (int *guild_id, int *type, const void *data, int *len); + if (HPMHooks.count.HP_mapif_guild_basicinfochanged_pre > 0) { + int (*preHookFunc) (int *guild_id, int *type, const void **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_basicinfochanged_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &type, data, &len); + retVal___ = preHookFunc(&guild_id, &type, &data, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11435,11 +13482,11 @@ int HP_mapif_guild_basicinfochanged(int guild_id, int type, const void *data, in { retVal___ = HPMHooks.source.mapif.guild_basicinfochanged(guild_id, type, data, len); } - if( HPMHooks.count.HP_mapif_guild_basicinfochanged_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, int *type, const void *data, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_basicinfochanged_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, int type, const void *data, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_basicinfochanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_basicinfochanged_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &type, data, &len); + retVal___ = postHookFunc(retVal___, guild_id, type, data, len); } } return retVal___; @@ -11447,14 +13494,14 @@ int HP_mapif_guild_basicinfochanged(int guild_id, int type, const void *data, in int HP_mapif_guild_memberinfochanged(int guild_id, int account_id, int char_id, int type, const void *data, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_memberinfochanged_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *type, const void *data, int *len); + if (HPMHooks.count.HP_mapif_guild_memberinfochanged_pre > 0) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *type, const void **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfochanged_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_memberinfochanged_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_memberinfochanged_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &type, data, &len); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &type, &data, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11462,11 +13509,11 @@ int HP_mapif_guild_memberinfochanged(int guild_id, int account_id, int char_id, { retVal___ = HPMHooks.source.mapif.guild_memberinfochanged(guild_id, account_id, char_id, type, data, len); } - if( HPMHooks.count.HP_mapif_guild_memberinfochanged_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_mapif_guild_memberinfochanged_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_memberinfochanged_post > 0) { + 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_mapif_guild_memberinfochanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_memberinfochanged_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &account_id, &char_id, &type, data, &len); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, type, data, len); } } return retVal___; @@ -11474,14 +13521,14 @@ int HP_mapif_guild_memberinfochanged(int guild_id, int account_id, int char_id, int HP_mapif_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_skillupack_pre ) { + if (HPMHooks.count.HP_mapif_guild_skillupack_pre > 0) { int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_skillupack_pre[hIndex].func; retVal___ = preHookFunc(&guild_id, &skill_id, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11489,11 +13536,11 @@ int HP_mapif_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { { retVal___ = HPMHooks.source.mapif.guild_skillupack(guild_id, skill_id, account_id); } - if( HPMHooks.count.HP_mapif_guild_skillupack_post ) { - int (*postHookFunc) (int retVal___, int *guild_id, uint16 *skill_id, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_skillupack_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, uint16 skill_id, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_skillupack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_skillupack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id, &skill_id, &account_id); + retVal___ = postHookFunc(retVal___, guild_id, skill_id, account_id); } } return retVal___; @@ -11501,14 +13548,14 @@ int HP_mapif_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { int HP_mapif_guild_alliance(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___ = 0; - if( HPMHooks.count.HP_mapif_guild_alliance_pre ) { - int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char *name1, const char *name2); + if (HPMHooks.count.HP_mapif_guild_alliance_pre > 0) { + int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char **name1, const char **name2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_alliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_alliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_alliance_pre[hIndex].func; - retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag, name1, name2); + retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag, &name1, &name2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11516,11 +13563,11 @@ int HP_mapif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int a { retVal___ = HPMHooks.source.mapif.guild_alliance(guild_id1, guild_id2, account_id1, account_id2, flag, name1, name2); } - if( HPMHooks.count.HP_mapif_guild_alliance_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_mapif_guild_alliance_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_alliance_post > 0) { + 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_mapif_guild_alliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_alliance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag, name1, name2); + retVal___ = postHookFunc(retVal___, guild_id1, guild_id2, account_id1, account_id2, flag, name1, name2); } } return retVal___; @@ -11528,14 +13575,14 @@ int HP_mapif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int a int HP_mapif_guild_position(struct guild *g, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_position_pre ) { - int (*preHookFunc) (struct guild *g, int *idx); + if (HPMHooks.count.HP_mapif_guild_position_pre > 0) { + int (*preHookFunc) (struct guild **g, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_position_pre[hIndex].func; - retVal___ = preHookFunc(g, &idx); + retVal___ = preHookFunc(&g, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11543,11 +13590,11 @@ int HP_mapif_guild_position(struct guild *g, int idx) { { retVal___ = HPMHooks.source.mapif.guild_position(g, idx); } - if( HPMHooks.count.HP_mapif_guild_position_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_position_post > 0) { + int (*postHookFunc) (int retVal___, struct guild *g, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_position_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_position_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &idx); + retVal___ = postHookFunc(retVal___, g, idx); } } return retVal___; @@ -11555,14 +13602,14 @@ int HP_mapif_guild_position(struct guild *g, int idx) { int HP_mapif_guild_notice(struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_notice_pre ) { - int (*preHookFunc) (struct guild *g); + if (HPMHooks.count.HP_mapif_guild_notice_pre > 0) { + int (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_notice_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_notice_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_notice_pre[hIndex].func; - retVal___ = preHookFunc(g); + retVal___ = preHookFunc(&g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11570,9 +13617,9 @@ int HP_mapif_guild_notice(struct guild *g) { { retVal___ = HPMHooks.source.mapif.guild_notice(g); } - if( HPMHooks.count.HP_mapif_guild_notice_post ) { + if (HPMHooks.count.HP_mapif_guild_notice_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_notice_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_notice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_notice_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -11582,14 +13629,14 @@ int HP_mapif_guild_notice(struct guild *g) { int HP_mapif_guild_emblem(struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_emblem_pre ) { - int (*preHookFunc) (struct guild *g); + if (HPMHooks.count.HP_mapif_guild_emblem_pre > 0) { + int (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_emblem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_emblem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_emblem_pre[hIndex].func; - retVal___ = preHookFunc(g); + retVal___ = preHookFunc(&g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11597,9 +13644,9 @@ int HP_mapif_guild_emblem(struct guild *g) { { retVal___ = HPMHooks.source.mapif.guild_emblem(g); } - if( HPMHooks.count.HP_mapif_guild_emblem_post ) { + if (HPMHooks.count.HP_mapif_guild_emblem_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_emblem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_emblem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_emblem_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -11609,14 +13656,14 @@ int HP_mapif_guild_emblem(struct guild *g) { int HP_mapif_guild_master_changed(struct guild *g, int aid, int cid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_master_changed_pre ) { - int (*preHookFunc) (struct guild *g, int *aid, int *cid); + if (HPMHooks.count.HP_mapif_guild_master_changed_pre > 0) { + int (*preHookFunc) (struct guild **g, int *aid, int *cid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_master_changed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_master_changed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_master_changed_pre[hIndex].func; - retVal___ = preHookFunc(g, &aid, &cid); + retVal___ = preHookFunc(&g, &aid, &cid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11624,11 +13671,11 @@ int HP_mapif_guild_master_changed(struct guild *g, int aid, int cid) { { retVal___ = HPMHooks.source.mapif.guild_master_changed(g, aid, cid); } - if( HPMHooks.count.HP_mapif_guild_master_changed_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *aid, int *cid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_master_changed_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_master_changed_post > 0) { + int (*postHookFunc) (int retVal___, struct guild *g, int aid, int cid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_master_changed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_master_changed_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &aid, &cid); + retVal___ = postHookFunc(retVal___, g, aid, cid); } } return retVal___; @@ -11636,14 +13683,14 @@ int HP_mapif_guild_master_changed(struct guild *g, int aid, int cid) { int HP_mapif_guild_castle_dataload(int fd, int sz, const int *castle_ids) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_guild_castle_dataload_pre ) { - int (*preHookFunc) (int *fd, int *sz, const int *castle_ids); + if (HPMHooks.count.HP_mapif_guild_castle_dataload_pre > 0) { + int (*preHookFunc) (int *fd, int *sz, const int **castle_ids); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_guild_castle_dataload_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &sz, castle_ids); + retVal___ = preHookFunc(&fd, &sz, &castle_ids); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11651,11 +13698,11 @@ int HP_mapif_guild_castle_dataload(int fd, int sz, const int *castle_ids) { { retVal___ = HPMHooks.source.mapif.guild_castle_dataload(fd, sz, castle_ids); } - if( HPMHooks.count.HP_mapif_guild_castle_dataload_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *sz, const int *castle_ids); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_guild_castle_dataload_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int sz, const int *castle_ids); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_guild_castle_dataload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_guild_castle_dataload_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &sz, castle_ids); + retVal___ = postHookFunc(retVal___, fd, sz, castle_ids); } } return retVal___; @@ -11663,14 +13710,14 @@ int HP_mapif_guild_castle_dataload(int fd, int sz, const int *castle_ids) { int HP_mapif_parse_CreateGuild(int fd, int account_id, const char *name, const struct guild_member *master) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_CreateGuild_pre ) { - int (*preHookFunc) (int *fd, int *account_id, const char *name, const struct guild_member *master); + if (HPMHooks.count.HP_mapif_parse_CreateGuild_pre > 0) { + int (*preHookFunc) (int *fd, int *account_id, const char **name, const struct guild_member **master); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_CreateGuild_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, name, master); + retVal___ = preHookFunc(&fd, &account_id, &name, &master); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11678,11 +13725,11 @@ int HP_mapif_parse_CreateGuild(int fd, int account_id, const char *name, const s { retVal___ = HPMHooks.source.mapif.parse_CreateGuild(fd, account_id, name, master); } - if( HPMHooks.count.HP_mapif_parse_CreateGuild_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, const char *name, const struct guild_member *master); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_CreateGuild_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id, const char *name, const struct guild_member *master); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateGuild_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_CreateGuild_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, name, master); + retVal___ = postHookFunc(retVal___, fd, account_id, name, master); } } return retVal___; @@ -11690,14 +13737,14 @@ int HP_mapif_parse_CreateGuild(int fd, int account_id, const char *name, const s int HP_mapif_parse_GuildInfo(int fd, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildInfo_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildInfo_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildInfo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11705,11 +13752,11 @@ int HP_mapif_parse_GuildInfo(int fd, int guild_id) { { retVal___ = HPMHooks.source.mapif.parse_GuildInfo(fd, guild_id); } - if( HPMHooks.count.HP_mapif_parse_GuildInfo_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildInfo_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildInfo_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildInfo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id); + retVal___ = postHookFunc(retVal___, fd, guild_id); } } return retVal___; @@ -11717,14 +13764,14 @@ int HP_mapif_parse_GuildInfo(int fd, int guild_id) { int HP_mapif_parse_GuildAddMember(int fd, int guild_id, const struct guild_member *m) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildAddMember_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, const struct guild_member *m); + if (HPMHooks.count.HP_mapif_parse_GuildAddMember_pre > 0) { + int (*preHookFunc) (int *fd, int *guild_id, const struct guild_member **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildAddMember_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, m); + retVal___ = preHookFunc(&fd, &guild_id, &m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11732,11 +13779,11 @@ int HP_mapif_parse_GuildAddMember(int fd, int guild_id, const struct guild_membe { retVal___ = HPMHooks.source.mapif.parse_GuildAddMember(fd, guild_id, m); } - if( HPMHooks.count.HP_mapif_parse_GuildAddMember_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, const struct guild_member *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildAddMember_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id, const struct guild_member *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAddMember_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildAddMember_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, m); + retVal___ = postHookFunc(retVal___, fd, guild_id, m); } } return retVal___; @@ -11744,14 +13791,14 @@ int HP_mapif_parse_GuildAddMember(int fd, int guild_id, const struct guild_membe int HP_mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, int flag, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildLeave_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char *mes); + if (HPMHooks.count.HP_mapif_parse_GuildLeave_pre > 0) { + int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildLeave_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &flag, mes); + retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &flag, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11759,38 +13806,38 @@ int HP_mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, { retVal___ = HPMHooks.source.mapif.parse_GuildLeave(fd, guild_id, account_id, char_id, flag, mes); } - if( HPMHooks.count.HP_mapif_parse_GuildLeave_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildLeave_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag, const char *mes); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildLeave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildLeave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, &char_id, &flag, mes); + retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, flag, mes); } } return retVal___; } -int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_) { +int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); + if (HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre > 0) { + int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &online, &lv, &class_); + retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &online, &lv, &class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.parse_GuildChangeMemberInfoShort(fd, guild_id, account_id, char_id, online, lv, class_); + retVal___ = HPMHooks.source.mapif.parse_GuildChangeMemberInfoShort(fd, guild_id, account_id, char_id, online, lv, class); } - if( HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, &char_id, &online, &lv, &class_); + retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, online, lv, class); } } return retVal___; @@ -11798,14 +13845,14 @@ int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_ int HP_mapif_parse_BreakGuild(int fd, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_BreakGuild_pre ) { + if (HPMHooks.count.HP_mapif_parse_BreakGuild_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_BreakGuild_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11813,38 +13860,11 @@ int HP_mapif_parse_BreakGuild(int fd, int guild_id) { { retVal___ = HPMHooks.source.mapif.parse_BreakGuild(fd, guild_id); } - if( HPMHooks.count.HP_mapif_parse_BreakGuild_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_BreakGuild_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakGuild_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_BreakGuild_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id); - } - } - return retVal___; -} -int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char *mes, int len) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildMessage_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, const char *mes, int *len); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &account_id, mes, &len); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.parse_GuildMessage(fd, guild_id, account_id, mes, len); - } - if( HPMHooks.count.HP_mapif_parse_GuildMessage_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, const char *mes, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMessage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMessage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, mes, &len); + retVal___ = postHookFunc(retVal___, fd, guild_id); } } return retVal___; @@ -11852,14 +13872,14 @@ int HP_mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char int HP_mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const void *data, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *type, const void *data, int *len); + if (HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre > 0) { + int (*preHookFunc) (int *fd, int *guild_id, int *type, const void **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildBasicInfoChange_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &type, data, &len); + retVal___ = preHookFunc(&fd, &guild_id, &type, &data, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11867,11 +13887,11 @@ int HP_mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const vo { retVal___ = HPMHooks.source.mapif.parse_GuildBasicInfoChange(fd, guild_id, type, data, len); } - if( HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *type, const void *data, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id, int type, const void *data, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildBasicInfoChange_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildBasicInfoChange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &type, data, &len); + retVal___ = postHookFunc(retVal___, fd, guild_id, type, data, len); } } return retVal___; @@ -11879,14 +13899,14 @@ int HP_mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const vo int HP_mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int char_id, int type, const char *data, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *type, const char *data, int *len); + if (HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre > 0) { + int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMemberInfoChange_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &type, data, &len); + retVal___ = preHookFunc(&fd, &guild_id, &account_id, &char_id, &type, &data, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11894,11 +13914,11 @@ int HP_mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, i { retVal___ = HPMHooks.source.mapif.parse_GuildMemberInfoChange(fd, guild_id, account_id, char_id, type, data, len); } - if( HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *account_id, int *char_id, int *type, const char *data, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int type, const char *data, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMemberInfoChange_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMemberInfoChange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &account_id, &char_id, &type, data, &len); + retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, type, data, len); } } return retVal___; @@ -11906,14 +13926,14 @@ int HP_mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, i int HP_mapif_parse_GuildPosition(int fd, int guild_id, int idx, const struct guild_position *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildPosition_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, int *idx, const struct guild_position *p); + if (HPMHooks.count.HP_mapif_parse_GuildPosition_pre > 0) { + int (*preHookFunc) (int *fd, int *guild_id, int *idx, const struct guild_position **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildPosition_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, &idx, p); + retVal___ = preHookFunc(&fd, &guild_id, &idx, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11921,11 +13941,11 @@ int HP_mapif_parse_GuildPosition(int fd, int guild_id, int idx, const struct gui { retVal___ = HPMHooks.source.mapif.parse_GuildPosition(fd, guild_id, idx, p); } - if( HPMHooks.count.HP_mapif_parse_GuildPosition_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, int *idx, const struct guild_position *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildPosition_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id, int idx, const struct guild_position *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildPosition_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildPosition_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &idx, p); + retVal___ = postHookFunc(retVal___, fd, guild_id, idx, p); } } return retVal___; @@ -11933,14 +13953,14 @@ int HP_mapif_parse_GuildPosition(int fd, int guild_id, int idx, const struct gui int HP_mapif_parse_GuildSkillUp(int fd, int guild_id, uint16 skill_id, int account_id, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id, uint16 *skill_id, int *account_id, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildSkillUp_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id, &skill_id, &account_id, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11948,38 +13968,11 @@ int HP_mapif_parse_GuildSkillUp(int fd, int guild_id, uint16 skill_id, int accou { retVal___ = HPMHooks.source.mapif.parse_GuildSkillUp(fd, guild_id, skill_id, account_id, max); } - if( HPMHooks.count.HP_mapif_parse_GuildSkillUp_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, uint16 *skill_id, int *account_id, int *max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildSkillUp_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id, uint16 skill_id, int account_id, int max); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildSkillUp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildSkillUp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, &skill_id, &account_id, &max); - } - } - return retVal___; -} -int HP_mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, int account_id1, int account_id2, int flag) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_pre ) { - int (*preHookFunc) (struct guild *g, int *guild_id, int *account_id1, int *account_id2, int *flag); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_GuildDeleteAlliance_pre[hIndex].func; - retVal___ = preHookFunc(g, &guild_id, &account_id1, &account_id2, &flag); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.parse_GuildDeleteAlliance(g, guild_id, account_id1, account_id2, flag); - } - if( HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_post ) { - int (*postHookFunc) (int retVal___, struct guild *g, int *guild_id, int *account_id1, int *account_id2, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildDeleteAlliance_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_GuildDeleteAlliance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, g, &guild_id, &account_id1, &account_id2, &flag); + retVal___ = postHookFunc(retVal___, fd, guild_id, skill_id, account_id, max); } } return retVal___; @@ -11987,14 +13980,14 @@ int HP_mapif_parse_GuildDeleteAlliance(struct guild *g, int guild_id, int accoun int HP_mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildAlliance_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildAlliance_pre > 0) { int (*preHookFunc) (int *fd, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildAlliance_pre[hIndex].func; retVal___ = preHookFunc(&fd, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12002,11 +13995,11 @@ int HP_mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int accou { retVal___ = HPMHooks.source.mapif.parse_GuildAlliance(fd, guild_id1, guild_id2, account_id1, account_id2, flag); } - if( HPMHooks.count.HP_mapif_parse_GuildAlliance_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildAlliance_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id1, int guild_id2, int account_id1, int account_id2, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildAlliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildAlliance_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id1, &guild_id2, &account_id1, &account_id2, &flag); + retVal___ = postHookFunc(retVal___, fd, guild_id1, guild_id2, account_id1, account_id2, flag); } } return retVal___; @@ -12014,14 +14007,14 @@ int HP_mapif_parse_GuildAlliance(int fd, int guild_id1, int guild_id2, int accou int HP_mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const char *mes2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildNotice_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, const char *mes1, const char *mes2); + if (HPMHooks.count.HP_mapif_parse_GuildNotice_pre > 0) { + int (*preHookFunc) (int *fd, int *guild_id, const char **mes1, const char **mes2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildNotice_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, mes1, mes2); + retVal___ = preHookFunc(&fd, &guild_id, &mes1, &mes2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12029,11 +14022,11 @@ int HP_mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const cha { retVal___ = HPMHooks.source.mapif.parse_GuildNotice(fd, guild_id, mes1, mes2); } - if( HPMHooks.count.HP_mapif_parse_GuildNotice_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, const char *mes1, const char *mes2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildNotice_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id, const char *mes1, const char *mes2); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildNotice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildNotice_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, mes1, mes2); + retVal___ = postHookFunc(retVal___, fd, guild_id, mes1, mes2); } } return retVal___; @@ -12041,14 +14034,14 @@ int HP_mapif_parse_GuildNotice(int fd, int guild_id, const char *mes1, const cha int HP_mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const char *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildEmblem_pre ) { - int (*preHookFunc) (int *fd, int *len, int *guild_id, int *dummy, const char *data); + if (HPMHooks.count.HP_mapif_parse_GuildEmblem_pre > 0) { + int (*preHookFunc) (int *fd, int *len, int *guild_id, int *dummy, const char **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildEmblem_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &len, &guild_id, &dummy, data); + retVal___ = preHookFunc(&fd, &len, &guild_id, &dummy, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12056,11 +14049,11 @@ int HP_mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const c { retVal___ = HPMHooks.source.mapif.parse_GuildEmblem(fd, len, guild_id, dummy, data); } - if( HPMHooks.count.HP_mapif_parse_GuildEmblem_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *len, int *guild_id, int *dummy, const char *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildEmblem_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int len, int guild_id, int dummy, const char *data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildEmblem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildEmblem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &len, &guild_id, &dummy, data); + retVal___ = postHookFunc(retVal___, fd, len, guild_id, dummy, data); } } return retVal___; @@ -12068,14 +14061,14 @@ int HP_mapif_parse_GuildEmblem(int fd, int len, int guild_id, int dummy, const c int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, const int *castle_ids) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre ) { - int (*preHookFunc) (int *fd, int *len, const int *castle_ids); + if (HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre > 0) { + int (*preHookFunc) (int *fd, int *len, const int **castle_ids); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataLoad_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &len, castle_ids); + retVal___ = preHookFunc(&fd, &len, &castle_ids); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12083,11 +14076,11 @@ int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, const int *castle_ids) { { retVal___ = HPMHooks.source.mapif.parse_GuildCastleDataLoad(fd, len, castle_ids); } - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *len, const int *castle_ids); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int len, const int *castle_ids); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataLoad_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataLoad_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &len, castle_ids); + retVal___ = postHookFunc(retVal___, fd, len, castle_ids); } } return retVal___; @@ -12095,14 +14088,14 @@ int HP_mapif_parse_GuildCastleDataLoad(int fd, int len, const int *castle_ids) { int HP_mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre ) { + if (HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre > 0) { int (*preHookFunc) (int *fd, int *castle_id, int *index, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataSave_pre[hIndex].func; retVal___ = preHookFunc(&fd, &castle_id, &index, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12110,11 +14103,11 @@ int HP_mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int val { retVal___ = HPMHooks.source.mapif.parse_GuildCastleDataSave(fd, castle_id, index, value); } - if( HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *castle_id, int *index, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int castle_id, int index, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildCastleDataSave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildCastleDataSave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &castle_id, &index, &value); + retVal___ = postHookFunc(retVal___, fd, castle_id, index, value); } } return retVal___; @@ -12122,14 +14115,14 @@ int HP_mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int val int HP_mapif_parse_GuildMasterChange(int fd, int guild_id, const char *name, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre ) { - int (*preHookFunc) (int *fd, int *guild_id, const char *name, int *len); + if (HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre > 0) { + int (*preHookFunc) (int *fd, int *guild_id, const char **name, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildMasterChange_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &guild_id, name, &len); + retVal___ = preHookFunc(&fd, &guild_id, &name, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -12137,25 +14130,25 @@ int HP_mapif_parse_GuildMasterChange(int fd, int guild_id, const char *name, int { retVal___ = HPMHooks.source.mapif.parse_GuildMasterChange(fd, guild_id, name, len); } - if( HPMHooks.count.HP_mapif_parse_GuildMasterChange_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *guild_id, const char *name, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_GuildMasterChange_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int guild_id, const char *name, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildMasterChange_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildMasterChange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &guild_id, name, &len); + retVal___ = postHookFunc(retVal___, fd, guild_id, name, len); } } return retVal___; } void HP_mapif_homunculus_created(int fd, int account_id, const struct s_homunculus *sh, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_created_pre ) { - void (*preHookFunc) (int *fd, int *account_id, const struct s_homunculus *sh, unsigned char *flag); + if (HPMHooks.count.HP_mapif_homunculus_created_pre > 0) { + void (*preHookFunc) (int *fd, int *account_id, const struct s_homunculus **sh, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_created_pre[hIndex].func; - preHookFunc(&fd, &account_id, sh, &flag); + preHookFunc(&fd, &account_id, &sh, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12163,25 +14156,25 @@ void HP_mapif_homunculus_created(int fd, int account_id, const struct s_homuncul { HPMHooks.source.mapif.homunculus_created(fd, account_id, sh, flag); } - if( HPMHooks.count.HP_mapif_homunculus_created_post ) { - void (*postHookFunc) (int *fd, int *account_id, const struct s_homunculus *sh, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_homunculus_created_post > 0) { + void (*postHookFunc) (int fd, int account_id, const struct s_homunculus *sh, unsigned char flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_created_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_created_post[hIndex].func; - postHookFunc(&fd, &account_id, sh, &flag); + postHookFunc(fd, account_id, sh, flag); } } return; } void HP_mapif_homunculus_deleted(int fd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_deleted_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_deleted_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_deleted_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12189,25 +14182,25 @@ void HP_mapif_homunculus_deleted(int fd, int flag) { { HPMHooks.source.mapif.homunculus_deleted(fd, flag); } - if( HPMHooks.count.HP_mapif_homunculus_deleted_post ) { - void (*postHookFunc) (int *fd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_homunculus_deleted_post > 0) { + void (*postHookFunc) (int fd, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_deleted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_deleted_post[hIndex].func; - postHookFunc(&fd, &flag); + postHookFunc(fd, flag); } } return; } void HP_mapif_homunculus_loaded(int fd, int account_id, struct s_homunculus *hd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_loaded_pre ) { - void (*preHookFunc) (int *fd, int *account_id, struct s_homunculus *hd); + if (HPMHooks.count.HP_mapif_homunculus_loaded_pre > 0) { + void (*preHookFunc) (int *fd, int *account_id, struct s_homunculus **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_loaded_pre[hIndex].func; - preHookFunc(&fd, &account_id, hd); + preHookFunc(&fd, &account_id, &hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12215,25 +14208,25 @@ void HP_mapif_homunculus_loaded(int fd, int account_id, struct s_homunculus *hd) { HPMHooks.source.mapif.homunculus_loaded(fd, account_id, hd); } - if( HPMHooks.count.HP_mapif_homunculus_loaded_post ) { - void (*postHookFunc) (int *fd, int *account_id, struct s_homunculus *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_homunculus_loaded_post > 0) { + void (*postHookFunc) (int fd, int account_id, struct s_homunculus *hd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_loaded_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_loaded_post[hIndex].func; - postHookFunc(&fd, &account_id, hd); + postHookFunc(fd, account_id, hd); } } return; } void HP_mapif_homunculus_saved(int fd, int account_id, bool flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_saved_pre ) { + if (HPMHooks.count.HP_mapif_homunculus_saved_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_saved_pre[hIndex].func; preHookFunc(&fd, &account_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12241,25 +14234,25 @@ void HP_mapif_homunculus_saved(int fd, int account_id, bool flag) { { HPMHooks.source.mapif.homunculus_saved(fd, account_id, flag); } - if( HPMHooks.count.HP_mapif_homunculus_saved_post ) { - void (*postHookFunc) (int *fd, int *account_id, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_homunculus_saved_post > 0) { + void (*postHookFunc) (int fd, int account_id, bool flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_saved_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_saved_post[hIndex].func; - postHookFunc(&fd, &account_id, &flag); + postHookFunc(fd, account_id, flag); } } return; } void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned char flag, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_homunculus_renamed_pre ) { - void (*preHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, const char *name); + if (HPMHooks.count.HP_mapif_homunculus_renamed_pre > 0) { + void (*preHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_homunculus_renamed_pre[hIndex].func; - preHookFunc(&fd, &account_id, &char_id, &flag, name); + preHookFunc(&fd, &account_id, &char_id, &flag, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12267,160 +14260,25 @@ void HP_mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned c { HPMHooks.source.mapif.homunculus_renamed(fd, account_id, char_id, flag, name); } - if( HPMHooks.count.HP_mapif_homunculus_renamed_post ) { - void (*postHookFunc) (int *fd, int *account_id, int *char_id, unsigned char *flag, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_homunculus_renamed_post > 0) { + void (*postHookFunc) (int fd, int account_id, int char_id, unsigned char flag, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_renamed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_homunculus_renamed_post[hIndex].func; - postHookFunc(&fd, &account_id, &char_id, &flag, name); + postHookFunc(fd, account_id, char_id, flag, name); } } return; } -bool HP_mapif_homunculus_create(struct s_homunculus *hd) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_create_pre ) { - bool (*preHookFunc) (struct s_homunculus *hd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_create_pre[hIndex].func; - retVal___ = preHookFunc(hd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.homunculus_create(hd); - } - if( HPMHooks.count.HP_mapif_homunculus_create_post ) { - bool (*postHookFunc) (bool retVal___, struct s_homunculus *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___, hd); - } - } - return retVal___; -} -bool HP_mapif_homunculus_save(const struct s_homunculus *hd) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_save_pre ) { - bool (*preHookFunc) (const struct s_homunculus *hd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_save_pre[hIndex].func; - retVal___ = preHookFunc(hd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.homunculus_save(hd); - } - if( HPMHooks.count.HP_mapif_homunculus_save_post ) { - bool (*postHookFunc) (bool retVal___, const struct s_homunculus *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_save_post[hIndex].func; - retVal___ = postHookFunc(retVal___, hd); - } - } - return retVal___; -} -bool HP_mapif_homunculus_load(int homun_id, struct s_homunculus *hd) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_load_pre ) { - bool (*preHookFunc) (int *homun_id, struct s_homunculus *hd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_load_pre[hIndex].func; - retVal___ = preHookFunc(&homun_id, hd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.homunculus_load(homun_id, hd); - } - if( HPMHooks.count.HP_mapif_homunculus_load_post ) { - bool (*postHookFunc) (bool retVal___, int *homun_id, struct s_homunculus *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_load_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &homun_id, hd); - } - } - return retVal___; -} -bool HP_mapif_homunculus_delete(int homun_id) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_delete_pre ) { - bool (*preHookFunc) (int *homun_id); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_delete_pre[hIndex].func; - retVal___ = preHookFunc(&homun_id); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.homunculus_delete(homun_id); - } - if( HPMHooks.count.HP_mapif_homunculus_delete_post ) { - bool (*postHookFunc) (bool retVal___, int *homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &homun_id); - } - } - return retVal___; -} -bool HP_mapif_homunculus_rename(const char *name) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_homunculus_rename_pre ) { - bool (*preHookFunc) (const char *name); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_homunculus_rename_pre[hIndex].func; - retVal___ = preHookFunc(name); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.homunculus_rename(name); - } - if( HPMHooks.count.HP_mapif_homunculus_rename_post ) { - bool (*postHookFunc) (bool retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_homunculus_rename_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_homunculus_rename_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name); - } - } - return retVal___; -} void HP_mapif_parse_homunculus_create(int fd, int len, int account_id, const struct s_homunculus *phd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_create_pre ) { - void (*preHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus *phd); + if (HPMHooks.count.HP_mapif_parse_homunculus_create_pre > 0) { + void (*preHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus **phd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_create_pre[hIndex].func; - preHookFunc(&fd, &len, &account_id, phd); + preHookFunc(&fd, &len, &account_id, &phd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12428,25 +14286,25 @@ void HP_mapif_parse_homunculus_create(int fd, int len, int account_id, const str { HPMHooks.source.mapif.parse_homunculus_create(fd, len, account_id, phd); } - if( HPMHooks.count.HP_mapif_parse_homunculus_create_post ) { - void (*postHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus *phd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_create_post > 0) { + void (*postHookFunc) (int fd, int len, int account_id, const struct s_homunculus *phd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_create_post[hIndex].func; - postHookFunc(&fd, &len, &account_id, phd); + postHookFunc(fd, len, account_id, phd); } } return; } void HP_mapif_parse_homunculus_delete(int fd, int homun_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_delete_pre ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_delete_pre > 0) { void (*preHookFunc) (int *fd, int *homun_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_delete_pre[hIndex].func; preHookFunc(&fd, &homun_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12454,25 +14312,25 @@ void HP_mapif_parse_homunculus_delete(int fd, int homun_id) { { HPMHooks.source.mapif.parse_homunculus_delete(fd, homun_id); } - if( HPMHooks.count.HP_mapif_parse_homunculus_delete_post ) { - void (*postHookFunc) (int *fd, int *homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_delete_post > 0) { + void (*postHookFunc) (int fd, int homun_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_delete_post[hIndex].func; - postHookFunc(&fd, &homun_id); + postHookFunc(fd, homun_id); } } return; } void HP_mapif_parse_homunculus_load(int fd, int account_id, int homun_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_load_pre ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_load_pre > 0) { void (*preHookFunc) (int *fd, int *account_id, int *homun_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_load_pre[hIndex].func; preHookFunc(&fd, &account_id, &homun_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12480,25 +14338,25 @@ void HP_mapif_parse_homunculus_load(int fd, int account_id, int homun_id) { { HPMHooks.source.mapif.parse_homunculus_load(fd, account_id, homun_id); } - if( HPMHooks.count.HP_mapif_parse_homunculus_load_post ) { - void (*postHookFunc) (int *fd, int *account_id, int *homun_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_load_post > 0) { + void (*postHookFunc) (int fd, int account_id, int homun_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_load_post[hIndex].func; - postHookFunc(&fd, &account_id, &homun_id); + postHookFunc(fd, account_id, homun_id); } } return; } void HP_mapif_parse_homunculus_save(int fd, int len, int account_id, const struct s_homunculus *phd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_save_pre ) { - void (*preHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus *phd); + if (HPMHooks.count.HP_mapif_parse_homunculus_save_pre > 0) { + void (*preHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus **phd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_save_pre[hIndex].func; - preHookFunc(&fd, &len, &account_id, phd); + preHookFunc(&fd, &len, &account_id, &phd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12506,25 +14364,25 @@ void HP_mapif_parse_homunculus_save(int fd, int len, int account_id, const struc { HPMHooks.source.mapif.parse_homunculus_save(fd, len, account_id, phd); } - if( HPMHooks.count.HP_mapif_parse_homunculus_save_post ) { - void (*postHookFunc) (int *fd, int *len, int *account_id, const struct s_homunculus *phd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_save_post > 0) { + void (*postHookFunc) (int fd, int len, int account_id, const struct s_homunculus *phd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_save_post[hIndex].func; - postHookFunc(&fd, &len, &account_id, phd); + postHookFunc(fd, len, account_id, phd); } } return; } void HP_mapif_parse_homunculus_rename(int fd, int account_id, int char_id, const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_homunculus_rename_pre ) { - void (*preHookFunc) (int *fd, int *account_id, int *char_id, const char *name); + if (HPMHooks.count.HP_mapif_parse_homunculus_rename_pre > 0) { + void (*preHookFunc) (int *fd, int *account_id, int *char_id, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_rename_pre[hIndex].func; - preHookFunc(&fd, &account_id, &char_id, name); + preHookFunc(&fd, &account_id, &char_id, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12532,25 +14390,25 @@ void HP_mapif_parse_homunculus_rename(int fd, int account_id, int char_id, const { HPMHooks.source.mapif.parse_homunculus_rename(fd, account_id, char_id, name); } - if( HPMHooks.count.HP_mapif_parse_homunculus_rename_post ) { - void (*postHookFunc) (int *fd, int *account_id, int *char_id, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_homunculus_rename_post > 0) { + void (*postHookFunc) (int fd, int account_id, int char_id, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_homunculus_rename_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_homunculus_rename_post[hIndex].func; - postHookFunc(&fd, &account_id, &char_id, name); + postHookFunc(fd, account_id, char_id, name); } } return; } void HP_mapif_mail_sendinbox(int fd, int char_id, unsigned char flag, struct mail_data *md) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_sendinbox_pre ) { - void (*preHookFunc) (int *fd, int *char_id, unsigned char *flag, struct mail_data *md); + if (HPMHooks.count.HP_mapif_mail_sendinbox_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, unsigned char *flag, struct mail_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_sendinbox_pre[hIndex].func; - preHookFunc(&fd, &char_id, &flag, md); + preHookFunc(&fd, &char_id, &flag, &md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12558,25 +14416,25 @@ void HP_mapif_mail_sendinbox(int fd, int char_id, unsigned char flag, struct mai { HPMHooks.source.mapif.mail_sendinbox(fd, char_id, flag, md); } - if( HPMHooks.count.HP_mapif_mail_sendinbox_post ) { - void (*postHookFunc) (int *fd, int *char_id, unsigned char *flag, struct mail_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_mail_sendinbox_post > 0) { + void (*postHookFunc) (int fd, int char_id, unsigned char flag, struct mail_data *md); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendinbox_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_sendinbox_post[hIndex].func; - postHookFunc(&fd, &char_id, &flag, md); + postHookFunc(fd, char_id, flag, md); } } return; } void HP_mapif_parse_mail_requestinbox(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_requestinbox_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12584,25 +14442,25 @@ void HP_mapif_parse_mail_requestinbox(int fd) { { HPMHooks.source.mapif.parse_mail_requestinbox(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_requestinbox_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_mail_requestinbox_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_requestinbox_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_requestinbox_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_mapif_parse_mail_read(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_read_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_read_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_read_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12610,25 +14468,25 @@ void HP_mapif_parse_mail_read(int fd) { { HPMHooks.source.mapif.parse_mail_read(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_read_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_mail_read_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_read_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_mapif_mail_sendattach(int fd, int char_id, struct mail_message *msg) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_sendattach_pre ) { - void (*preHookFunc) (int *fd, int *char_id, struct mail_message *msg); + if (HPMHooks.count.HP_mapif_mail_sendattach_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_sendattach_pre[hIndex].func; - preHookFunc(&fd, &char_id, msg); + preHookFunc(&fd, &char_id, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12636,51 +14494,25 @@ void HP_mapif_mail_sendattach(int fd, int char_id, struct mail_message *msg) { { HPMHooks.source.mapif.mail_sendattach(fd, char_id, msg); } - if( HPMHooks.count.HP_mapif_mail_sendattach_post ) { - void (*postHookFunc) (int *fd, int *char_id, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_mail_sendattach_post > 0) { + void (*postHookFunc) (int fd, int char_id, struct mail_message *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_sendattach_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_sendattach_post[hIndex].func; - postHookFunc(&fd, &char_id, msg); - } - } - return; -} -void HP_mapif_mail_getattach(int fd, int char_id, int mail_id) { - int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_getattach_pre ) { - void (*preHookFunc) (int *fd, int *char_id, int *mail_id); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_getattach_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mail_getattach_pre[hIndex].func; - preHookFunc(&fd, &char_id, &mail_id); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.mapif.mail_getattach(fd, char_id, mail_id); - } - if( HPMHooks.count.HP_mapif_mail_getattach_post ) { - void (*postHookFunc) (int *fd, int *char_id, int *mail_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_getattach_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mail_getattach_post[hIndex].func; - postHookFunc(&fd, &char_id, &mail_id); + postHookFunc(fd, char_id, msg); } } return; } void HP_mapif_parse_mail_getattach(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_getattach_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_getattach_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_getattach_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12688,25 +14520,25 @@ void HP_mapif_parse_mail_getattach(int fd) { { HPMHooks.source.mapif.parse_mail_getattach(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_getattach_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_mail_getattach_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_getattach_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_getattach_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_mapif_mail_delete(int fd, int char_id, int mail_id, bool failed) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_delete_pre ) { + if (HPMHooks.count.HP_mapif_mail_delete_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, int *mail_id, bool *failed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_delete_pre[hIndex].func; preHookFunc(&fd, &char_id, &mail_id, &failed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12714,25 +14546,25 @@ void HP_mapif_mail_delete(int fd, int char_id, int mail_id, bool failed) { { HPMHooks.source.mapif.mail_delete(fd, char_id, mail_id, failed); } - if( HPMHooks.count.HP_mapif_mail_delete_post ) { - void (*postHookFunc) (int *fd, int *char_id, int *mail_id, bool *failed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_mail_delete_post > 0) { + void (*postHookFunc) (int fd, int char_id, int mail_id, bool failed); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_delete_post[hIndex].func; - postHookFunc(&fd, &char_id, &mail_id, &failed); + postHookFunc(fd, char_id, mail_id, failed); } } return; } void HP_mapif_parse_mail_delete(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_delete_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_delete_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_delete_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12740,25 +14572,25 @@ void HP_mapif_parse_mail_delete(int fd) { { HPMHooks.source.mapif.parse_mail_delete(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_delete_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_mail_delete_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_delete_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_mapif_mail_new(struct mail_message *msg) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_new_pre ) { - void (*preHookFunc) (struct mail_message *msg); + if (HPMHooks.count.HP_mapif_mail_new_pre > 0) { + void (*preHookFunc) (struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_new_pre[hIndex].func; - preHookFunc(msg); + preHookFunc(&msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12766,9 +14598,9 @@ void HP_mapif_mail_new(struct mail_message *msg) { { HPMHooks.source.mapif.mail_new(msg); } - if( HPMHooks.count.HP_mapif_mail_new_post ) { + if (HPMHooks.count.HP_mapif_mail_new_post > 0) { void (*postHookFunc) (struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_new_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_new_post[hIndex].func; postHookFunc(msg); } @@ -12777,14 +14609,14 @@ void HP_mapif_mail_new(struct mail_message *msg) { } void HP_mapif_mail_return(int fd, int char_id, int mail_id, int new_mail) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_return_pre ) { + if (HPMHooks.count.HP_mapif_mail_return_pre > 0) { void (*preHookFunc) (int *fd, int *char_id, int *mail_id, int *new_mail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_return_pre[hIndex].func; preHookFunc(&fd, &char_id, &mail_id, &new_mail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12792,25 +14624,25 @@ void HP_mapif_mail_return(int fd, int char_id, int mail_id, int new_mail) { { HPMHooks.source.mapif.mail_return(fd, char_id, mail_id, new_mail); } - if( HPMHooks.count.HP_mapif_mail_return_post ) { - void (*postHookFunc) (int *fd, int *char_id, int *mail_id, int *new_mail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_mail_return_post > 0) { + void (*postHookFunc) (int fd, int char_id, int mail_id, int new_mail); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_return_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_return_post[hIndex].func; - postHookFunc(&fd, &char_id, &mail_id, &new_mail); + postHookFunc(fd, char_id, mail_id, new_mail); } } return; } void HP_mapif_parse_mail_return(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_return_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_return_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_return_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12818,25 +14650,25 @@ void HP_mapif_parse_mail_return(int fd) { { HPMHooks.source.mapif.parse_mail_return(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_return_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_mail_return_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_return_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_return_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_mapif_mail_send(int fd, struct mail_message *msg) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mail_send_pre ) { - void (*preHookFunc) (int *fd, struct mail_message *msg); + if (HPMHooks.count.HP_mapif_mail_send_pre > 0) { + void (*preHookFunc) (int *fd, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mail_send_pre[hIndex].func; - preHookFunc(&fd, msg); + preHookFunc(&fd, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12844,25 +14676,25 @@ void HP_mapif_mail_send(int fd, struct mail_message *msg) { { HPMHooks.source.mapif.mail_send(fd, msg); } - if( HPMHooks.count.HP_mapif_mail_send_post ) { - void (*postHookFunc) (int *fd, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_mail_send_post > 0) { + void (*postHookFunc) (int fd, struct mail_message *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mail_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mail_send_post[hIndex].func; - postHookFunc(&fd, msg); + postHookFunc(fd, msg); } } return; } void HP_mapif_parse_mail_send(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mail_send_pre ) { + if (HPMHooks.count.HP_mapif_parse_mail_send_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mail_send_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12870,133 +14702,25 @@ void HP_mapif_parse_mail_send(int fd) { { HPMHooks.source.mapif.parse_mail_send(fd); } - if( HPMHooks.count.HP_mapif_parse_mail_send_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_mail_send_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mail_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mail_send_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } -bool HP_mapif_mercenary_create(struct s_mercenary *merc) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_mercenary_create_pre ) { - bool (*preHookFunc) (struct s_mercenary *merc); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_create_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mercenary_create_pre[hIndex].func; - retVal___ = preHookFunc(merc); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.mercenary_create(merc); - } - if( HPMHooks.count.HP_mapif_mercenary_create_post ) { - bool (*postHookFunc) (bool retVal___, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_create_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mercenary_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___, merc); - } - } - return retVal___; -} -bool HP_mapif_mercenary_save(const struct s_mercenary *merc) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_mercenary_save_pre ) { - bool (*preHookFunc) (const struct s_mercenary *merc); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mercenary_save_pre[hIndex].func; - retVal___ = preHookFunc(merc); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.mercenary_save(merc); - } - if( HPMHooks.count.HP_mapif_mercenary_save_post ) { - bool (*postHookFunc) (bool retVal___, const struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mercenary_save_post[hIndex].func; - retVal___ = postHookFunc(retVal___, merc); - } - } - return retVal___; -} -bool HP_mapif_mercenary_load(int merc_id, int char_id, struct s_mercenary *merc) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_mercenary_load_pre ) { - bool (*preHookFunc) (int *merc_id, int *char_id, struct s_mercenary *merc); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mercenary_load_pre[hIndex].func; - retVal___ = preHookFunc(&merc_id, &char_id, merc); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.mercenary_load(merc_id, char_id, merc); - } - if( HPMHooks.count.HP_mapif_mercenary_load_post ) { - bool (*postHookFunc) (bool retVal___, int *merc_id, int *char_id, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mercenary_load_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &merc_id, &char_id, merc); - } - } - return retVal___; -} -bool HP_mapif_mercenary_delete(int merc_id) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_mercenary_delete_pre ) { - bool (*preHookFunc) (int *merc_id); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_mercenary_delete_pre[hIndex].func; - retVal___ = preHookFunc(&merc_id); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.mercenary_delete(merc_id); - } - if( HPMHooks.count.HP_mapif_mercenary_delete_post ) { - bool (*postHookFunc) (bool retVal___, int *merc_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_mercenary_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &merc_id); - } - } - return retVal___; -} void HP_mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mercenary_send_pre ) { - void (*preHookFunc) (int *fd, struct s_mercenary *merc, unsigned char *flag); + if (HPMHooks.count.HP_mapif_mercenary_send_pre > 0) { + void (*preHookFunc) (int *fd, struct s_mercenary **merc, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mercenary_send_pre[hIndex].func; - preHookFunc(&fd, merc, &flag); + preHookFunc(&fd, &merc, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13004,25 +14728,25 @@ void HP_mapif_mercenary_send(int fd, struct s_mercenary *merc, unsigned char fla { HPMHooks.source.mapif.mercenary_send(fd, merc, flag); } - if( HPMHooks.count.HP_mapif_mercenary_send_post ) { - void (*postHookFunc) (int *fd, struct s_mercenary *merc, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_mercenary_send_post > 0) { + void (*postHookFunc) (int fd, struct s_mercenary *merc, unsigned char flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mercenary_send_post[hIndex].func; - postHookFunc(&fd, merc, &flag); + postHookFunc(fd, merc, flag); } } return; } void HP_mapif_parse_mercenary_create(int fd, const struct s_mercenary *merc) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_create_pre ) { - void (*preHookFunc) (int *fd, const struct s_mercenary *merc); + if (HPMHooks.count.HP_mapif_parse_mercenary_create_pre > 0) { + void (*preHookFunc) (int *fd, const struct s_mercenary **merc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_create_pre[hIndex].func; - preHookFunc(&fd, merc); + preHookFunc(&fd, &merc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13030,25 +14754,25 @@ void HP_mapif_parse_mercenary_create(int fd, const struct s_mercenary *merc) { { HPMHooks.source.mapif.parse_mercenary_create(fd, merc); } - if( HPMHooks.count.HP_mapif_parse_mercenary_create_post ) { - void (*postHookFunc) (int *fd, const struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_create_post > 0) { + void (*postHookFunc) (int fd, const struct s_mercenary *merc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_create_post[hIndex].func; - postHookFunc(&fd, merc); + postHookFunc(fd, merc); } } return; } void HP_mapif_parse_mercenary_load(int fd, int merc_id, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_load_pre ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_load_pre > 0) { void (*preHookFunc) (int *fd, int *merc_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_load_pre[hIndex].func; preHookFunc(&fd, &merc_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13056,25 +14780,25 @@ void HP_mapif_parse_mercenary_load(int fd, int merc_id, int char_id) { { HPMHooks.source.mapif.parse_mercenary_load(fd, merc_id, char_id); } - if( HPMHooks.count.HP_mapif_parse_mercenary_load_post ) { - void (*postHookFunc) (int *fd, int *merc_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_load_post > 0) { + void (*postHookFunc) (int fd, int merc_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_load_post[hIndex].func; - postHookFunc(&fd, &merc_id, &char_id); + postHookFunc(fd, merc_id, char_id); } } return; } void HP_mapif_mercenary_deleted(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mercenary_deleted_pre ) { + if (HPMHooks.count.HP_mapif_mercenary_deleted_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mercenary_deleted_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13082,25 +14806,25 @@ void HP_mapif_mercenary_deleted(int fd, unsigned char flag) { { HPMHooks.source.mapif.mercenary_deleted(fd, flag); } - if( HPMHooks.count.HP_mapif_mercenary_deleted_post ) { - void (*postHookFunc) (int *fd, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_mercenary_deleted_post > 0) { + void (*postHookFunc) (int fd, unsigned char flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_deleted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mercenary_deleted_post[hIndex].func; - postHookFunc(&fd, &flag); + postHookFunc(fd, flag); } } return; } void HP_mapif_parse_mercenary_delete(int fd, int merc_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_delete_pre ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_delete_pre > 0) { void (*preHookFunc) (int *fd, int *merc_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_delete_pre[hIndex].func; preHookFunc(&fd, &merc_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13108,25 +14832,25 @@ void HP_mapif_parse_mercenary_delete(int fd, int merc_id) { { HPMHooks.source.mapif.parse_mercenary_delete(fd, merc_id); } - if( HPMHooks.count.HP_mapif_parse_mercenary_delete_post ) { - void (*postHookFunc) (int *fd, int *merc_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_delete_post > 0) { + void (*postHookFunc) (int fd, int merc_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_delete_post[hIndex].func; - postHookFunc(&fd, &merc_id); + postHookFunc(fd, merc_id); } } return; } void HP_mapif_mercenary_saved(int fd, unsigned char flag) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_mercenary_saved_pre ) { + if (HPMHooks.count.HP_mapif_mercenary_saved_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_mercenary_saved_pre[hIndex].func; preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13134,25 +14858,25 @@ void HP_mapif_mercenary_saved(int fd, unsigned char flag) { { HPMHooks.source.mapif.mercenary_saved(fd, flag); } - if( HPMHooks.count.HP_mapif_mercenary_saved_post ) { - void (*postHookFunc) (int *fd, unsigned char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_mercenary_saved_post > 0) { + void (*postHookFunc) (int fd, unsigned char flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_mercenary_saved_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_mercenary_saved_post[hIndex].func; - postHookFunc(&fd, &flag); + postHookFunc(fd, flag); } } return; } void HP_mapif_parse_mercenary_save(int fd, const struct s_mercenary *merc) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_mercenary_save_pre ) { - void (*preHookFunc) (int *fd, const struct s_mercenary *merc); + if (HPMHooks.count.HP_mapif_parse_mercenary_save_pre > 0) { + void (*preHookFunc) (int *fd, const struct s_mercenary **merc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_save_pre[hIndex].func; - preHookFunc(&fd, merc); + preHookFunc(&fd, &merc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13160,11 +14884,11 @@ void HP_mapif_parse_mercenary_save(int fd, const struct s_mercenary *merc) { { HPMHooks.source.mapif.parse_mercenary_save(fd, merc); } - if( HPMHooks.count.HP_mapif_parse_mercenary_save_post ) { - void (*postHookFunc) (int *fd, const struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_mercenary_save_post > 0) { + void (*postHookFunc) (int fd, const struct s_mercenary *merc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_mercenary_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_mercenary_save_post[hIndex].func; - postHookFunc(&fd, merc); + postHookFunc(fd, merc); } } return; @@ -13172,14 +14896,14 @@ void HP_mapif_parse_mercenary_save(int fd, const struct s_mercenary *merc) { int HP_mapif_party_created(int fd, int account_id, int char_id, struct party *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_created_pre ) { - int (*preHookFunc) (int *fd, int *account_id, int *char_id, struct party *p); + if (HPMHooks.count.HP_mapif_party_created_pre > 0) { + int (*preHookFunc) (int *fd, int *account_id, int *char_id, struct party **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_created_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, &char_id, p); + retVal___ = preHookFunc(&fd, &account_id, &char_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13187,25 +14911,25 @@ int HP_mapif_party_created(int fd, int account_id, int char_id, struct party *p) { retVal___ = HPMHooks.source.mapif.party_created(fd, account_id, char_id, p); } - if( HPMHooks.count.HP_mapif_party_created_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, struct party *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_party_created_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id, int char_id, struct party *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_created_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_created_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, p); + retVal___ = postHookFunc(retVal___, fd, account_id, char_id, p); } } return retVal___; } void HP_mapif_party_noinfo(int fd, int party_id, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_party_noinfo_pre ) { + if (HPMHooks.count.HP_mapif_party_noinfo_pre > 0) { void (*preHookFunc) (int *fd, int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_noinfo_pre[hIndex].func; preHookFunc(&fd, &party_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13213,25 +14937,25 @@ void HP_mapif_party_noinfo(int fd, int party_id, int char_id) { { HPMHooks.source.mapif.party_noinfo(fd, party_id, char_id); } - if( HPMHooks.count.HP_mapif_party_noinfo_post ) { - void (*postHookFunc) (int *fd, int *party_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_party_noinfo_post > 0) { + void (*postHookFunc) (int fd, int party_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_noinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_noinfo_post[hIndex].func; - postHookFunc(&fd, &party_id, &char_id); + postHookFunc(fd, party_id, char_id); } } return; } void HP_mapif_party_info(int fd, struct party *p, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_party_info_pre ) { - void (*preHookFunc) (int *fd, struct party *p, int *char_id); + if (HPMHooks.count.HP_mapif_party_info_pre > 0) { + void (*preHookFunc) (int *fd, struct party **p, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_info_pre[hIndex].func; - preHookFunc(&fd, p, &char_id); + preHookFunc(&fd, &p, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13239,11 +14963,11 @@ void HP_mapif_party_info(int fd, struct party *p, int char_id) { { HPMHooks.source.mapif.party_info(fd, p, char_id); } - if( HPMHooks.count.HP_mapif_party_info_post ) { - void (*postHookFunc) (int *fd, struct party *p, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_party_info_post > 0) { + void (*postHookFunc) (int fd, struct party *p, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_info_post[hIndex].func; - postHookFunc(&fd, p, &char_id); + postHookFunc(fd, p, char_id); } } return; @@ -13251,14 +14975,14 @@ void HP_mapif_party_info(int fd, struct party *p, int char_id) { int HP_mapif_party_memberadded(int fd, int party_id, int account_id, int char_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_memberadded_pre ) { + if (HPMHooks.count.HP_mapif_party_memberadded_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_memberadded_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13266,11 +14990,11 @@ int HP_mapif_party_memberadded(int fd, int party_id, int account_id, int char_id { retVal___ = HPMHooks.source.mapif.party_memberadded(fd, party_id, account_id, char_id, flag); } - if( HPMHooks.count.HP_mapif_party_memberadded_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_party_memberadded_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, int char_id, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_memberadded_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_memberadded_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id, &flag); + retVal___ = postHookFunc(retVal___, fd, party_id, account_id, char_id, flag); } } return retVal___; @@ -13278,14 +15002,14 @@ int HP_mapif_party_memberadded(int fd, int party_id, int account_id, int char_id int HP_mapif_party_optionchanged(int fd, struct party *p, int account_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_optionchanged_pre ) { - int (*preHookFunc) (int *fd, struct party *p, int *account_id, int *flag); + if (HPMHooks.count.HP_mapif_party_optionchanged_pre > 0) { + int (*preHookFunc) (int *fd, struct party **p, int *account_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_optionchanged_pre[hIndex].func; - retVal___ = preHookFunc(&fd, p, &account_id, &flag); + retVal___ = preHookFunc(&fd, &p, &account_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13293,11 +15017,11 @@ int HP_mapif_party_optionchanged(int fd, struct party *p, int account_id, int fl { retVal___ = HPMHooks.source.mapif.party_optionchanged(fd, p, account_id, flag); } - if( HPMHooks.count.HP_mapif_party_optionchanged_post ) { - int (*postHookFunc) (int retVal___, int *fd, struct party *p, int *account_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_party_optionchanged_post > 0) { + int (*postHookFunc) (int retVal___, int fd, struct party *p, int account_id, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_optionchanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_optionchanged_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, p, &account_id, &flag); + retVal___ = postHookFunc(retVal___, fd, p, account_id, flag); } } return retVal___; @@ -13305,14 +15029,14 @@ int HP_mapif_party_optionchanged(int fd, struct party *p, int account_id, int fl int HP_mapif_party_withdraw(int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_withdraw_pre ) { + if (HPMHooks.count.HP_mapif_party_withdraw_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_withdraw_pre[hIndex].func; retVal___ = preHookFunc(&party_id, &account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13320,11 +15044,11 @@ int HP_mapif_party_withdraw(int party_id, int account_id, int char_id) { { retVal___ = HPMHooks.source.mapif.party_withdraw(party_id, account_id, char_id); } - if( HPMHooks.count.HP_mapif_party_withdraw_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_party_withdraw_post > 0) { + int (*postHookFunc) (int retVal___, int party_id, int account_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_withdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_withdraw_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, &char_id); + retVal___ = postHookFunc(retVal___, party_id, account_id, char_id); } } return retVal___; @@ -13332,14 +15056,14 @@ int HP_mapif_party_withdraw(int party_id, int account_id, int char_id) { int HP_mapif_party_membermoved(struct party *p, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_membermoved_pre ) { - int (*preHookFunc) (struct party *p, int *idx); + if (HPMHooks.count.HP_mapif_party_membermoved_pre > 0) { + int (*preHookFunc) (struct party **p, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_membermoved_pre[hIndex].func; - retVal___ = preHookFunc(p, &idx); + retVal___ = preHookFunc(&p, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13347,11 +15071,11 @@ int HP_mapif_party_membermoved(struct party *p, int idx) { { retVal___ = HPMHooks.source.mapif.party_membermoved(p, idx); } - if( HPMHooks.count.HP_mapif_party_membermoved_post ) { - int (*postHookFunc) (int retVal___, struct party *p, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_party_membermoved_post > 0) { + int (*postHookFunc) (int retVal___, struct party *p, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_membermoved_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_membermoved_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &idx); + retVal___ = postHookFunc(retVal___, p, idx); } } return retVal___; @@ -13359,14 +15083,14 @@ int HP_mapif_party_membermoved(struct party *p, int idx) { int HP_mapif_party_broken(int party_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_broken_pre ) { + if (HPMHooks.count.HP_mapif_party_broken_pre > 0) { int (*preHookFunc) (int *party_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_party_broken_pre[hIndex].func; retVal___ = preHookFunc(&party_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13374,38 +15098,11 @@ int HP_mapif_party_broken(int party_id, int flag) { { retVal___ = HPMHooks.source.mapif.party_broken(party_id, flag); } - if( HPMHooks.count.HP_mapif_party_broken_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_party_broken_post > 0) { + int (*postHookFunc) (int retVal___, int party_id, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_broken_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_party_broken_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &flag); - } - } - return retVal___; -} -int HP_mapif_party_message(int party_id, int account_id, const char *mes, int len, int sfd) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_party_message_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, const char *mes, int *len, int *sfd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_party_message_pre[hIndex].func; - retVal___ = preHookFunc(&party_id, &account_id, mes, &len, &sfd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.party_message(party_id, account_id, mes, len, sfd); - } - if( HPMHooks.count.HP_mapif_party_message_post ) { - int (*postHookFunc) (int retVal___, int *party_id, int *account_id, const char *mes, int *len, int *sfd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_party_message_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_party_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &party_id, &account_id, mes, &len, &sfd); + retVal___ = postHookFunc(retVal___, party_id, flag); } } return retVal___; @@ -13413,14 +15110,14 @@ int HP_mapif_party_message(int party_id, int account_id, const char *mes, int le int HP_mapif_parse_CreateParty(int fd, const char *name, int item, int item2, const struct party_member *leader) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_CreateParty_pre ) { - int (*preHookFunc) (int *fd, const char *name, int *item, int *item2, const struct party_member *leader); + if (HPMHooks.count.HP_mapif_parse_CreateParty_pre > 0) { + int (*preHookFunc) (int *fd, const char **name, int *item, int *item2, const struct party_member **leader); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_CreateParty_pre[hIndex].func; - retVal___ = preHookFunc(&fd, name, &item, &item2, leader); + retVal___ = preHookFunc(&fd, &name, &item, &item2, &leader); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13428,25 +15125,25 @@ int HP_mapif_parse_CreateParty(int fd, const char *name, int item, int item2, co { retVal___ = HPMHooks.source.mapif.parse_CreateParty(fd, name, item, item2, leader); } - if( HPMHooks.count.HP_mapif_parse_CreateParty_post ) { - int (*postHookFunc) (int retVal___, int *fd, const char *name, int *item, int *item2, const struct party_member *leader); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_CreateParty_post > 0) { + int (*postHookFunc) (int retVal___, int fd, const char *name, int item, int item2, const struct party_member *leader); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreateParty_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_CreateParty_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, name, &item, &item2, leader); + retVal___ = postHookFunc(retVal___, fd, name, item, item2, leader); } } return retVal___; } void HP_mapif_parse_PartyInfo(int fd, int party_id, int char_id) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_PartyInfo_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyInfo_pre > 0) { void (*preHookFunc) (int *fd, int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyInfo_pre[hIndex].func; preHookFunc(&fd, &party_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13454,11 +15151,11 @@ void HP_mapif_parse_PartyInfo(int fd, int party_id, int char_id) { { HPMHooks.source.mapif.parse_PartyInfo(fd, party_id, char_id); } - if( HPMHooks.count.HP_mapif_parse_PartyInfo_post ) { - void (*postHookFunc) (int *fd, int *party_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_PartyInfo_post > 0) { + void (*postHookFunc) (int fd, int party_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyInfo_post[hIndex].func; - postHookFunc(&fd, &party_id, &char_id); + postHookFunc(fd, party_id, char_id); } } return; @@ -13466,14 +15163,14 @@ void HP_mapif_parse_PartyInfo(int fd, int party_id, int char_id) { int HP_mapif_parse_PartyAddMember(int fd, int party_id, const struct party_member *member) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyAddMember_pre ) { - int (*preHookFunc) (int *fd, int *party_id, const struct party_member *member); + if (HPMHooks.count.HP_mapif_parse_PartyAddMember_pre > 0) { + int (*preHookFunc) (int *fd, int *party_id, const struct party_member **member); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyAddMember_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &party_id, member); + retVal___ = preHookFunc(&fd, &party_id, &member); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13481,11 +15178,11 @@ int HP_mapif_parse_PartyAddMember(int fd, int party_id, const struct party_membe { retVal___ = HPMHooks.source.mapif.parse_PartyAddMember(fd, party_id, member); } - if( HPMHooks.count.HP_mapif_parse_PartyAddMember_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, const struct party_member *member); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_PartyAddMember_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int party_id, const struct party_member *member); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyAddMember_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyAddMember_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, member); + retVal___ = postHookFunc(retVal___, fd, party_id, member); } } return retVal___; @@ -13493,14 +15190,14 @@ int HP_mapif_parse_PartyAddMember(int fd, int party_id, const struct party_membe int HP_mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int exp, int item) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *exp, int *item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeOption_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &account_id, &exp, &item); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13508,11 +15205,11 @@ int HP_mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int e { retVal___ = HPMHooks.source.mapif.parse_PartyChangeOption(fd, party_id, account_id, exp, item); } - if( HPMHooks.count.HP_mapif_parse_PartyChangeOption_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *exp, int *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_PartyChangeOption_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, int exp, int item); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeOption_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeOption_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &exp, &item); + retVal___ = postHookFunc(retVal___, fd, party_id, account_id, exp, item); } } return retVal___; @@ -13520,14 +15217,14 @@ int HP_mapif_parse_PartyChangeOption(int fd, int party_id, int account_id, int e int HP_mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyLeave_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyLeave_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeave_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13535,11 +15232,11 @@ int HP_mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) { retVal___ = HPMHooks.source.mapif.parse_PartyLeave(fd, party_id, account_id, char_id); } - if( HPMHooks.count.HP_mapif_parse_PartyLeave_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_PartyLeave_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeave_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id); + retVal___ = postHookFunc(retVal___, fd, party_id, account_id, char_id); } } return retVal___; @@ -13547,14 +15244,14 @@ int HP_mapif_parse_PartyLeave(int fd, int party_id, int account_id, int char_id) int HP_mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, unsigned int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeMap_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id, &map, &online, &lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13562,11 +15259,11 @@ int HP_mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char { retVal___ = HPMHooks.source.mapif.parse_PartyChangeMap(fd, party_id, account_id, char_id, map, online, lv); } - if( HPMHooks.count.HP_mapif_parse_PartyChangeMap_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id, unsigned short *map, int *online, unsigned int *lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_PartyChangeMap_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, int char_id, unsigned short map, int online, unsigned int lv); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyChangeMap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyChangeMap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id, &map, &online, &lv); + retVal___ = postHookFunc(retVal___, fd, party_id, account_id, char_id, map, online, lv); } } return retVal___; @@ -13574,14 +15271,14 @@ int HP_mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char int HP_mapif_parse_BreakParty(int fd, int party_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_BreakParty_pre ) { + if (HPMHooks.count.HP_mapif_parse_BreakParty_pre > 0) { int (*preHookFunc) (int *fd, int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_BreakParty_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13589,38 +15286,11 @@ int HP_mapif_parse_BreakParty(int fd, int party_id) { { retVal___ = HPMHooks.source.mapif.parse_BreakParty(fd, party_id); } - if( HPMHooks.count.HP_mapif_parse_BreakParty_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_BreakParty_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int party_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_BreakParty_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_BreakParty_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id); - } - } - return retVal___; -} -int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, const char *mes, int len) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyMessage_pre ) { - int (*preHookFunc) (int *fd, int *party_id, int *account_id, const char *mes, int *len); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &party_id, &account_id, mes, &len); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.parse_PartyMessage(fd, party_id, account_id, mes, len); - } - if( HPMHooks.count.HP_mapif_parse_PartyMessage_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, const char *mes, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyMessage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_PartyMessage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, mes, &len); + retVal___ = postHookFunc(retVal___, fd, party_id); } } return retVal___; @@ -13628,14 +15298,14 @@ int HP_mapif_parse_PartyMessage(int fd, int party_id, int account_id, const char int HP_mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre ) { + if (HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre > 0) { int (*preHookFunc) (int *fd, int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeaderChange_pre[hIndex].func; retVal___ = preHookFunc(&fd, &party_id, &account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13643,11 +15313,11 @@ int HP_mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int c { retVal___ = HPMHooks.source.mapif.parse_PartyLeaderChange(fd, party_id, account_id, char_id); } - if( HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *party_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int party_id, int account_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_PartyLeaderChange_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_PartyLeaderChange_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &party_id, &account_id, &char_id); + retVal___ = postHookFunc(retVal___, fd, party_id, account_id, char_id); } } return retVal___; @@ -13655,14 +15325,14 @@ int HP_mapif_parse_PartyLeaderChange(int fd, int party_id, int account_id, int c int HP_mapif_pet_created(int fd, int account_id, struct s_pet *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_pet_created_pre ) { - int (*preHookFunc) (int *fd, int *account_id, struct s_pet *p); + if (HPMHooks.count.HP_mapif_pet_created_pre > 0) { + int (*preHookFunc) (int *fd, int *account_id, struct s_pet **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_pet_created_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, p); + retVal___ = preHookFunc(&fd, &account_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13670,11 +15340,11 @@ int HP_mapif_pet_created(int fd, int account_id, struct s_pet *p) { { retVal___ = HPMHooks.source.mapif.pet_created(fd, account_id, p); } - if( HPMHooks.count.HP_mapif_pet_created_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_pet_created_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id, struct s_pet *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_created_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_pet_created_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, p); + retVal___ = postHookFunc(retVal___, fd, account_id, p); } } return retVal___; @@ -13682,14 +15352,14 @@ int HP_mapif_pet_created(int fd, int account_id, struct s_pet *p) { int HP_mapif_pet_info(int fd, int account_id, struct s_pet *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_pet_info_pre ) { - int (*preHookFunc) (int *fd, int *account_id, struct s_pet *p); + if (HPMHooks.count.HP_mapif_pet_info_pre > 0) { + int (*preHookFunc) (int *fd, int *account_id, struct s_pet **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_pet_info_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, p); + retVal___ = preHookFunc(&fd, &account_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13697,11 +15367,11 @@ int HP_mapif_pet_info(int fd, int account_id, struct s_pet *p) { { retVal___ = HPMHooks.source.mapif.pet_info(fd, account_id, p); } - if( HPMHooks.count.HP_mapif_pet_info_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, struct s_pet *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_pet_info_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id, struct s_pet *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_pet_info_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, p); + retVal___ = postHookFunc(retVal___, fd, account_id, p); } } return retVal___; @@ -13709,14 +15379,14 @@ int HP_mapif_pet_info(int fd, int account_id, struct s_pet *p) { int HP_mapif_pet_noinfo(int fd, int account_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_pet_noinfo_pre ) { + if (HPMHooks.count.HP_mapif_pet_noinfo_pre > 0) { int (*preHookFunc) (int *fd, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_pet_noinfo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13724,11 +15394,11 @@ int HP_mapif_pet_noinfo(int fd, int account_id) { { retVal___ = HPMHooks.source.mapif.pet_noinfo(fd, account_id); } - if( HPMHooks.count.HP_mapif_pet_noinfo_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_pet_noinfo_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pet_noinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_pet_noinfo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id); + retVal___ = postHookFunc(retVal___, fd, account_id); } } return retVal___; @@ -13736,14 +15406,14 @@ int HP_mapif_pet_noinfo(int fd, int account_id) { int HP_mapif_save_pet_ack(int fd, int account_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_save_pet_ack_pre ) { + if (HPMHooks.count.HP_mapif_save_pet_ack_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_save_pet_ack_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13751,11 +15421,11 @@ int HP_mapif_save_pet_ack(int fd, int account_id, int flag) { { retVal___ = HPMHooks.source.mapif.save_pet_ack(fd, account_id, flag); } - if( HPMHooks.count.HP_mapif_save_pet_ack_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_save_pet_ack_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_save_pet_ack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &flag); + retVal___ = postHookFunc(retVal___, fd, account_id, flag); } } return retVal___; @@ -13763,14 +15433,14 @@ int HP_mapif_save_pet_ack(int fd, int account_id, int flag) { int HP_mapif_delete_pet_ack(int fd, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_delete_pet_ack_pre ) { + if (HPMHooks.count.HP_mapif_delete_pet_ack_pre > 0) { int (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_delete_pet_ack_pre[hIndex].func; retVal___ = preHookFunc(&fd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13778,65 +15448,11 @@ int HP_mapif_delete_pet_ack(int fd, int flag) { { retVal___ = HPMHooks.source.mapif.delete_pet_ack(fd, flag); } - if( HPMHooks.count.HP_mapif_delete_pet_ack_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_delete_pet_ack_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_delete_pet_ack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &flag); - } - } - return retVal___; -} -int HP_mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id, short pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_create_pet_pre ) { - int (*preHookFunc) (int *fd, int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char *pet_name); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_create_pet_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, &char_id, &pet_class, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incubate, pet_name); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.create_pet(fd, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); - } - if( HPMHooks.count.HP_mapif_create_pet_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, short *pet_class, short *pet_lv, short *pet_egg_id, short *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char *pet_name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_create_pet_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_create_pet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &pet_class, &pet_lv, &pet_egg_id, &pet_equip, &intimate, &hungry, &rename_flag, &incubate, pet_name); - } - } - return retVal___; -} -int HP_mapif_load_pet(int fd, int account_id, int char_id, int pet_id) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_load_pet_pre ) { - int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *pet_id); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_pet_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_load_pet_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, &char_id, &pet_id); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.load_pet(fd, account_id, char_id, pet_id); - } - if( HPMHooks.count.HP_mapif_load_pet_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, int *pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_pet_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_load_pet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &pet_id); + retVal___ = postHookFunc(retVal___, fd, flag); } } return retVal___; @@ -13844,14 +15460,14 @@ int HP_mapif_load_pet(int fd, int account_id, int char_id, int pet_id) { int HP_mapif_save_pet(int fd, int account_id, const struct s_pet *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_save_pet_pre ) { - int (*preHookFunc) (int *fd, int *account_id, const struct s_pet *data); + if (HPMHooks.count.HP_mapif_save_pet_pre > 0) { + int (*preHookFunc) (int *fd, int *account_id, const struct s_pet **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_save_pet_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &account_id, data); + retVal___ = preHookFunc(&fd, &account_id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13859,11 +15475,11 @@ int HP_mapif_save_pet(int fd, int account_id, const struct s_pet *data) { { retVal___ = HPMHooks.source.mapif.save_pet(fd, account_id, data); } - if( HPMHooks.count.HP_mapif_save_pet_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, const struct s_pet *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_save_pet_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id, const struct s_pet *data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_pet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_save_pet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, data); + retVal___ = postHookFunc(retVal___, fd, account_id, data); } } return retVal___; @@ -13871,14 +15487,14 @@ int HP_mapif_save_pet(int fd, int account_id, const struct s_pet *data) { int HP_mapif_delete_pet(int fd, int pet_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_delete_pet_pre ) { + if (HPMHooks.count.HP_mapif_delete_pet_pre > 0) { int (*preHookFunc) (int *fd, int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_delete_pet_pre[hIndex].func; retVal___ = preHookFunc(&fd, &pet_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13886,11 +15502,11 @@ int HP_mapif_delete_pet(int fd, int pet_id) { { retVal___ = HPMHooks.source.mapif.delete_pet(fd, pet_id); } - if( HPMHooks.count.HP_mapif_delete_pet_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_delete_pet_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int pet_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_delete_pet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_delete_pet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &pet_id); + retVal___ = postHookFunc(retVal___, fd, pet_id); } } return retVal___; @@ -13898,14 +15514,14 @@ int HP_mapif_delete_pet(int fd, int pet_id) { int HP_mapif_parse_CreatePet(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_CreatePet_pre ) { + if (HPMHooks.count.HP_mapif_parse_CreatePet_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_CreatePet_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13913,11 +15529,11 @@ int HP_mapif_parse_CreatePet(int fd) { { retVal___ = HPMHooks.source.mapif.parse_CreatePet(fd); } - if( HPMHooks.count.HP_mapif_parse_CreatePet_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_CreatePet_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_CreatePet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_CreatePet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -13925,14 +15541,14 @@ int HP_mapif_parse_CreatePet(int fd) { int HP_mapif_parse_LoadPet(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_LoadPet_pre ) { + if (HPMHooks.count.HP_mapif_parse_LoadPet_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_LoadPet_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13940,11 +15556,11 @@ int HP_mapif_parse_LoadPet(int fd) { { retVal___ = HPMHooks.source.mapif.parse_LoadPet(fd); } - if( HPMHooks.count.HP_mapif_parse_LoadPet_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_LoadPet_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadPet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_LoadPet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -13952,14 +15568,14 @@ int HP_mapif_parse_LoadPet(int fd) { int HP_mapif_parse_SavePet(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_SavePet_pre ) { + if (HPMHooks.count.HP_mapif_parse_SavePet_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_SavePet_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13967,11 +15583,11 @@ int HP_mapif_parse_SavePet(int fd) { { retVal___ = HPMHooks.source.mapif.parse_SavePet(fd); } - if( HPMHooks.count.HP_mapif_parse_SavePet_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_SavePet_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SavePet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_SavePet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -13979,14 +15595,14 @@ int HP_mapif_parse_SavePet(int fd) { int HP_mapif_parse_DeletePet(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_DeletePet_pre ) { + if (HPMHooks.count.HP_mapif_parse_DeletePet_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_DeletePet_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -13994,240 +15610,418 @@ int HP_mapif_parse_DeletePet(int fd) { { retVal___ = HPMHooks.source.mapif.parse_DeletePet(fd); } - if( HPMHooks.count.HP_mapif_parse_DeletePet_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_DeletePet_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_DeletePet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_DeletePet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -struct quest* HP_mapif_quests_fromsql(int char_id, int *count) { +void HP_mapif_quest_save_ack(int fd, int char_id, bool success) { int hIndex = 0; - struct quest* retVal___ = NULL; - if( HPMHooks.count.HP_mapif_quests_fromsql_pre ) { - struct quest* (*preHookFunc) (int *char_id, int *count); + if (HPMHooks.count.HP_mapif_quest_save_ack_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, bool *success); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quests_fromsql_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_quests_fromsql_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, count); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_quest_save_ack_pre[hIndex].func; + preHookFunc(&fd, &char_id, &success); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.quests_fromsql(char_id, count); + HPMHooks.source.mapif.quest_save_ack(fd, char_id, success); } - if( HPMHooks.count.HP_mapif_quests_fromsql_post ) { - struct quest* (*postHookFunc) (struct quest* retVal___, int *char_id, int *count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quests_fromsql_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_quests_fromsql_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, count); + if (HPMHooks.count.HP_mapif_quest_save_ack_post > 0) { + void (*postHookFunc) (int fd, int char_id, bool success); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_quest_save_ack_post[hIndex].func; + postHookFunc(fd, char_id, success); } } - return retVal___; + return; } -bool HP_mapif_quest_delete(int char_id, int quest_id) { +int HP_mapif_parse_quest_save(int fd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_quest_delete_pre ) { - bool (*preHookFunc) (int *char_id, int *quest_id); + int retVal___ = 0; + if (HPMHooks.count.HP_mapif_parse_quest_save_pre > 0) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_delete_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_quest_delete_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &quest_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_quest_save_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.quest_delete(char_id, quest_id); + retVal___ = HPMHooks.source.mapif.parse_quest_save(fd); } - if( HPMHooks.count.HP_mapif_quest_delete_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, int *quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_delete_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_quest_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &quest_id); + if (HPMHooks.count.HP_mapif_parse_quest_save_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_quest_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -bool HP_mapif_quest_add(int char_id, struct quest qd) { +void HP_mapif_send_quests(int fd, int char_id, struct quest *tmp_questlog, int num_quests) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_quest_add_pre ) { - bool (*preHookFunc) (int *char_id, struct quest *qd); + if (HPMHooks.count.HP_mapif_send_quests_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, struct quest **tmp_questlog, int *num_quests); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_add_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_quest_add_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &qd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_send_quests_pre[hIndex].func; + preHookFunc(&fd, &char_id, &tmp_questlog, &num_quests); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.quest_add(char_id, qd); + HPMHooks.source.mapif.send_quests(fd, char_id, tmp_questlog, num_quests); } - if( HPMHooks.count.HP_mapif_quest_add_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, struct quest *qd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_add_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_quest_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &qd); + if (HPMHooks.count.HP_mapif_send_quests_post > 0) { + void (*postHookFunc) (int fd, int char_id, struct quest *tmp_questlog, int num_quests); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_send_quests_post[hIndex].func; + postHookFunc(fd, char_id, tmp_questlog, num_quests); } } - return retVal___; + return; } -bool HP_mapif_quest_update(int char_id, struct quest qd) { +int HP_mapif_parse_quest_load(int fd) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mapif_quest_update_pre ) { - bool (*preHookFunc) (int *char_id, struct quest *qd); + int retVal___ = 0; + if (HPMHooks.count.HP_mapif_parse_quest_load_pre > 0) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_update_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_quest_update_pre[hIndex].func; - retVal___ = preHookFunc(&char_id, &qd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_quest_load_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.quest_update(char_id, qd); + retVal___ = HPMHooks.source.mapif.parse_quest_load(fd); } - if( HPMHooks.count.HP_mapif_quest_update_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, struct quest *qd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_update_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_quest_update_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_id, &qd); + if (HPMHooks.count.HP_mapif_parse_quest_load_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_quest_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -void HP_mapif_quest_save_ack(int fd, int char_id, bool success) { +void HP_mapif_parse_rodex_requestinbox(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_quest_save_ack_pre ) { - void (*preHookFunc) (int *fd, int *char_id, bool *success); + if (HPMHooks.count.HP_mapif_parse_rodex_requestinbox_pre > 0) { + void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_quest_save_ack_pre[hIndex].func; - preHookFunc(&fd, &char_id, &success); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_requestinbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_rodex_requestinbox_pre[hIndex].func; + preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.mapif.quest_save_ack(fd, char_id, success); + HPMHooks.source.mapif.parse_rodex_requestinbox(fd); } - if( HPMHooks.count.HP_mapif_quest_save_ack_post ) { - void (*postHookFunc) (int *fd, int *char_id, bool *success); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_quest_save_ack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_quest_save_ack_post[hIndex].func; - postHookFunc(&fd, &char_id, &success); + if (HPMHooks.count.HP_mapif_parse_rodex_requestinbox_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_requestinbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_rodex_requestinbox_post[hIndex].func; + postHookFunc(fd); } } return; } -int HP_mapif_parse_quest_save(int fd) { +void HP_mapif_rodex_sendinbox(int fd, int char_id, int8 opentype, int8 flag, int count, int64 mail_id, struct rodex_maillist *mails) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_quest_save_pre ) { - int (*preHookFunc) (int *fd); + if (HPMHooks.count.HP_mapif_rodex_sendinbox_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, int8 *opentype, int8 *flag, int *count, int64 *mail_id, struct rodex_maillist **mails); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_quest_save_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_sendinbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_sendinbox_pre[hIndex].func; + preHookFunc(&fd, &char_id, &opentype, &flag, &count, &mail_id, &mails); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_quest_save(fd); + HPMHooks.source.mapif.rodex_sendinbox(fd, char_id, opentype, flag, count, mail_id, mails); } - if( HPMHooks.count.HP_mapif_parse_quest_save_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_save_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_quest_save_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_mapif_rodex_sendinbox_post > 0) { + void (*postHookFunc) (int fd, int char_id, int8 opentype, int8 flag, int count, int64 mail_id, struct rodex_maillist *mails); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_sendinbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_sendinbox_post[hIndex].func; + postHookFunc(fd, char_id, opentype, flag, count, mail_id, mails); } } - return retVal___; + return; } -void HP_mapif_send_quests(int fd, int char_id, struct quest *tmp_questlog, int num_quests) { +void HP_mapif_parse_rodex_checkhasnew(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_send_quests_pre ) { - void (*preHookFunc) (int *fd, int *char_id, struct quest *tmp_questlog, int *num_quests); + if (HPMHooks.count.HP_mapif_parse_rodex_checkhasnew_pre > 0) { + void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_send_quests_pre[hIndex].func; - preHookFunc(&fd, &char_id, tmp_questlog, &num_quests); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_checkhasnew_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_rodex_checkhasnew_pre[hIndex].func; + preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.mapif.send_quests(fd, char_id, tmp_questlog, num_quests); + HPMHooks.source.mapif.parse_rodex_checkhasnew(fd); } - if( HPMHooks.count.HP_mapif_send_quests_post ) { - void (*postHookFunc) (int *fd, int *char_id, struct quest *tmp_questlog, int *num_quests); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_send_quests_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_send_quests_post[hIndex].func; - postHookFunc(&fd, &char_id, tmp_questlog, &num_quests); + if (HPMHooks.count.HP_mapif_parse_rodex_checkhasnew_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_checkhasnew_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_rodex_checkhasnew_post[hIndex].func; + postHookFunc(fd); } } return; } -int HP_mapif_parse_quest_load(int fd) { +void HP_mapif_rodex_sendhasnew(int fd, int char_id, bool has_new) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_quest_load_pre ) { - int (*preHookFunc) (int *fd); + if (HPMHooks.count.HP_mapif_rodex_sendhasnew_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, bool *has_new); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_quest_load_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_sendhasnew_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_sendhasnew_pre[hIndex].func; + preHookFunc(&fd, &char_id, &has_new); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_quest_load(fd); + HPMHooks.source.mapif.rodex_sendhasnew(fd, char_id, has_new); } - if( HPMHooks.count.HP_mapif_parse_quest_load_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_quest_load_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_quest_load_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_mapif_rodex_sendhasnew_post > 0) { + void (*postHookFunc) (int fd, int char_id, bool has_new); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_sendhasnew_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_sendhasnew_post[hIndex].func; + postHookFunc(fd, char_id, has_new); } } - return retVal___; + return; +} +void HP_mapif_parse_rodex_updatemail(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_parse_rodex_updatemail_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_updatemail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_rodex_updatemail_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_rodex_updatemail(fd); + } + if (HPMHooks.count.HP_mapif_parse_rodex_updatemail_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_updatemail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_rodex_updatemail_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_mapif_parse_rodex_send(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_parse_rodex_send_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_send_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_rodex_send_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_rodex_send(fd); + } + if (HPMHooks.count.HP_mapif_parse_rodex_send_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_send_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_rodex_send_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_mapif_rodex_send(int fd, int sender_id, int receiver_id, int receiver_accountid, bool result) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_send_pre > 0) { + void (*preHookFunc) (int *fd, int *sender_id, int *receiver_id, int *receiver_accountid, bool *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_send_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_send_pre[hIndex].func; + preHookFunc(&fd, &sender_id, &receiver_id, &receiver_accountid, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_send(fd, sender_id, receiver_id, receiver_accountid, result); + } + if (HPMHooks.count.HP_mapif_rodex_send_post > 0) { + void (*postHookFunc) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_send_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_send_post[hIndex].func; + postHookFunc(fd, sender_id, receiver_id, receiver_accountid, result); + } + } + return; +} +void HP_mapif_parse_rodex_checkname(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_parse_rodex_checkname_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_checkname_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_rodex_checkname_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.parse_rodex_checkname(fd); + } + if (HPMHooks.count.HP_mapif_parse_rodex_checkname_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_rodex_checkname_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_rodex_checkname_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_checkname_pre > 0) { + void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_pre[hIndex].func; + preHookFunc(&fd, &reqchar_id, &target_char_id, &target_class, &target_level, &name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_checkname(fd, reqchar_id, target_char_id, target_class, target_level, name); + } + if (HPMHooks.count.HP_mapif_rodex_checkname_post > 0) { + void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_post[hIndex].func; + postHookFunc(fd, reqchar_id, target_char_id, target_class, target_level, name); + } + } + return; +} +void HP_mapif_rodex_getzenyack(int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_getzenyack_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int64 *zeny); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getzenyack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_getzenyack_pre[hIndex].func; + preHookFunc(&fd, &char_id, &mail_id, &opentype, &zeny); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_getzenyack(fd, char_id, mail_id, opentype, zeny); + } + if (HPMHooks.count.HP_mapif_rodex_getzenyack_post > 0) { + void (*postHookFunc) (int fd, int char_id, int64 mail_id, uint8 opentype, int64 zeny); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getzenyack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_getzenyack_post[hIndex].func; + postHookFunc(fd, char_id, mail_id, opentype, zeny); + } + } + return; +} +void HP_mapif_rodex_getitemsack(int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items) { + int hIndex = 0; + if (HPMHooks.count.HP_mapif_rodex_getitemsack_pre > 0) { + void (*preHookFunc) (int *fd, int *char_id, int64 *mail_id, uint8 *opentype, int *count, const struct rodex_item **items); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getitemsack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_rodex_getitemsack_pre[hIndex].func; + preHookFunc(&fd, &char_id, &mail_id, &opentype, &count, &items); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mapif.rodex_getitemsack(fd, char_id, mail_id, opentype, count, items); + } + if (HPMHooks.count.HP_mapif_rodex_getitemsack_post > 0) { + void (*postHookFunc) (int fd, int char_id, int64 mail_id, uint8 opentype, int count, const struct rodex_item *items); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_getitemsack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_rodex_getitemsack_post[hIndex].func; + postHookFunc(fd, char_id, mail_id, opentype, count, items); + } + } + return; } int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_load_guild_storage_pre ) { + if (HPMHooks.count.HP_mapif_load_guild_storage_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *guild_id, char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_load_guild_storage_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &guild_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14235,11 +16029,11 @@ int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) { retVal___ = HPMHooks.source.mapif.load_guild_storage(fd, account_id, guild_id, flag); } - if( HPMHooks.count.HP_mapif_load_guild_storage_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *guild_id, char *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_load_guild_storage_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id, int guild_id, char flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_load_guild_storage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_load_guild_storage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &guild_id, &flag); + retVal___ = postHookFunc(retVal___, fd, account_id, guild_id, flag); } } return retVal___; @@ -14247,14 +16041,14 @@ int HP_mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) int HP_mapif_save_guild_storage_ack(int fd, int account_id, int guild_id, int fail) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_save_guild_storage_ack_pre ) { + if (HPMHooks.count.HP_mapif_save_guild_storage_ack_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *guild_id, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_save_guild_storage_ack_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &guild_id, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14262,11 +16056,11 @@ int HP_mapif_save_guild_storage_ack(int fd, int account_id, int guild_id, int fa { retVal___ = HPMHooks.source.mapif.save_guild_storage_ack(fd, account_id, guild_id, fail); } - if( HPMHooks.count.HP_mapif_save_guild_storage_ack_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *guild_id, int *fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_save_guild_storage_ack_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id, int guild_id, int fail); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_save_guild_storage_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_save_guild_storage_ack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &guild_id, &fail); + retVal___ = postHookFunc(retVal___, fd, account_id, guild_id, fail); } } return retVal___; @@ -14274,14 +16068,14 @@ int HP_mapif_save_guild_storage_ack(int fd, int account_id, int guild_id, int fa int HP_mapif_parse_LoadGuildStorage(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre ) { + if (HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_LoadGuildStorage_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14289,11 +16083,11 @@ int HP_mapif_parse_LoadGuildStorage(int fd) { { retVal___ = HPMHooks.source.mapif.parse_LoadGuildStorage(fd); } - if( HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_LoadGuildStorage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_LoadGuildStorage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -14301,14 +16095,14 @@ int HP_mapif_parse_LoadGuildStorage(int fd) { int HP_mapif_parse_SaveGuildStorage(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre ) { + if (HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_SaveGuildStorage_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14316,265 +16110,212 @@ int HP_mapif_parse_SaveGuildStorage(int fd) { { retVal___ = HPMHooks.source.mapif.parse_SaveGuildStorage(fd); } - if( HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_SaveGuildStorage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_SaveGuildStorage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -int HP_mapif_itembound_ack(int fd, int aid, int guild_id) { +int HP_mapif_account_storage_load(int fd, int account_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_itembound_ack_pre ) { - int (*preHookFunc) (int *fd, int *aid, int *guild_id); + if (HPMHooks.count.HP_mapif_account_storage_load_pre > 0) { + int (*preHookFunc) (int *fd, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_itembound_ack_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &aid, &guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_storage_load_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_account_storage_load_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.itembound_ack(fd, aid, guild_id); + retVal___ = HPMHooks.source.mapif.account_storage_load(fd, account_id); } - if( HPMHooks.count.HP_mapif_itembound_ack_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *aid, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_itembound_ack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &aid, &guild_id); + if (HPMHooks.count.HP_mapif_account_storage_load_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_storage_load_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_account_storage_load_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, account_id); } } return retVal___; } -int HP_mapif_parse_ItemBoundRetrieve_sub(int fd) { +int HP_mapif_pAccountStorageLoad(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_pre ) { + if (HPMHooks.count.HP_mapif_pAccountStorageLoad_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_sub_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageLoad_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_pAccountStorageLoad_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.parse_ItemBoundRetrieve_sub(fd); + retVal___ = HPMHooks.source.mapif.pAccountStorageLoad(fd); } - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_mapif_pAccountStorageLoad_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageLoad_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_pAccountStorageLoad_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -void HP_mapif_parse_ItemBoundRetrieve(int fd) { - int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre ) { - void (*preHookFunc) (int *fd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_pre[hIndex].func; - preHookFunc(&fd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.mapif.parse_ItemBoundRetrieve(fd); - } - if( HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_post[hIndex].func; - postHookFunc(&fd); - } - } - return; -} -void HP_mapif_parse_accinfo(int fd) { +int HP_mapif_pAccountStorageSave(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_accinfo_pre ) { - void (*preHookFunc) (int *fd); + int retVal___ = 0; + if (HPMHooks.count.HP_mapif_pAccountStorageSave_pre > 0) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_accinfo_pre[hIndex].func; - preHookFunc(&fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageSave_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_pAccountStorageSave_pre[hIndex].func; + retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.parse_accinfo(fd); + retVal___ = HPMHooks.source.mapif.pAccountStorageSave(fd); } - if( HPMHooks.count.HP_mapif_parse_accinfo_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_accinfo_post[hIndex].func; - postHookFunc(&fd); + if (HPMHooks.count.HP_mapif_pAccountStorageSave_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_pAccountStorageSave_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_pAccountStorageSave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); } } - return; + return retVal___; } -void HP_mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int group_id, int logincount, int state) { +void HP_mapif_sAccountStorageSaveAck(int fd, int account_id, bool save) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_parse_accinfo2_pre ) { - void (*preHookFunc) (bool *success, int *map_fd, int *u_fd, int *u_aid, int *account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int *group_id, int *logincount, int *state); + if (HPMHooks.count.HP_mapif_sAccountStorageSaveAck_pre > 0) { + void (*preHookFunc) (int *fd, int *account_id, bool *save); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo2_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_accinfo2_pre[hIndex].func; - preHookFunc(&success, &map_fd, &u_fd, &u_aid, &account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, &group_id, &logincount, &state); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sAccountStorageSaveAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_sAccountStorageSaveAck_pre[hIndex].func; + preHookFunc(&fd, &account_id, &save); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.mapif.parse_accinfo2(success, map_fd, u_fd, u_aid, account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, group_id, logincount, state); + HPMHooks.source.mapif.sAccountStorageSaveAck(fd, account_id, save); } - if( HPMHooks.count.HP_mapif_parse_accinfo2_post ) { - void (*postHookFunc) (bool *success, int *map_fd, int *u_fd, int *u_aid, int *account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int *group_id, int *logincount, int *state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo2_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_accinfo2_post[hIndex].func; - postHookFunc(&success, &map_fd, &u_fd, &u_aid, &account_id, userid, user_pass, email, last_ip, lastlogin, pin_code, birthdate, &group_id, &logincount, &state); + if (HPMHooks.count.HP_mapif_sAccountStorageSaveAck_post > 0) { + void (*postHookFunc) (int fd, int account_id, bool save); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_sAccountStorageSaveAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_sAccountStorageSaveAck_post[hIndex].func; + postHookFunc(fd, account_id, save); } } return; } -int HP_mapif_broadcast(const unsigned char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, int sfd) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_broadcast_pre ) { - int (*preHookFunc) (const unsigned char *mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_broadcast_pre[hIndex].func; - retVal___ = preHookFunc(mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &sfd); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.mapif.broadcast(mes, len, fontColor, fontType, fontSize, fontAlign, fontY, sfd); - } - if( HPMHooks.count.HP_mapif_broadcast_post ) { - int (*postHookFunc) (int retVal___, const unsigned char *mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, int *sfd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_broadcast_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_broadcast_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &sfd); - } - } - return retVal___; -} -int HP_mapif_wis_message(struct WisData *wd) { +int HP_mapif_itembound_ack(int fd, int aid, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_wis_message_pre ) { - int (*preHookFunc) (struct WisData *wd); + if (HPMHooks.count.HP_mapif_itembound_ack_pre > 0) { + int (*preHookFunc) (int *fd, int *aid, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_wis_message_pre[hIndex].func; - retVal___ = preHookFunc(wd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_itembound_ack_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &aid, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.wis_message(wd); + retVal___ = HPMHooks.source.mapif.itembound_ack(fd, aid, guild_id); } - if( HPMHooks.count.HP_mapif_wis_message_post ) { - int (*postHookFunc) (int retVal___, struct WisData *wd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_message_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_wis_message_post[hIndex].func; - retVal___ = postHookFunc(retVal___, wd); + if (HPMHooks.count.HP_mapif_itembound_ack_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int aid, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_itembound_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_itembound_ack_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, aid, guild_id); } } return retVal___; } -void HP_mapif_wis_response(int fd, const unsigned char *src, int flag) { +void HP_mapif_parse_ItemBoundRetrieve(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_wis_response_pre ) { - void (*preHookFunc) (int *fd, const unsigned char *src, int *flag); + if (HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre > 0) { + void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_wis_response_pre[hIndex].func; - preHookFunc(&fd, src, &flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_pre[hIndex].func; + preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.mapif.wis_response(fd, src, flag); + HPMHooks.source.mapif.parse_ItemBoundRetrieve(fd); } - if( HPMHooks.count.HP_mapif_wis_response_post ) { - void (*postHookFunc) (int *fd, const unsigned char *src, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_response_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_wis_response_post[hIndex].func; - postHookFunc(&fd, src, &flag); + if (HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ItemBoundRetrieve_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_ItemBoundRetrieve_post[hIndex].func; + postHookFunc(fd); } } return; } -int HP_mapif_wis_end(struct WisData *wd, int flag) { +void HP_mapif_parse_accinfo(int fd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_wis_end_pre ) { - int (*preHookFunc) (struct WisData *wd, int *flag); + if (HPMHooks.count.HP_mapif_parse_accinfo_pre > 0) { + void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_wis_end_pre[hIndex].func; - retVal___ = preHookFunc(wd, &flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_accinfo_pre[hIndex].func; + preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.wis_end(wd, flag); + HPMHooks.source.mapif.parse_accinfo(fd); } - if( HPMHooks.count.HP_mapif_wis_end_post ) { - int (*postHookFunc) (int retVal___, struct WisData *wd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_wis_end_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_wis_end_post[hIndex].func; - retVal___ = postHookFunc(retVal___, wd, &flag); + if (HPMHooks.count.HP_mapif_parse_accinfo_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_accinfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_accinfo_post[hIndex].func; + postHookFunc(fd); } } - return retVal___; + return; } int HP_mapif_account_reg_reply(int fd, int account_id, int char_id, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_account_reg_reply_pre ) { + if (HPMHooks.count.HP_mapif_account_reg_reply_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_account_reg_reply_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &char_id, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14582,11 +16323,11 @@ int HP_mapif_account_reg_reply(int fd, int account_id, int char_id, int type) { { retVal___ = HPMHooks.source.mapif.account_reg_reply(fd, account_id, char_id, type); } - if( HPMHooks.count.HP_mapif_account_reg_reply_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_account_reg_reply_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id, int char_id, int type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_account_reg_reply_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_account_reg_reply_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &type); + retVal___ = postHookFunc(retVal___, fd, account_id, char_id, type); } } return retVal___; @@ -14594,14 +16335,14 @@ int HP_mapif_account_reg_reply(int fd, int account_id, int char_id, int type) { int HP_mapif_disconnectplayer(int fd, int account_id, int char_id, int reason) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_disconnectplayer_pre ) { + if (HPMHooks.count.HP_mapif_disconnectplayer_pre > 0) { int (*preHookFunc) (int *fd, int *account_id, int *char_id, int *reason); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_disconnectplayer_pre[hIndex].func; retVal___ = preHookFunc(&fd, &account_id, &char_id, &reason); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14609,242 +16350,242 @@ int HP_mapif_disconnectplayer(int fd, int account_id, int char_id, int reason) { { retVal___ = HPMHooks.source.mapif.disconnectplayer(fd, account_id, char_id, reason); } - if( HPMHooks.count.HP_mapif_disconnectplayer_post ) { - int (*postHookFunc) (int retVal___, int *fd, int *account_id, int *char_id, int *reason); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_post; hIndex++ ) { + if (HPMHooks.count.HP_mapif_disconnectplayer_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int account_id, int char_id, int reason); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_disconnectplayer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_disconnectplayer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &account_id, &char_id, &reason); + retVal___ = postHookFunc(retVal___, fd, account_id, char_id, reason); } } return retVal___; } -int HP_mapif_parse_broadcast(int fd) { +int HP_mapif_parse_Registry(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_broadcast_pre ) { + if (HPMHooks.count.HP_mapif_parse_Registry_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_Registry_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.parse_broadcast(fd); + retVal___ = HPMHooks.source.mapif.parse_Registry(fd); } - if( HPMHooks.count.HP_mapif_parse_broadcast_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_broadcast_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_broadcast_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_mapif_parse_Registry_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_Registry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -int HP_mapif_parse_WisRequest(int fd) { +int HP_mapif_parse_RegistryRequest(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_WisRequest_pre ) { + if (HPMHooks.count.HP_mapif_parse_RegistryRequest_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_RegistryRequest_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.parse_WisRequest(fd); + retVal___ = HPMHooks.source.mapif.parse_RegistryRequest(fd); } - if( HPMHooks.count.HP_mapif_parse_WisRequest_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisRequest_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_WisRequest_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_mapif_parse_RegistryRequest_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_RegistryRequest_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -int HP_mapif_parse_WisReply(int fd) { +void HP_mapif_namechange_ack(int fd, int account_id, int char_id, int type, int flag, const char *name) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_WisReply_pre ) { - int (*preHookFunc) (int *fd); + if (HPMHooks.count.HP_mapif_namechange_ack_pre > 0) { + void (*preHookFunc) (int *fd, int *account_id, int *char_id, int *type, int *flag, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_namechange_ack_pre[hIndex].func; + preHookFunc(&fd, &account_id, &char_id, &type, &flag, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mapif.parse_WisReply(fd); + HPMHooks.source.mapif.namechange_ack(fd, account_id, char_id, type, flag, name); } - if( HPMHooks.count.HP_mapif_parse_WisReply_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisReply_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_WisReply_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_mapif_namechange_ack_post > 0) { + void (*postHookFunc) (int fd, int account_id, int char_id, int type, int flag, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_namechange_ack_post[hIndex].func; + postHookFunc(fd, account_id, char_id, type, flag, name); } } - return retVal___; + return; } -int HP_mapif_parse_WisToGM(int fd) { +int HP_mapif_parse_NameChangeRequest(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_WisToGM_pre ) { + if (HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_NameChangeRequest_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.parse_WisToGM(fd); + retVal___ = HPMHooks.source.mapif.parse_NameChangeRequest(fd); } - if( HPMHooks.count.HP_mapif_parse_WisToGM_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_WisToGM_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_WisToGM_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_mapif_parse_NameChangeRequest_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_NameChangeRequest_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -int HP_mapif_parse_Registry(int fd) { +int HP_mapif_parse_ClanMemberKick(int fd, int clan_id, int kick_interval) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_Registry_pre ) { - int (*preHookFunc) (int *fd); + if (HPMHooks.count.HP_mapif_parse_ClanMemberKick_pre > 0) { + int (*preHookFunc) (int *fd, int *clan_id, int *kick_interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_Registry_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ClanMemberKick_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_ClanMemberKick_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &clan_id, &kick_interval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.parse_Registry(fd); + retVal___ = HPMHooks.source.mapif.parse_ClanMemberKick(fd, clan_id, kick_interval); } - if( HPMHooks.count.HP_mapif_parse_Registry_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_Registry_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_Registry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_mapif_parse_ClanMemberKick_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int clan_id, int kick_interval); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ClanMemberKick_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_ClanMemberKick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, clan_id, kick_interval); } } return retVal___; } -int HP_mapif_parse_RegistryRequest(int fd) { +int HP_mapif_parse_ClanMemberCount(int fd, int clan_id, int kick_interval) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_RegistryRequest_pre ) { - int (*preHookFunc) (int *fd); + if (HPMHooks.count.HP_mapif_parse_ClanMemberCount_pre > 0) { + int (*preHookFunc) (int *fd, int *clan_id, int *kick_interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_RegistryRequest_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ClanMemberCount_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapif_parse_ClanMemberCount_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &clan_id, &kick_interval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.parse_RegistryRequest(fd); + retVal___ = HPMHooks.source.mapif.parse_ClanMemberCount(fd, clan_id, kick_interval); } - if( HPMHooks.count.HP_mapif_parse_RegistryRequest_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_RegistryRequest_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_RegistryRequest_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_mapif_parse_ClanMemberCount_post > 0) { + int (*postHookFunc) (int retVal___, int fd, int clan_id, int kick_interval); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_ClanMemberCount_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapif_parse_ClanMemberCount_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, clan_id, kick_interval); } } return retVal___; } -void HP_mapif_namechange_ack(int fd, int account_id, int char_id, int type, int flag, const char *name) { +/* mapindex_interface */ +bool HP_mapindex_config_read_dbpath(const char *filename, const struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_mapif_namechange_ack_pre ) { - void (*preHookFunc) (int *fd, int *account_id, int *char_id, int *type, int *flag, const char *name); + bool retVal___ = false; + if (HPMHooks.count.HP_mapindex_config_read_dbpath_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_namechange_ack_pre[hIndex].func; - preHookFunc(&fd, &account_id, &char_id, &type, &flag, name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_dbpath_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapindex_config_read_dbpath_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.mapif.namechange_ack(fd, account_id, char_id, type, flag, name); + retVal___ = HPMHooks.source.mapindex.config_read_dbpath(filename, config); } - if( HPMHooks.count.HP_mapif_namechange_ack_post ) { - void (*postHookFunc) (int *fd, int *account_id, int *char_id, int *type, int *flag, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_namechange_ack_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_namechange_ack_post[hIndex].func; - postHookFunc(&fd, &account_id, &char_id, &type, &flag, name); + if (HPMHooks.count.HP_mapindex_config_read_dbpath_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_dbpath_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapindex_config_read_dbpath_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config); } } - return; + return retVal___; } -int HP_mapif_parse_NameChangeRequest(int fd) { +bool HP_mapindex_config_read(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre ) { - int (*preHookFunc) (int *fd); + bool retVal___ = false; + if (HPMHooks.count.HP_mapindex_config_read_pre > 0) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_mapif_parse_NameChangeRequest_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapindex_config_read_pre[hIndex].func; + retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapif.parse_NameChangeRequest(fd); + retVal___ = HPMHooks.source.mapindex.config_read(); } - if( HPMHooks.count.HP_mapif_parse_NameChangeRequest_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_NameChangeRequest_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_mapif_parse_NameChangeRequest_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_mapindex_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapindex_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -/* mapindex */ int HP_mapindex_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapindex_init_pre ) { + if (HPMHooks.count.HP_mapindex_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14852,9 +16593,9 @@ int HP_mapindex_init(void) { { retVal___ = HPMHooks.source.mapindex.init(); } - if( HPMHooks.count.HP_mapindex_init_post ) { + if (HPMHooks.count.HP_mapindex_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -14863,14 +16604,14 @@ int HP_mapindex_init(void) { } void HP_mapindex_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapindex_final_pre ) { + if (HPMHooks.count.HP_mapindex_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14878,9 +16619,9 @@ void HP_mapindex_final(void) { { HPMHooks.source.mapindex.final(); } - if( HPMHooks.count.HP_mapindex_final_post ) { + if (HPMHooks.count.HP_mapindex_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_final_post[hIndex].func; postHookFunc(); } @@ -14890,14 +16631,14 @@ void HP_mapindex_final(void) { int HP_mapindex_addmap(int index, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapindex_addmap_pre ) { - int (*preHookFunc) (int *index, const char *name); + if (HPMHooks.count.HP_mapindex_addmap_pre > 0) { + int (*preHookFunc) (int *index, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_addmap_pre[hIndex].func; - retVal___ = preHookFunc(&index, name); + retVal___ = preHookFunc(&index, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14905,25 +16646,25 @@ int HP_mapindex_addmap(int index, const char *name) { { retVal___ = HPMHooks.source.mapindex.addmap(index, name); } - if( HPMHooks.count.HP_mapindex_addmap_post ) { - int (*postHookFunc) (int retVal___, int *index, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++ ) { + if (HPMHooks.count.HP_mapindex_addmap_post > 0) { + int (*postHookFunc) (int retVal___, int index, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_addmap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &index, name); + retVal___ = postHookFunc(retVal___, index, name); } } return retVal___; } void HP_mapindex_removemap(int index) { int hIndex = 0; - if( HPMHooks.count.HP_mapindex_removemap_pre ) { + if (HPMHooks.count.HP_mapindex_removemap_pre > 0) { void (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_removemap_pre[hIndex].func; preHookFunc(&index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14931,11 +16672,11 @@ void HP_mapindex_removemap(int index) { { HPMHooks.source.mapindex.removemap(index); } - if( HPMHooks.count.HP_mapindex_removemap_post ) { - void (*postHookFunc) (int *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++ ) { + if (HPMHooks.count.HP_mapindex_removemap_post > 0) { + void (*postHookFunc) (int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_removemap_post[hIndex].func; - postHookFunc(&index); + postHookFunc(index); } } return; @@ -14943,14 +16684,14 @@ void HP_mapindex_removemap(int index) { const char* HP_mapindex_getmapname(const char *string, char *output) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_getmapname_pre ) { - const char* (*preHookFunc) (const char *string, char *output); + if (HPMHooks.count.HP_mapindex_getmapname_pre > 0) { + const char* (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_getmapname_pre[hIndex].func; - retVal___ = preHookFunc(string, output); + retVal___ = preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14958,9 +16699,9 @@ const char* HP_mapindex_getmapname(const char *string, char *output) { { retVal___ = HPMHooks.source.mapindex.getmapname(string, output); } - if( HPMHooks.count.HP_mapindex_getmapname_post ) { + if (HPMHooks.count.HP_mapindex_getmapname_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_getmapname_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, output); } @@ -14970,14 +16711,14 @@ const char* HP_mapindex_getmapname(const char *string, char *output) { const char* HP_mapindex_getmapname_ext(const char *string, char *output) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_getmapname_ext_pre ) { - const char* (*preHookFunc) (const char *string, char *output); + if (HPMHooks.count.HP_mapindex_getmapname_ext_pre > 0) { + const char* (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_pre[hIndex].func; - retVal___ = preHookFunc(string, output); + retVal___ = preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14985,9 +16726,9 @@ const char* HP_mapindex_getmapname_ext(const char *string, char *output) { { retVal___ = HPMHooks.source.mapindex.getmapname_ext(string, output); } - if( HPMHooks.count.HP_mapindex_getmapname_ext_post ) { + if (HPMHooks.count.HP_mapindex_getmapname_ext_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, output); } @@ -14997,14 +16738,14 @@ const char* HP_mapindex_getmapname_ext(const char *string, char *output) { unsigned short HP_mapindex_name2id(const char *p1) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_mapindex_name2id_pre ) { - unsigned short (*preHookFunc) (const char *p1); + if (HPMHooks.count.HP_mapindex_name2id_pre > 0) { + unsigned short (*preHookFunc) (const char **p1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_name2id_pre[hIndex].func; - retVal___ = preHookFunc(p1); + retVal___ = preHookFunc(&p1); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15012,9 +16753,9 @@ unsigned short HP_mapindex_name2id(const char *p1) { { retVal___ = HPMHooks.source.mapindex.name2id(p1); } - if( HPMHooks.count.HP_mapindex_name2id_post ) { + if (HPMHooks.count.HP_mapindex_name2id_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, const char *p1); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_name2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, p1); } @@ -15024,14 +16765,14 @@ unsigned short HP_mapindex_name2id(const char *p1) { const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const char *func) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_id2name_pre ) { - const char* (*preHookFunc) (uint16 *id, const char *file, int *line, const char *func); + if (HPMHooks.count.HP_mapindex_id2name_pre > 0) { + const char* (*preHookFunc) (uint16 *id, const char **file, int *line, const char **func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_id2name_pre[hIndex].func; - retVal___ = preHookFunc(&id, file, &line, func); + retVal___ = preHookFunc(&id, &file, &line, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15039,11 +16780,11 @@ const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const cha { retVal___ = HPMHooks.source.mapindex.id2name(id, file, line, func); } - if( HPMHooks.count.HP_mapindex_id2name_post ) { - const char* (*postHookFunc) (const char* retVal___, uint16 *id, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++ ) { + if (HPMHooks.count.HP_mapindex_id2name_post > 0) { + const char* (*postHookFunc) (const char* retVal___, uint16 id, const char *file, int line, const char *func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_id2name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id, file, &line, func); + retVal___ = postHookFunc(retVal___, id, file, line, func); } } return retVal___; @@ -15051,14 +16792,14 @@ const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const cha bool HP_mapindex_check_default(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapindex_check_default_pre ) { + if (HPMHooks.count.HP_mapindex_check_default_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_check_default_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15066,26 +16807,421 @@ bool HP_mapindex_check_default(void) { { retVal___ = HPMHooks.source.mapindex.check_default(); } - if( HPMHooks.count.HP_mapindex_check_default_post ) { + if (HPMHooks.count.HP_mapindex_check_default_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_check_default_post[hIndex].func; retVal___ = postHookFunc(retVal___); } } return retVal___; } -/* nullpo */ +/* md5_interface */ +void HP_md5_string(const char *string, char *output) { + int hIndex = 0; + if (HPMHooks.count.HP_md5_string_pre > 0) { + void (*preHookFunc) (const char **string, char **output); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_md5_string_pre[hIndex].func; + preHookFunc(&string, &output); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.md5.string(string, output); + } + if (HPMHooks.count.HP_md5_string_post > 0) { + void (*postHookFunc) (const char *string, char *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_md5_string_post[hIndex].func; + postHookFunc(string, output); + } + } + return; +} +void HP_md5_binary(const uint8 *buf, const int buf_size, uint8 *output) { + int hIndex = 0; + if (HPMHooks.count.HP_md5_binary_pre > 0) { + void (*preHookFunc) (const uint8 **buf, const int *buf_size, uint8 **output); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_md5_binary_pre[hIndex].func; + preHookFunc(&buf, &buf_size, &output); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.md5.binary(buf, buf_size, output); + } + if (HPMHooks.count.HP_md5_binary_post > 0) { + void (*postHookFunc) (const uint8 *buf, const int buf_size, uint8 *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_md5_binary_post[hIndex].func; + postHookFunc(buf, buf_size, output); + } + } + return; +} +void HP_md5_salt(int len, char *output) { + int hIndex = 0; + if (HPMHooks.count.HP_md5_salt_pre > 0) { + void (*preHookFunc) (int *len, char **output); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_md5_salt_pre[hIndex].func; + preHookFunc(&len, &output); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.md5.salt(len, output); + } + if (HPMHooks.count.HP_md5_salt_post > 0) { + void (*postHookFunc) (int len, char *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_md5_salt_post[hIndex].func; + postHookFunc(len, output); + } + } + return; +} +/* mutex_interface */ +struct mutex_data* HP_mutex_create(void) { + int hIndex = 0; + struct mutex_data* retVal___ = NULL; + if (HPMHooks.count.HP_mutex_create_pre > 0) { + struct mutex_data* (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_create_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mutex.create(); + } + if (HPMHooks.count.HP_mutex_create_post > 0) { + struct mutex_data* (*postHookFunc) (struct mutex_data* retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_mutex_destroy(struct mutex_data *m) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_destroy_pre > 0) { + void (*preHookFunc) (struct mutex_data **m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_destroy_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.destroy(m); + } + if (HPMHooks.count.HP_mutex_destroy_post > 0) { + void (*postHookFunc) (struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_destroy_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +void HP_mutex_lock(struct mutex_data *m) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_lock_pre > 0) { + void (*preHookFunc) (struct mutex_data **m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_lock_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.lock(m); + } + if (HPMHooks.count.HP_mutex_lock_post > 0) { + void (*postHookFunc) (struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_lock_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +bool HP_mutex_trylock(struct mutex_data *m) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mutex_trylock_pre > 0) { + bool (*preHookFunc) (struct mutex_data **m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_trylock_pre[hIndex].func; + retVal___ = preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mutex.trylock(m); + } + if (HPMHooks.count.HP_mutex_trylock_post > 0) { + bool (*postHookFunc) (bool retVal___, struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_trylock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m); + } + } + return retVal___; +} +void HP_mutex_unlock(struct mutex_data *m) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_unlock_pre > 0) { + void (*preHookFunc) (struct mutex_data **m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_unlock_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.unlock(m); + } + if (HPMHooks.count.HP_mutex_unlock_post > 0) { + void (*postHookFunc) (struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_unlock_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +struct cond_data* HP_mutex_cond_create(void) { + int hIndex = 0; + struct cond_data* retVal___ = NULL; + if (HPMHooks.count.HP_mutex_cond_create_pre > 0) { + struct cond_data* (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_create_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mutex.cond_create(); + } + if (HPMHooks.count.HP_mutex_cond_create_post > 0) { + struct cond_data* (*postHookFunc) (struct cond_data* retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_mutex_cond_destroy(struct cond_data *c) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_destroy_pre > 0) { + void (*preHookFunc) (struct cond_data **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_destroy_pre[hIndex].func; + preHookFunc(&c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_destroy(c); + } + if (HPMHooks.count.HP_mutex_cond_destroy_post > 0) { + void (*postHookFunc) (struct cond_data *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_destroy_post[hIndex].func; + postHookFunc(c); + } + } + return; +} +void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeout_ticks) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_wait_pre > 0) { + void (*preHookFunc) (struct cond_data **c, struct mutex_data **m, sysint *timeout_ticks); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_wait_pre[hIndex].func; + preHookFunc(&c, &m, &timeout_ticks); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_wait(c, m, timeout_ticks); + } + if (HPMHooks.count.HP_mutex_cond_wait_post > 0) { + void (*postHookFunc) (struct cond_data *c, struct mutex_data *m, sysint timeout_ticks); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_wait_post[hIndex].func; + postHookFunc(c, m, timeout_ticks); + } + } + return; +} +void HP_mutex_cond_signal(struct cond_data *c) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_signal_pre > 0) { + void (*preHookFunc) (struct cond_data **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_signal_pre[hIndex].func; + preHookFunc(&c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_signal(c); + } + if (HPMHooks.count.HP_mutex_cond_signal_post > 0) { + void (*postHookFunc) (struct cond_data *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_signal_post[hIndex].func; + postHookFunc(c); + } + } + return; +} +void HP_mutex_cond_broadcast(struct cond_data *c) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_broadcast_pre > 0) { + void (*preHookFunc) (struct cond_data **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_pre[hIndex].func; + preHookFunc(&c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_broadcast(c); + } + if (HPMHooks.count.HP_mutex_cond_broadcast_post > 0) { + void (*postHookFunc) (struct cond_data *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_post[hIndex].func; + postHookFunc(c); + } + } + return; +} +/* nullpo_interface */ +void HP_nullpo_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_nullpo_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_nullpo_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.nullpo.init(); + } + if (HPMHooks.count.HP_nullpo_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_nullpo_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_nullpo_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_nullpo_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_nullpo_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.nullpo.final(); + } + if (HPMHooks.count.HP_nullpo_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_nullpo_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { int hIndex = 0; - if( HPMHooks.count.HP_nullpo_assert_report_pre ) { - void (*preHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); + if (HPMHooks.count.HP_nullpo_assert_report_pre > 0) { + void (*preHookFunc) (const char **file, int *line, const char **func, const char **targetname, const char **title); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func; - preHookFunc(file, &line, func, targetname, title); + preHookFunc(&file, &line, &func, &targetname, &title); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15093,26 +17229,131 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const { HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title); } - if( HPMHooks.count.HP_nullpo_assert_report_post ) { - void (*postHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) { + if (HPMHooks.count.HP_nullpo_assert_report_post > 0) { + void (*postHookFunc) (const char *file, int line, const char *func, const char *targetname, const char *title); + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++) { postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func; - postHookFunc(file, &line, func, targetname, title); + postHookFunc(file, line, func, targetname, title); + } + } + return; +} +/* packets_interface */ +void HP_packets_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.init(); + } + if (HPMHooks.count.HP_packets_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.final(); + } + if (HPMHooks.count.HP_packets_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_addLens(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_addLens_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLens_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_addLens_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.addLens(); + } + if (HPMHooks.count.HP_packets_addLens_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLens_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_addLens_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_addLen(int id, int len) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_addLen_pre > 0) { + void (*preHookFunc) (int *id, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLen_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_addLen_pre[hIndex].func; + preHookFunc(&id, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.addLen(id, len); + } + if (HPMHooks.count.HP_packets_addLen_post > 0) { + void (*postHookFunc) (int id, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLen_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_addLen_post[hIndex].func; + postHookFunc(id, len); } } return; } -/* pincode */ +/* pincode_interface */ void HP_pincode_handle(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_handle_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_pincode_handle_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_handle_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15120,25 +17361,25 @@ void HP_pincode_handle(int fd, struct char_session_data *sd) { { HPMHooks.source.pincode.handle(fd, sd); } - if( HPMHooks.count.HP_pincode_handle_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_post; hIndex++ ) { + if (HPMHooks.count.HP_pincode_handle_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_handle_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_handle_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_pincode_decrypt(unsigned int userSeed, char *pin) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_decrypt_pre ) { - void (*preHookFunc) (unsigned int *userSeed, char *pin); + if (HPMHooks.count.HP_pincode_decrypt_pre > 0) { + void (*preHookFunc) (unsigned int *userSeed, char **pin); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_decrypt_pre[hIndex].func; - preHookFunc(&userSeed, pin); + preHookFunc(&userSeed, &pin); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15146,25 +17387,25 @@ void HP_pincode_decrypt(unsigned int userSeed, char *pin) { { HPMHooks.source.pincode.decrypt(userSeed, pin); } - if( HPMHooks.count.HP_pincode_decrypt_post ) { - void (*postHookFunc) (unsigned int *userSeed, char *pin); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_post; hIndex++ ) { + if (HPMHooks.count.HP_pincode_decrypt_post > 0) { + void (*postHookFunc) (unsigned int userSeed, char *pin); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_decrypt_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_decrypt_post[hIndex].func; - postHookFunc(&userSeed, pin); + postHookFunc(userSeed, pin); } } return; } void HP_pincode_error(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_error_pre ) { + if (HPMHooks.count.HP_pincode_error_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_error_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15172,25 +17413,25 @@ void HP_pincode_error(int account_id) { { HPMHooks.source.pincode.error(account_id); } - if( HPMHooks.count.HP_pincode_error_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_post; hIndex++ ) { + if (HPMHooks.count.HP_pincode_error_post > 0) { + void (*postHookFunc) (int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_error_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_error_post[hIndex].func; - postHookFunc(&account_id); + postHookFunc(account_id); } } return; } void HP_pincode_update(int account_id, char *pin) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_update_pre ) { - void (*preHookFunc) (int *account_id, char *pin); + if (HPMHooks.count.HP_pincode_update_pre > 0) { + void (*preHookFunc) (int *account_id, char **pin); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_update_pre[hIndex].func; - preHookFunc(&account_id, pin); + preHookFunc(&account_id, &pin); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15198,51 +17439,129 @@ void HP_pincode_update(int account_id, char *pin) { { HPMHooks.source.pincode.update(account_id, pin); } - if( HPMHooks.count.HP_pincode_update_post ) { - void (*postHookFunc) (int *account_id, char *pin); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_post; hIndex++ ) { + if (HPMHooks.count.HP_pincode_update_post > 0) { + void (*postHookFunc) (int account_id, char *pin); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_update_post[hIndex].func; - postHookFunc(&account_id, pin); + postHookFunc(account_id, pin); + } + } + return; +} +void HP_pincode_makestate(int fd, struct char_session_data *sd, enum pincode_make_response state) { + int hIndex = 0; + if (HPMHooks.count.HP_pincode_makestate_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, enum pincode_make_response *state); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_makestate_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_makestate_pre[hIndex].func; + preHookFunc(&fd, &sd, &state); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.makestate(fd, sd, state); + } + if (HPMHooks.count.HP_pincode_makestate_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, enum pincode_make_response state); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_makestate_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_makestate_post[hIndex].func; + postHookFunc(fd, sd, state); + } + } + return; +} +void HP_pincode_editstate(int fd, struct char_session_data *sd, enum pincode_edit_response state) { + int hIndex = 0; + if (HPMHooks.count.HP_pincode_editstate_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, enum pincode_edit_response *state); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_editstate_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_editstate_pre[hIndex].func; + preHookFunc(&fd, &sd, &state); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.editstate(fd, sd, state); + } + if (HPMHooks.count.HP_pincode_editstate_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, enum pincode_edit_response state); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_editstate_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_editstate_post[hIndex].func; + postHookFunc(fd, sd, state); + } + } + return; +} +void HP_pincode_loginstate(int fd, struct char_session_data *sd, enum pincode_login_response state) { + int hIndex = 0; + if (HPMHooks.count.HP_pincode_loginstate_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, enum pincode_login_response *state); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_loginstate_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_loginstate_pre[hIndex].func; + preHookFunc(&fd, &sd, &state); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.loginstate(fd, sd, state); + } + if (HPMHooks.count.HP_pincode_loginstate_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, enum pincode_login_response state); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_loginstate_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_loginstate_post[hIndex].func; + postHookFunc(fd, sd, state); } } return; } -void HP_pincode_sendstate(int fd, struct char_session_data *sd, uint16 state) { +void HP_pincode_loginstate2(int fd, struct char_session_data *sd, enum pincode_login_response state, enum pincode_login_response2 flag) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_sendstate_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd, uint16 *state); + if (HPMHooks.count.HP_pincode_loginstate2_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd, enum pincode_login_response *state, enum pincode_login_response2 *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_pincode_sendstate_pre[hIndex].func; - preHookFunc(&fd, sd, &state); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_loginstate2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_loginstate2_pre[hIndex].func; + preHookFunc(&fd, &sd, &state, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.pincode.sendstate(fd, sd, state); + HPMHooks.source.pincode.loginstate2(fd, sd, state, flag); } - if( HPMHooks.count.HP_pincode_sendstate_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd, uint16 *state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_sendstate_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_pincode_sendstate_post[hIndex].func; - postHookFunc(&fd, sd, &state); + if (HPMHooks.count.HP_pincode_loginstate2_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd, enum pincode_login_response state, enum pincode_login_response2 flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_loginstate2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_loginstate2_post[hIndex].func; + postHookFunc(fd, sd, state, flag); } } return; } void HP_pincode_setnew(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_setnew_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_pincode_setnew_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_setnew_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15250,25 +17569,25 @@ void HP_pincode_setnew(int fd, struct char_session_data *sd) { { HPMHooks.source.pincode.setnew(fd, sd); } - if( HPMHooks.count.HP_pincode_setnew_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_post; hIndex++ ) { + if (HPMHooks.count.HP_pincode_setnew_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_setnew_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_setnew_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_pincode_change(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_change_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_pincode_change_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_change_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15276,26 +17595,53 @@ void HP_pincode_change(int fd, struct char_session_data *sd) { { HPMHooks.source.pincode.change(fd, sd); } - if( HPMHooks.count.HP_pincode_change_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_post; hIndex++ ) { + if (HPMHooks.count.HP_pincode_change_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_change_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_change_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } +bool HP_pincode_isBlacklisted(const char *pin) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pincode_isBlacklisted_pre > 0) { + bool (*preHookFunc) (const char **pin); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_isBlacklisted_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_isBlacklisted_pre[hIndex].func; + retVal___ = preHookFunc(&pin); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pincode.isBlacklisted(pin); + } + if (HPMHooks.count.HP_pincode_isBlacklisted_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *pin); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_isBlacklisted_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_isBlacklisted_post[hIndex].func; + retVal___ = postHookFunc(retVal___, pin); + } + } + return retVal___; +} int HP_pincode_compare(int fd, struct char_session_data *sd, char *pin) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pincode_compare_pre ) { - int (*preHookFunc) (int *fd, struct char_session_data *sd, char *pin); + if (HPMHooks.count.HP_pincode_compare_pre > 0) { + int (*preHookFunc) (int *fd, struct char_session_data **sd, char **pin); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_compare_pre[hIndex].func; - retVal___ = preHookFunc(&fd, sd, pin); + retVal___ = preHookFunc(&fd, &sd, &pin); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15303,25 +17649,25 @@ int HP_pincode_compare(int fd, struct char_session_data *sd, char *pin) { { retVal___ = HPMHooks.source.pincode.compare(fd, sd, pin); } - if( HPMHooks.count.HP_pincode_compare_post ) { - int (*postHookFunc) (int retVal___, int *fd, struct char_session_data *sd, char *pin); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_post; hIndex++ ) { + if (HPMHooks.count.HP_pincode_compare_post > 0) { + int (*postHookFunc) (int retVal___, int fd, struct char_session_data *sd, char *pin); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_compare_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_compare_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, sd, pin); + retVal___ = postHookFunc(retVal___, fd, sd, pin); } } return retVal___; } void HP_pincode_check(int fd, struct char_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pincode_check_pre ) { - void (*preHookFunc) (int *fd, struct char_session_data *sd); + if (HPMHooks.count.HP_pincode_check_pre > 0) { + void (*preHookFunc) (int *fd, struct char_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_check_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15329,53 +17675,319 @@ void HP_pincode_check(int fd, struct char_session_data *sd) { { HPMHooks.source.pincode.check(fd, sd); } - if( HPMHooks.count.HP_pincode_check_post ) { - void (*postHookFunc) (int *fd, struct char_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_post; hIndex++ ) { + if (HPMHooks.count.HP_pincode_check_post > 0) { + void (*postHookFunc) (int fd, struct char_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_check_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } -bool HP_pincode_config_read(char *w1, char *w2) { +bool HP_pincode_config_read(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pincode_config_read_pre ) { - bool (*preHookFunc) (char *w1, char *w2); + if (HPMHooks.count.HP_pincode_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pincode_config_read_pre[hIndex].func; - retVal___ = preHookFunc(w1, w2); + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pincode.config_read(w1, w2); + retVal___ = HPMHooks.source.pincode.config_read(filename, config, imported); } - if( HPMHooks.count.HP_pincode_config_read_post ) { - bool (*postHookFunc) (bool retVal___, char *w1, char *w2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_post; hIndex++ ) { + if (HPMHooks.count.HP_pincode_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pincode_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, w1, w2); + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +void HP_pincode_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_pincode_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.init(); + } + if (HPMHooks.count.HP_pincode_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_pincode_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_pincode_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pincode_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pincode.final(); + } + if (HPMHooks.count.HP_pincode_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pincode_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pincode_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* rnd_interface */ +void HP_rnd_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_rnd_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rnd.init(); + } + if (HPMHooks.count.HP_rnd_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_rnd_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_rnd_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rnd.final(); + } + if (HPMHooks.count.HP_rnd_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_rnd_seed(uint32 seed) { + int hIndex = 0; + if (HPMHooks.count.HP_rnd_seed_pre > 0) { + void (*preHookFunc) (uint32 *seed); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_seed_pre[hIndex].func; + preHookFunc(&seed); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rnd.seed(seed); + } + if (HPMHooks.count.HP_rnd_seed_post > 0) { + void (*postHookFunc) (uint32 seed); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_seed_post[hIndex].func; + postHookFunc(seed); + } + } + return; +} +int32 HP_rnd_random(void) { + int hIndex = 0; + int32 retVal___ = 0; + if (HPMHooks.count.HP_rnd_random_pre > 0) { + int32 (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_random_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.random(); + } + if (HPMHooks.count.HP_rnd_random_post > 0) { + int32 (*postHookFunc) (int32 retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_random_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +uint32 HP_rnd_roll(uint32 dice_faces) { + int hIndex = 0; + uint32 retVal___ = 0; + if (HPMHooks.count.HP_rnd_roll_pre > 0) { + uint32 (*preHookFunc) (uint32 *dice_faces); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_roll_pre[hIndex].func; + retVal___ = preHookFunc(&dice_faces); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.roll(dice_faces); + } + if (HPMHooks.count.HP_rnd_roll_post > 0) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 dice_faces); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_roll_post[hIndex].func; + retVal___ = postHookFunc(retVal___, dice_faces); + } + } + return retVal___; +} +int32 HP_rnd_value(int32 min, int32 max) { + int hIndex = 0; + int32 retVal___ = 0; + if (HPMHooks.count.HP_rnd_value_pre > 0) { + int32 (*preHookFunc) (int32 *min, int32 *max); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_value_pre[hIndex].func; + retVal___ = preHookFunc(&min, &max); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.value(min, max); + } + if (HPMHooks.count.HP_rnd_value_post > 0) { + int32 (*postHookFunc) (int32 retVal___, int32 min, int32 max); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, min, max); + } + } + return retVal___; +} +double HP_rnd_uniform(void) { + int hIndex = 0; + double retVal___ = 0.; + if (HPMHooks.count.HP_rnd_uniform_pre > 0) { + double (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_uniform_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.uniform(); + } + if (HPMHooks.count.HP_rnd_uniform_post > 0) { + double (*postHookFunc) (double retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_uniform_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +double HP_rnd_uniform53(void) { + int hIndex = 0; + double retVal___ = 0.; + if (HPMHooks.count.HP_rnd_uniform53_pre > 0) { + double (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_uniform53_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.uniform53(); + } + if (HPMHooks.count.HP_rnd_uniform53_post > 0) { + double (*postHookFunc) (double retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_uniform53_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -/* showmsg */ +/* showmsg_interface */ void HP_showmsg_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_init_pre ) { + if (HPMHooks.count.HP_showmsg_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15383,9 +17995,9 @@ void HP_showmsg_init(void) { { HPMHooks.source.showmsg.init(); } - if( HPMHooks.count.HP_showmsg_init_post ) { + if (HPMHooks.count.HP_showmsg_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func; postHookFunc(); } @@ -15394,14 +18006,14 @@ void HP_showmsg_init(void) { } void HP_showmsg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_final_pre ) { + if (HPMHooks.count.HP_showmsg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15409,9 +18021,9 @@ void HP_showmsg_final(void) { { HPMHooks.source.showmsg.final(); } - if( HPMHooks.count.HP_showmsg_final_post ) { + if (HPMHooks.count.HP_showmsg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func; postHookFunc(); } @@ -15420,14 +18032,14 @@ void HP_showmsg_final(void) { } void HP_showmsg_clearScreen(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_clearScreen_pre ) { + if (HPMHooks.count.HP_showmsg_clearScreen_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15435,9 +18047,9 @@ void HP_showmsg_clearScreen(void) { { HPMHooks.source.showmsg.clearScreen(); } - if( HPMHooks.count.HP_showmsg_clearScreen_post ) { + if (HPMHooks.count.HP_showmsg_clearScreen_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func; postHookFunc(); } @@ -15447,16 +18059,16 @@ void HP_showmsg_clearScreen(void) { int HP_showmsg_showMessageV(const char *string, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_showmsg_showMessageV_pre ) { - int (*preHookFunc) (const char *string, va_list ap); + if (HPMHooks.count.HP_showmsg_showMessageV_pre > 0) { + int (*preHookFunc) (const char **string, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func; - retVal___ = preHookFunc(string, ap___copy); + retVal___ = preHookFunc(&string, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15466,9 +18078,9 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { retVal___ = HPMHooks.source.showmsg.showMessageV(string, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_showmsg_showMessageV_post ) { + if (HPMHooks.count.HP_showmsg_showMessageV_post > 0) { int (*postHookFunc) (int retVal___, const char *string, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, ap___copy); @@ -15477,17 +18089,17 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { } return retVal___; } -/* sockt */ +/* socket_interface */ void HP_sockt_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_init_pre ) { + if (HPMHooks.count.HP_sockt_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15495,9 +18107,9 @@ void HP_sockt_init(void) { { HPMHooks.source.sockt.init(); } - if( HPMHooks.count.HP_sockt_init_post ) { + if (HPMHooks.count.HP_sockt_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func; postHookFunc(); } @@ -15506,14 +18118,14 @@ void HP_sockt_init(void) { } void HP_sockt_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_final_pre ) { + if (HPMHooks.count.HP_sockt_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15521,9 +18133,9 @@ void HP_sockt_final(void) { { HPMHooks.source.sockt.final(); } - if( HPMHooks.count.HP_sockt_final_post ) { + if (HPMHooks.count.HP_sockt_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func; postHookFunc(); } @@ -15533,14 +18145,14 @@ void HP_sockt_final(void) { int HP_sockt_perform(int next) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_perform_pre ) { + if (HPMHooks.count.HP_sockt_perform_pre > 0) { int (*preHookFunc) (int *next); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func; retVal___ = preHookFunc(&next); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15548,25 +18160,25 @@ int HP_sockt_perform(int next) { { retVal___ = HPMHooks.source.sockt.perform(next); } - if( HPMHooks.count.HP_sockt_perform_post ) { - int (*postHookFunc) (int retVal___, int *next); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_perform_post > 0) { + int (*postHookFunc) (int retVal___, int next); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &next); + retVal___ = postHookFunc(retVal___, next); } } return retVal___; } void HP_sockt_datasync(int fd, bool send) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_datasync_pre ) { + if (HPMHooks.count.HP_sockt_datasync_pre > 0) { void (*preHookFunc) (int *fd, bool *send); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func; preHookFunc(&fd, &send); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15574,11 +18186,11 @@ void HP_sockt_datasync(int fd, bool send) { { HPMHooks.source.sockt.datasync(fd, send); } - if( HPMHooks.count.HP_sockt_datasync_post ) { - void (*postHookFunc) (int *fd, bool *send); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_datasync_post > 0) { + void (*postHookFunc) (int fd, bool send); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func; - postHookFunc(&fd, &send); + postHookFunc(fd, send); } } return; @@ -15586,14 +18198,14 @@ void HP_sockt_datasync(int fd, bool send) { int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_pre > 0) { int (*preHookFunc) (uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func; retVal___ = preHookFunc(&ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15601,11 +18213,11 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port); } - if( HPMHooks.count.HP_sockt_make_listen_bind_post ) { - int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_post > 0) { + int (*postHookFunc) (int retVal___, uint32 ip, uint16 port); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, &port); + retVal___ = postHookFunc(retVal___, ip, port); } } return retVal___; @@ -15613,14 +18225,14 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_connection_pre ) { - int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt *opt); + if (HPMHooks.count.HP_sockt_make_connection_pre > 0) { + int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func; - retVal___ = preHookFunc(&ip, &port, opt); + retVal___ = preHookFunc(&ip, &port, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15628,11 +18240,11 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { { retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt); } - if( HPMHooks.count.HP_sockt_make_connection_post ) { - int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port, struct hSockOpt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_make_connection_post > 0) { + int (*postHookFunc) (int retVal___, uint32 ip, uint16 port, struct hSockOpt *opt); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, &port, opt); + retVal___ = postHookFunc(retVal___, ip, port, opt); } } return retVal___; @@ -15640,14 +18252,14 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_pre > 0) { int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15655,11 +18267,11 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si { retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size); } - if( HPMHooks.count.HP_sockt_realloc_fifo_post ) { - int (*postHookFunc) (int retVal___, int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_post > 0) { + int (*postHookFunc) (int retVal___, int fd, unsigned int rfifo_size, unsigned int wfifo_size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &rfifo_size, &wfifo_size); + retVal___ = postHookFunc(retVal___, fd, rfifo_size, wfifo_size); } } return retVal___; @@ -15667,14 +18279,14 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si int HP_sockt_realloc_writefifo(int fd, size_t addition) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_pre > 0) { int (*preHookFunc) (int *fd, size_t *addition); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &addition); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15682,53 +18294,79 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) { { retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition); } - if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) { - int (*postHookFunc) (int retVal___, int *fd, size_t *addition); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_post > 0) { + int (*postHookFunc) (int retVal___, int fd, size_t addition); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &addition); + retVal___ = postHookFunc(retVal___, fd, addition); } } return retVal___; } -int HP_sockt_wfifoset(int fd, size_t len) { +int HP_sockt_wfifoset(int fd, size_t len, bool validate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_wfifoset_pre ) { - int (*preHookFunc) (int *fd, size_t *len); + if (HPMHooks.count.HP_sockt_wfifoset_pre > 0) { + int (*preHookFunc) (int *fd, size_t *len, bool *validate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &len); + retVal___ = preHookFunc(&fd, &len, &validate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.sockt.wfifoset(fd, len); + retVal___ = HPMHooks.source.sockt.wfifoset(fd, len, validate); } - if( HPMHooks.count.HP_sockt_wfifoset_post ) { - int (*postHookFunc) (int retVal___, int *fd, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_wfifoset_post > 0) { + int (*postHookFunc) (int retVal___, int fd, size_t len, bool validate); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &len); + retVal___ = postHookFunc(retVal___, fd, len, validate); } } return retVal___; } +void HP_sockt_wfifohead(int fd, size_t len) { + int hIndex = 0; + if (HPMHooks.count.HP_sockt_wfifohead_pre > 0) { + void (*preHookFunc) (int *fd, size_t *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_wfifohead_pre[hIndex].func; + preHookFunc(&fd, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.wfifohead(fd, len); + } + if (HPMHooks.count.HP_sockt_wfifohead_post > 0) { + void (*postHookFunc) (int fd, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_wfifohead_post[hIndex].func; + postHookFunc(fd, len); + } + } + return; +} int HP_sockt_rfifoskip(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_rfifoskip_pre ) { + if (HPMHooks.count.HP_sockt_rfifoskip_pre > 0) { int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func; retVal___ = preHookFunc(&fd, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15736,25 +18374,25 @@ int HP_sockt_rfifoskip(int fd, size_t len) { { retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len); } - if( HPMHooks.count.HP_sockt_rfifoskip_post ) { - int (*postHookFunc) (int retVal___, int *fd, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_rfifoskip_post > 0) { + int (*postHookFunc) (int retVal___, int fd, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &len); + retVal___ = postHookFunc(retVal___, fd, len); } } return retVal___; } void HP_sockt_close(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_close_pre ) { + if (HPMHooks.count.HP_sockt_close_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15762,11 +18400,37 @@ void HP_sockt_close(int fd) { { HPMHooks.source.sockt.close(fd); } - if( HPMHooks.count.HP_sockt_close_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_close_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); + } + } + return; +} +void HP_sockt_validateWfifo(int fd, size_t len) { + int hIndex = 0; + if (HPMHooks.count.HP_sockt_validateWfifo_pre > 0) { + void (*preHookFunc) (int *fd, size_t *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_validateWfifo_pre[hIndex].func; + preHookFunc(&fd, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.validateWfifo(fd, len); + } + if (HPMHooks.count.HP_sockt_validateWfifo_post > 0) { + void (*postHookFunc) (int fd, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_validateWfifo_post[hIndex].func; + postHookFunc(fd, len); } } return; @@ -15774,14 +18438,14 @@ void HP_sockt_close(int fd) { bool HP_sockt_session_is_valid(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_valid_pre ) { + if (HPMHooks.count.HP_sockt_session_is_valid_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15789,11 +18453,11 @@ bool HP_sockt_session_is_valid(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_valid(fd); } - if( HPMHooks.count.HP_sockt_session_is_valid_post ) { - bool (*postHookFunc) (bool retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_session_is_valid_post > 0) { + bool (*postHookFunc) (bool retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -15801,14 +18465,14 @@ bool HP_sockt_session_is_valid(int fd) { bool HP_sockt_session_is_active(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_active_pre ) { + if (HPMHooks.count.HP_sockt_session_is_active_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15816,25 +18480,25 @@ bool HP_sockt_session_is_active(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_active(fd); } - if( HPMHooks.count.HP_sockt_session_is_active_post ) { - bool (*postHookFunc) (bool retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_session_is_active_post > 0) { + bool (*postHookFunc) (bool retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } void HP_sockt_flush(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_pre ) { + if (HPMHooks.count.HP_sockt_flush_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15842,25 +18506,25 @@ void HP_sockt_flush(int fd) { { HPMHooks.source.sockt.flush(fd); } - if( HPMHooks.count.HP_sockt_flush_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_flush_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_sockt_flush_fifos(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_fifos_pre ) { + if (HPMHooks.count.HP_sockt_flush_fifos_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15868,25 +18532,52 @@ void HP_sockt_flush_fifos(void) { { HPMHooks.source.sockt.flush_fifos(); } - if( HPMHooks.count.HP_sockt_flush_fifos_post ) { + if (HPMHooks.count.HP_sockt_flush_fifos_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func; postHookFunc(); } } return; } +int HP_sockt_connect_client(int listen_fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_sockt_connect_client_pre > 0) { + int (*preHookFunc) (int *listen_fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_connect_client_pre[hIndex].func; + retVal___ = preHookFunc(&listen_fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.connect_client(listen_fd); + } + if (HPMHooks.count.HP_sockt_connect_client_post > 0) { + int (*postHookFunc) (int retVal___, int listen_fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_connect_client_post[hIndex].func; + retVal___ = postHookFunc(retVal___, listen_fd); + } + } + return retVal___; +} void HP_sockt_set_nonblocking(int fd, unsigned long yes) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) { void (*preHookFunc) (int *fd, unsigned long *yes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func; preHookFunc(&fd, &yes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15894,25 +18585,25 @@ void HP_sockt_set_nonblocking(int fd, unsigned long yes) { { HPMHooks.source.sockt.set_nonblocking(fd, yes); } - if( HPMHooks.count.HP_sockt_set_nonblocking_post ) { - void (*postHookFunc) (int *fd, unsigned long *yes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_post > 0) { + void (*postHookFunc) (int fd, unsigned long yes); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func; - postHookFunc(&fd, &yes); + postHookFunc(fd, yes); } } return; } void HP_sockt_set_defaultparse(ParseFunc defaultparse) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_pre > 0) { void (*preHookFunc) (ParseFunc *defaultparse); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func; preHookFunc(&defaultparse); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15920,11 +18611,11 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { { HPMHooks.source.sockt.set_defaultparse(defaultparse); } - if( HPMHooks.count.HP_sockt_set_defaultparse_post ) { - void (*postHookFunc) (ParseFunc *defaultparse); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_post > 0) { + void (*postHookFunc) (ParseFunc defaultparse); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func; - postHookFunc(&defaultparse); + postHookFunc(defaultparse); } } return; @@ -15932,14 +18623,14 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { uint32 HP_sockt_host2ip(const char *hostname) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_host2ip_pre ) { - uint32 (*preHookFunc) (const char *hostname); + if (HPMHooks.count.HP_sockt_host2ip_pre > 0) { + uint32 (*preHookFunc) (const char **hostname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func; - retVal___ = preHookFunc(hostname); + retVal___ = preHookFunc(&hostname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15947,9 +18638,9 @@ uint32 HP_sockt_host2ip(const char *hostname) { { retVal___ = HPMHooks.source.sockt.host2ip(hostname); } - if( HPMHooks.count.HP_sockt_host2ip_post ) { + if (HPMHooks.count.HP_sockt_host2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *hostname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, hostname); } @@ -15959,14 +18650,14 @@ uint32 HP_sockt_host2ip(const char *hostname) { const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sockt_ip2str_pre ) { - const char* (*preHookFunc) (uint32 *ip, char *ip_str); + if (HPMHooks.count.HP_sockt_ip2str_pre > 0) { + const char* (*preHookFunc) (uint32 *ip, char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func; - retVal___ = preHookFunc(&ip, ip_str); + retVal___ = preHookFunc(&ip, &ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15974,11 +18665,11 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { { retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str); } - if( HPMHooks.count.HP_sockt_ip2str_post ) { - const char* (*postHookFunc) (const char* retVal___, uint32 *ip, char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_ip2str_post > 0) { + const char* (*postHookFunc) (const char* retVal___, uint32 ip, char *ip_str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, ip_str); + retVal___ = postHookFunc(retVal___, ip, ip_str); } } return retVal___; @@ -15986,14 +18677,14 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { uint32 HP_sockt_str2ip(const char *ip_str) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_str2ip_pre ) { - uint32 (*preHookFunc) (const char *ip_str); + if (HPMHooks.count.HP_sockt_str2ip_pre > 0) { + uint32 (*preHookFunc) (const char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func; - retVal___ = preHookFunc(ip_str); + retVal___ = preHookFunc(&ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16001,9 +18692,9 @@ uint32 HP_sockt_str2ip(const char *ip_str) { { retVal___ = HPMHooks.source.sockt.str2ip(ip_str); } - if( HPMHooks.count.HP_sockt_str2ip_post ) { + if (HPMHooks.count.HP_sockt_str2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip_str); } @@ -16013,14 +18704,14 @@ uint32 HP_sockt_str2ip(const char *ip_str) { uint16 HP_sockt_ntows(uint16 netshort) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_sockt_ntows_pre ) { + if (HPMHooks.count.HP_sockt_ntows_pre > 0) { uint16 (*preHookFunc) (uint16 *netshort); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func; retVal___ = preHookFunc(&netshort); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16028,11 +18719,11 @@ uint16 HP_sockt_ntows(uint16 netshort) { { retVal___ = HPMHooks.source.sockt.ntows(netshort); } - if( HPMHooks.count.HP_sockt_ntows_post ) { - uint16 (*postHookFunc) (uint16 retVal___, uint16 *netshort); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_ntows_post > 0) { + uint16 (*postHookFunc) (uint16 retVal___, uint16 netshort); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &netshort); + retVal___ = postHookFunc(retVal___, netshort); } } return retVal___; @@ -16040,14 +18731,14 @@ uint16 HP_sockt_ntows(uint16 netshort) { int HP_sockt_getips(uint32 *ips, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_getips_pre ) { - int (*preHookFunc) (uint32 *ips, int *max); + if (HPMHooks.count.HP_sockt_getips_pre > 0) { + int (*preHookFunc) (uint32 **ips, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func; - retVal___ = preHookFunc(ips, &max); + retVal___ = preHookFunc(&ips, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16055,25 +18746,25 @@ int HP_sockt_getips(uint32 *ips, int max) { { retVal___ = HPMHooks.source.sockt.getips(ips, max); } - if( HPMHooks.count.HP_sockt_getips_post ) { - int (*postHookFunc) (int retVal___, uint32 *ips, int *max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_getips_post > 0) { + int (*postHookFunc) (int retVal___, uint32 *ips, int max); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ips, &max); + retVal___ = postHookFunc(retVal___, ips, max); } } return retVal___; } void HP_sockt_eof(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_eof_pre ) { + if (HPMHooks.count.HP_sockt_eof_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16081,11 +18772,11 @@ void HP_sockt_eof(int fd) { { HPMHooks.source.sockt.eof(fd); } - if( HPMHooks.count.HP_sockt_eof_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_eof_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -16093,14 +18784,14 @@ void HP_sockt_eof(int fd) { uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) { - uint32 (*preHookFunc) (uint32 *ip, struct s_subnet *info); + if (HPMHooks.count.HP_sockt_lan_subnet_check_pre > 0) { + uint32 (*preHookFunc) (uint32 *ip, struct s_subnet **info); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func; - retVal___ = preHookFunc(&ip, info); + retVal___ = preHookFunc(&ip, &info); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16108,11 +18799,11 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { { retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info); } - if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) { - uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip, struct s_subnet *info); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_lan_subnet_check_post > 0) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 ip, struct s_subnet *info); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, info); + retVal___ = postHookFunc(retVal___, ip, info); } } return retVal___; @@ -16120,14 +18811,14 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { bool HP_sockt_allowed_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16135,11 +18826,11 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip); } - if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) { - bool (*postHookFunc) (bool retVal___, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_post > 0) { + bool (*postHookFunc) (bool retVal___, uint32 ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip); + retVal___ = postHookFunc(retVal___, ip); } } return retVal___; @@ -16147,14 +18838,14 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { bool HP_sockt_trusted_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16162,11 +18853,11 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip); } - if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) { - bool (*postHookFunc) (bool retVal___, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_post > 0) { + bool (*postHookFunc) (bool retVal___, uint32 ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip); + retVal___ = postHookFunc(retVal___, ip); } } return retVal___; @@ -16174,14 +18865,14 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) { - int (*preHookFunc) (struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname); + if (HPMHooks.count.HP_sockt_net_config_read_sub_pre > 0) { + int (*preHookFunc) (struct config_setting_t **t, struct s_subnet_vector **list, const char **filename, const char **groupname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func; - retVal___ = preHookFunc(t, list, filename, groupname); + retVal___ = preHookFunc(&t, &list, &filename, &groupname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16189,9 +18880,9 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec { retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, filename, groupname); } - if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_sub_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, t, list, filename, groupname); } @@ -16200,14 +18891,14 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec } void HP_sockt_net_config_read(const char *filename) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_net_config_read_pre ) { - void (*preHookFunc) (const char *filename); + if (HPMHooks.count.HP_sockt_net_config_read_pre > 0) { + void (*preHookFunc) (const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func; - preHookFunc(filename); + preHookFunc(&filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16215,27 +18906,27 @@ void HP_sockt_net_config_read(const char *filename) { { HPMHooks.source.sockt.net_config_read(filename); } - if( HPMHooks.count.HP_sockt_net_config_read_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_post > 0) { void (*postHookFunc) (const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func; postHookFunc(filename); } } return; } -/* SQL */ +/* sql_interface */ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Connect_pre ) { - int (*preHookFunc) (struct Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); + if (HPMHooks.count.HP_SQL_Connect_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **user, const char **passwd, const char **host, uint16 *port, const char **db); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func; - retVal___ = preHookFunc(self, user, passwd, host, &port, db); + retVal___ = preHookFunc(&self, &user, &passwd, &host, &port, &db); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16243,11 +18934,11 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const { retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db); } - if( HPMHooks.count.HP_SQL_Connect_post ) { - int (*postHookFunc) (int retVal___, struct Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_Connect_post > 0) { + int (*postHookFunc) (int retVal___, struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, user, passwd, host, &port, db); + retVal___ = postHookFunc(retVal___, self, user, passwd, host, port, db); } } return retVal___; @@ -16255,14 +18946,14 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetTimeout_pre ) { - int (*preHookFunc) (struct Sql *self, uint32 *out_timeout); + if (HPMHooks.count.HP_SQL_GetTimeout_pre > 0) { + int (*preHookFunc) (struct Sql **self, uint32 **out_timeout); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func; - retVal___ = preHookFunc(self, out_timeout); + retVal___ = preHookFunc(&self, &out_timeout); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16270,9 +18961,9 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { { retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout); } - if( HPMHooks.count.HP_SQL_GetTimeout_post ) { + if (HPMHooks.count.HP_SQL_GetTimeout_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, uint32 *out_timeout); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_timeout); } @@ -16282,14 +18973,14 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) { - int (*preHookFunc) (struct Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); + if (HPMHooks.count.HP_SQL_GetColumnNames_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **table, char **out_buf, size_t *buf_len, char *sep); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func; - retVal___ = preHookFunc(self, table, out_buf, &buf_len, &sep); + retVal___ = preHookFunc(&self, &table, &out_buf, &buf_len, &sep); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16297,11 +18988,11 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si { retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep); } - if( HPMHooks.count.HP_SQL_GetColumnNames_post ) { - int (*postHookFunc) (int retVal___, struct Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_GetColumnNames_post > 0) { + int (*postHookFunc) (int retVal___, struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, table, out_buf, &buf_len, &sep); + retVal___ = postHookFunc(retVal___, self, table, out_buf, buf_len, sep); } } return retVal___; @@ -16309,14 +19000,14 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_SetEncoding_pre ) { - int (*preHookFunc) (struct Sql *self, const char *encoding); + if (HPMHooks.count.HP_SQL_SetEncoding_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **encoding); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func; - retVal___ = preHookFunc(self, encoding); + retVal___ = preHookFunc(&self, &encoding); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16324,9 +19015,9 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { { retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding); } - if( HPMHooks.count.HP_SQL_SetEncoding_post ) { + if (HPMHooks.count.HP_SQL_SetEncoding_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *encoding); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, encoding); } @@ -16336,14 +19027,14 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int HP_SQL_Ping(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Ping_pre ) { - int (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_Ping_pre > 0) { + int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16351,9 +19042,9 @@ int HP_SQL_Ping(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.Ping(self); } - if( HPMHooks.count.HP_SQL_Ping_post ) { + if (HPMHooks.count.HP_SQL_Ping_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -16363,14 +19054,14 @@ int HP_SQL_Ping(struct Sql *self) { size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeString_pre ) { - size_t (*preHookFunc) (struct Sql *self, char *out_to, const char *from); + if (HPMHooks.count.HP_SQL_EscapeString_pre > 0) { + size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func; - retVal___ = preHookFunc(self, out_to, from); + retVal___ = preHookFunc(&self, &out_to, &from); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16378,9 +19069,9 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { { retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from); } - if( HPMHooks.count.HP_SQL_EscapeString_post ) { + if (HPMHooks.count.HP_SQL_EscapeString_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_to, from); } @@ -16390,14 +19081,14 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, size_t from_len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) { - size_t (*preHookFunc) (struct Sql *self, char *out_to, const char *from, size_t *from_len); + if (HPMHooks.count.HP_SQL_EscapeStringLen_pre > 0) { + size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from, size_t *from_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func; - retVal___ = preHookFunc(self, out_to, from, &from_len); + retVal___ = preHookFunc(&self, &out_to, &from, &from_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16405,11 +19096,11 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, { retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len); } - if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) { - size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from, size_t *from_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_EscapeStringLen_post > 0) { + size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from, size_t from_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, out_to, from, &from_len); + retVal___ = postHookFunc(retVal___, self, out_to, from, from_len); } } return retVal___; @@ -16417,16 +19108,16 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryV_pre ) { - int (*preHookFunc) (struct Sql *self, const char *query, va_list args); + if (HPMHooks.count.HP_SQL_QueryV_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func; - retVal___ = preHookFunc(self, query, args___copy); + retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16436,9 +19127,9 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_QueryV_post ) { + if (HPMHooks.count.HP_SQL_QueryV_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -16450,14 +19141,14 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int HP_SQL_QueryStr(struct Sql *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryStr_pre ) { - int (*preHookFunc) (struct Sql *self, const char *query); + if (HPMHooks.count.HP_SQL_QueryStr_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func; - retVal___ = preHookFunc(self, query); + retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16465,9 +19156,9 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { { retVal___ = HPMHooks.source.SQL.QueryStr(self, query); } - if( HPMHooks.count.HP_SQL_QueryStr_post ) { + if (HPMHooks.count.HP_SQL_QueryStr_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -16477,14 +19168,14 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { uint64 HP_SQL_LastInsertId(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_LastInsertId_pre ) { - uint64 (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_LastInsertId_pre > 0) { + uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16492,9 +19183,9 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.LastInsertId(self); } - if( HPMHooks.count.HP_SQL_LastInsertId_post ) { + if (HPMHooks.count.HP_SQL_LastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -16504,14 +19195,14 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { uint32 HP_SQL_NumColumns(struct Sql *self) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumColumns_pre ) { - uint32 (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_NumColumns_pre > 0) { + uint32 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16519,9 +19210,9 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumColumns(self); } - if( HPMHooks.count.HP_SQL_NumColumns_post ) { + if (HPMHooks.count.HP_SQL_NumColumns_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -16531,14 +19222,14 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { uint64 HP_SQL_NumRows(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumRows_pre ) { - uint64 (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_NumRows_pre > 0) { + uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16546,9 +19237,9 @@ uint64 HP_SQL_NumRows(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumRows(self); } - if( HPMHooks.count.HP_SQL_NumRows_post ) { + if (HPMHooks.count.HP_SQL_NumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -16558,14 +19249,14 @@ uint64 HP_SQL_NumRows(struct Sql *self) { int HP_SQL_NextRow(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_NextRow_pre ) { - int (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_NextRow_pre > 0) { + int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16573,9 +19264,9 @@ int HP_SQL_NextRow(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NextRow(self); } - if( HPMHooks.count.HP_SQL_NextRow_post ) { + if (HPMHooks.count.HP_SQL_NextRow_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -16585,14 +19276,14 @@ int HP_SQL_NextRow(struct Sql *self) { int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetData_pre ) { - int (*preHookFunc) (struct Sql *self, size_t *col, char **out_buf, size_t *out_len); + if (HPMHooks.count.HP_SQL_GetData_pre > 0) { + int (*preHookFunc) (struct Sql **self, size_t *col, char ***out_buf, size_t **out_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func; - retVal___ = preHookFunc(self, &col, out_buf, out_len); + retVal___ = preHookFunc(&self, &col, &out_buf, &out_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16600,25 +19291,25 @@ int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len { retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len); } - if( HPMHooks.count.HP_SQL_GetData_post ) { - int (*postHookFunc) (int retVal___, struct Sql *self, size_t *col, char **out_buf, size_t *out_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_GetData_post > 0) { + int (*postHookFunc) (int retVal___, struct Sql *self, size_t col, char **out_buf, size_t *out_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, &col, out_buf, out_len); + retVal___ = postHookFunc(retVal___, self, col, out_buf, out_len); } } return retVal___; } void HP_SQL_FreeResult(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_FreeResult_pre ) { - void (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_FreeResult_pre > 0) { + void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16626,9 +19317,9 @@ void HP_SQL_FreeResult(struct Sql *self) { { HPMHooks.source.SQL.FreeResult(self); } - if( HPMHooks.count.HP_SQL_FreeResult_post ) { + if (HPMHooks.count.HP_SQL_FreeResult_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func; postHookFunc(self); } @@ -16637,14 +19328,14 @@ void HP_SQL_FreeResult(struct Sql *self) { } void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_ShowDebug__pre ) { - void (*preHookFunc) (struct Sql *self, const char *debug_file, const unsigned long *debug_line); + if (HPMHooks.count.HP_SQL_ShowDebug__pre > 0) { + void (*preHookFunc) (struct Sql **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func; - preHookFunc(self, debug_file, &debug_line); + preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16652,25 +19343,25 @@ void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned { HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_ShowDebug__post ) { - void (*postHookFunc) (struct Sql *self, const char *debug_file, const unsigned long *debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_ShowDebug__post > 0) { + void (*postHookFunc) (struct Sql *self, const char *debug_file, const unsigned long debug_line); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func; - postHookFunc(self, debug_file, &debug_line); + postHookFunc(self, debug_file, debug_line); } } return; } void HP_SQL_Free(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_Free_pre ) { - void (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_Free_pre > 0) { + void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16678,9 +19369,9 @@ void HP_SQL_Free(struct Sql *self) { { HPMHooks.source.SQL.Free(self); } - if( HPMHooks.count.HP_SQL_Free_post ) { + if (HPMHooks.count.HP_SQL_Free_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func; postHookFunc(self); } @@ -16690,14 +19381,14 @@ void HP_SQL_Free(struct Sql *self) { struct Sql* HP_SQL_Malloc(void) { int hIndex = 0; struct Sql* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_Malloc_pre ) { + if (HPMHooks.count.HP_SQL_Malloc_pre > 0) { struct Sql* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16705,9 +19396,9 @@ struct Sql* HP_SQL_Malloc(void) { { retVal___ = HPMHooks.source.SQL.Malloc(); } - if( HPMHooks.count.HP_SQL_Malloc_post ) { + if (HPMHooks.count.HP_SQL_Malloc_post > 0) { struct Sql* (*postHookFunc) (struct Sql* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -16717,14 +19408,14 @@ struct Sql* HP_SQL_Malloc(void) { struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int hIndex = 0; struct SqlStmt* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) { - struct SqlStmt* (*preHookFunc) (struct Sql *sql); + if (HPMHooks.count.HP_SQL_StmtMalloc_pre > 0) { + struct SqlStmt* (*preHookFunc) (struct Sql **sql); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func; - retVal___ = preHookFunc(sql); + retVal___ = preHookFunc(&sql); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16732,9 +19423,9 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { { retVal___ = HPMHooks.source.SQL.StmtMalloc(sql); } - if( HPMHooks.count.HP_SQL_StmtMalloc_post ) { + if (HPMHooks.count.HP_SQL_StmtMalloc_post > 0) { struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, struct Sql *sql); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func; retVal___ = postHookFunc(retVal___, sql); } @@ -16744,16 +19435,16 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) { - int (*preHookFunc) (struct SqlStmt *self, const char *query, va_list args); + if (HPMHooks.count.HP_SQL_StmtPrepareV_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func; - retVal___ = preHookFunc(self, query, args___copy); + retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16763,9 +19454,9 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareV_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -16777,14 +19468,14 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) { - int (*preHookFunc) (struct SqlStmt *self, const char *query); + if (HPMHooks.count.HP_SQL_StmtPrepareStr_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func; - retVal___ = preHookFunc(self, query); + retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16792,9 +19483,9 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { { retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query); } - if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareStr_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -16804,14 +19495,14 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) { - size_t (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNumParams_pre > 0) { + size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16819,9 +19510,9 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumParams(self); } - if( HPMHooks.count.HP_SQL_StmtNumParams_post ) { + if (HPMHooks.count.HP_SQL_StmtNumParams_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -16831,14 +19522,14 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) { - int (*preHookFunc) (struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, const void *buffer, size_t *buffer_len); + if (HPMHooks.count.HP_SQL_StmtBindParam_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, const void **buffer, size_t *buffer_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func; - retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len); + retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16846,11 +19537,11 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff { retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len); } - if( HPMHooks.count.HP_SQL_StmtBindParam_post ) { - int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, const void *buffer, size_t *buffer_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_StmtBindParam_post > 0) { + int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len); + retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len); } } return retVal___; @@ -16858,14 +19549,14 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff int HP_SQL_StmtExecute(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtExecute_pre ) { - int (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtExecute_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16873,9 +19564,9 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtExecute(self); } - if( HPMHooks.count.HP_SQL_StmtExecute_post ) { + if (HPMHooks.count.HP_SQL_StmtExecute_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -16885,14 +19576,14 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) { - uint64 (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtLastInsertId_pre > 0) { + uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16900,9 +19591,9 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self); } - if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) { + if (HPMHooks.count.HP_SQL_StmtLastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -16912,14 +19603,14 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) { - size_t (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNumColumns_pre > 0) { + size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16927,9 +19618,9 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumColumns(self); } - if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) { + if (HPMHooks.count.HP_SQL_StmtNumColumns_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -16939,14 +19630,14 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) { - int (*preHookFunc) (struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); + if (HPMHooks.count.HP_SQL_StmtBindColumn_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, void **buffer, size_t *buffer_len, uint32 **out_length, int8 **out_is_null); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func; - retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); + retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len, &out_length, &out_is_null); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16954,11 +19645,11 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf { retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } - if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) { - int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_StmtBindColumn_post > 0) { + int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); + retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } } return retVal___; @@ -16966,14 +19657,14 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) { - uint64 (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNumRows_pre > 0) { + uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -16981,9 +19672,9 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumRows(self); } - if( HPMHooks.count.HP_SQL_StmtNumRows_post ) { + if (HPMHooks.count.HP_SQL_StmtNumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -16993,14 +19684,14 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int HP_SQL_StmtNextRow(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) { - int (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNextRow_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17008,9 +19699,9 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNextRow(self); } - if( HPMHooks.count.HP_SQL_StmtNextRow_post ) { + if (HPMHooks.count.HP_SQL_StmtNextRow_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17019,14 +19710,14 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { } void HP_SQL_StmtFreeResult(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) { - void (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtFreeResult_pre > 0) { + void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17034,9 +19725,9 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFreeResult(self); } - if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) { + if (HPMHooks.count.HP_SQL_StmtFreeResult_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func; postHookFunc(self); } @@ -17045,14 +19736,14 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { } void HP_SQL_StmtFree(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFree_pre ) { - void (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtFree_pre > 0) { + void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17060,9 +19751,9 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFree(self); } - if( HPMHooks.count.HP_SQL_StmtFree_post ) { + if (HPMHooks.count.HP_SQL_StmtFree_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func; postHookFunc(self); } @@ -17071,14 +19762,14 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { } void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) { - void (*preHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long *debug_line); + if (HPMHooks.count.HP_SQL_StmtShowDebug__pre > 0) { + void (*preHookFunc) (struct SqlStmt **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func; - preHookFunc(self, debug_file, &debug_line); + preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17086,27 +19777,27 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u { HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) { - void (*postHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long *debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_StmtShowDebug__post > 0) { + void (*postHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long debug_line); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func; - postHookFunc(self, debug_file, &debug_line); + postHookFunc(self, debug_file, debug_line); } } return; } -/* StrBuf */ +/* stringbuf_interface */ StringBuf* HP_StrBuf_Malloc(void) { int hIndex = 0; StringBuf* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Malloc_pre ) { + if (HPMHooks.count.HP_StrBuf_Malloc_pre > 0) { StringBuf* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17114,9 +19805,9 @@ StringBuf* HP_StrBuf_Malloc(void) { { retVal___ = HPMHooks.source.StrBuf.Malloc(); } - if( HPMHooks.count.HP_StrBuf_Malloc_post ) { + if (HPMHooks.count.HP_StrBuf_Malloc_post > 0) { StringBuf* (*postHookFunc) (StringBuf* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -17125,14 +19816,14 @@ StringBuf* HP_StrBuf_Malloc(void) { } void HP_StrBuf_Init(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Init_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Init_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17140,9 +19831,9 @@ void HP_StrBuf_Init(StringBuf *self) { { HPMHooks.source.StrBuf.Init(self); } - if( HPMHooks.count.HP_StrBuf_Init_post ) { + if (HPMHooks.count.HP_StrBuf_Init_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func; postHookFunc(self); } @@ -17152,16 +19843,16 @@ void HP_StrBuf_Init(StringBuf *self) { int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) { - int (*preHookFunc) (StringBuf *self, const char *fmt, va_list args); + if (HPMHooks.count.HP_StrBuf_Vprintf_pre > 0) { + int (*preHookFunc) (StringBuf **self, const char **fmt, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func; - retVal___ = preHookFunc(self, fmt, args___copy); + retVal___ = preHookFunc(&self, &fmt, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17171,9 +19862,9 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_StrBuf_Vprintf_post ) { + if (HPMHooks.count.HP_StrBuf_Vprintf_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, fmt, args___copy); @@ -17185,14 +19876,14 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Append_pre ) { - int (*preHookFunc) (StringBuf *self, const StringBuf *sbuf); + if (HPMHooks.count.HP_StrBuf_Append_pre > 0) { + int (*preHookFunc) (StringBuf **self, const StringBuf **sbuf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func; - retVal___ = preHookFunc(self, sbuf); + retVal___ = preHookFunc(&self, &sbuf); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17200,9 +19891,9 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { { retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf); } - if( HPMHooks.count.HP_StrBuf_Append_post ) { + if (HPMHooks.count.HP_StrBuf_Append_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, sbuf); } @@ -17212,14 +19903,14 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) { - int (*preHookFunc) (StringBuf *self, const char *str); + if (HPMHooks.count.HP_StrBuf_AppendStr_pre > 0) { + int (*preHookFunc) (StringBuf **self, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func; - retVal___ = preHookFunc(self, str); + retVal___ = preHookFunc(&self, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17227,9 +19918,9 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { { retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str); } - if( HPMHooks.count.HP_StrBuf_AppendStr_post ) { + if (HPMHooks.count.HP_StrBuf_AppendStr_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, str); } @@ -17239,14 +19930,14 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int HP_StrBuf_Length(StringBuf *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Length_pre ) { - int (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Length_pre > 0) { + int (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17254,9 +19945,9 @@ int HP_StrBuf_Length(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Length(self); } - if( HPMHooks.count.HP_StrBuf_Length_post ) { + if (HPMHooks.count.HP_StrBuf_Length_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17266,14 +19957,14 @@ int HP_StrBuf_Length(StringBuf *self) { char* HP_StrBuf_Value(StringBuf *self) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Value_pre ) { - char* (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Value_pre > 0) { + char* (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17281,9 +19972,9 @@ char* HP_StrBuf_Value(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Value(self); } - if( HPMHooks.count.HP_StrBuf_Value_post ) { + if (HPMHooks.count.HP_StrBuf_Value_post > 0) { char* (*postHookFunc) (char* retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -17292,14 +19983,14 @@ char* HP_StrBuf_Value(StringBuf *self) { } void HP_StrBuf_Clear(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Clear_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Clear_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17307,9 +19998,9 @@ void HP_StrBuf_Clear(StringBuf *self) { { HPMHooks.source.StrBuf.Clear(self); } - if( HPMHooks.count.HP_StrBuf_Clear_post ) { + if (HPMHooks.count.HP_StrBuf_Clear_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func; postHookFunc(self); } @@ -17318,14 +20009,14 @@ void HP_StrBuf_Clear(StringBuf *self) { } void HP_StrBuf_Destroy(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Destroy_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Destroy_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17333,9 +20024,9 @@ void HP_StrBuf_Destroy(StringBuf *self) { { HPMHooks.source.StrBuf.Destroy(self); } - if( HPMHooks.count.HP_StrBuf_Destroy_post ) { + if (HPMHooks.count.HP_StrBuf_Destroy_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func; postHookFunc(self); } @@ -17344,14 +20035,14 @@ void HP_StrBuf_Destroy(StringBuf *self) { } void HP_StrBuf_Free(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Free_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Free_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17359,27 +20050,27 @@ void HP_StrBuf_Free(StringBuf *self) { { HPMHooks.source.StrBuf.Free(self); } - if( HPMHooks.count.HP_StrBuf_Free_post ) { + if (HPMHooks.count.HP_StrBuf_Free_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func; postHookFunc(self); } } return; } -/* strlib */ +/* strlib_interface */ char* HP_strlib_jstrescape(char *pt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescape_pre ) { - char* (*preHookFunc) (char *pt); + if (HPMHooks.count.HP_strlib_jstrescape_pre > 0) { + char* (*preHookFunc) (char **pt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func; - retVal___ = preHookFunc(pt); + retVal___ = preHookFunc(&pt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17387,9 +20078,9 @@ char* HP_strlib_jstrescape(char *pt) { { retVal___ = HPMHooks.source.strlib.jstrescape(pt); } - if( HPMHooks.count.HP_strlib_jstrescape_post ) { + if (HPMHooks.count.HP_strlib_jstrescape_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt); } @@ -17399,14 +20090,14 @@ char* HP_strlib_jstrescape(char *pt) { char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) { - char* (*preHookFunc) (char *pt, const char *spt); + if (HPMHooks.count.HP_strlib_jstrescapecpy_pre > 0) { + char* (*preHookFunc) (char **pt, const char **spt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func; - retVal___ = preHookFunc(pt, spt); + retVal___ = preHookFunc(&pt, &spt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17414,9 +20105,9 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { { retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt); } - if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) { + if (HPMHooks.count.HP_strlib_jstrescapecpy_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt, const char *spt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt, spt); } @@ -17426,14 +20117,14 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) { - int (*preHookFunc) (char *pt, const char *spt, int *size); + if (HPMHooks.count.HP_strlib_jmemescapecpy_pre > 0) { + int (*preHookFunc) (char **pt, const char **spt, int *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func; - retVal___ = preHookFunc(pt, spt, &size); + retVal___ = preHookFunc(&pt, &spt, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17441,11 +20132,11 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { { retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size); } - if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) { - int (*postHookFunc) (int retVal___, char *pt, const char *spt, int *size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_jmemescapecpy_post > 0) { + int (*postHookFunc) (int retVal___, char *pt, const char *spt, int size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func; - retVal___ = postHookFunc(retVal___, pt, spt, &size); + retVal___ = postHookFunc(retVal___, pt, spt, size); } } return retVal___; @@ -17453,14 +20144,14 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int HP_strlib_remove_control_chars_(char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) { - int (*preHookFunc) (char *str); + if (HPMHooks.count.HP_strlib_remove_control_chars__pre > 0) { + int (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17468,9 +20159,9 @@ int HP_strlib_remove_control_chars_(char *str) { { retVal___ = HPMHooks.source.strlib.remove_control_chars_(str); } - if( HPMHooks.count.HP_strlib_remove_control_chars__post ) { + if (HPMHooks.count.HP_strlib_remove_control_chars__post > 0) { int (*postHookFunc) (int retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -17480,14 +20171,14 @@ int HP_strlib_remove_control_chars_(char *str) { char* HP_strlib_trim_(char *str) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_trim__pre ) { - char* (*preHookFunc) (char *str); + if (HPMHooks.count.HP_strlib_trim__pre > 0) { + char* (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17495,9 +20186,9 @@ char* HP_strlib_trim_(char *str) { { retVal___ = HPMHooks.source.strlib.trim_(str); } - if( HPMHooks.count.HP_strlib_trim__post ) { + if (HPMHooks.count.HP_strlib_trim__post > 0) { char* (*postHookFunc) (char* retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -17507,14 +20198,14 @@ char* HP_strlib_trim_(char *str) { char* HP_strlib_normalize_name_(char *str, const char *delims) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_normalize_name__pre ) { - char* (*preHookFunc) (char *str, const char *delims); + if (HPMHooks.count.HP_strlib_normalize_name__pre > 0) { + char* (*preHookFunc) (char **str, const char **delims); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func; - retVal___ = preHookFunc(str, delims); + retVal___ = preHookFunc(&str, &delims); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17522,9 +20213,9 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { { retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims); } - if( HPMHooks.count.HP_strlib_normalize_name__post ) { + if (HPMHooks.count.HP_strlib_normalize_name__post > 0) { char* (*postHookFunc) (char* retVal___, char *str, const char *delims); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func; retVal___ = postHookFunc(retVal___, str, delims); } @@ -17534,14 +20225,14 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { const char* HP_strlib_stristr_(const char *haystack, const char *needle) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_stristr__pre ) { - const char* (*preHookFunc) (const char *haystack, const char *needle); + if (HPMHooks.count.HP_strlib_stristr__pre > 0) { + const char* (*preHookFunc) (const char **haystack, const char **needle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func; - retVal___ = preHookFunc(haystack, needle); + retVal___ = preHookFunc(&haystack, &needle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17549,9 +20240,9 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { { retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle); } - if( HPMHooks.count.HP_strlib_stristr__post ) { + if (HPMHooks.count.HP_strlib_stristr__post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func; retVal___ = postHookFunc(retVal___, haystack, needle); } @@ -17561,14 +20252,14 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_strnlen__pre ) { - size_t (*preHookFunc) (const char *string, size_t *maxlen); + if (HPMHooks.count.HP_strlib_strnlen__pre > 0) { + size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func; - retVal___ = preHookFunc(string, &maxlen); + retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17576,11 +20267,11 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_strnlen__post ) { - size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_strnlen__post > 0) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func; - retVal___ = postHookFunc(retVal___, string, &maxlen); + retVal___ = postHookFunc(retVal___, string, maxlen); } } return retVal___; @@ -17588,14 +20279,14 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_strtok_r__pre ) { - char* (*preHookFunc) (char *s1, const char *s2, char **lasts); + if (HPMHooks.count.HP_strlib_strtok_r__pre > 0) { + char* (*preHookFunc) (char **s1, const char **s2, char ***lasts); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func; - retVal___ = preHookFunc(s1, s2, lasts); + retVal___ = preHookFunc(&s1, &s2, &lasts); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17603,9 +20294,9 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { { retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts); } - if( HPMHooks.count.HP_strlib_strtok_r__post ) { + if (HPMHooks.count.HP_strlib_strtok_r__post > 0) { char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func; retVal___ = postHookFunc(retVal___, s1, s2, lasts); } @@ -17615,14 +20306,14 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int HP_strlib_e_mail_check_(char *email) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_e_mail_check__pre ) { - int (*preHookFunc) (char *email); + if (HPMHooks.count.HP_strlib_e_mail_check__pre > 0) { + int (*preHookFunc) (char **email); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func; - retVal___ = preHookFunc(email); + retVal___ = preHookFunc(&email); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17630,9 +20321,9 @@ int HP_strlib_e_mail_check_(char *email) { { retVal___ = HPMHooks.source.strlib.e_mail_check_(email); } - if( HPMHooks.count.HP_strlib_e_mail_check__post ) { + if (HPMHooks.count.HP_strlib_e_mail_check__post > 0) { int (*postHookFunc) (int retVal___, char *email); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func; retVal___ = postHookFunc(retVal___, email); } @@ -17642,14 +20333,14 @@ int HP_strlib_e_mail_check_(char *email) { int HP_strlib_config_switch_(const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_config_switch__pre ) { - int (*preHookFunc) (const char *str); + if (HPMHooks.count.HP_strlib_config_switch__pre > 0) { + int (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17657,9 +20348,9 @@ int HP_strlib_config_switch_(const char *str) { { retVal___ = HPMHooks.source.strlib.config_switch_(str); } - if( HPMHooks.count.HP_strlib_config_switch__post ) { + if (HPMHooks.count.HP_strlib_config_switch__post > 0) { int (*postHookFunc) (int retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -17669,14 +20360,14 @@ int HP_strlib_config_switch_(const char *str) { char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_safestrncpy__pre ) { - char* (*preHookFunc) (char *dst, const char *src, size_t *n); + if (HPMHooks.count.HP_strlib_safestrncpy__pre > 0) { + char* (*preHookFunc) (char **dst, const char **src, size_t *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func; - retVal___ = preHookFunc(dst, src, &n); + retVal___ = preHookFunc(&dst, &src, &n); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17684,11 +20375,11 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { { retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n); } - if( HPMHooks.count.HP_strlib_safestrncpy__post ) { - char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t *n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_safestrncpy__post > 0) { + char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func; - retVal___ = postHookFunc(retVal___, dst, src, &n); + retVal___ = postHookFunc(retVal___, dst, src, n); } } return retVal___; @@ -17696,14 +20387,14 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_safestrnlen__pre ) { - size_t (*preHookFunc) (const char *string, size_t *maxlen); + if (HPMHooks.count.HP_strlib_safestrnlen__pre > 0) { + size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func; - retVal___ = preHookFunc(string, &maxlen); + retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17711,11 +20402,11 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_safestrnlen__post ) { - size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_safestrnlen__post > 0) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func; - retVal___ = postHookFunc(retVal___, string, &maxlen); + retVal___ = postHookFunc(retVal___, string, maxlen); } } return retVal___; @@ -17723,14 +20414,14 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int HP_strlib_strline_(const char *str, size_t pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_strline__pre ) { - int (*preHookFunc) (const char *str, size_t *pos); + if (HPMHooks.count.HP_strlib_strline__pre > 0) { + int (*preHookFunc) (const char **str, size_t *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func; - retVal___ = preHookFunc(str, &pos); + retVal___ = preHookFunc(&str, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17738,26 +20429,26 @@ int HP_strlib_strline_(const char *str, size_t pos) { { retVal___ = HPMHooks.source.strlib.strline_(str, pos); } - if( HPMHooks.count.HP_strlib_strline__post ) { - int (*postHookFunc) (int retVal___, const char *str, size_t *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_strline__post > 0) { + int (*postHookFunc) (int retVal___, const char *str, size_t pos); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &pos); + retVal___ = postHookFunc(retVal___, str, pos); } } return retVal___; } -bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { +bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_strlib_bin2hex__pre ) { - bool (*preHookFunc) (char *output, unsigned char *input, size_t *count); + if (HPMHooks.count.HP_strlib_bin2hex__pre > 0) { + bool (*preHookFunc) (char **output, const unsigned char **input, size_t *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; - retVal___ = preHookFunc(output, input, &count); + retVal___ = preHookFunc(&output, &input, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17765,27 +20456,27 @@ bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { { retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); } - if( HPMHooks.count.HP_strlib_bin2hex__post ) { - bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_bin2hex__post > 0) { + bool (*postHookFunc) (bool retVal___, char *output, const unsigned char *input, size_t count); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; - retVal___ = postHookFunc(retVal___, output, input, &count); + retVal___ = postHookFunc(retVal___, output, input, count); } } return retVal___; } -/* sv */ +/* sv_interface */ int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_next_pre ) { - int (*preHookFunc) (struct s_svstate *svstate); + if (HPMHooks.count.HP_sv_parse_next_pre > 0) { + int (*preHookFunc) (struct s_svstate **svstate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func; - retVal___ = preHookFunc(svstate); + retVal___ = preHookFunc(&svstate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17793,9 +20484,9 @@ int HP_sv_parse_next(struct s_svstate *svstate) { { retVal___ = HPMHooks.source.sv.parse_next(svstate); } - if( HPMHooks.count.HP_sv_parse_next_post ) { + if (HPMHooks.count.HP_sv_parse_next_post > 0) { int (*postHookFunc) (int retVal___, struct s_svstate *svstate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func; retVal___ = postHookFunc(retVal___, svstate); } @@ -17805,14 +20496,14 @@ int HP_sv_parse_next(struct s_svstate *svstate) { int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_pre ) { - int (*preHookFunc) (const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); + if (HPMHooks.count.HP_sv_parse_pre > 0) { + int (*preHookFunc) (const char **str, int *len, int *startoff, char *delim, int **out_pos, int *npos, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func; - retVal___ = preHookFunc(str, &len, &startoff, &delim, out_pos, &npos, &opt); + retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_pos, &npos, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17820,11 +20511,11 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos { retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt); } - if( HPMHooks.count.HP_sv_parse_post ) { - int (*postHookFunc) (int retVal___, const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_parse_post > 0) { + int (*postHookFunc) (int retVal___, const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_pos, &npos, &opt); + retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_pos, npos, opt); } } return retVal___; @@ -17832,14 +20523,14 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_split_pre ) { - int (*preHookFunc) (char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); + if (HPMHooks.count.HP_sv_split_pre > 0) { + int (*preHookFunc) (char **str, int *len, int *startoff, char *delim, char ***out_fields, int *nfields, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func; - retVal___ = preHookFunc(str, &len, &startoff, &delim, out_fields, &nfields, &opt); + retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_fields, &nfields, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17847,11 +20538,11 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, { retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt); } - if( HPMHooks.count.HP_sv_split_post ) { - int (*postHookFunc) (int retVal___, char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_split_post > 0) { + int (*postHookFunc) (int retVal___, char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_fields, &nfields, &opt); + retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_fields, nfields, opt); } } return retVal___; @@ -17859,14 +20550,14 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_escape_c_pre ) { - size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len, const char *escapes); + if (HPMHooks.count.HP_sv_escape_c_pre > 0) { + size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len, const char **escapes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func; - retVal___ = preHookFunc(out_dest, src, &len, escapes); + retVal___ = preHookFunc(&out_dest, &src, &len, &escapes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17874,11 +20565,11 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e { retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes); } - if( HPMHooks.count.HP_sv_escape_c_post ) { - size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len, const char *escapes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_escape_c_post > 0) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len, const char *escapes); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func; - retVal___ = postHookFunc(retVal___, out_dest, src, &len, escapes); + retVal___ = postHookFunc(retVal___, out_dest, src, len, escapes); } } return retVal___; @@ -17886,14 +20577,14 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_unescape_c_pre ) { - size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len); + if (HPMHooks.count.HP_sv_unescape_c_pre > 0) { + size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func; - retVal___ = preHookFunc(out_dest, src, &len); + retVal___ = preHookFunc(&out_dest, &src, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17901,11 +20592,11 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { { retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len); } - if( HPMHooks.count.HP_sv_unescape_c_post ) { - size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_unescape_c_post > 0) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func; - retVal___ = postHookFunc(retVal___, out_dest, src, &len); + retVal___ = postHookFunc(retVal___, out_dest, src, len); } } return retVal___; @@ -17913,14 +20604,14 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { const char* HP_sv_skip_escaped_c(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) { - const char* (*preHookFunc) (const char *p); + if (HPMHooks.count.HP_sv_skip_escaped_c_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func; - retVal___ = preHookFunc(p); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17928,9 +20619,9 @@ const char* HP_sv_skip_escaped_c(const char *p) { { retVal___ = HPMHooks.source.sv.skip_escaped_c(p); } - if( HPMHooks.count.HP_sv_skip_escaped_c_post ) { + if (HPMHooks.count.HP_sv_skip_escaped_c_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -17940,14 +20631,14 @@ const char* HP_sv_skip_escaped_c(const char *p) { bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sv_readdb_pre ) { - bool (*preHookFunc) (const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); + if (HPMHooks.count.HP_sv_readdb_pre > 0) { + bool (*preHookFunc) (const char **directory, const char **filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( **parseproc ) (char *fields[], int columns, int current)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func; - retVal___ = preHookFunc(directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); + retVal___ = preHookFunc(&directory, &filename, &delim, &mincols, &maxcols, &maxrows, &parseproc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17955,27 +20646,27 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m { retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc); } - if( HPMHooks.count.HP_sv_readdb_post ) { - bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_readdb_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); + retVal___ = postHookFunc(retVal___, directory, filename, delim, mincols, maxcols, maxrows, parseproc); } } return retVal___; } -/* sysinfo */ +/* sysinfo_interface */ int HP_sysinfo_getpagesize(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17983,9 +20674,9 @@ int HP_sysinfo_getpagesize(void) { { retVal___ = HPMHooks.source.sysinfo.getpagesize(); } - if( HPMHooks.count.HP_sysinfo_getpagesize_post ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -17995,14 +20686,14 @@ int HP_sysinfo_getpagesize(void) { const char* HP_sysinfo_platform(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_platform_pre ) { + if (HPMHooks.count.HP_sysinfo_platform_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18010,9 +20701,9 @@ const char* HP_sysinfo_platform(void) { { retVal___ = HPMHooks.source.sysinfo.platform(); } - if( HPMHooks.count.HP_sysinfo_platform_post ) { + if (HPMHooks.count.HP_sysinfo_platform_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18022,14 +20713,14 @@ const char* HP_sysinfo_platform(void) { const char* HP_sysinfo_osversion(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_osversion_pre ) { + if (HPMHooks.count.HP_sysinfo_osversion_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18037,9 +20728,9 @@ const char* HP_sysinfo_osversion(void) { { retVal___ = HPMHooks.source.sysinfo.osversion(); } - if( HPMHooks.count.HP_sysinfo_osversion_post ) { + if (HPMHooks.count.HP_sysinfo_osversion_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18049,14 +20740,14 @@ const char* HP_sysinfo_osversion(void) { const char* HP_sysinfo_cpu(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cpu_pre ) { + if (HPMHooks.count.HP_sysinfo_cpu_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18064,9 +20755,9 @@ const char* HP_sysinfo_cpu(void) { { retVal___ = HPMHooks.source.sysinfo.cpu(); } - if( HPMHooks.count.HP_sysinfo_cpu_post ) { + if (HPMHooks.count.HP_sysinfo_cpu_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18076,14 +20767,14 @@ const char* HP_sysinfo_cpu(void) { int HP_sysinfo_cpucores(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_cpucores_pre ) { + if (HPMHooks.count.HP_sysinfo_cpucores_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18091,9 +20782,9 @@ int HP_sysinfo_cpucores(void) { { retVal___ = HPMHooks.source.sysinfo.cpucores(); } - if( HPMHooks.count.HP_sysinfo_cpucores_post ) { + if (HPMHooks.count.HP_sysinfo_cpucores_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18103,14 +20794,14 @@ int HP_sysinfo_cpucores(void) { const char* HP_sysinfo_arch(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_arch_pre ) { + if (HPMHooks.count.HP_sysinfo_arch_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18118,9 +20809,9 @@ const char* HP_sysinfo_arch(void) { { retVal___ = HPMHooks.source.sysinfo.arch(); } - if( HPMHooks.count.HP_sysinfo_arch_post ) { + if (HPMHooks.count.HP_sysinfo_arch_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18130,14 +20821,14 @@ const char* HP_sysinfo_arch(void) { bool HP_sysinfo_is64bit(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is64bit_pre ) { + if (HPMHooks.count.HP_sysinfo_is64bit_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18145,9 +20836,9 @@ bool HP_sysinfo_is64bit(void) { { retVal___ = HPMHooks.source.sysinfo.is64bit(); } - if( HPMHooks.count.HP_sysinfo_is64bit_post ) { + if (HPMHooks.count.HP_sysinfo_is64bit_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18157,14 +20848,14 @@ bool HP_sysinfo_is64bit(void) { const char* HP_sysinfo_compiler(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_compiler_pre ) { + if (HPMHooks.count.HP_sysinfo_compiler_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18172,9 +20863,9 @@ const char* HP_sysinfo_compiler(void) { { retVal___ = HPMHooks.source.sysinfo.compiler(); } - if( HPMHooks.count.HP_sysinfo_compiler_post ) { + if (HPMHooks.count.HP_sysinfo_compiler_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18184,14 +20875,14 @@ const char* HP_sysinfo_compiler(void) { const char* HP_sysinfo_cflags(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cflags_pre ) { + if (HPMHooks.count.HP_sysinfo_cflags_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18199,9 +20890,9 @@ const char* HP_sysinfo_cflags(void) { { retVal___ = HPMHooks.source.sysinfo.cflags(); } - if( HPMHooks.count.HP_sysinfo_cflags_post ) { + if (HPMHooks.count.HP_sysinfo_cflags_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18211,14 +20902,14 @@ const char* HP_sysinfo_cflags(void) { const char* HP_sysinfo_time(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_time_pre ) { + if (HPMHooks.count.HP_sysinfo_time_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_time_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18226,9 +20917,9 @@ const char* HP_sysinfo_time(void) { { retVal___ = HPMHooks.source.sysinfo.time(); } - if( HPMHooks.count.HP_sysinfo_time_post ) { + if (HPMHooks.count.HP_sysinfo_time_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_time_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18238,14 +20929,14 @@ const char* HP_sysinfo_time(void) { const char* HP_sysinfo_vcstype(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcstype_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstype_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18253,9 +20944,9 @@ const char* HP_sysinfo_vcstype(void) { { retVal___ = HPMHooks.source.sysinfo.vcstype(); } - if( HPMHooks.count.HP_sysinfo_vcstype_post ) { + if (HPMHooks.count.HP_sysinfo_vcstype_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18265,14 +20956,14 @@ const char* HP_sysinfo_vcstype(void) { int HP_sysinfo_vcstypeid(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18280,9 +20971,9 @@ int HP_sysinfo_vcstypeid(void) { { retVal___ = HPMHooks.source.sysinfo.vcstypeid(); } - if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18292,14 +20983,14 @@ int HP_sysinfo_vcstypeid(void) { const char* HP_sysinfo_vcsrevision_src(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18307,9 +20998,9 @@ const char* HP_sysinfo_vcsrevision_src(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_src(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18319,14 +21010,14 @@ const char* HP_sysinfo_vcsrevision_src(void) { const char* HP_sysinfo_vcsrevision_scripts(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18334,9 +21025,9 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18345,14 +21036,14 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { } void HP_sysinfo_vcsrevision_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18360,9 +21051,9 @@ void HP_sysinfo_vcsrevision_reload(void) { { HPMHooks.source.sysinfo.vcsrevision_reload(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func; postHookFunc(); } @@ -18372,14 +21063,14 @@ void HP_sysinfo_vcsrevision_reload(void) { bool HP_sysinfo_is_superuser(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18387,9 +21078,9 @@ bool HP_sysinfo_is_superuser(void) { { retVal___ = HPMHooks.source.sysinfo.is_superuser(); } - if( HPMHooks.count.HP_sysinfo_is_superuser_post ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18398,14 +21089,14 @@ bool HP_sysinfo_is_superuser(void) { } void HP_sysinfo_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_init_pre ) { + if (HPMHooks.count.HP_sysinfo_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18413,9 +21104,9 @@ void HP_sysinfo_init(void) { { HPMHooks.source.sysinfo.init(); } - if( HPMHooks.count.HP_sysinfo_init_post ) { + if (HPMHooks.count.HP_sysinfo_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func; postHookFunc(); } @@ -18424,14 +21115,14 @@ void HP_sysinfo_init(void) { } void HP_sysinfo_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_final_pre ) { + if (HPMHooks.count.HP_sysinfo_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18439,27 +21130,320 @@ void HP_sysinfo_final(void) { { HPMHooks.source.sysinfo.final(); } - if( HPMHooks.count.HP_sysinfo_final_post ) { + if (HPMHooks.count.HP_sysinfo_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func; postHookFunc(); } } return; } -/* timer */ +/* thread_interface */ +void HP_thread_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.init(); + } + if (HPMHooks.count.HP_thread_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_thread_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.final(); + } + if (HPMHooks.count.HP_thread_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { + int hIndex = 0; + struct thread_handle* retVal___ = NULL; + if (HPMHooks.count.HP_thread_create_pre > 0) { + struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_create_pre[hIndex].func; + retVal___ = preHookFunc(&entry_point, ¶m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.create(entry_point, param); + } + if (HPMHooks.count.HP_thread_create_post > 0) { + struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry_point, param); + } + } + return retVal___; +} +struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio) { + int hIndex = 0; + struct thread_handle* retVal___ = NULL; + if (HPMHooks.count.HP_thread_create_opt_pre > 0) { + struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param, size_t *stack_size, enum thread_priority *prio); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_create_opt_pre[hIndex].func; + retVal___ = preHookFunc(&entry_point, ¶m, &stack_size, &prio); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.create_opt(entry_point, param, stack_size, prio); + } + if (HPMHooks.count.HP_thread_create_opt_post > 0) { + struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_create_opt_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry_point, param, stack_size, prio); + } + } + return retVal___; +} +void HP_thread_destroy(struct thread_handle *handle) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_destroy_pre > 0) { + void (*preHookFunc) (struct thread_handle **handle); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_destroy_pre[hIndex].func; + preHookFunc(&handle); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.destroy(handle); + } + if (HPMHooks.count.HP_thread_destroy_post > 0) { + void (*postHookFunc) (struct thread_handle *handle); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_destroy_post[hIndex].func; + postHookFunc(handle); + } + } + return; +} +struct thread_handle* HP_thread_self(void) { + int hIndex = 0; + struct thread_handle* retVal___ = NULL; + if (HPMHooks.count.HP_thread_self_pre > 0) { + struct thread_handle* (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_self_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.self(); + } + if (HPMHooks.count.HP_thread_self_post > 0) { + struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_self_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_thread_get_tid(void) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_thread_get_tid_pre > 0) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_get_tid_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.get_tid(); + } + if (HPMHooks.count.HP_thread_get_tid_post > 0) { + int (*postHookFunc) (int retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_get_tid_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_thread_wait_pre > 0) { + bool (*preHookFunc) (struct thread_handle **handle, void ***out_exit_code); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_wait_pre[hIndex].func; + retVal___ = preHookFunc(&handle, &out_exit_code); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.wait(handle, out_exit_code); + } + if (HPMHooks.count.HP_thread_wait_post > 0) { + bool (*postHookFunc) (bool retVal___, struct thread_handle *handle, void **out_exit_code); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_wait_post[hIndex].func; + retVal___ = postHookFunc(retVal___, handle, out_exit_code); + } + } + return retVal___; +} +void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_prio_set_pre > 0) { + void (*preHookFunc) (struct thread_handle **handle, enum thread_priority *prio); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_prio_set_pre[hIndex].func; + preHookFunc(&handle, &prio); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.prio_set(handle, prio); + } + if (HPMHooks.count.HP_thread_prio_set_post > 0) { + void (*postHookFunc) (struct thread_handle *handle, enum thread_priority prio); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_prio_set_post[hIndex].func; + postHookFunc(handle, prio); + } + } + return; +} +enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { + int hIndex = 0; + enum thread_priority retVal___ = THREADPRIO_NORMAL; + if (HPMHooks.count.HP_thread_prio_get_pre > 0) { + enum thread_priority (*preHookFunc) (struct thread_handle **handle); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_prio_get_pre[hIndex].func; + retVal___ = preHookFunc(&handle); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.prio_get(handle); + } + if (HPMHooks.count.HP_thread_prio_get_post > 0) { + enum thread_priority (*postHookFunc) (enum thread_priority retVal___, struct thread_handle *handle); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_prio_get_post[hIndex].func; + retVal___ = postHookFunc(retVal___, handle); + } + } + return retVal___; +} +void HP_thread_yield(void) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_yield_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_yield_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.yield(); + } + if (HPMHooks.count.HP_thread_yield_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_yield_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* timer_interface */ int64 HP_timer_gettick(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_pre ) { + if (HPMHooks.count.HP_timer_gettick_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18467,9 +21451,9 @@ int64 HP_timer_gettick(void) { { retVal___ = HPMHooks.source.timer.gettick(); } - if( HPMHooks.count.HP_timer_gettick_post ) { + if (HPMHooks.count.HP_timer_gettick_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18479,14 +21463,14 @@ int64 HP_timer_gettick(void) { int64 HP_timer_gettick_nocache(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_nocache_pre ) { + if (HPMHooks.count.HP_timer_gettick_nocache_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18494,9 +21478,9 @@ int64 HP_timer_gettick_nocache(void) { { retVal___ = HPMHooks.source.timer.gettick_nocache(); } - if( HPMHooks.count.HP_timer_gettick_nocache_post ) { + if (HPMHooks.count.HP_timer_gettick_nocache_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18506,14 +21490,14 @@ int64 HP_timer_gettick_nocache(void) { int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_pre ) { + if (HPMHooks.count.HP_timer_add_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18521,11 +21505,11 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { { retVal___ = HPMHooks.source.timer.add(tick, func, id, data); } - if( HPMHooks.count.HP_timer_add_post ) { - int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_add_post > 0) { + int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data); + retVal___ = postHookFunc(retVal___, tick, func, id, data); } } return retVal___; @@ -18533,14 +21517,14 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_interval_pre ) { + if (HPMHooks.count.HP_timer_add_interval_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data, &interval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18548,11 +21532,11 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int { retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval); } - if( HPMHooks.count.HP_timer_add_interval_post ) { - int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_add_interval_post > 0) { + int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data, int interval); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data, &interval); + retVal___ = postHookFunc(retVal___, tick, func, id, data, interval); } } return retVal___; @@ -18560,14 +21544,14 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int const struct TimerData* HP_timer_get(int tid) { int hIndex = 0; const struct TimerData* retVal___ = NULL; - if( HPMHooks.count.HP_timer_get_pre ) { + if (HPMHooks.count.HP_timer_get_pre > 0) { const struct TimerData* (*preHookFunc) (int *tid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func; retVal___ = preHookFunc(&tid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18575,11 +21559,11 @@ const struct TimerData* HP_timer_get(int tid) { { retVal___ = HPMHooks.source.timer.get(tid); } - if( HPMHooks.count.HP_timer_get_post ) { - const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int *tid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_get_post > 0) { + const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int tid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid); + retVal___ = postHookFunc(retVal___, tid); } } return retVal___; @@ -18587,14 +21571,14 @@ const struct TimerData* HP_timer_get(int tid) { int HP_timer_delete(int tid, TimerFunc func) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_delete_pre ) { + if (HPMHooks.count.HP_timer_delete_pre > 0) { int (*preHookFunc) (int *tid, TimerFunc *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func; retVal___ = preHookFunc(&tid, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18602,11 +21586,11 @@ int HP_timer_delete(int tid, TimerFunc func) { { retVal___ = HPMHooks.source.timer.delete(tid, func); } - if( HPMHooks.count.HP_timer_delete_post ) { - int (*postHookFunc) (int retVal___, int *tid, TimerFunc *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_delete_post > 0) { + int (*postHookFunc) (int retVal___, int tid, TimerFunc func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &func); + retVal___ = postHookFunc(retVal___, tid, func); } } return retVal___; @@ -18614,14 +21598,14 @@ int HP_timer_delete(int tid, TimerFunc func) { int64 HP_timer_addtick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_addtick_pre ) { + if (HPMHooks.count.HP_timer_addtick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18629,11 +21613,11 @@ int64 HP_timer_addtick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.addtick(tid, tick); } - if( HPMHooks.count.HP_timer_addtick_post ) { - int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_addtick_post > 0) { + int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick); + retVal___ = postHookFunc(retVal___, tid, tick); } } return retVal___; @@ -18641,14 +21625,14 @@ int64 HP_timer_addtick(int tid, int64 tick) { int64 HP_timer_settick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_settick_pre ) { + if (HPMHooks.count.HP_timer_settick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18656,11 +21640,11 @@ int64 HP_timer_settick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.settick(tid, tick); } - if( HPMHooks.count.HP_timer_settick_post ) { - int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_settick_post > 0) { + int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick); + retVal___ = postHookFunc(retVal___, tid, tick); } } return retVal___; @@ -18668,14 +21652,14 @@ int64 HP_timer_settick(int tid, int64 tick) { int HP_timer_add_func_list(TimerFunc func, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_func_list_pre ) { - int (*preHookFunc) (TimerFunc *func, char *name); + if (HPMHooks.count.HP_timer_add_func_list_pre > 0) { + int (*preHookFunc) (TimerFunc *func, char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func; - retVal___ = preHookFunc(&func, name); + retVal___ = preHookFunc(&func, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18683,11 +21667,11 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { { retVal___ = HPMHooks.source.timer.add_func_list(func, name); } - if( HPMHooks.count.HP_timer_add_func_list_post ) { - int (*postHookFunc) (int retVal___, TimerFunc *func, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_add_func_list_post > 0) { + int (*postHookFunc) (int retVal___, TimerFunc func, char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &func, name); + retVal___ = postHookFunc(retVal___, func, name); } } return retVal___; @@ -18695,14 +21679,14 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { unsigned long HP_timer_get_uptime(void) { int hIndex = 0; unsigned long retVal___ = 0; - if( HPMHooks.count.HP_timer_get_uptime_pre ) { + if (HPMHooks.count.HP_timer_get_uptime_pre > 0) { unsigned long (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18710,9 +21694,9 @@ unsigned long HP_timer_get_uptime(void) { { retVal___ = HPMHooks.source.timer.get_uptime(); } - if( HPMHooks.count.HP_timer_get_uptime_post ) { + if (HPMHooks.count.HP_timer_get_uptime_post > 0) { unsigned long (*postHookFunc) (unsigned long retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -18722,14 +21706,14 @@ unsigned long HP_timer_get_uptime(void) { int HP_timer_perform(int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_perform_pre ) { + if (HPMHooks.count.HP_timer_perform_pre > 0) { int (*preHookFunc) (int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func; retVal___ = preHookFunc(&tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18737,25 +21721,25 @@ int HP_timer_perform(int64 tick) { { retVal___ = HPMHooks.source.timer.perform(tick); } - if( HPMHooks.count.HP_timer_perform_post ) { - int (*postHookFunc) (int retVal___, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_perform_post > 0) { + int (*postHookFunc) (int retVal___, int64 tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tick); + retVal___ = postHookFunc(retVal___, tick); } } return retVal___; } void HP_timer_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_init_pre ) { + if (HPMHooks.count.HP_timer_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18763,9 +21747,9 @@ void HP_timer_init(void) { { HPMHooks.source.timer.init(); } - if( HPMHooks.count.HP_timer_init_post ) { + if (HPMHooks.count.HP_timer_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func; postHookFunc(); } @@ -18774,14 +21758,14 @@ void HP_timer_init(void) { } void HP_timer_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_final_pre ) { + if (HPMHooks.count.HP_timer_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18789,9 +21773,9 @@ void HP_timer_final(void) { { HPMHooks.source.timer.final(); } - if( HPMHooks.count.HP_timer_final_post ) { + if (HPMHooks.count.HP_timer_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func; postHookFunc(); } diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc index d14117add..7adc65b3c 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,36 +23,46 @@ * as it will get overwritten. */ -memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface)); -memcpy(&HPMHooks.source.chr, chr, sizeof(struct char_interface)); -memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface)); -memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface)); -memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface)); -memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface)); -memcpy(&HPMHooks.source.geoip, geoip, sizeof(struct geoip_interface)); -memcpy(&HPMHooks.source.inter_auction, inter_auction, sizeof(struct inter_auction_interface)); -memcpy(&HPMHooks.source.inter_elemental, inter_elemental, sizeof(struct inter_elemental_interface)); -memcpy(&HPMHooks.source.inter_guild, inter_guild, sizeof(struct inter_guild_interface)); -memcpy(&HPMHooks.source.inter_homunculus, inter_homunculus, sizeof(struct inter_homunculus_interface)); -memcpy(&HPMHooks.source.inter, inter, sizeof(struct inter_interface)); -memcpy(&HPMHooks.source.inter_mail, inter_mail, sizeof(struct inter_mail_interface)); -memcpy(&HPMHooks.source.inter_mercenary, inter_mercenary, sizeof(struct inter_mercenary_interface)); -memcpy(&HPMHooks.source.inter_party, inter_party, sizeof(struct inter_party_interface)); -memcpy(&HPMHooks.source.inter_pet, inter_pet, sizeof(struct inter_pet_interface)); -memcpy(&HPMHooks.source.inter_quest, inter_quest, sizeof(struct inter_quest_interface)); -memcpy(&HPMHooks.source.inter_storage, inter_storage, sizeof(struct inter_storage_interface)); -memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface)); -memcpy(&HPMHooks.source.loginif, loginif, sizeof(struct loginif_interface)); -memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface)); -memcpy(&HPMHooks.source.mapif, mapif, sizeof(struct mapif_interface)); -memcpy(&HPMHooks.source.mapindex, mapindex, sizeof(struct mapindex_interface)); -memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface)); -memcpy(&HPMHooks.source.pincode, pincode, sizeof(struct pincode_interface)); -memcpy(&HPMHooks.source.showmsg, showmsg, sizeof(struct showmsg_interface)); -memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface)); -memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface)); -memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface)); -memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface)); -memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface)); -memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface)); -memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_interface)); +/* GENERATED FILE DO NOT EDIT */ + +HPMHooks.source.HCache = *HCache; +HPMHooks.source.chr = *chr; +HPMHooks.source.cmdline = *cmdline; +HPMHooks.source.console = *console; +HPMHooks.source.core = *core; +HPMHooks.source.DB = *DB; +HPMHooks.source.des = *des; +HPMHooks.source.geoip = *geoip; +HPMHooks.source.inter_achievement = *inter_achievement; +HPMHooks.source.inter_auction = *inter_auction; +HPMHooks.source.inter_clan = *inter_clan; +HPMHooks.source.inter_elemental = *inter_elemental; +HPMHooks.source.inter_guild = *inter_guild; +HPMHooks.source.inter_homunculus = *inter_homunculus; +HPMHooks.source.inter = *inter; +HPMHooks.source.inter_mail = *inter_mail; +HPMHooks.source.inter_mercenary = *inter_mercenary; +HPMHooks.source.inter_party = *inter_party; +HPMHooks.source.inter_pet = *inter_pet; +HPMHooks.source.inter_quest = *inter_quest; +HPMHooks.source.inter_rodex = *inter_rodex; +HPMHooks.source.inter_storage = *inter_storage; +HPMHooks.source.libconfig = *libconfig; +HPMHooks.source.loginif = *loginif; +HPMHooks.source.mapif = *mapif; +HPMHooks.source.mapindex = *mapindex; +HPMHooks.source.md5 = *md5; +HPMHooks.source.mutex = *mutex; +HPMHooks.source.nullpo = *nullpo; +HPMHooks.source.packets = *packets; +HPMHooks.source.pincode = *pincode; +HPMHooks.source.rnd = *rnd; +HPMHooks.source.showmsg = *showmsg; +HPMHooks.source.sockt = *sockt; +HPMHooks.source.SQL = *SQL; +HPMHooks.source.StrBuf = *StrBuf; +HPMHooks.source.strlib = *strlib; +HPMHooks.source.sv = *sv; +HPMHooks.source.sysinfo = *sysinfo; +HPMHooks.source.thread = *thread; +HPMHooks.source.timer = *timer; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc index 67257883f..2875df334 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,8 @@ * as it will get overwritten. */ +/* GENERATED FILE DO NOT EDIT */ + struct { struct HPMHookPoint *HP_HCache_init_pre; struct HPMHookPoint *HP_HCache_init_post; @@ -30,6 +32,44 @@ struct { struct HPMHookPoint *HP_HCache_check_post; struct HPMHookPoint *HP_HCache_open_pre; struct HPMHookPoint *HP_HCache_open_post; + struct HPMHookPoint *HP_account_db_sql_up_pre; + struct HPMHookPoint *HP_account_db_sql_up_post; + struct HPMHookPoint *HP_account_mmo_send_accreg2_pre; + struct HPMHookPoint *HP_account_mmo_send_accreg2_post; + struct HPMHookPoint *HP_account_mmo_save_accreg2_pre; + struct HPMHookPoint *HP_account_mmo_save_accreg2_post; + struct HPMHookPoint *HP_account_mmo_auth_fromsql_pre; + struct HPMHookPoint *HP_account_mmo_auth_fromsql_post; + struct HPMHookPoint *HP_account_mmo_auth_tosql_pre; + struct HPMHookPoint *HP_account_mmo_auth_tosql_post; + struct HPMHookPoint *HP_account_db_sql_pre; + struct HPMHookPoint *HP_account_db_sql_post; + struct HPMHookPoint *HP_account_db_sql_init_pre; + struct HPMHookPoint *HP_account_db_sql_init_post; + struct HPMHookPoint *HP_account_db_sql_destroy_pre; + struct HPMHookPoint *HP_account_db_sql_destroy_post; + struct HPMHookPoint *HP_account_db_sql_get_property_pre; + struct HPMHookPoint *HP_account_db_sql_get_property_post; + struct HPMHookPoint *HP_account_db_sql_set_property_pre; + struct HPMHookPoint *HP_account_db_sql_set_property_post; + struct HPMHookPoint *HP_account_db_sql_create_pre; + struct HPMHookPoint *HP_account_db_sql_create_post; + struct HPMHookPoint *HP_account_db_sql_remove_pre; + struct HPMHookPoint *HP_account_db_sql_remove_post; + struct HPMHookPoint *HP_account_db_sql_save_pre; + struct HPMHookPoint *HP_account_db_sql_save_post; + struct HPMHookPoint *HP_account_db_sql_load_num_pre; + struct HPMHookPoint *HP_account_db_sql_load_num_post; + struct HPMHookPoint *HP_account_db_sql_load_str_pre; + struct HPMHookPoint *HP_account_db_sql_load_str_post; + struct HPMHookPoint *HP_account_db_sql_iterator_pre; + struct HPMHookPoint *HP_account_db_sql_iterator_post; + struct HPMHookPoint *HP_account_db_sql_iter_destroy_pre; + struct HPMHookPoint *HP_account_db_sql_iter_destroy_post; + struct HPMHookPoint *HP_account_db_sql_iter_next_pre; + struct HPMHookPoint *HP_account_db_sql_iter_next_post; + struct HPMHookPoint *HP_account_db_read_inter_pre; + struct HPMHookPoint *HP_account_db_read_inter_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -90,6 +130,92 @@ struct { struct HPMHookPoint *HP_DB_init_post; struct HPMHookPoint *HP_DB_final_pre; struct HPMHookPoint *HP_DB_final_post; + struct HPMHookPoint *HP_des_decrypt_block_pre; + struct HPMHookPoint *HP_des_decrypt_block_post; + struct HPMHookPoint *HP_des_decrypt_pre; + struct HPMHookPoint *HP_des_decrypt_post; + struct HPMHookPoint *HP_ipban_init_pre; + struct HPMHookPoint *HP_ipban_init_post; + struct HPMHookPoint *HP_ipban_final_pre; + struct HPMHookPoint *HP_ipban_final_post; + struct HPMHookPoint *HP_ipban_cleanup_pre; + struct HPMHookPoint *HP_ipban_cleanup_post; + struct HPMHookPoint *HP_ipban_config_read_inter_pre; + struct HPMHookPoint *HP_ipban_config_read_inter_post; + struct HPMHookPoint *HP_ipban_config_read_connection_pre; + struct HPMHookPoint *HP_ipban_config_read_connection_post; + struct HPMHookPoint *HP_ipban_config_read_dynamic_pre; + struct HPMHookPoint *HP_ipban_config_read_dynamic_post; + struct HPMHookPoint *HP_ipban_config_read_pre; + struct HPMHookPoint *HP_ipban_config_read_post; + struct HPMHookPoint *HP_ipban_check_pre; + struct HPMHookPoint *HP_ipban_check_post; + struct HPMHookPoint *HP_ipban_log_pre; + struct HPMHookPoint *HP_ipban_log_post; + struct HPMHookPoint *HP_lchrif_server_init_pre; + struct HPMHookPoint *HP_lchrif_server_init_post; + struct HPMHookPoint *HP_lchrif_server_destroy_pre; + struct HPMHookPoint *HP_lchrif_server_destroy_post; + struct HPMHookPoint *HP_lchrif_server_reset_pre; + struct HPMHookPoint *HP_lchrif_server_reset_post; + struct HPMHookPoint *HP_lchrif_on_disconnect_pre; + struct HPMHookPoint *HP_lchrif_on_disconnect_post; + struct HPMHookPoint *HP_lclif_init_pre; + struct HPMHookPoint *HP_lclif_init_post; + struct HPMHookPoint *HP_lclif_final_pre; + struct HPMHookPoint *HP_lclif_final_post; + struct HPMHookPoint *HP_lclif_connection_error_pre; + struct HPMHookPoint *HP_lclif_connection_error_post; + struct HPMHookPoint *HP_lclif_server_list_pre; + struct HPMHookPoint *HP_lclif_server_list_post; + struct HPMHookPoint *HP_lclif_auth_failed_pre; + struct HPMHookPoint *HP_lclif_auth_failed_post; + struct HPMHookPoint *HP_lclif_login_error_pre; + struct HPMHookPoint *HP_lclif_login_error_post; + struct HPMHookPoint *HP_lclif_coding_key_pre; + struct HPMHookPoint *HP_lclif_coding_key_post; + struct HPMHookPoint *HP_lclif_packet_pre; + struct HPMHookPoint *HP_lclif_packet_post; + struct HPMHookPoint *HP_lclif_parse_packet_pre; + struct HPMHookPoint *HP_lclif_parse_packet_post; + struct HPMHookPoint *HP_lclif_parse_pre; + struct HPMHookPoint *HP_lclif_parse_post; + struct HPMHookPoint *HP_PRIV__lclif_packetdb_loaddb_pre; + struct HPMHookPoint *HP_PRIV__lclif_packetdb_loaddb_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_sub_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_sub_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN2_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN2_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN3_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN3_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN4_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN4_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_HAN_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_OTP_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_LOGIN_OTP_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_OTP_CODE_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_OTP_CODE_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_REQ_HASH_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_REQ_HASH_post; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre; + struct HPMHookPoint *HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post; + struct HPMHookPoint *HP_libconfig_set_db_path_pre; + struct HPMHookPoint *HP_libconfig_set_db_path_post; + struct HPMHookPoint *HP_libconfig_format_db_path_pre; + struct HPMHookPoint *HP_libconfig_format_db_path_post; struct HPMHookPoint *HP_libconfig_read_pre; struct HPMHookPoint *HP_libconfig_read_post; struct HPMHookPoint *HP_libconfig_write_pre; @@ -308,66 +434,122 @@ struct { struct HPMHookPoint *HP_login_fromchar_parse_accinfo_post; struct HPMHookPoint *HP_login_parse_fromchar_pre; struct HPMHookPoint *HP_login_parse_fromchar_post; - struct HPMHookPoint *HP_login_connection_problem_pre; - struct HPMHookPoint *HP_login_connection_problem_post; struct HPMHookPoint *HP_login_kick_pre; struct HPMHookPoint *HP_login_kick_post; struct HPMHookPoint *HP_login_auth_ok_pre; struct HPMHookPoint *HP_login_auth_ok_post; struct HPMHookPoint *HP_login_auth_failed_pre; struct HPMHookPoint *HP_login_auth_failed_post; - struct HPMHookPoint *HP_login_login_error_pre; - struct HPMHookPoint *HP_login_login_error_post; - struct HPMHookPoint *HP_login_parse_ping_pre; - struct HPMHookPoint *HP_login_parse_ping_post; - struct HPMHookPoint *HP_login_parse_client_md5_pre; - struct HPMHookPoint *HP_login_parse_client_md5_post; - struct HPMHookPoint *HP_login_parse_client_login_pre; - struct HPMHookPoint *HP_login_parse_client_login_post; - struct HPMHookPoint *HP_login_send_coding_key_pre; - struct HPMHookPoint *HP_login_send_coding_key_post; - struct HPMHookPoint *HP_login_parse_request_coding_key_pre; - struct HPMHookPoint *HP_login_parse_request_coding_key_post; + struct HPMHookPoint *HP_login_client_login_pre; + struct HPMHookPoint *HP_login_client_login_post; + struct HPMHookPoint *HP_login_client_login_otp_pre; + struct HPMHookPoint *HP_login_client_login_otp_post; + struct HPMHookPoint *HP_login_client_login_mobile_otp_request_pre; + struct HPMHookPoint *HP_login_client_login_mobile_otp_request_post; struct HPMHookPoint *HP_login_char_server_connection_status_pre; struct HPMHookPoint *HP_login_char_server_connection_status_post; struct HPMHookPoint *HP_login_parse_request_connection_pre; struct HPMHookPoint *HP_login_parse_request_connection_post; - struct HPMHookPoint *HP_login_parse_login_pre; - struct HPMHookPoint *HP_login_parse_login_post; struct HPMHookPoint *HP_login_config_set_defaults_pre; struct HPMHookPoint *HP_login_config_set_defaults_post; struct HPMHookPoint *HP_login_config_read_pre; struct HPMHookPoint *HP_login_config_read_post; - struct HPMHookPoint *HP_iMalloc_init_pre; - struct HPMHookPoint *HP_iMalloc_init_post; - struct HPMHookPoint *HP_iMalloc_final_pre; - struct HPMHookPoint *HP_iMalloc_final_post; - struct HPMHookPoint *HP_iMalloc_malloc_pre; - struct HPMHookPoint *HP_iMalloc_malloc_post; - struct HPMHookPoint *HP_iMalloc_calloc_pre; - struct HPMHookPoint *HP_iMalloc_calloc_post; - struct HPMHookPoint *HP_iMalloc_realloc_pre; - struct HPMHookPoint *HP_iMalloc_realloc_post; - struct HPMHookPoint *HP_iMalloc_reallocz_pre; - struct HPMHookPoint *HP_iMalloc_reallocz_post; - struct HPMHookPoint *HP_iMalloc_astrdup_pre; - struct HPMHookPoint *HP_iMalloc_astrdup_post; - struct HPMHookPoint *HP_iMalloc_astrndup_pre; - struct HPMHookPoint *HP_iMalloc_astrndup_post; - struct HPMHookPoint *HP_iMalloc_free_pre; - struct HPMHookPoint *HP_iMalloc_free_post; - struct HPMHookPoint *HP_iMalloc_memory_check_pre; - struct HPMHookPoint *HP_iMalloc_memory_check_post; - struct HPMHookPoint *HP_iMalloc_verify_ptr_pre; - struct HPMHookPoint *HP_iMalloc_verify_ptr_post; - struct HPMHookPoint *HP_iMalloc_usage_pre; - struct HPMHookPoint *HP_iMalloc_usage_post; - struct HPMHookPoint *HP_iMalloc_post_shutdown_pre; - struct HPMHookPoint *HP_iMalloc_post_shutdown_post; - struct HPMHookPoint *HP_iMalloc_init_messages_pre; - struct HPMHookPoint *HP_iMalloc_init_messages_post; + struct HPMHookPoint *HP_login_config_read_inter_pre; + struct HPMHookPoint *HP_login_config_read_inter_post; + struct HPMHookPoint *HP_login_config_read_console_pre; + struct HPMHookPoint *HP_login_config_read_console_post; + struct HPMHookPoint *HP_login_config_read_log_pre; + struct HPMHookPoint *HP_login_config_read_log_post; + struct HPMHookPoint *HP_login_config_read_account_pre; + struct HPMHookPoint *HP_login_config_read_account_post; + struct HPMHookPoint *HP_login_config_read_permission_pre; + struct HPMHookPoint *HP_login_config_read_permission_post; + struct HPMHookPoint *HP_login_config_read_permission_hash_pre; + struct HPMHookPoint *HP_login_config_read_permission_hash_post; + struct HPMHookPoint *HP_login_config_read_permission_blacklist_pre; + struct HPMHookPoint *HP_login_config_read_permission_blacklist_post; + struct HPMHookPoint *HP_login_config_read_users_pre; + struct HPMHookPoint *HP_login_config_read_users_post; + struct HPMHookPoint *HP_login_clear_dnsbl_servers_pre; + struct HPMHookPoint *HP_login_clear_dnsbl_servers_post; + struct HPMHookPoint *HP_login_config_set_dnsbl_servers_pre; + struct HPMHookPoint *HP_login_config_set_dnsbl_servers_post; + struct HPMHookPoint *HP_login_clear_client_hash_nodes_pre; + struct HPMHookPoint *HP_login_clear_client_hash_nodes_post; + struct HPMHookPoint *HP_login_config_set_md5hash_pre; + struct HPMHookPoint *HP_login_config_set_md5hash_post; + struct HPMHookPoint *HP_login_convert_users_to_colors_pre; + struct HPMHookPoint *HP_login_convert_users_to_colors_post; + struct HPMHookPoint *HP_loginlog_failedattempts_pre; + struct HPMHookPoint *HP_loginlog_failedattempts_post; + struct HPMHookPoint *HP_loginlog_log_pre; + struct HPMHookPoint *HP_loginlog_log_post; + struct HPMHookPoint *HP_loginlog_init_pre; + struct HPMHookPoint *HP_loginlog_init_post; + struct HPMHookPoint *HP_loginlog_final_pre; + struct HPMHookPoint *HP_loginlog_final_post; + struct HPMHookPoint *HP_loginlog_config_read_names_pre; + struct HPMHookPoint *HP_loginlog_config_read_names_post; + struct HPMHookPoint *HP_loginlog_config_read_log_pre; + struct HPMHookPoint *HP_loginlog_config_read_log_post; + struct HPMHookPoint *HP_loginlog_config_read_pre; + struct HPMHookPoint *HP_loginlog_config_read_post; + struct HPMHookPoint *HP_md5_string_pre; + struct HPMHookPoint *HP_md5_string_post; + struct HPMHookPoint *HP_md5_binary_pre; + struct HPMHookPoint *HP_md5_binary_post; + struct HPMHookPoint *HP_md5_salt_pre; + struct HPMHookPoint *HP_md5_salt_post; + struct HPMHookPoint *HP_mutex_create_pre; + struct HPMHookPoint *HP_mutex_create_post; + struct HPMHookPoint *HP_mutex_destroy_pre; + struct HPMHookPoint *HP_mutex_destroy_post; + struct HPMHookPoint *HP_mutex_lock_pre; + struct HPMHookPoint *HP_mutex_lock_post; + struct HPMHookPoint *HP_mutex_trylock_pre; + struct HPMHookPoint *HP_mutex_trylock_post; + struct HPMHookPoint *HP_mutex_unlock_pre; + struct HPMHookPoint *HP_mutex_unlock_post; + struct HPMHookPoint *HP_mutex_cond_create_pre; + struct HPMHookPoint *HP_mutex_cond_create_post; + struct HPMHookPoint *HP_mutex_cond_destroy_pre; + struct HPMHookPoint *HP_mutex_cond_destroy_post; + struct HPMHookPoint *HP_mutex_cond_wait_pre; + struct HPMHookPoint *HP_mutex_cond_wait_post; + struct HPMHookPoint *HP_mutex_cond_signal_pre; + struct HPMHookPoint *HP_mutex_cond_signal_post; + struct HPMHookPoint *HP_mutex_cond_broadcast_pre; + struct HPMHookPoint *HP_mutex_cond_broadcast_post; + struct HPMHookPoint *HP_nullpo_init_pre; + struct HPMHookPoint *HP_nullpo_init_post; + struct HPMHookPoint *HP_nullpo_final_pre; + struct HPMHookPoint *HP_nullpo_final_post; struct HPMHookPoint *HP_nullpo_assert_report_pre; struct HPMHookPoint *HP_nullpo_assert_report_post; + struct HPMHookPoint *HP_packets_init_pre; + struct HPMHookPoint *HP_packets_init_post; + struct HPMHookPoint *HP_packets_final_pre; + struct HPMHookPoint *HP_packets_final_post; + struct HPMHookPoint *HP_packets_addLens_pre; + struct HPMHookPoint *HP_packets_addLens_post; + struct HPMHookPoint *HP_packets_addLen_pre; + struct HPMHookPoint *HP_packets_addLen_post; + struct HPMHookPoint *HP_rnd_init_pre; + struct HPMHookPoint *HP_rnd_init_post; + struct HPMHookPoint *HP_rnd_final_pre; + struct HPMHookPoint *HP_rnd_final_post; + struct HPMHookPoint *HP_rnd_seed_pre; + struct HPMHookPoint *HP_rnd_seed_post; + struct HPMHookPoint *HP_rnd_random_pre; + struct HPMHookPoint *HP_rnd_random_post; + struct HPMHookPoint *HP_rnd_roll_pre; + struct HPMHookPoint *HP_rnd_roll_post; + struct HPMHookPoint *HP_rnd_value_pre; + struct HPMHookPoint *HP_rnd_value_post; + struct HPMHookPoint *HP_rnd_uniform_pre; + struct HPMHookPoint *HP_rnd_uniform_post; + struct HPMHookPoint *HP_rnd_uniform53_pre; + struct HPMHookPoint *HP_rnd_uniform53_post; struct HPMHookPoint *HP_showmsg_init_pre; struct HPMHookPoint *HP_showmsg_init_post; struct HPMHookPoint *HP_showmsg_final_pre; @@ -394,10 +576,14 @@ struct { struct HPMHookPoint *HP_sockt_realloc_writefifo_post; struct HPMHookPoint *HP_sockt_wfifoset_pre; struct HPMHookPoint *HP_sockt_wfifoset_post; + struct HPMHookPoint *HP_sockt_wfifohead_pre; + struct HPMHookPoint *HP_sockt_wfifohead_post; struct HPMHookPoint *HP_sockt_rfifoskip_pre; struct HPMHookPoint *HP_sockt_rfifoskip_post; struct HPMHookPoint *HP_sockt_close_pre; struct HPMHookPoint *HP_sockt_close_post; + struct HPMHookPoint *HP_sockt_validateWfifo_pre; + struct HPMHookPoint *HP_sockt_validateWfifo_post; struct HPMHookPoint *HP_sockt_session_is_valid_pre; struct HPMHookPoint *HP_sockt_session_is_valid_post; struct HPMHookPoint *HP_sockt_session_is_active_pre; @@ -406,6 +592,8 @@ struct { struct HPMHookPoint *HP_sockt_flush_post; struct HPMHookPoint *HP_sockt_flush_fifos_pre; struct HPMHookPoint *HP_sockt_flush_fifos_post; + struct HPMHookPoint *HP_sockt_connect_client_pre; + struct HPMHookPoint *HP_sockt_connect_client_post; struct HPMHookPoint *HP_sockt_set_nonblocking_pre; struct HPMHookPoint *HP_sockt_set_nonblocking_post; struct HPMHookPoint *HP_sockt_set_defaultparse_pre; @@ -596,6 +784,28 @@ struct { struct HPMHookPoint *HP_sysinfo_init_post; struct HPMHookPoint *HP_sysinfo_final_pre; struct HPMHookPoint *HP_sysinfo_final_post; + struct HPMHookPoint *HP_thread_init_pre; + struct HPMHookPoint *HP_thread_init_post; + struct HPMHookPoint *HP_thread_final_pre; + struct HPMHookPoint *HP_thread_final_post; + struct HPMHookPoint *HP_thread_create_pre; + struct HPMHookPoint *HP_thread_create_post; + struct HPMHookPoint *HP_thread_create_opt_pre; + struct HPMHookPoint *HP_thread_create_opt_post; + struct HPMHookPoint *HP_thread_destroy_pre; + struct HPMHookPoint *HP_thread_destroy_post; + struct HPMHookPoint *HP_thread_self_pre; + struct HPMHookPoint *HP_thread_self_post; + struct HPMHookPoint *HP_thread_get_tid_pre; + struct HPMHookPoint *HP_thread_get_tid_post; + struct HPMHookPoint *HP_thread_wait_pre; + struct HPMHookPoint *HP_thread_wait_post; + struct HPMHookPoint *HP_thread_prio_set_pre; + struct HPMHookPoint *HP_thread_prio_set_post; + struct HPMHookPoint *HP_thread_prio_get_pre; + struct HPMHookPoint *HP_thread_prio_get_post; + struct HPMHookPoint *HP_thread_yield_pre; + struct HPMHookPoint *HP_thread_yield_post; struct HPMHookPoint *HP_timer_gettick_pre; struct HPMHookPoint *HP_timer_gettick_post; struct HPMHookPoint *HP_timer_gettick_nocache_pre; @@ -631,6 +841,44 @@ struct { int HP_HCache_check_post; int HP_HCache_open_pre; int HP_HCache_open_post; + int HP_account_db_sql_up_pre; + int HP_account_db_sql_up_post; + int HP_account_mmo_send_accreg2_pre; + int HP_account_mmo_send_accreg2_post; + int HP_account_mmo_save_accreg2_pre; + int HP_account_mmo_save_accreg2_post; + int HP_account_mmo_auth_fromsql_pre; + int HP_account_mmo_auth_fromsql_post; + int HP_account_mmo_auth_tosql_pre; + int HP_account_mmo_auth_tosql_post; + int HP_account_db_sql_pre; + int HP_account_db_sql_post; + int HP_account_db_sql_init_pre; + int HP_account_db_sql_init_post; + int HP_account_db_sql_destroy_pre; + int HP_account_db_sql_destroy_post; + int HP_account_db_sql_get_property_pre; + int HP_account_db_sql_get_property_post; + int HP_account_db_sql_set_property_pre; + int HP_account_db_sql_set_property_post; + int HP_account_db_sql_create_pre; + int HP_account_db_sql_create_post; + int HP_account_db_sql_remove_pre; + int HP_account_db_sql_remove_post; + int HP_account_db_sql_save_pre; + int HP_account_db_sql_save_post; + int HP_account_db_sql_load_num_pre; + int HP_account_db_sql_load_num_post; + int HP_account_db_sql_load_str_pre; + int HP_account_db_sql_load_str_post; + int HP_account_db_sql_iterator_pre; + int HP_account_db_sql_iterator_post; + int HP_account_db_sql_iter_destroy_pre; + int HP_account_db_sql_iter_destroy_post; + int HP_account_db_sql_iter_next_pre; + int HP_account_db_sql_iter_next_post; + int HP_account_db_read_inter_pre; + int HP_account_db_read_inter_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; @@ -691,6 +939,92 @@ struct { int HP_DB_init_post; int HP_DB_final_pre; int HP_DB_final_post; + int HP_des_decrypt_block_pre; + int HP_des_decrypt_block_post; + int HP_des_decrypt_pre; + int HP_des_decrypt_post; + int HP_ipban_init_pre; + int HP_ipban_init_post; + int HP_ipban_final_pre; + int HP_ipban_final_post; + int HP_ipban_cleanup_pre; + int HP_ipban_cleanup_post; + int HP_ipban_config_read_inter_pre; + int HP_ipban_config_read_inter_post; + int HP_ipban_config_read_connection_pre; + int HP_ipban_config_read_connection_post; + int HP_ipban_config_read_dynamic_pre; + int HP_ipban_config_read_dynamic_post; + int HP_ipban_config_read_pre; + int HP_ipban_config_read_post; + int HP_ipban_check_pre; + int HP_ipban_check_post; + int HP_ipban_log_pre; + int HP_ipban_log_post; + int HP_lchrif_server_init_pre; + int HP_lchrif_server_init_post; + int HP_lchrif_server_destroy_pre; + int HP_lchrif_server_destroy_post; + int HP_lchrif_server_reset_pre; + int HP_lchrif_server_reset_post; + int HP_lchrif_on_disconnect_pre; + int HP_lchrif_on_disconnect_post; + int HP_lclif_init_pre; + int HP_lclif_init_post; + int HP_lclif_final_pre; + int HP_lclif_final_post; + int HP_lclif_connection_error_pre; + int HP_lclif_connection_error_post; + int HP_lclif_server_list_pre; + int HP_lclif_server_list_post; + int HP_lclif_auth_failed_pre; + int HP_lclif_auth_failed_post; + int HP_lclif_login_error_pre; + int HP_lclif_login_error_post; + int HP_lclif_coding_key_pre; + int HP_lclif_coding_key_post; + int HP_lclif_packet_pre; + int HP_lclif_packet_post; + int HP_lclif_parse_packet_pre; + int HP_lclif_parse_packet_post; + int HP_lclif_parse_pre; + int HP_lclif_parse_post; + int HP_PRIV__lclif_packetdb_loaddb_pre; + int HP_PRIV__lclif_packetdb_loaddb_post; + int HP_PRIV__lclif_parse_sub_pre; + int HP_PRIV__lclif_parse_sub_post; + int HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre; + int HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post; + int HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre; + int HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post; + int HP_PRIV__lclif_parse_CA_LOGIN_pre; + int HP_PRIV__lclif_parse_CA_LOGIN_post; + int HP_PRIV__lclif_parse_CA_LOGIN2_pre; + int HP_PRIV__lclif_parse_CA_LOGIN2_post; + int HP_PRIV__lclif_parse_CA_LOGIN3_pre; + int HP_PRIV__lclif_parse_CA_LOGIN3_post; + int HP_PRIV__lclif_parse_CA_LOGIN4_pre; + int HP_PRIV__lclif_parse_CA_LOGIN4_post; + int HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre; + int HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post; + int HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre; + int HP_PRIV__lclif_parse_CA_LOGIN_HAN_post; + int HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre; + int HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post; + int HP_PRIV__lclif_parse_CA_LOGIN_OTP_pre; + int HP_PRIV__lclif_parse_CA_LOGIN_OTP_post; + int HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre; + int HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post; + int HP_PRIV__lclif_parse_CA_OTP_CODE_pre; + int HP_PRIV__lclif_parse_CA_OTP_CODE_post; + int HP_PRIV__lclif_parse_CA_REQ_HASH_pre; + int HP_PRIV__lclif_parse_CA_REQ_HASH_post; + int HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre; + int HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post; + int HP_libconfig_set_db_path_pre; + int HP_libconfig_set_db_path_post; + int HP_libconfig_format_db_path_pre; + int HP_libconfig_format_db_path_post; int HP_libconfig_read_pre; int HP_libconfig_read_post; int HP_libconfig_write_pre; @@ -909,66 +1243,122 @@ struct { int HP_login_fromchar_parse_accinfo_post; int HP_login_parse_fromchar_pre; int HP_login_parse_fromchar_post; - int HP_login_connection_problem_pre; - int HP_login_connection_problem_post; int HP_login_kick_pre; int HP_login_kick_post; int HP_login_auth_ok_pre; int HP_login_auth_ok_post; int HP_login_auth_failed_pre; int HP_login_auth_failed_post; - int HP_login_login_error_pre; - int HP_login_login_error_post; - int HP_login_parse_ping_pre; - int HP_login_parse_ping_post; - int HP_login_parse_client_md5_pre; - int HP_login_parse_client_md5_post; - int HP_login_parse_client_login_pre; - int HP_login_parse_client_login_post; - int HP_login_send_coding_key_pre; - int HP_login_send_coding_key_post; - int HP_login_parse_request_coding_key_pre; - int HP_login_parse_request_coding_key_post; + int HP_login_client_login_pre; + int HP_login_client_login_post; + int HP_login_client_login_otp_pre; + int HP_login_client_login_otp_post; + int HP_login_client_login_mobile_otp_request_pre; + int HP_login_client_login_mobile_otp_request_post; int HP_login_char_server_connection_status_pre; int HP_login_char_server_connection_status_post; int HP_login_parse_request_connection_pre; int HP_login_parse_request_connection_post; - int HP_login_parse_login_pre; - int HP_login_parse_login_post; int HP_login_config_set_defaults_pre; int HP_login_config_set_defaults_post; int HP_login_config_read_pre; int HP_login_config_read_post; - int HP_iMalloc_init_pre; - int HP_iMalloc_init_post; - int HP_iMalloc_final_pre; - int HP_iMalloc_final_post; - int HP_iMalloc_malloc_pre; - int HP_iMalloc_malloc_post; - int HP_iMalloc_calloc_pre; - int HP_iMalloc_calloc_post; - int HP_iMalloc_realloc_pre; - int HP_iMalloc_realloc_post; - int HP_iMalloc_reallocz_pre; - int HP_iMalloc_reallocz_post; - int HP_iMalloc_astrdup_pre; - int HP_iMalloc_astrdup_post; - int HP_iMalloc_astrndup_pre; - int HP_iMalloc_astrndup_post; - int HP_iMalloc_free_pre; - int HP_iMalloc_free_post; - int HP_iMalloc_memory_check_pre; - int HP_iMalloc_memory_check_post; - int HP_iMalloc_verify_ptr_pre; - int HP_iMalloc_verify_ptr_post; - int HP_iMalloc_usage_pre; - int HP_iMalloc_usage_post; - int HP_iMalloc_post_shutdown_pre; - int HP_iMalloc_post_shutdown_post; - int HP_iMalloc_init_messages_pre; - int HP_iMalloc_init_messages_post; + int HP_login_config_read_inter_pre; + int HP_login_config_read_inter_post; + int HP_login_config_read_console_pre; + int HP_login_config_read_console_post; + int HP_login_config_read_log_pre; + int HP_login_config_read_log_post; + int HP_login_config_read_account_pre; + int HP_login_config_read_account_post; + int HP_login_config_read_permission_pre; + int HP_login_config_read_permission_post; + int HP_login_config_read_permission_hash_pre; + int HP_login_config_read_permission_hash_post; + int HP_login_config_read_permission_blacklist_pre; + int HP_login_config_read_permission_blacklist_post; + int HP_login_config_read_users_pre; + int HP_login_config_read_users_post; + int HP_login_clear_dnsbl_servers_pre; + int HP_login_clear_dnsbl_servers_post; + int HP_login_config_set_dnsbl_servers_pre; + int HP_login_config_set_dnsbl_servers_post; + int HP_login_clear_client_hash_nodes_pre; + int HP_login_clear_client_hash_nodes_post; + int HP_login_config_set_md5hash_pre; + int HP_login_config_set_md5hash_post; + int HP_login_convert_users_to_colors_pre; + int HP_login_convert_users_to_colors_post; + int HP_loginlog_failedattempts_pre; + int HP_loginlog_failedattempts_post; + int HP_loginlog_log_pre; + int HP_loginlog_log_post; + int HP_loginlog_init_pre; + int HP_loginlog_init_post; + int HP_loginlog_final_pre; + int HP_loginlog_final_post; + int HP_loginlog_config_read_names_pre; + int HP_loginlog_config_read_names_post; + int HP_loginlog_config_read_log_pre; + int HP_loginlog_config_read_log_post; + int HP_loginlog_config_read_pre; + int HP_loginlog_config_read_post; + int HP_md5_string_pre; + int HP_md5_string_post; + int HP_md5_binary_pre; + int HP_md5_binary_post; + int HP_md5_salt_pre; + int HP_md5_salt_post; + int HP_mutex_create_pre; + int HP_mutex_create_post; + int HP_mutex_destroy_pre; + int HP_mutex_destroy_post; + int HP_mutex_lock_pre; + int HP_mutex_lock_post; + int HP_mutex_trylock_pre; + int HP_mutex_trylock_post; + int HP_mutex_unlock_pre; + int HP_mutex_unlock_post; + int HP_mutex_cond_create_pre; + int HP_mutex_cond_create_post; + int HP_mutex_cond_destroy_pre; + int HP_mutex_cond_destroy_post; + int HP_mutex_cond_wait_pre; + int HP_mutex_cond_wait_post; + int HP_mutex_cond_signal_pre; + int HP_mutex_cond_signal_post; + int HP_mutex_cond_broadcast_pre; + int HP_mutex_cond_broadcast_post; + int HP_nullpo_init_pre; + int HP_nullpo_init_post; + int HP_nullpo_final_pre; + int HP_nullpo_final_post; int HP_nullpo_assert_report_pre; int HP_nullpo_assert_report_post; + int HP_packets_init_pre; + int HP_packets_init_post; + int HP_packets_final_pre; + int HP_packets_final_post; + int HP_packets_addLens_pre; + int HP_packets_addLens_post; + int HP_packets_addLen_pre; + int HP_packets_addLen_post; + int HP_rnd_init_pre; + int HP_rnd_init_post; + int HP_rnd_final_pre; + int HP_rnd_final_post; + int HP_rnd_seed_pre; + int HP_rnd_seed_post; + int HP_rnd_random_pre; + int HP_rnd_random_post; + int HP_rnd_roll_pre; + int HP_rnd_roll_post; + int HP_rnd_value_pre; + int HP_rnd_value_post; + int HP_rnd_uniform_pre; + int HP_rnd_uniform_post; + int HP_rnd_uniform53_pre; + int HP_rnd_uniform53_post; int HP_showmsg_init_pre; int HP_showmsg_init_post; int HP_showmsg_final_pre; @@ -995,10 +1385,14 @@ struct { int HP_sockt_realloc_writefifo_post; int HP_sockt_wfifoset_pre; int HP_sockt_wfifoset_post; + int HP_sockt_wfifohead_pre; + int HP_sockt_wfifohead_post; int HP_sockt_rfifoskip_pre; int HP_sockt_rfifoskip_post; int HP_sockt_close_pre; int HP_sockt_close_post; + int HP_sockt_validateWfifo_pre; + int HP_sockt_validateWfifo_post; int HP_sockt_session_is_valid_pre; int HP_sockt_session_is_valid_post; int HP_sockt_session_is_active_pre; @@ -1007,6 +1401,8 @@ struct { int HP_sockt_flush_post; int HP_sockt_flush_fifos_pre; int HP_sockt_flush_fifos_post; + int HP_sockt_connect_client_pre; + int HP_sockt_connect_client_post; int HP_sockt_set_nonblocking_pre; int HP_sockt_set_nonblocking_post; int HP_sockt_set_defaultparse_pre; @@ -1197,6 +1593,28 @@ struct { int HP_sysinfo_init_post; int HP_sysinfo_final_pre; int HP_sysinfo_final_post; + int HP_thread_init_pre; + int HP_thread_init_post; + int HP_thread_final_pre; + int HP_thread_final_post; + int HP_thread_create_pre; + int HP_thread_create_post; + int HP_thread_create_opt_pre; + int HP_thread_create_opt_post; + int HP_thread_destroy_pre; + int HP_thread_destroy_post; + int HP_thread_self_pre; + int HP_thread_self_post; + int HP_thread_get_tid_pre; + int HP_thread_get_tid_post; + int HP_thread_wait_pre; + int HP_thread_wait_post; + int HP_thread_prio_set_pre; + int HP_thread_prio_set_post; + int HP_thread_prio_get_pre; + int HP_thread_prio_get_post; + int HP_thread_yield_pre; + int HP_thread_yield_post; int HP_timer_gettick_pre; int HP_timer_gettick_post; int HP_timer_gettick_nocache_pre; @@ -1227,14 +1645,24 @@ struct { struct { struct HCache_interface HCache; + struct account_interface account; struct cmdline_interface cmdline; struct console_interface console; struct core_interface core; struct db_interface DB; + struct des_interface des; + struct ipban_interface ipban; + struct lchrif_interface lchrif; + struct lclif_interface lclif; + struct lclif_interface_private PRIV__lclif; struct libconfig_interface libconfig; struct login_interface login; - struct malloc_interface iMalloc; + struct loginlog_interface loginlog; + struct md5_interface md5; + struct mutex_interface mutex; struct nullpo_interface nullpo; + struct packets_interface packets; + struct rnd_interface rnd; struct showmsg_interface showmsg; struct socket_interface sockt; struct sql_interface SQL; @@ -1242,5 +1670,6 @@ struct { struct strlib_interface strlib; struct sv_interface sv; struct sysinfo_interface sysinfo; + struct thread_interface thread; struct timer_interface timer; } source; diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc index 0460f4ca4..61864325b 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc @@ -1,7 +1,8 @@ /** * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,26 +23,48 @@ * as it will get overwritten. */ +/* GENERATED FILE DO NOT EDIT */ + struct HookingPointData HookingPoints[] = { -/* HCache */ +/* HCache_interface */ { HP_POP(HCache->init, HP_HCache_init) }, { HP_POP(HCache->check, HP_HCache_check) }, { HP_POP(HCache->open, HP_HCache_open) }, -/* cmdline */ +/* account_interface */ + { HP_POP(account->db_sql_up, HP_account_db_sql_up) }, + { HP_POP(account->mmo_send_accreg2, HP_account_mmo_send_accreg2) }, + { HP_POP(account->mmo_save_accreg2, HP_account_mmo_save_accreg2) }, + { HP_POP(account->mmo_auth_fromsql, HP_account_mmo_auth_fromsql) }, + { HP_POP(account->mmo_auth_tosql, HP_account_mmo_auth_tosql) }, + { HP_POP(account->db_sql, HP_account_db_sql) }, + { HP_POP(account->db_sql_init, HP_account_db_sql_init) }, + { HP_POP(account->db_sql_destroy, HP_account_db_sql_destroy) }, + { HP_POP(account->db_sql_get_property, HP_account_db_sql_get_property) }, + { HP_POP(account->db_sql_set_property, HP_account_db_sql_set_property) }, + { HP_POP(account->db_sql_create, HP_account_db_sql_create) }, + { HP_POP(account->db_sql_remove, HP_account_db_sql_remove) }, + { HP_POP(account->db_sql_save, HP_account_db_sql_save) }, + { HP_POP(account->db_sql_load_num, HP_account_db_sql_load_num) }, + { HP_POP(account->db_sql_load_str, HP_account_db_sql_load_str) }, + { HP_POP(account->db_sql_iterator, HP_account_db_sql_iterator) }, + { HP_POP(account->db_sql_iter_destroy, HP_account_db_sql_iter_destroy) }, + { HP_POP(account->db_sql_iter_next, HP_account_db_sql_iter_next) }, + { HP_POP(account->db_read_inter, HP_account_db_read_inter) }, +/* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, { HP_POP(cmdline->arg_add, HP_cmdline_arg_add) }, { HP_POP(cmdline->exec, HP_cmdline_exec) }, { HP_POP(cmdline->arg_next_value, HP_cmdline_arg_next_value) }, { HP_POP(cmdline->arg_source, HP_cmdline_arg_source) }, -/* console */ +/* console_interface */ { HP_POP(console->init, HP_console_init) }, { HP_POP(console->final, HP_console_final) }, { HP_POP(console->display_title, HP_console_display_title) }, { HP_POP(console->display_gplnotice, HP_console_display_gplnotice) }, -/* core */ +/* core_interface */ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) }, -/* DB */ +/* db_interface */ { HP_POP(DB->fix_options, HP_DB_fix_options) }, { HP_POP(DB->default_cmp, HP_DB_default_cmp) }, { HP_POP(DB->default_hash, HP_DB_default_hash) }, @@ -61,7 +84,55 @@ struct HookingPointData HookingPoints[] = { { HP_POP(DB->data2ptr, HP_DB_data2ptr) }, { HP_POP(DB->init, HP_DB_init) }, { HP_POP(DB->final, HP_DB_final) }, -/* libconfig */ +/* des_interface */ + { HP_POP(des->decrypt_block, HP_des_decrypt_block) }, + { HP_POP(des->decrypt, HP_des_decrypt) }, +/* ipban_interface */ + { HP_POP(ipban->init, HP_ipban_init) }, + { HP_POP(ipban->final, HP_ipban_final) }, + { HP_POP(ipban->cleanup, HP_ipban_cleanup) }, + { HP_POP(ipban->config_read_inter, HP_ipban_config_read_inter) }, + { HP_POP(ipban->config_read_connection, HP_ipban_config_read_connection) }, + { HP_POP(ipban->config_read_dynamic, HP_ipban_config_read_dynamic) }, + { HP_POP(ipban->config_read, HP_ipban_config_read) }, + { HP_POP(ipban->check, HP_ipban_check) }, + { HP_POP(ipban->log, HP_ipban_log) }, +/* lchrif_interface */ + { HP_POP(lchrif->server_init, HP_lchrif_server_init) }, + { HP_POP(lchrif->server_destroy, HP_lchrif_server_destroy) }, + { HP_POP(lchrif->server_reset, HP_lchrif_server_reset) }, + { HP_POP(lchrif->on_disconnect, HP_lchrif_on_disconnect) }, +/* lclif_interface */ + { HP_POP(lclif->init, HP_lclif_init) }, + { HP_POP(lclif->final, HP_lclif_final) }, + { HP_POP(lclif->connection_error, HP_lclif_connection_error) }, + { HP_POP(lclif->server_list, HP_lclif_server_list) }, + { HP_POP(lclif->auth_failed, HP_lclif_auth_failed) }, + { HP_POP(lclif->login_error, HP_lclif_login_error) }, + { HP_POP(lclif->coding_key, HP_lclif_coding_key) }, + { HP_POP(lclif->packet, HP_lclif_packet) }, + { HP_POP(lclif->parse_packet, HP_lclif_parse_packet) }, + { HP_POP(lclif->parse, HP_lclif_parse) }, +/* lclif_interface_private */ + { HP_POP(lclif->p->packetdb_loaddb, HP_PRIV__lclif_packetdb_loaddb) }, + { HP_POP(lclif->p->parse_sub, HP_PRIV__lclif_parse_sub) }, + { HP_POP(lclif->p->parse_CA_CONNECT_INFO_CHANGED, HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED) }, + { HP_POP(lclif->p->parse_CA_EXE_HASHCHECK, HP_PRIV__lclif_parse_CA_EXE_HASHCHECK) }, + { HP_POP(lclif->p->parse_CA_LOGIN, HP_PRIV__lclif_parse_CA_LOGIN) }, + { HP_POP(lclif->p->parse_CA_LOGIN2, HP_PRIV__lclif_parse_CA_LOGIN2) }, + { HP_POP(lclif->p->parse_CA_LOGIN3, HP_PRIV__lclif_parse_CA_LOGIN3) }, + { HP_POP(lclif->p->parse_CA_LOGIN4, HP_PRIV__lclif_parse_CA_LOGIN4) }, + { HP_POP(lclif->p->parse_CA_LOGIN_PCBANG, HP_PRIV__lclif_parse_CA_LOGIN_PCBANG) }, + { HP_POP(lclif->p->parse_CA_LOGIN_HAN, HP_PRIV__lclif_parse_CA_LOGIN_HAN) }, + { HP_POP(lclif->p->parse_CA_SSO_LOGIN_REQ, HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ) }, + { HP_POP(lclif->p->parse_CA_LOGIN_OTP, HP_PRIV__lclif_parse_CA_LOGIN_OTP) }, + { HP_POP(lclif->p->parse_CA_ACK_MOBILE_OTP, HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP) }, + { HP_POP(lclif->p->parse_CA_OTP_CODE, HP_PRIV__lclif_parse_CA_OTP_CODE) }, + { HP_POP(lclif->p->parse_CA_REQ_HASH, HP_PRIV__lclif_parse_CA_REQ_HASH) }, + { HP_POP(lclif->p->parse_CA_CHARSERVERCONNECT, HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT) }, +/* libconfig_interface */ + { HP_POP(libconfig->set_db_path, HP_libconfig_set_db_path) }, + { HP_POP(libconfig->format_db_path, HP_libconfig_format_db_path) }, { HP_POP(libconfig->read, HP_libconfig_read) }, { HP_POP(libconfig->write, HP_libconfig_write) }, { HP_POP(libconfig->set_options, HP_libconfig_set_options) }, @@ -130,7 +201,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(libconfig->setting_lookup_int16, HP_libconfig_setting_lookup_int16) }, { HP_POP(libconfig->setting_lookup_mutable_string, HP_libconfig_setting_lookup_mutable_string) }, { HP_POP(libconfig->lookup_mutable_string, HP_libconfig_lookup_mutable_string) }, -/* login */ +/* login_interface */ { HP_POP(login->mmo_auth, HP_login_mmo_auth) }, { HP_POP(login->mmo_auth_new, HP_login_mmo_auth_new) }, { HP_POP(login->waiting_disconnect_timer, HP_login_waiting_disconnect_timer) }, @@ -172,44 +243,76 @@ struct HookingPointData HookingPoints[] = { { HP_POP(login->fromchar_parse_wrong_pincode, HP_login_fromchar_parse_wrong_pincode) }, { HP_POP(login->fromchar_parse_accinfo, HP_login_fromchar_parse_accinfo) }, { HP_POP(login->parse_fromchar, HP_login_parse_fromchar) }, - { HP_POP(login->connection_problem, HP_login_connection_problem) }, { HP_POP(login->kick, HP_login_kick) }, { HP_POP(login->auth_ok, HP_login_auth_ok) }, { HP_POP(login->auth_failed, HP_login_auth_failed) }, - { HP_POP(login->login_error, HP_login_login_error) }, - { HP_POP(login->parse_ping, HP_login_parse_ping) }, - { HP_POP(login->parse_client_md5, HP_login_parse_client_md5) }, - { HP_POP(login->parse_client_login, HP_login_parse_client_login) }, - { HP_POP(login->send_coding_key, HP_login_send_coding_key) }, - { HP_POP(login->parse_request_coding_key, HP_login_parse_request_coding_key) }, + { HP_POP(login->client_login, HP_login_client_login) }, + { HP_POP(login->client_login_otp, HP_login_client_login_otp) }, + { HP_POP(login->client_login_mobile_otp_request, HP_login_client_login_mobile_otp_request) }, { HP_POP(login->char_server_connection_status, HP_login_char_server_connection_status) }, { HP_POP(login->parse_request_connection, HP_login_parse_request_connection) }, - { HP_POP(login->parse_login, HP_login_parse_login) }, { HP_POP(login->config_set_defaults, HP_login_config_set_defaults) }, { HP_POP(login->config_read, HP_login_config_read) }, -/* iMalloc */ - { HP_POP(iMalloc->init, HP_iMalloc_init) }, - { HP_POP(iMalloc->final, HP_iMalloc_final) }, - { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, - { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) }, - { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) }, - { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) }, - { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) }, - { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) }, - { HP_POP(iMalloc->free, HP_iMalloc_free) }, - { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) }, - { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) }, - { HP_POP(iMalloc->usage, HP_iMalloc_usage) }, - { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) }, - { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) }, -/* nullpo */ + { HP_POP(login->config_read_inter, HP_login_config_read_inter) }, + { HP_POP(login->config_read_console, HP_login_config_read_console) }, + { HP_POP(login->config_read_log, HP_login_config_read_log) }, + { HP_POP(login->config_read_account, HP_login_config_read_account) }, + { HP_POP(login->config_read_permission, HP_login_config_read_permission) }, + { HP_POP(login->config_read_permission_hash, HP_login_config_read_permission_hash) }, + { HP_POP(login->config_read_permission_blacklist, HP_login_config_read_permission_blacklist) }, + { HP_POP(login->config_read_users, HP_login_config_read_users) }, + { HP_POP(login->clear_dnsbl_servers, HP_login_clear_dnsbl_servers) }, + { HP_POP(login->config_set_dnsbl_servers, HP_login_config_set_dnsbl_servers) }, + { HP_POP(login->clear_client_hash_nodes, HP_login_clear_client_hash_nodes) }, + { HP_POP(login->config_set_md5hash, HP_login_config_set_md5hash) }, + { HP_POP(login->convert_users_to_colors, HP_login_convert_users_to_colors) }, +/* loginlog_interface */ + { HP_POP(loginlog->failedattempts, HP_loginlog_failedattempts) }, + { HP_POP(loginlog->log, HP_loginlog_log) }, + { HP_POP(loginlog->init, HP_loginlog_init) }, + { HP_POP(loginlog->final, HP_loginlog_final) }, + { HP_POP(loginlog->config_read_names, HP_loginlog_config_read_names) }, + { HP_POP(loginlog->config_read_log, HP_loginlog_config_read_log) }, + { HP_POP(loginlog->config_read, HP_loginlog_config_read) }, +/* md5_interface */ + { HP_POP(md5->string, HP_md5_string) }, + { HP_POP(md5->binary, HP_md5_binary) }, + { HP_POP(md5->salt, HP_md5_salt) }, +/* mutex_interface */ + { HP_POP(mutex->create, HP_mutex_create) }, + { HP_POP(mutex->destroy, HP_mutex_destroy) }, + { HP_POP(mutex->lock, HP_mutex_lock) }, + { HP_POP(mutex->trylock, HP_mutex_trylock) }, + { HP_POP(mutex->unlock, HP_mutex_unlock) }, + { HP_POP(mutex->cond_create, HP_mutex_cond_create) }, + { HP_POP(mutex->cond_destroy, HP_mutex_cond_destroy) }, + { HP_POP(mutex->cond_wait, HP_mutex_cond_wait) }, + { HP_POP(mutex->cond_signal, HP_mutex_cond_signal) }, + { HP_POP(mutex->cond_broadcast, HP_mutex_cond_broadcast) }, +/* nullpo_interface */ + { HP_POP(nullpo->init, HP_nullpo_init) }, + { HP_POP(nullpo->final, HP_nullpo_final) }, { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, -/* showmsg */ +/* packets_interface */ + { HP_POP(packets->init, HP_packets_init) }, + { HP_POP(packets->final, HP_packets_final) }, + { HP_POP(packets->addLens, HP_packets_addLens) }, + { HP_POP(packets->addLen, HP_packets_addLen) }, +/* rnd_interface */ + { HP_POP(rnd->init, HP_rnd_init) }, + { HP_POP(rnd->final, HP_rnd_final) }, + { HP_POP(rnd->seed, HP_rnd_seed) }, + { HP_POP(rnd->random, HP_rnd_random) }, + { HP_POP(rnd->roll, HP_rnd_roll) }, + { HP_POP(rnd->value, HP_rnd_value) }, + { HP_POP(rnd->uniform, HP_rnd_uniform) }, + { HP_POP(rnd->uniform53, HP_rnd_uniform53) }, +/* showmsg_interface */ { HP_POP(showmsg->init, HP_showmsg_init) }, { HP_POP(showmsg->final, HP_showmsg_final) }, { HP_POP(showmsg->clearScreen, HP_showmsg_clearScreen) }, { HP_POP(showmsg->showMessageV, HP_showmsg_showMessageV) }, -/* sockt */ +/* socket_interface */ { HP_POP(sockt->init, HP_sockt_init) }, { HP_POP(sockt->final, HP_sockt_final) }, { HP_POP(sockt->perform, HP_sockt_perform) }, @@ -219,12 +322,15 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) }, { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) }, { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) }, + { HP_POP(sockt->wfifohead, HP_sockt_wfifohead) }, { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) }, { HP_POP(sockt->close, HP_sockt_close) }, + { HP_POP(sockt->validateWfifo, HP_sockt_validateWfifo) }, { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) }, { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) }, { HP_POP(sockt->flush, HP_sockt_flush) }, { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) }, + { HP_POP(sockt->connect_client, HP_sockt_connect_client) }, { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) }, { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) }, { HP_POP(sockt->host2ip, HP_sockt_host2ip) }, @@ -238,7 +344,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sockt->trusted_ip_check, HP_sockt_trusted_ip_check) }, { HP_POP(sockt->net_config_read_sub, HP_sockt_net_config_read_sub) }, { HP_POP(sockt->net_config_read, HP_sockt_net_config_read) }, -/* SQL */ +/* sql_interface */ { HP_POP(SQL->Connect, HP_SQL_Connect) }, { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) }, { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) }, @@ -271,7 +377,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) }, { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) }, { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) }, -/* StrBuf */ +/* stringbuf_interface */ { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) }, { HP_POP(StrBuf->Init, HP_StrBuf_Init) }, { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) }, @@ -282,7 +388,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) }, { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) }, { HP_POP(StrBuf->Free, HP_StrBuf_Free) }, -/* strlib */ +/* strlib_interface */ { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) }, { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) }, { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) }, @@ -298,7 +404,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) }, { HP_POP(strlib->strline_, HP_strlib_strline_) }, { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) }, -/* sv */ +/* sv_interface */ { HP_POP(sv->parse_next, HP_sv_parse_next) }, { HP_POP(sv->parse, HP_sv_parse) }, { HP_POP(sv->split, HP_sv_split) }, @@ -306,7 +412,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sv->unescape_c, HP_sv_unescape_c) }, { HP_POP(sv->skip_escaped_c, HP_sv_skip_escaped_c) }, { HP_POP(sv->readdb, HP_sv_readdb) }, -/* sysinfo */ +/* sysinfo_interface */ { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) }, { HP_POP(sysinfo->platform, HP_sysinfo_platform) }, { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) }, @@ -325,7 +431,19 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) }, { HP_POP(sysinfo->init, HP_sysinfo_init) }, { HP_POP(sysinfo->final, HP_sysinfo_final) }, -/* timer */ +/* thread_interface */ + { HP_POP(thread->init, HP_thread_init) }, + { HP_POP(thread->final, HP_thread_final) }, + { HP_POP(thread->create, HP_thread_create) }, + { HP_POP(thread->create_opt, HP_thread_create_opt) }, + { HP_POP(thread->destroy, HP_thread_destroy) }, + { HP_POP(thread->self, HP_thread_self) }, + { HP_POP(thread->get_tid, HP_thread_get_tid) }, + { HP_POP(thread->wait, HP_thread_wait) }, + { HP_POP(thread->prio_set, HP_thread_prio_set) }, + { HP_POP(thread->prio_get, HP_thread_prio_get) }, + { HP_POP(thread->yield, HP_thread_yield) }, +/* timer_interface */ { HP_POP(timer->gettick, HP_timer_gettick) }, { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) }, { HP_POP(timer->add, HP_timer_add) }, diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc index d49998deb..1c1817276 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,17 +23,19 @@ * as it will get overwritten. */ -/* HCache */ +/* GENERATED FILE DO NOT EDIT */ + +/* HCache_interface */ void HP_HCache_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_HCache_init_pre ) { + if (HPMHooks.count.HP_HCache_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41,9 +43,9 @@ void HP_HCache_init(void) { { HPMHooks.source.HCache.init(); } - if( HPMHooks.count.HP_HCache_init_post ) { + if (HPMHooks.count.HP_HCache_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func; postHookFunc(); } @@ -53,14 +55,14 @@ void HP_HCache_init(void) { bool HP_HCache_check(const char *file) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_HCache_check_pre ) { - bool (*preHookFunc) (const char *file); + if (HPMHooks.count.HP_HCache_check_pre > 0) { + bool (*preHookFunc) (const char **file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func; - retVal___ = preHookFunc(file); + retVal___ = preHookFunc(&file); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68,9 +70,9 @@ bool HP_HCache_check(const char *file) { { retVal___ = HPMHooks.source.HCache.check(file); } - if( HPMHooks.count.HP_HCache_check_post ) { + if (HPMHooks.count.HP_HCache_check_post > 0) { bool (*postHookFunc) (bool retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, file); } @@ -80,14 +82,14 @@ bool HP_HCache_check(const char *file) { FILE* HP_HCache_open(const char *file, const char *opt) { int hIndex = 0; FILE* retVal___ = NULL; - if( HPMHooks.count.HP_HCache_open_pre ) { - FILE* (*preHookFunc) (const char *file, const char *opt); + if (HPMHooks.count.HP_HCache_open_pre > 0) { + FILE* (*preHookFunc) (const char **file, const char **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func; - retVal___ = preHookFunc(file, opt); + retVal___ = preHookFunc(&file, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -95,26 +97,536 @@ FILE* HP_HCache_open(const char *file, const char *opt) { { retVal___ = HPMHooks.source.HCache.open(file, opt); } - if( HPMHooks.count.HP_HCache_open_post ) { + if (HPMHooks.count.HP_HCache_open_post > 0) { FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, file, opt); } } return retVal___; } -/* cmdline */ +/* account_interface */ +struct Sql* HP_account_db_sql_up(AccountDB *self) { + int hIndex = 0; + struct Sql* retVal___ = NULL; + if (HPMHooks.count.HP_account_db_sql_up_pre > 0) { + struct Sql* (*preHookFunc) (AccountDB **self); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_up_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_up_pre[hIndex].func; + retVal___ = preHookFunc(&self); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql_up(self); + } + if (HPMHooks.count.HP_account_db_sql_up_post > 0) { + struct Sql* (*postHookFunc) (struct Sql* retVal___, AccountDB *self); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_up_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_up_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +void HP_account_mmo_send_accreg2(AccountDB *self, int fd, int account_id, int char_id) { + int hIndex = 0; + if (HPMHooks.count.HP_account_mmo_send_accreg2_pre > 0) { + void (*preHookFunc) (AccountDB **self, int *fd, int *account_id, int *char_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_send_accreg2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_mmo_send_accreg2_pre[hIndex].func; + preHookFunc(&self, &fd, &account_id, &char_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.account.mmo_send_accreg2(self, fd, account_id, char_id); + } + if (HPMHooks.count.HP_account_mmo_send_accreg2_post > 0) { + void (*postHookFunc) (AccountDB *self, int fd, int account_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_send_accreg2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_mmo_send_accreg2_post[hIndex].func; + postHookFunc(self, fd, account_id, char_id); + } + } + return; +} +void HP_account_mmo_save_accreg2(AccountDB *self, int fd, int account_id, int char_id) { + int hIndex = 0; + if (HPMHooks.count.HP_account_mmo_save_accreg2_pre > 0) { + void (*preHookFunc) (AccountDB **self, int *fd, int *account_id, int *char_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_save_accreg2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_mmo_save_accreg2_pre[hIndex].func; + preHookFunc(&self, &fd, &account_id, &char_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.account.mmo_save_accreg2(self, fd, account_id, char_id); + } + if (HPMHooks.count.HP_account_mmo_save_accreg2_post > 0) { + void (*postHookFunc) (AccountDB *self, int fd, int account_id, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_save_accreg2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_mmo_save_accreg2_post[hIndex].func; + postHookFunc(self, fd, account_id, char_id); + } + } + return; +} +bool HP_account_mmo_auth_fromsql(AccountDB_SQL *db, struct mmo_account *acc, int account_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_mmo_auth_fromsql_pre > 0) { + bool (*preHookFunc) (AccountDB_SQL **db, struct mmo_account **acc, int *account_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_auth_fromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_mmo_auth_fromsql_pre[hIndex].func; + retVal___ = preHookFunc(&db, &acc, &account_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.mmo_auth_fromsql(db, acc, account_id); + } + if (HPMHooks.count.HP_account_mmo_auth_fromsql_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDB_SQL *db, struct mmo_account *acc, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_auth_fromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_mmo_auth_fromsql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, db, acc, account_id); + } + } + return retVal___; +} +bool HP_account_mmo_auth_tosql(AccountDB_SQL *db, const struct mmo_account *acc, bool is_new) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_mmo_auth_tosql_pre > 0) { + bool (*preHookFunc) (AccountDB_SQL **db, const struct mmo_account **acc, bool *is_new); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_auth_tosql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_mmo_auth_tosql_pre[hIndex].func; + retVal___ = preHookFunc(&db, &acc, &is_new); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.mmo_auth_tosql(db, acc, is_new); + } + if (HPMHooks.count.HP_account_mmo_auth_tosql_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDB_SQL *db, const struct mmo_account *acc, bool is_new); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_mmo_auth_tosql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_mmo_auth_tosql_post[hIndex].func; + retVal___ = postHookFunc(retVal___, db, acc, is_new); + } + } + return retVal___; +} +AccountDB* HP_account_db_sql(void) { + int hIndex = 0; + AccountDB* retVal___ = NULL; + if (HPMHooks.count.HP_account_db_sql_pre > 0) { + AccountDB* (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql(); + } + if (HPMHooks.count.HP_account_db_sql_post > 0) { + AccountDB* (*postHookFunc) (AccountDB* retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_account_db_sql_init(AccountDB *self) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_db_sql_init_pre > 0) { + bool (*preHookFunc) (AccountDB **self); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_init_pre[hIndex].func; + retVal___ = preHookFunc(&self); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql_init(self); + } + if (HPMHooks.count.HP_account_db_sql_init_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDB *self); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +void HP_account_db_sql_destroy(AccountDB *self) { + int hIndex = 0; + if (HPMHooks.count.HP_account_db_sql_destroy_pre > 0) { + void (*preHookFunc) (AccountDB **self); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_destroy_pre[hIndex].func; + preHookFunc(&self); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.account.db_sql_destroy(self); + } + if (HPMHooks.count.HP_account_db_sql_destroy_post > 0) { + void (*postHookFunc) (AccountDB *self); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_destroy_post[hIndex].func; + postHookFunc(self); + } + } + return; +} +bool HP_account_db_sql_get_property(AccountDB *self, const char *key, char *buf, size_t buflen) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_db_sql_get_property_pre > 0) { + bool (*preHookFunc) (AccountDB **self, const char **key, char **buf, size_t *buflen); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_get_property_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_get_property_pre[hIndex].func; + retVal___ = preHookFunc(&self, &key, &buf, &buflen); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql_get_property(self, key, buf, buflen); + } + if (HPMHooks.count.HP_account_db_sql_get_property_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDB *self, const char *key, char *buf, size_t buflen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_get_property_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_get_property_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, key, buf, buflen); + } + } + return retVal___; +} +bool HP_account_db_sql_set_property(AccountDB *self, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_db_sql_set_property_pre > 0) { + bool (*preHookFunc) (AccountDB **self, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_set_property_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_set_property_pre[hIndex].func; + retVal___ = preHookFunc(&self, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql_set_property(self, config, imported); + } + if (HPMHooks.count.HP_account_db_sql_set_property_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDB *self, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_set_property_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_set_property_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, config, imported); + } + } + return retVal___; +} +bool HP_account_db_sql_create(AccountDB *self, struct mmo_account *acc) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_db_sql_create_pre > 0) { + bool (*preHookFunc) (AccountDB **self, struct mmo_account **acc); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_create_pre[hIndex].func; + retVal___ = preHookFunc(&self, &acc); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql_create(self, acc); + } + if (HPMHooks.count.HP_account_db_sql_create_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDB *self, struct mmo_account *acc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, acc); + } + } + return retVal___; +} +bool HP_account_db_sql_remove(AccountDB *self, const int account_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_db_sql_remove_pre > 0) { + bool (*preHookFunc) (AccountDB **self, const int *account_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_remove_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_remove_pre[hIndex].func; + retVal___ = preHookFunc(&self, &account_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql_remove(self, account_id); + } + if (HPMHooks.count.HP_account_db_sql_remove_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDB *self, const int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_remove_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_remove_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, account_id); + } + } + return retVal___; +} +bool HP_account_db_sql_save(AccountDB *self, const struct mmo_account *acc) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_db_sql_save_pre > 0) { + bool (*preHookFunc) (AccountDB **self, const struct mmo_account **acc); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_save_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_save_pre[hIndex].func; + retVal___ = preHookFunc(&self, &acc); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql_save(self, acc); + } + if (HPMHooks.count.HP_account_db_sql_save_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDB *self, const struct mmo_account *acc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_save_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_save_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, acc); + } + } + return retVal___; +} +bool HP_account_db_sql_load_num(AccountDB *self, struct mmo_account *acc, const int account_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_db_sql_load_num_pre > 0) { + bool (*preHookFunc) (AccountDB **self, struct mmo_account **acc, const int *account_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_load_num_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_load_num_pre[hIndex].func; + retVal___ = preHookFunc(&self, &acc, &account_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql_load_num(self, acc, account_id); + } + if (HPMHooks.count.HP_account_db_sql_load_num_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDB *self, struct mmo_account *acc, const int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_load_num_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_load_num_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, acc, account_id); + } + } + return retVal___; +} +bool HP_account_db_sql_load_str(AccountDB *self, struct mmo_account *acc, const char *userid) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_db_sql_load_str_pre > 0) { + bool (*preHookFunc) (AccountDB **self, struct mmo_account **acc, const char **userid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_load_str_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_load_str_pre[hIndex].func; + retVal___ = preHookFunc(&self, &acc, &userid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql_load_str(self, acc, userid); + } + if (HPMHooks.count.HP_account_db_sql_load_str_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDB *self, struct mmo_account *acc, const char *userid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_load_str_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_load_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, acc, userid); + } + } + return retVal___; +} +AccountDBIterator* HP_account_db_sql_iterator(AccountDB *self) { + int hIndex = 0; + AccountDBIterator* retVal___ = NULL; + if (HPMHooks.count.HP_account_db_sql_iterator_pre > 0) { + AccountDBIterator* (*preHookFunc) (AccountDB **self); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iterator_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_iterator_pre[hIndex].func; + retVal___ = preHookFunc(&self); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql_iterator(self); + } + if (HPMHooks.count.HP_account_db_sql_iterator_post > 0) { + AccountDBIterator* (*postHookFunc) (AccountDBIterator* retVal___, AccountDB *self); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iterator_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_iterator_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self); + } + } + return retVal___; +} +void HP_account_db_sql_iter_destroy(AccountDBIterator *self) { + int hIndex = 0; + if (HPMHooks.count.HP_account_db_sql_iter_destroy_pre > 0) { + void (*preHookFunc) (AccountDBIterator **self); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iter_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_iter_destroy_pre[hIndex].func; + preHookFunc(&self); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.account.db_sql_iter_destroy(self); + } + if (HPMHooks.count.HP_account_db_sql_iter_destroy_post > 0) { + void (*postHookFunc) (AccountDBIterator *self); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iter_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_iter_destroy_post[hIndex].func; + postHookFunc(self); + } + } + return; +} +bool HP_account_db_sql_iter_next(AccountDBIterator *self, struct mmo_account *acc) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_db_sql_iter_next_pre > 0) { + bool (*preHookFunc) (AccountDBIterator **self, struct mmo_account **acc); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iter_next_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_sql_iter_next_pre[hIndex].func; + retVal___ = preHookFunc(&self, &acc); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_sql_iter_next(self, acc); + } + if (HPMHooks.count.HP_account_db_sql_iter_next_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDBIterator *self, struct mmo_account *acc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_sql_iter_next_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_sql_iter_next_post[hIndex].func; + retVal___ = postHookFunc(retVal___, self, acc); + } + } + return retVal___; +} +bool HP_account_db_read_inter(AccountDB_SQL *db, const char *filename, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_account_db_read_inter_pre > 0) { + bool (*preHookFunc) (AccountDB_SQL **db, const char **filename, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_read_inter_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_account_db_read_inter_pre[hIndex].func; + retVal___ = preHookFunc(&db, &filename, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.account.db_read_inter(db, filename, imported); + } + if (HPMHooks.count.HP_account_db_read_inter_post > 0) { + bool (*postHookFunc) (bool retVal___, AccountDB_SQL *db, const char *filename, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_account_db_read_inter_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_account_db_read_inter_post[hIndex].func; + retVal___ = postHookFunc(retVal___, db, filename, imported); + } + } + return retVal___; +} +/* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_init_pre ) { + if (HPMHooks.count.HP_cmdline_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -122,9 +634,9 @@ void HP_cmdline_init(void) { { HPMHooks.source.cmdline.init(); } - if( HPMHooks.count.HP_cmdline_init_post ) { + if (HPMHooks.count.HP_cmdline_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func; postHookFunc(); } @@ -133,14 +645,14 @@ void HP_cmdline_init(void) { } void HP_cmdline_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_final_pre ) { + if (HPMHooks.count.HP_cmdline_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -148,9 +660,9 @@ void HP_cmdline_final(void) { { HPMHooks.source.cmdline.final(); } - if( HPMHooks.count.HP_cmdline_final_post ) { + if (HPMHooks.count.HP_cmdline_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func; postHookFunc(); } @@ -160,14 +672,14 @@ void HP_cmdline_final(void) { bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_add_pre ) { - bool (*preHookFunc) (unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); + if (HPMHooks.count.HP_cmdline_arg_add_pre > 0) { + bool (*preHookFunc) (unsigned int *pluginID, const char **name, char *shortname, CmdlineExecFunc *func, const char **help, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func; - retVal___ = preHookFunc(&pluginID, name, &shortname, &func, help, &options); + retVal___ = preHookFunc(&pluginID, &name, &shortname, &func, &help, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -175,11 +687,11 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, { retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options); } - if( HPMHooks.count.HP_cmdline_arg_add_post ) { - bool (*postHookFunc) (bool retVal___, unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) { + if (HPMHooks.count.HP_cmdline_arg_add_post > 0) { + bool (*postHookFunc) (bool retVal___, unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &pluginID, name, &shortname, &func, help, &options); + retVal___ = postHookFunc(retVal___, pluginID, name, shortname, func, help, options); } } return retVal___; @@ -187,14 +699,14 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, int HP_cmdline_exec(int argc, char **argv, unsigned int options) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_cmdline_exec_pre ) { - int (*preHookFunc) (int *argc, char **argv, unsigned int *options); + if (HPMHooks.count.HP_cmdline_exec_pre > 0) { + int (*preHookFunc) (int *argc, char ***argv, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func; - retVal___ = preHookFunc(&argc, argv, &options); + retVal___ = preHookFunc(&argc, &argv, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -202,11 +714,11 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { { retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options); } - if( HPMHooks.count.HP_cmdline_exec_post ) { - int (*postHookFunc) (int retVal___, int *argc, char **argv, unsigned int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) { + if (HPMHooks.count.HP_cmdline_exec_post > 0) { + int (*postHookFunc) (int retVal___, int argc, char **argv, unsigned int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &argc, argv, &options); + retVal___ = postHookFunc(retVal___, argc, argv, options); } } return retVal___; @@ -214,14 +726,14 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) { - bool (*preHookFunc) (const char *name, int *current_arg, int *argc); + if (HPMHooks.count.HP_cmdline_arg_next_value_pre > 0) { + bool (*preHookFunc) (const char **name, int *current_arg, int *argc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func; - retVal___ = preHookFunc(name, ¤t_arg, &argc); + retVal___ = preHookFunc(&name, ¤t_arg, &argc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -229,11 +741,11 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { { retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc); } - if( HPMHooks.count.HP_cmdline_arg_next_value_post ) { - bool (*postHookFunc) (bool retVal___, const char *name, int *current_arg, int *argc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) { + if (HPMHooks.count.HP_cmdline_arg_next_value_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *name, int current_arg, int argc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name, ¤t_arg, &argc); + retVal___ = postHookFunc(retVal___, name, current_arg, argc); } } return retVal___; @@ -241,14 +753,14 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_cmdline_arg_source_pre ) { - const char* (*preHookFunc) (struct CmdlineArgData *arg); + if (HPMHooks.count.HP_cmdline_arg_source_pre > 0) { + const char* (*preHookFunc) (struct CmdlineArgData **arg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func; - retVal___ = preHookFunc(arg); + retVal___ = preHookFunc(&arg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -256,26 +768,26 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { { retVal___ = HPMHooks.source.cmdline.arg_source(arg); } - if( HPMHooks.count.HP_cmdline_arg_source_post ) { + if (HPMHooks.count.HP_cmdline_arg_source_post > 0) { const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func; retVal___ = postHookFunc(retVal___, arg); } } return retVal___; } -/* console */ +/* console_interface */ void HP_console_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_init_pre ) { + if (HPMHooks.count.HP_console_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -283,9 +795,9 @@ void HP_console_init(void) { { HPMHooks.source.console.init(); } - if( HPMHooks.count.HP_console_init_post ) { + if (HPMHooks.count.HP_console_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func; postHookFunc(); } @@ -294,14 +806,14 @@ void HP_console_init(void) { } void HP_console_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_final_pre ) { + if (HPMHooks.count.HP_console_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -309,9 +821,9 @@ void HP_console_final(void) { { HPMHooks.source.console.final(); } - if( HPMHooks.count.HP_console_final_post ) { + if (HPMHooks.count.HP_console_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func; postHookFunc(); } @@ -320,14 +832,14 @@ void HP_console_final(void) { } void HP_console_display_title(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_title_pre ) { + if (HPMHooks.count.HP_console_display_title_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -335,9 +847,9 @@ void HP_console_display_title(void) { { HPMHooks.source.console.display_title(); } - if( HPMHooks.count.HP_console_display_title_post ) { + if (HPMHooks.count.HP_console_display_title_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func; postHookFunc(); } @@ -346,14 +858,14 @@ void HP_console_display_title(void) { } void HP_console_display_gplnotice(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_gplnotice_pre ) { + if (HPMHooks.count.HP_console_display_gplnotice_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_gplnotice_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -361,26 +873,26 @@ void HP_console_display_gplnotice(void) { { HPMHooks.source.console.display_gplnotice(); } - if( HPMHooks.count.HP_console_display_gplnotice_post ) { + if (HPMHooks.count.HP_console_display_gplnotice_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_gplnotice_post[hIndex].func; postHookFunc(); } } return; } -/* core */ +/* core_interface */ void HP_core_shutdown_callback(void) { int hIndex = 0; - if( HPMHooks.count.HP_core_shutdown_callback_pre ) { + if (HPMHooks.count.HP_core_shutdown_callback_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -388,27 +900,27 @@ void HP_core_shutdown_callback(void) { { HPMHooks.source.core.shutdown_callback(); } - if( HPMHooks.count.HP_core_shutdown_callback_post ) { + if (HPMHooks.count.HP_core_shutdown_callback_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++) { postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func; postHookFunc(); } } return; } -/* DB */ +/* db_interface */ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { int hIndex = 0; enum DBOptions retVal___ = DB_OPT_BASE; - if( HPMHooks.count.HP_DB_fix_options_pre ) { + if (HPMHooks.count.HP_DB_fix_options_pre > 0) { enum DBOptions (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -416,11 +928,11 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.fix_options(type, options); } - if( HPMHooks.count.HP_DB_fix_options_post ) { - enum DBOptions (*postHookFunc) (enum DBOptions retVal___, enum DBType *type, enum DBOptions *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_fix_options_post > 0) { + enum DBOptions (*postHookFunc) (enum DBOptions retVal___, enum DBType type, enum DBOptions options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type, &options); + retVal___ = postHookFunc(retVal___, type, options); } } return retVal___; @@ -428,14 +940,14 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { DBComparator HP_DB_default_cmp(enum DBType type) { int hIndex = 0; DBComparator retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_cmp_pre ) { + if (HPMHooks.count.HP_DB_default_cmp_pre > 0) { DBComparator (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -443,11 +955,11 @@ DBComparator HP_DB_default_cmp(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_cmp(type); } - if( HPMHooks.count.HP_DB_default_cmp_post ) { - DBComparator (*postHookFunc) (DBComparator retVal___, enum DBType *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_default_cmp_post > 0) { + DBComparator (*postHookFunc) (DBComparator retVal___, enum DBType type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type); + retVal___ = postHookFunc(retVal___, type); } } return retVal___; @@ -455,14 +967,14 @@ DBComparator HP_DB_default_cmp(enum DBType type) { DBHasher HP_DB_default_hash(enum DBType type) { int hIndex = 0; DBHasher retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_hash_pre ) { + if (HPMHooks.count.HP_DB_default_hash_pre > 0) { DBHasher (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -470,11 +982,11 @@ DBHasher HP_DB_default_hash(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_hash(type); } - if( HPMHooks.count.HP_DB_default_hash_post ) { - DBHasher (*postHookFunc) (DBHasher retVal___, enum DBType *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_default_hash_post > 0) { + DBHasher (*postHookFunc) (DBHasher retVal___, enum DBType type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type); + retVal___ = postHookFunc(retVal___, type); } } return retVal___; @@ -482,14 +994,14 @@ DBHasher HP_DB_default_hash(enum DBType type) { DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_release_pre ) { + if (HPMHooks.count.HP_DB_default_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -497,11 +1009,11 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.default_release(type, options); } - if( HPMHooks.count.HP_DB_default_release_post ) { - DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBType *type, enum DBOptions *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_default_release_post > 0) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBType type, enum DBOptions options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type, &options); + retVal___ = postHookFunc(retVal___, type, options); } } return retVal___; @@ -509,14 +1021,14 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_custom_release_pre ) { + if (HPMHooks.count.HP_DB_custom_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBReleaseOption *which); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func; retVal___ = preHookFunc(&which); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -524,11 +1036,11 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { { retVal___ = HPMHooks.source.DB.custom_release(which); } - if( HPMHooks.count.HP_DB_custom_release_post ) { - DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBReleaseOption *which); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_custom_release_post > 0) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBReleaseOption which); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &which); + retVal___ = postHookFunc(retVal___, which); } } return retVal___; @@ -536,14 +1048,14 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen) { int hIndex = 0; struct DBMap* retVal___ = NULL; - if( HPMHooks.count.HP_DB_alloc_pre ) { - struct DBMap* (*preHookFunc) (const char *file, const char *func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); + if (HPMHooks.count.HP_DB_alloc_pre > 0) { + struct DBMap* (*preHookFunc) (const char **file, const char **func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func; - retVal___ = preHookFunc(file, func, &line, &type, &options, &maxlen); + retVal___ = preHookFunc(&file, &func, &line, &type, &options, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -551,27 +1063,26 @@ struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBT { retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen); } - if( HPMHooks.count.HP_DB_alloc_post ) { - struct DBMap* (*postHookFunc) (struct DBMap* retVal___, const char *file, const char *func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_alloc_post > 0) { + struct DBMap* (*postHookFunc) (struct DBMap* retVal___, const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, file, func, &line, &type, &options, &maxlen); + retVal___ = postHookFunc(retVal___, file, func, line, type, options, maxlen); } } return retVal___; } union DBKey HP_DB_i2key(int key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_i2key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_i2key_pre > 0) { union DBKey (*preHookFunc) (int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -579,27 +1090,26 @@ union DBKey HP_DB_i2key(int key) { { retVal___ = HPMHooks.source.DB.i2key(key); } - if( HPMHooks.count.HP_DB_i2key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, int *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_i2key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, int key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } union DBKey HP_DB_ui2key(unsigned int key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_ui2key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ui2key_pre > 0) { union DBKey (*preHookFunc) (unsigned int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -607,27 +1117,26 @@ union DBKey HP_DB_ui2key(unsigned int key) { { retVal___ = HPMHooks.source.DB.ui2key(key); } - if( HPMHooks.count.HP_DB_ui2key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, unsigned int *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_ui2key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, unsigned int key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } union DBKey HP_DB_str2key(const char *key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_str2key_pre ) { - union DBKey (*preHookFunc) (const char *key); + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_str2key_pre > 0) { + union DBKey (*preHookFunc) (const char **key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func; - retVal___ = preHookFunc(key); + retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -635,9 +1144,9 @@ union DBKey HP_DB_str2key(const char *key) { { retVal___ = HPMHooks.source.DB.str2key(key); } - if( HPMHooks.count.HP_DB_str2key_post ) { + if (HPMHooks.count.HP_DB_str2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, const char *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -646,16 +1155,15 @@ union DBKey HP_DB_str2key(const char *key) { } union DBKey HP_DB_i642key(int64 key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_i642key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_i642key_pre > 0) { union DBKey (*preHookFunc) (int64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -663,27 +1171,26 @@ union DBKey HP_DB_i642key(int64 key) { { retVal___ = HPMHooks.source.DB.i642key(key); } - if( HPMHooks.count.HP_DB_i642key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, int64 *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_i642key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, int64 key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } union DBKey HP_DB_ui642key(uint64 key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_ui642key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ui642key_pre > 0) { union DBKey (*preHookFunc) (uint64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -691,27 +1198,26 @@ union DBKey HP_DB_ui642key(uint64 key) { { retVal___ = HPMHooks.source.DB.ui642key(key); } - if( HPMHooks.count.HP_DB_ui642key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, uint64 *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_ui642key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, uint64 key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } struct DBData HP_DB_i2data(int data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_DB_i2data_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_i2data_pre > 0) { struct DBData (*preHookFunc) (int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -719,27 +1225,26 @@ struct DBData HP_DB_i2data(int data) { { retVal___ = HPMHooks.source.DB.i2data(data); } - if( HPMHooks.count.HP_DB_i2data_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, int *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_i2data_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, int data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &data); + retVal___ = postHookFunc(retVal___, data); } } return retVal___; } struct DBData HP_DB_ui2data(unsigned int data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_DB_ui2data_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ui2data_pre > 0) { struct DBData (*preHookFunc) (unsigned int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -747,27 +1252,26 @@ struct DBData HP_DB_ui2data(unsigned int data) { { retVal___ = HPMHooks.source.DB.ui2data(data); } - if( HPMHooks.count.HP_DB_ui2data_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, unsigned int *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_ui2data_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, unsigned int data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &data); + retVal___ = postHookFunc(retVal___, data); } } return retVal___; } struct DBData HP_DB_ptr2data(void *data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_DB_ptr2data_pre ) { - struct DBData (*preHookFunc) (void *data); + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ptr2data_pre > 0) { + struct DBData (*preHookFunc) (void **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -775,9 +1279,9 @@ struct DBData HP_DB_ptr2data(void *data) { { retVal___ = HPMHooks.source.DB.ptr2data(data); } - if( HPMHooks.count.HP_DB_ptr2data_post ) { + if (HPMHooks.count.HP_DB_ptr2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, void *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -787,14 +1291,14 @@ struct DBData HP_DB_ptr2data(void *data) { int HP_DB_data2i(struct DBData *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2i_pre ) { - int (*preHookFunc) (struct DBData *data); + if (HPMHooks.count.HP_DB_data2i_pre > 0) { + int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -802,9 +1306,9 @@ int HP_DB_data2i(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2i(data); } - if( HPMHooks.count.HP_DB_data2i_post ) { + if (HPMHooks.count.HP_DB_data2i_post > 0) { int (*postHookFunc) (int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -814,14 +1318,14 @@ int HP_DB_data2i(struct DBData *data) { unsigned int HP_DB_data2ui(struct DBData *data) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2ui_pre ) { - unsigned int (*preHookFunc) (struct DBData *data); + if (HPMHooks.count.HP_DB_data2ui_pre > 0) { + unsigned int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -829,9 +1333,9 @@ unsigned int HP_DB_data2ui(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ui(data); } - if( HPMHooks.count.HP_DB_data2ui_post ) { + if (HPMHooks.count.HP_DB_data2ui_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -841,14 +1345,14 @@ unsigned int HP_DB_data2ui(struct DBData *data) { void* HP_DB_data2ptr(struct DBData *data) { int hIndex = 0; void* retVal___ = NULL; - if( HPMHooks.count.HP_DB_data2ptr_pre ) { - void* (*preHookFunc) (struct DBData *data); + if (HPMHooks.count.HP_DB_data2ptr_pre > 0) { + void* (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -856,9 +1360,9 @@ void* HP_DB_data2ptr(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ptr(data); } - if( HPMHooks.count.HP_DB_data2ptr_post ) { + if (HPMHooks.count.HP_DB_data2ptr_post > 0) { void* (*postHookFunc) (void* retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -867,14 +1371,14 @@ void* HP_DB_data2ptr(struct DBData *data) { } void HP_DB_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_init_pre ) { + if (HPMHooks.count.HP_DB_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -882,9 +1386,9 @@ void HP_DB_init(void) { { HPMHooks.source.DB.init(); } - if( HPMHooks.count.HP_DB_init_post ) { + if (HPMHooks.count.HP_DB_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func; postHookFunc(); } @@ -893,14 +1397,14 @@ void HP_DB_init(void) { } void HP_DB_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_final_pre ) { + if (HPMHooks.count.HP_DB_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -908,27 +1412,1175 @@ void HP_DB_final(void) { { HPMHooks.source.DB.final(); } - if( HPMHooks.count.HP_DB_final_post ) { + if (HPMHooks.count.HP_DB_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func; postHookFunc(); } } return; } -/* libconfig */ +/* des_interface */ +void HP_des_decrypt_block(struct des_bit64 *block) { + int hIndex = 0; + if (HPMHooks.count.HP_des_decrypt_block_pre > 0) { + void (*preHookFunc) (struct des_bit64 **block); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_des_decrypt_block_pre[hIndex].func; + preHookFunc(&block); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.des.decrypt_block(block); + } + if (HPMHooks.count.HP_des_decrypt_block_post > 0) { + void (*postHookFunc) (struct des_bit64 *block); + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_des_decrypt_block_post[hIndex].func; + postHookFunc(block); + } + } + return; +} +void HP_des_decrypt(unsigned char *data, size_t size) { + int hIndex = 0; + if (HPMHooks.count.HP_des_decrypt_pre > 0) { + void (*preHookFunc) (unsigned char **data, size_t *size); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_des_decrypt_pre[hIndex].func; + preHookFunc(&data, &size); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.des.decrypt(data, size); + } + if (HPMHooks.count.HP_des_decrypt_post > 0) { + void (*postHookFunc) (unsigned char *data, size_t size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_des_decrypt_post[hIndex].func; + postHookFunc(data, size); + } + } + return; +} +/* ipban_interface */ +void HP_ipban_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_ipban_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ipban_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ipban.init(); + } + if (HPMHooks.count.HP_ipban_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ipban_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_ipban_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_ipban_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ipban_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ipban.final(); + } + if (HPMHooks.count.HP_ipban_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ipban_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_ipban_cleanup(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_ipban_cleanup_pre > 0) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_cleanup_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ipban_cleanup_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ipban.cleanup(tid, tick, id, data); + } + if (HPMHooks.count.HP_ipban_cleanup_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_cleanup_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ipban_cleanup_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); + } + } + return retVal___; +} +bool HP_ipban_config_read_inter(const char *filename, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_ipban_config_read_inter_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_inter_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ipban_config_read_inter_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ipban.config_read_inter(filename, imported); + } + if (HPMHooks.count.HP_ipban_config_read_inter_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_inter_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ipban_config_read_inter_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, imported); + } + } + return retVal___; +} +bool HP_ipban_config_read_connection(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_ipban_config_read_connection_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_connection_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ipban_config_read_connection_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ipban.config_read_connection(filename, config, imported); + } + if (HPMHooks.count.HP_ipban_config_read_connection_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_connection_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ipban_config_read_connection_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_ipban_config_read_dynamic(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_ipban_config_read_dynamic_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_dynamic_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ipban_config_read_dynamic_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ipban.config_read_dynamic(filename, config, imported); + } + if (HPMHooks.count.HP_ipban_config_read_dynamic_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_dynamic_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ipban_config_read_dynamic_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_ipban_config_read(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_ipban_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ipban_config_read_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ipban.config_read(filename, config, imported); + } + if (HPMHooks.count.HP_ipban_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_config_read_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ipban_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_ipban_check(uint32 ip) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_ipban_check_pre > 0) { + bool (*preHookFunc) (uint32 *ip); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_check_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ipban_check_pre[hIndex].func; + retVal___ = preHookFunc(&ip); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ipban.check(ip); + } + if (HPMHooks.count.HP_ipban_check_post > 0) { + bool (*postHookFunc) (bool retVal___, uint32 ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_check_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ipban_check_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ip); + } + } + return retVal___; +} +void HP_ipban_log(uint32 ip) { + int hIndex = 0; + if (HPMHooks.count.HP_ipban_log_pre > 0) { + void (*preHookFunc) (uint32 *ip); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_log_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ipban_log_pre[hIndex].func; + preHookFunc(&ip); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ipban.log(ip); + } + if (HPMHooks.count.HP_ipban_log_post > 0) { + void (*postHookFunc) (uint32 ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ipban_log_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ipban_log_post[hIndex].func; + postHookFunc(ip); + } + } + return; +} +/* lchrif_interface */ +void HP_lchrif_server_init(int id) { + int hIndex = 0; + if (HPMHooks.count.HP_lchrif_server_init_pre > 0) { + void (*preHookFunc) (int *id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lchrif_server_init_pre[hIndex].func; + preHookFunc(&id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lchrif.server_init(id); + } + if (HPMHooks.count.HP_lchrif_server_init_post > 0) { + void (*postHookFunc) (int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lchrif_server_init_post[hIndex].func; + postHookFunc(id); + } + } + return; +} +void HP_lchrif_server_destroy(int id) { + int hIndex = 0; + if (HPMHooks.count.HP_lchrif_server_destroy_pre > 0) { + void (*preHookFunc) (int *id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lchrif_server_destroy_pre[hIndex].func; + preHookFunc(&id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lchrif.server_destroy(id); + } + if (HPMHooks.count.HP_lchrif_server_destroy_post > 0) { + void (*postHookFunc) (int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lchrif_server_destroy_post[hIndex].func; + postHookFunc(id); + } + } + return; +} +void HP_lchrif_server_reset(int id) { + int hIndex = 0; + if (HPMHooks.count.HP_lchrif_server_reset_pre > 0) { + void (*preHookFunc) (int *id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_reset_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lchrif_server_reset_pre[hIndex].func; + preHookFunc(&id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lchrif.server_reset(id); + } + if (HPMHooks.count.HP_lchrif_server_reset_post > 0) { + void (*postHookFunc) (int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_server_reset_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lchrif_server_reset_post[hIndex].func; + postHookFunc(id); + } + } + return; +} +void HP_lchrif_on_disconnect(int id) { + int hIndex = 0; + if (HPMHooks.count.HP_lchrif_on_disconnect_pre > 0) { + void (*preHookFunc) (int *id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_on_disconnect_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lchrif_on_disconnect_pre[hIndex].func; + preHookFunc(&id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lchrif.on_disconnect(id); + } + if (HPMHooks.count.HP_lchrif_on_disconnect_post > 0) { + void (*postHookFunc) (int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lchrif_on_disconnect_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lchrif_on_disconnect_post[hIndex].func; + postHookFunc(id); + } + } + return; +} +/* lclif_interface */ +void HP_lclif_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_lclif_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lclif_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.init(); + } + if (HPMHooks.count.HP_lclif_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lclif_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_lclif_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_lclif_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lclif_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.final(); + } + if (HPMHooks.count.HP_lclif_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lclif_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_lclif_connection_error(int fd, uint8 error) { + int hIndex = 0; + if (HPMHooks.count.HP_lclif_connection_error_pre > 0) { + void (*preHookFunc) (int *fd, uint8 *error); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_connection_error_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lclif_connection_error_pre[hIndex].func; + preHookFunc(&fd, &error); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.connection_error(fd, error); + } + if (HPMHooks.count.HP_lclif_connection_error_post > 0) { + void (*postHookFunc) (int fd, uint8 error); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_connection_error_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lclif_connection_error_post[hIndex].func; + postHookFunc(fd, error); + } + } + return; +} +bool HP_lclif_server_list(struct login_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_lclif_server_list_pre > 0) { + bool (*preHookFunc) (struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_server_list_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lclif_server_list_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.lclif.server_list(sd); + } + if (HPMHooks.count.HP_lclif_server_list_post > 0) { + bool (*postHookFunc) (bool retVal___, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_server_list_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lclif_server_list_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +void HP_lclif_auth_failed(int fd, time_t ban, uint32 error) { + int hIndex = 0; + if (HPMHooks.count.HP_lclif_auth_failed_pre > 0) { + void (*preHookFunc) (int *fd, time_t *ban, uint32 *error); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_auth_failed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lclif_auth_failed_pre[hIndex].func; + preHookFunc(&fd, &ban, &error); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.auth_failed(fd, ban, error); + } + if (HPMHooks.count.HP_lclif_auth_failed_post > 0) { + void (*postHookFunc) (int fd, time_t ban, uint32 error); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_auth_failed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lclif_auth_failed_post[hIndex].func; + postHookFunc(fd, ban, error); + } + } + return; +} +void HP_lclif_login_error(int fd, uint8 error) { + int hIndex = 0; + if (HPMHooks.count.HP_lclif_login_error_pre > 0) { + void (*preHookFunc) (int *fd, uint8 *error); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_login_error_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lclif_login_error_pre[hIndex].func; + preHookFunc(&fd, &error); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.login_error(fd, error); + } + if (HPMHooks.count.HP_lclif_login_error_post > 0) { + void (*postHookFunc) (int fd, uint8 error); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_login_error_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lclif_login_error_post[hIndex].func; + postHookFunc(fd, error); + } + } + return; +} +void HP_lclif_coding_key(int fd, struct login_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_lclif_coding_key_pre > 0) { + void (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_coding_key_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lclif_coding_key_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.lclif.coding_key(fd, sd); + } + if (HPMHooks.count.HP_lclif_coding_key_post > 0) { + void (*postHookFunc) (int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_coding_key_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lclif_coding_key_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +const struct login_packet_db* HP_lclif_packet(int16 packet_id) { + int hIndex = 0; + const struct login_packet_db* retVal___ = NULL; + if (HPMHooks.count.HP_lclif_packet_pre > 0) { + const struct login_packet_db* (*preHookFunc) (int16 *packet_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_packet_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lclif_packet_pre[hIndex].func; + retVal___ = preHookFunc(&packet_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.lclif.packet(packet_id); + } + if (HPMHooks.count.HP_lclif_packet_post > 0) { + const struct login_packet_db* (*postHookFunc) (const struct login_packet_db* retVal___, int16 packet_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_packet_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lclif_packet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, packet_id); + } + } + return retVal___; +} +enum parsefunc_rcode HP_lclif_parse_packet(const struct login_packet_db *lpd, int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_lclif_parse_packet_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (const struct login_packet_db **lpd, int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_packet_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lclif_parse_packet_pre[hIndex].func; + retVal___ = preHookFunc(&lpd, &fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.lclif.parse_packet(lpd, fd, sd); + } + if (HPMHooks.count.HP_lclif_parse_packet_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, const struct login_packet_db *lpd, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_packet_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lclif_parse_packet_post[hIndex].func; + retVal___ = postHookFunc(retVal___, lpd, fd, sd); + } + } + return retVal___; +} +int HP_lclif_parse(int fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_lclif_parse_pre > 0) { + int (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_lclif_parse_pre[hIndex].func; + retVal___ = preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.lclif.parse(fd); + } + if (HPMHooks.count.HP_lclif_parse_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_lclif_parse_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_lclif_parse_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd); + } + } + return retVal___; +} +/* lclif_interface_private */ +void HP_PRIV__lclif_packetdb_loaddb(void) { + int hIndex = 0; + if (HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_packetdb_loaddb_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.PRIV__lclif.packetdb_loaddb(); + } + if (HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_packetdb_loaddb_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_packetdb_loaddb_post[hIndex].func; + postHookFunc(); + } + } + return; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_sub(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_sub_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_sub_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_sub(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_sub_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_CONNECT_INFO_CHANGED(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CONNECT_INFO_CHANGED_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_EXE_HASHCHECK(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_EXE_HASHCHECK(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_EXE_HASHCHECK_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN2(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN2_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN2(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN2_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN3(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN3_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN3(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN3_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN3_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN4(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN4_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN4(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN4_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN4_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_PCBANG(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN_PCBANG(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_PCBANG_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_HAN(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_HAN_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN_HAN(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_HAN_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_HAN_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_SSO_LOGIN_REQ(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_SSO_LOGIN_REQ_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_LOGIN_OTP(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_OTP_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_OTP_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_OTP_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_LOGIN_OTP(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_OTP_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_LOGIN_OTP_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_LOGIN_OTP_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_ACK_MOBILE_OTP(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_ACK_MOBILE_OTP_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_OTP_CODE(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_OTP_CODE_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_OTP_CODE(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_OTP_CODE_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_OTP_CODE_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_REQ_HASH(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_REQ_HASH_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_REQ_HASH(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_REQ_HASH_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_REQ_HASH_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +enum parsefunc_rcode HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT(int fd, struct login_session_data *sd) { + int hIndex = 0; + enum parsefunc_rcode retVal___ = PACKET_UNKNOWN; + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre > 0) { + enum parsefunc_rcode (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__lclif.parse_CA_CHARSERVERCONNECT(fd, sd); + } + if (HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post > 0) { + enum parsefunc_rcode (*postHookFunc) (enum parsefunc_rcode retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__lclif_parse_CA_CHARSERVERCONNECT_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +/* libconfig_interface */ +void HP_libconfig_set_db_path(const char *db_path) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_set_db_path_pre > 0) { + void (*preHookFunc) (const char **db_path); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_set_db_path_pre[hIndex].func; + preHookFunc(&db_path); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.set_db_path(db_path); + } + if (HPMHooks.count.HP_libconfig_set_db_path_post > 0) { + void (*postHookFunc) (const char *db_path); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_set_db_path_post[hIndex].func; + postHookFunc(db_path); + } + } + return; +} +void HP_libconfig_format_db_path(const char *filename, char *path_buf, int buffer_len) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_format_db_path_pre > 0) { + void (*preHookFunc) (const char **filename, char **path_buf, int *buffer_len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_format_db_path_pre[hIndex].func; + preHookFunc(&filename, &path_buf, &buffer_len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.format_db_path(filename, path_buf, buffer_len); + } + if (HPMHooks.count.HP_libconfig_format_db_path_post > 0) { + void (*postHookFunc) (const char *filename, char *path_buf, int buffer_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_format_db_path_post[hIndex].func; + postHookFunc(filename, path_buf, buffer_len); + } + } + return; +} int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_pre ) { - int (*preHookFunc) (struct config_t *config, FILE *stream); + if (HPMHooks.count.HP_libconfig_read_pre > 0) { + int (*preHookFunc) (struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func; - retVal___ = preHookFunc(config, stream); + retVal___ = preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -936,9 +2588,9 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { { retVal___ = HPMHooks.source.libconfig.read(config, stream); } - if( HPMHooks.count.HP_libconfig_read_post ) { + if (HPMHooks.count.HP_libconfig_read_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, stream); } @@ -947,14 +2599,14 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { } void HP_libconfig_write(const struct config_t *config, FILE *stream) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_write_pre ) { - void (*preHookFunc) (const struct config_t *config, FILE *stream); + if (HPMHooks.count.HP_libconfig_write_pre > 0) { + void (*preHookFunc) (const struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func; - preHookFunc(config, stream); + preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -962,9 +2614,9 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { { HPMHooks.source.libconfig.write(config, stream); } - if( HPMHooks.count.HP_libconfig_write_post ) { + if (HPMHooks.count.HP_libconfig_write_post > 0) { void (*postHookFunc) (const struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func; postHookFunc(config, stream); } @@ -973,14 +2625,14 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { } void HP_libconfig_set_options(struct config_t *config, int options) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_options_pre ) { - void (*preHookFunc) (struct config_t *config, int *options); + if (HPMHooks.count.HP_libconfig_set_options_pre > 0) { + void (*preHookFunc) (struct config_t **config, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_options_pre[hIndex].func; - preHookFunc(config, &options); + preHookFunc(&config, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -988,11 +2640,11 @@ void HP_libconfig_set_options(struct config_t *config, int options) { { HPMHooks.source.libconfig.set_options(config, options); } - if( HPMHooks.count.HP_libconfig_set_options_post ) { - void (*postHookFunc) (struct config_t *config, int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_set_options_post > 0) { + void (*postHookFunc) (struct config_t *config, int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_options_post[hIndex].func; - postHookFunc(config, &options); + postHookFunc(config, options); } } return; @@ -1000,14 +2652,14 @@ void HP_libconfig_set_options(struct config_t *config, int options) { int HP_libconfig_get_options(const struct config_t *config) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_get_options_pre ) { - int (*preHookFunc) (const struct config_t *config); + if (HPMHooks.count.HP_libconfig_get_options_pre > 0) { + int (*preHookFunc) (const struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_get_options_pre[hIndex].func; - retVal___ = preHookFunc(config); + retVal___ = preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1015,9 +2667,9 @@ int HP_libconfig_get_options(const struct config_t *config) { { retVal___ = HPMHooks.source.libconfig.get_options(config); } - if( HPMHooks.count.HP_libconfig_get_options_post ) { + if (HPMHooks.count.HP_libconfig_get_options_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_get_options_post[hIndex].func; retVal___ = postHookFunc(retVal___, config); } @@ -1027,14 +2679,14 @@ int HP_libconfig_get_options(const struct config_t *config) { int HP_libconfig_read_string(struct config_t *config, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_string_pre ) { - int (*preHookFunc) (struct config_t *config, const char *str); + if (HPMHooks.count.HP_libconfig_read_string_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func; - retVal___ = preHookFunc(config, str); + retVal___ = preHookFunc(&config, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1042,9 +2694,9 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { { retVal___ = HPMHooks.source.libconfig.read_string(config, str); } - if( HPMHooks.count.HP_libconfig_read_string_post ) { + if (HPMHooks.count.HP_libconfig_read_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, str); } @@ -1054,14 +2706,14 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_file_src_pre ) { - int (*preHookFunc) (struct config_t *config, const char *filename); + if (HPMHooks.count.HP_libconfig_read_file_src_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func; - retVal___ = preHookFunc(config, filename); + retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1069,9 +2721,9 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename); } - if( HPMHooks.count.HP_libconfig_read_file_src_post ) { + if (HPMHooks.count.HP_libconfig_read_file_src_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -1081,14 +2733,14 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int HP_libconfig_write_file(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_write_file_pre ) { - int (*preHookFunc) (struct config_t *config, const char *filename); + if (HPMHooks.count.HP_libconfig_write_file_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func; - retVal___ = preHookFunc(config, filename); + retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1096,9 +2748,9 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.write_file(config, filename); } - if( HPMHooks.count.HP_libconfig_write_file_post ) { + if (HPMHooks.count.HP_libconfig_write_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -1107,14 +2759,14 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { } void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) (void *)) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_destructor_pre ) { - void (*preHookFunc) (struct config_t *config, void ( *destructor ) (void *)); + if (HPMHooks.count.HP_libconfig_set_destructor_pre > 0) { + void (*preHookFunc) (struct config_t **config, void ( **destructor ) (void *)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func; - preHookFunc(config, destructor); + preHookFunc(&config, &destructor); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1122,9 +2774,9 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( { HPMHooks.source.libconfig.set_destructor(config, destructor); } - if( HPMHooks.count.HP_libconfig_set_destructor_post ) { + if (HPMHooks.count.HP_libconfig_set_destructor_post > 0) { void (*postHookFunc) (struct config_t *config, void ( *destructor ) (void *)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func; postHookFunc(config, destructor); } @@ -1133,14 +2785,14 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( } void HP_libconfig_set_include_dir(struct config_t *config, const char *include_dir) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) { - void (*preHookFunc) (struct config_t *config, const char *include_dir); + if (HPMHooks.count.HP_libconfig_set_include_dir_pre > 0) { + void (*preHookFunc) (struct config_t **config, const char **include_dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func; - preHookFunc(config, include_dir); + preHookFunc(&config, &include_dir); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1148,9 +2800,9 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d { HPMHooks.source.libconfig.set_include_dir(config, include_dir); } - if( HPMHooks.count.HP_libconfig_set_include_dir_post ) { + if (HPMHooks.count.HP_libconfig_set_include_dir_post > 0) { void (*postHookFunc) (struct config_t *config, const char *include_dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func; postHookFunc(config, include_dir); } @@ -1159,14 +2811,14 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d } void HP_libconfig_init(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_init_pre ) { - void (*preHookFunc) (struct config_t *config); + if (HPMHooks.count.HP_libconfig_init_pre > 0) { + void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func; - preHookFunc(config); + preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1174,9 +2826,9 @@ void HP_libconfig_init(struct config_t *config) { { HPMHooks.source.libconfig.init(config); } - if( HPMHooks.count.HP_libconfig_init_post ) { + if (HPMHooks.count.HP_libconfig_init_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func; postHookFunc(config); } @@ -1185,14 +2837,14 @@ void HP_libconfig_init(struct config_t *config) { } void HP_libconfig_destroy(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_destroy_pre ) { - void (*preHookFunc) (struct config_t *config); + if (HPMHooks.count.HP_libconfig_destroy_pre > 0) { + void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func; - preHookFunc(config); + preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1200,9 +2852,9 @@ void HP_libconfig_destroy(struct config_t *config) { { HPMHooks.source.libconfig.destroy(config); } - if( HPMHooks.count.HP_libconfig_destroy_post ) { + if (HPMHooks.count.HP_libconfig_destroy_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func; postHookFunc(config); } @@ -1212,14 +2864,14 @@ void HP_libconfig_destroy(struct config_t *config) { int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_int_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1227,26 +2879,26 @@ int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } } return retVal___; } -long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { +int64 HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) { - long long (*preHookFunc) (const struct config_setting_t *setting); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1254,9 +2906,9 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -1266,14 +2918,14 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) { - double (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_float_pre > 0) { + double (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1281,9 +2933,9 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_float(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_post > 0) { double (*postHookFunc) (double retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -1293,14 +2945,14 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_bool_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1308,9 +2960,9 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -1320,14 +2972,14 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { const char* HP_libconfig_setting_get_string(const struct config_setting_t *setting) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) { - const char* (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_string_pre > 0) { + const char* (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1335,9 +2987,9 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti { retVal___ = HPMHooks.source.libconfig.setting_get_string(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -1347,14 +2999,14 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_lookup_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, const char *name); + if (HPMHooks.count.HP_libconfig_setting_lookup_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_pre[hIndex].func; - retVal___ = preHookFunc(setting, name); + retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1362,9 +3014,9 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_lookup_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -1374,14 +3026,14 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, int *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1389,26 +3041,26 @@ int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, cons { retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } } return retVal___; } -int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, long long *value) { +int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, long long *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1416,9 +3068,9 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -1428,14 +3080,14 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, const char *name, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, double *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_float_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1443,9 +3095,9 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -1455,14 +3107,14 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, int *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1470,9 +3122,9 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -1482,14 +3134,14 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, const char *name, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, const char **value); + if (HPMHooks.count.HP_libconfig_setting_lookup_string_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1497,9 +3149,9 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -1509,14 +3161,14 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_int_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1524,26 +3176,26 @@ int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; } -int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long value) { +int HP_libconfig_setting_set_int64(struct config_setting_t *setting, int64 value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1551,11 +3203,11 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v { retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; @@ -1563,14 +3215,14 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v int HP_libconfig_setting_set_float(struct config_setting_t *setting, double value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, double *value); + if (HPMHooks.count.HP_libconfig_setting_set_float_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1578,11 +3230,11 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu { retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, double value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; @@ -1590,14 +3242,14 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_bool_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1605,11 +3257,11 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; @@ -1617,14 +3269,14 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, const char *value); + if (HPMHooks.count.HP_libconfig_setting_set_string_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func; - retVal___ = preHookFunc(setting, value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1632,9 +3284,9 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char { retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -1644,14 +3296,14 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char int HP_libconfig_setting_set_format(struct config_setting_t *setting, short format) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, short *format); + if (HPMHooks.count.HP_libconfig_setting_set_format_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, short *format); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func; - retVal___ = preHookFunc(setting, &format); + retVal___ = preHookFunc(&setting, &format); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1659,11 +3311,11 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form { retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format); } - if( HPMHooks.count.HP_libconfig_setting_set_format_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, short *format); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_format_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, short format); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &format); + retVal___ = postHookFunc(retVal___, setting, format); } } return retVal___; @@ -1671,14 +3323,14 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) { - short (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_format_pre > 0) { + short (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1686,9 +3338,9 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_format(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_format_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_format_post > 0) { short (*postHookFunc) (short retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -1698,14 +3350,14 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1713,26 +3365,26 @@ int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, in { retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; } -long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { +int64 HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) { - long long (*preHookFunc) (const struct config_setting_t *setting, int *idx); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1740,11 +3392,11 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set { retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -1752,14 +3404,14 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set double HP_libconfig_setting_get_float_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) { - double (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_pre > 0) { + double (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1767,11 +3419,11 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin { retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) { - double (*postHookFunc) (double retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_post > 0) { + double (*postHookFunc) (double retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -1779,14 +3431,14 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1794,11 +3446,11 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i { retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -1806,14 +3458,14 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) { - const char* (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_pre > 0) { + const char* (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1821,11 +3473,11 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * { retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) { - const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -1833,14 +3485,14 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1848,26 +3500,26 @@ struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting { retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; } -struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, long long value) { +struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, int64 value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1875,11 +3527,11 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -1887,14 +3539,14 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setting_t *setting, int idx, double value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, double *value); + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1902,11 +3554,11 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, double value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -1914,14 +3566,14 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1929,11 +3581,11 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin { retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -1941,14 +3593,14 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_setting_t *setting, int idx, const char *value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, const char *value); + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1956,11 +3608,11 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett { retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, const char *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -1968,14 +3620,14 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett int HP_libconfig_setting_index(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_index_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_index_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1983,9 +3635,9 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_index(setting); } - if( HPMHooks.count.HP_libconfig_setting_index_post ) { + if (HPMHooks.count.HP_libconfig_setting_index_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -1995,14 +3647,14 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { int HP_libconfig_setting_length(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_length_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_length_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2010,9 +3662,9 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_length(setting); } - if( HPMHooks.count.HP_libconfig_setting_length_post ) { + if (HPMHooks.count.HP_libconfig_setting_length_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -2022,14 +3674,14 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setting_t *setting, unsigned int idx) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) { - struct config_setting_t* (*preHookFunc) (const struct config_setting_t *setting, unsigned int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2037,11 +3689,11 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, unsigned int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, unsigned int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -2049,14 +3701,14 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti struct config_setting_t* HP_libconfig_setting_get_member(const struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) { - struct config_setting_t* (*preHookFunc) (const struct config_setting_t *setting, const char *name); + if (HPMHooks.count.HP_libconfig_setting_get_member_pre > 0) { + struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func; - retVal___ = preHookFunc(setting, name); + retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2064,9 +3716,9 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set { retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_get_member_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_member_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -2076,14 +3728,14 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *parent, const char *name, int type) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_add_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *parent, const char *name, int *type); + if (HPMHooks.count.HP_libconfig_setting_add_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **parent, const char **name, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func; - retVal___ = preHookFunc(parent, name, &type); + retVal___ = preHookFunc(&parent, &name, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2091,11 +3743,11 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren { retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type); } - if( HPMHooks.count.HP_libconfig_setting_add_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *parent, const char *name, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_add_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *parent, const char *name, int type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, parent, name, &type); + retVal___ = postHookFunc(retVal___, parent, name, type); } } return retVal___; @@ -2103,14 +3755,14 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_pre ) { - int (*preHookFunc) (struct config_setting_t *parent, const char *name); + if (HPMHooks.count.HP_libconfig_setting_remove_pre > 0) { + int (*preHookFunc) (struct config_setting_t **parent, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func; - retVal___ = preHookFunc(parent, name); + retVal___ = preHookFunc(&parent, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2118,9 +3770,9 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam { retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name); } - if( HPMHooks.count.HP_libconfig_setting_remove_post ) { + if (HPMHooks.count.HP_libconfig_setting_remove_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, name); } @@ -2130,14 +3782,14 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) { - int (*preHookFunc) (struct config_setting_t *parent, unsigned int *idx); + if (HPMHooks.count.HP_libconfig_setting_remove_elem_pre > 0) { + int (*preHookFunc) (struct config_setting_t **parent, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func; - retVal___ = preHookFunc(parent, &idx); + retVal___ = preHookFunc(&parent, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2145,25 +3797,25 @@ int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned i { retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx); } - if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *parent, unsigned int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_remove_elem_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *parent, unsigned int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, parent, &idx); + retVal___ = postHookFunc(retVal___, parent, idx); } } return retVal___; } void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) { - void (*preHookFunc) (struct config_setting_t *setting, void *hook); + if (HPMHooks.count.HP_libconfig_setting_set_hook_pre > 0) { + void (*preHookFunc) (struct config_setting_t **setting, void **hook); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func; - preHookFunc(setting, hook); + preHookFunc(&setting, &hook); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2171,9 +3823,9 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { HPMHooks.source.libconfig.setting_set_hook(setting, hook); } - if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_hook_post > 0) { void (*postHookFunc) (struct config_setting_t *setting, void *hook); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func; postHookFunc(setting, hook); } @@ -2183,14 +3835,14 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, const char *filepath) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_lookup_pre ) { - struct config_setting_t* (*preHookFunc) (const struct config_t *config, const char *filepath); + if (HPMHooks.count.HP_libconfig_lookup_pre > 0) { + struct config_setting_t* (*preHookFunc) (const struct config_t **config, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath); + retVal___ = preHookFunc(&config, &filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2198,9 +3850,9 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons { retVal___ = HPMHooks.source.libconfig.lookup(config, filepath); } - if( HPMHooks.count.HP_libconfig_lookup_post ) { + if (HPMHooks.count.HP_libconfig_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_t *config, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath); } @@ -2210,14 +3862,14 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, int *value); + if (HPMHooks.count.HP_libconfig_lookup_int_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2225,26 +3877,26 @@ int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, { retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } } return retVal___; } -int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, long long *value) { +int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, long long *value); + if (HPMHooks.count.HP_libconfig_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2252,9 +3904,9 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -2264,14 +3916,14 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat int HP_libconfig_lookup_float(const struct config_t *config, const char *filepath, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_float_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, double *value); + if (HPMHooks.count.HP_libconfig_lookup_float_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2279,9 +3931,9 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -2291,14 +3943,14 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, int *value); + if (HPMHooks.count.HP_libconfig_lookup_bool_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2306,9 +3958,9 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath { retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -2318,14 +3970,14 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath int HP_libconfig_lookup_string(const struct config_t *config, const char *filepath, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_string_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, const char **value); + if (HPMHooks.count.HP_libconfig_lookup_string_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2333,9 +3985,9 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa { retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -2345,14 +3997,14 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_load_file_pre ) { - int (*preHookFunc) (struct config_t *config, const char *config_filename); + if (HPMHooks.count.HP_libconfig_load_file_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_load_file_pre[hIndex].func; - retVal___ = preHookFunc(config, config_filename); + retVal___ = preHookFunc(&config, &config_filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2360,9 +4012,9 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { retVal___ = HPMHooks.source.libconfig.load_file(config, config_filename); } - if( HPMHooks.count.HP_libconfig_load_file_post ) { + if (HPMHooks.count.HP_libconfig_load_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_load_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, config_filename); } @@ -2371,14 +4023,14 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) } void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) { - void (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_simple_pre > 0) { + void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func; - preHookFunc(parent, src); + preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2386,9 +4038,9 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str { HPMHooks.source.libconfig.setting_copy_simple(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_simple_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func; postHookFunc(parent, src); } @@ -2397,14 +4049,14 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str } void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) { - void (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_elem_pre > 0) { + void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func; - preHookFunc(parent, src); + preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2412,9 +4064,9 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc { HPMHooks.source.libconfig.setting_copy_elem(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_elem_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func; postHookFunc(parent, src); } @@ -2423,14 +4075,14 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc } void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) { - void (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre > 0) { + void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func; - preHookFunc(parent, src); + preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2438,9 +4090,9 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const { HPMHooks.source.libconfig.setting_copy_aggregate(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func; postHookFunc(parent, src); } @@ -2450,14 +4102,14 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_pre ) { - int (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_pre > 0) { + int (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func; - retVal___ = preHookFunc(parent, src); + retVal___ = preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2465,9 +4117,9 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf { retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, src); } @@ -2477,14 +4129,14 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_pre ) { - bool (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2492,9 +4144,9 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_bool_real(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -2504,14 +4156,14 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint32_pre ) { - uint32 (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_uint32_pre > 0) { + uint32 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2519,9 +4171,9 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint32(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint32_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -2531,14 +4183,14 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint16_pre ) { - uint16 (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_uint16_pre > 0) { + uint16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2546,9 +4198,9 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint16_post > 0) { uint16 (*postHookFunc) (uint16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -2558,14 +4210,14 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int hIndex = 0; int16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int16_pre ) { - int16 (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_int16_pre > 0) { + int16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2573,9 +4225,9 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int16_post > 0) { int16 (*postHookFunc) (int16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -2585,14 +4237,14 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting, const char *name, bool *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, bool *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, bool **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2600,9 +4252,9 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool_real(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, bool *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -2612,14 +4264,14 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, const char *name, uint32 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, uint32 *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint32 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2627,9 +4279,9 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint32(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint32 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -2639,14 +4291,14 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, const char *name, uint16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, uint16 *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2654,9 +4306,9 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -2666,14 +4318,14 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, const char *name, int16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, int16 *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2681,9 +4333,9 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -2693,14 +4345,14 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *setting, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, char *out, size_t *out_size); + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, out, &out_size); + retVal___ = preHookFunc(&setting, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2708,11 +4360,11 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup_mutable_string(setting, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, char *out, size_t *out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, char *out, size_t out_size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, name, out, &out_size); + retVal___ = postHookFunc(retVal___, setting, name, out, out_size); } } return retVal___; @@ -2720,14 +4372,14 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *name, char *out, size_t *out_size); + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_pre[hIndex].func; - retVal___ = preHookFunc(config, name, out, &out_size); + retVal___ = preHookFunc(&config, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2735,27 +4387,27 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char { retVal___ = HPMHooks.source.libconfig.lookup_mutable_string(config, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_post ) { - int (*postHookFunc) (int retVal___, const struct config_t *config, const char *name, char *out, size_t *out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_t *config, const char *name, char *out, size_t out_size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_post[hIndex].func; - retVal___ = postHookFunc(retVal___, config, name, out, &out_size); + retVal___ = postHookFunc(retVal___, config, name, out, out_size); } } return retVal___; } -/* login */ +/* login_interface */ int HP_login_mmo_auth(struct login_session_data *sd, bool isServer) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_mmo_auth_pre ) { - int (*preHookFunc) (struct login_session_data *sd, bool *isServer); + if (HPMHooks.count.HP_login_mmo_auth_pre > 0) { + int (*preHookFunc) (struct login_session_data **sd, bool *isServer); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_mmo_auth_pre[hIndex].func; - retVal___ = preHookFunc(sd, &isServer); + retVal___ = preHookFunc(&sd, &isServer); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2763,11 +4415,11 @@ int HP_login_mmo_auth(struct login_session_data *sd, bool isServer) { { retVal___ = HPMHooks.source.login.mmo_auth(sd, isServer); } - if( HPMHooks.count.HP_login_mmo_auth_post ) { - int (*postHookFunc) (int retVal___, struct login_session_data *sd, bool *isServer); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_post; hIndex++ ) { + if (HPMHooks.count.HP_login_mmo_auth_post > 0) { + int (*postHookFunc) (int retVal___, struct login_session_data *sd, bool isServer); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_mmo_auth_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &isServer); + retVal___ = postHookFunc(retVal___, sd, isServer); } } return retVal___; @@ -2775,14 +4427,14 @@ int HP_login_mmo_auth(struct login_session_data *sd, bool isServer) { int HP_login_mmo_auth_new(const char *userid, const char *pass, const char sex, const char *last_ip) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_mmo_auth_new_pre ) { - int (*preHookFunc) (const char *userid, const char *pass, const char *sex, const char *last_ip); + if (HPMHooks.count.HP_login_mmo_auth_new_pre > 0) { + int (*preHookFunc) (const char **userid, const char **pass, const char *sex, const char **last_ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_mmo_auth_new_pre[hIndex].func; - retVal___ = preHookFunc(userid, pass, &sex, last_ip); + retVal___ = preHookFunc(&userid, &pass, &sex, &last_ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2790,11 +4442,11 @@ int HP_login_mmo_auth_new(const char *userid, const char *pass, const char sex, { retVal___ = HPMHooks.source.login.mmo_auth_new(userid, pass, sex, last_ip); } - if( HPMHooks.count.HP_login_mmo_auth_new_post ) { - int (*postHookFunc) (int retVal___, const char *userid, const char *pass, const char *sex, const char *last_ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_post; hIndex++ ) { + if (HPMHooks.count.HP_login_mmo_auth_new_post > 0) { + int (*postHookFunc) (int retVal___, const char *userid, const char *pass, const char sex, const char *last_ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_mmo_auth_new_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_mmo_auth_new_post[hIndex].func; - retVal___ = postHookFunc(retVal___, userid, pass, &sex, last_ip); + retVal___ = postHookFunc(retVal___, userid, pass, sex, last_ip); } } return retVal___; @@ -2802,14 +4454,14 @@ int HP_login_mmo_auth_new(const char *userid, const char *pass, const char sex, int HP_login_waiting_disconnect_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_waiting_disconnect_timer_pre ) { + if (HPMHooks.count.HP_login_waiting_disconnect_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_waiting_disconnect_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2817,29 +4469,28 @@ int HP_login_waiting_disconnect_timer(int tid, int64 tick, int id, intptr_t data { retVal___ = HPMHooks.source.login.waiting_disconnect_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_login_waiting_disconnect_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_login_waiting_disconnect_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_waiting_disconnect_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_waiting_disconnect_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } struct DBData HP_login_create_online_user(union DBKey key, va_list args) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_login_create_online_user_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_login_create_online_user_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_login_create_online_user_pre[hIndex].func; retVal___ = preHookFunc(&key, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2849,12 +4500,12 @@ struct DBData HP_login_create_online_user(union DBKey key, va_list args) { retVal___ = HPMHooks.source.login.create_online_user(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_login_create_online_user_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_post; hIndex++ ) { + if (HPMHooks.count.HP_login_create_online_user_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey key, va_list args); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_create_online_user_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_login_create_online_user_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, args___copy); + retVal___ = postHookFunc(retVal___, key, args___copy); va_end(args___copy); } } @@ -2863,14 +4514,14 @@ struct DBData HP_login_create_online_user(union DBKey key, va_list args) { struct online_login_data* HP_login_add_online_user(int char_server, int account_id) { int hIndex = 0; struct online_login_data* retVal___ = NULL; - if( HPMHooks.count.HP_login_add_online_user_pre ) { + if (HPMHooks.count.HP_login_add_online_user_pre > 0) { struct online_login_data* (*preHookFunc) (int *char_server, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_add_online_user_pre[hIndex].func; retVal___ = preHookFunc(&char_server, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2878,25 +4529,25 @@ struct online_login_data* HP_login_add_online_user(int char_server, int account_ { retVal___ = HPMHooks.source.login.add_online_user(char_server, account_id); } - if( HPMHooks.count.HP_login_add_online_user_post ) { - struct online_login_data* (*postHookFunc) (struct online_login_data* retVal___, int *char_server, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_post; hIndex++ ) { + if (HPMHooks.count.HP_login_add_online_user_post > 0) { + struct online_login_data* (*postHookFunc) (struct online_login_data* retVal___, int char_server, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_add_online_user_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_add_online_user_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &char_server, &account_id); + retVal___ = postHookFunc(retVal___, char_server, account_id); } } return retVal___; } void HP_login_remove_online_user(int account_id) { int hIndex = 0; - if( HPMHooks.count.HP_login_remove_online_user_pre ) { + if (HPMHooks.count.HP_login_remove_online_user_pre > 0) { void (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_remove_online_user_pre[hIndex].func; preHookFunc(&account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2904,11 +4555,11 @@ void HP_login_remove_online_user(int account_id) { { HPMHooks.source.login.remove_online_user(account_id); } - if( HPMHooks.count.HP_login_remove_online_user_post ) { - void (*postHookFunc) (int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_post; hIndex++ ) { + if (HPMHooks.count.HP_login_remove_online_user_post > 0) { + void (*postHookFunc) (int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_remove_online_user_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_remove_online_user_post[hIndex].func; - postHookFunc(&account_id); + postHookFunc(account_id); } } return; @@ -2916,16 +4567,16 @@ void HP_login_remove_online_user(int account_id) { int HP_login_online_db_setoffline(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_online_db_setoffline_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_login_online_db_setoffline_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_login_online_db_setoffline_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2935,12 +4586,12 @@ int HP_login_online_db_setoffline(union DBKey key, struct DBData *data, va_list retVal___ = HPMHooks.source.login.online_db_setoffline(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_login_online_db_setoffline_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_post; hIndex++ ) { + if (HPMHooks.count.HP_login_online_db_setoffline_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_db_setoffline_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_login_online_db_setoffline_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -2949,16 +4600,16 @@ int HP_login_online_db_setoffline(union DBKey key, struct DBData *data, va_list int HP_login_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_online_data_cleanup_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_login_online_data_cleanup_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_login_online_data_cleanup_sub_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2968,12 +4619,12 @@ int HP_login_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_li retVal___ = HPMHooks.source.login.online_data_cleanup_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_login_online_data_cleanup_sub_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_login_online_data_cleanup_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_sub_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_login_online_data_cleanup_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -2982,14 +4633,14 @@ int HP_login_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_li int HP_login_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_online_data_cleanup_pre ) { + if (HPMHooks.count.HP_login_online_data_cleanup_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_online_data_cleanup_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2997,11 +4648,11 @@ int HP_login_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.login.online_data_cleanup(tid, tick, id, data); } - if( HPMHooks.count.HP_login_online_data_cleanup_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_post; hIndex++ ) { + if (HPMHooks.count.HP_login_online_data_cleanup_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_online_data_cleanup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_online_data_cleanup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -3009,14 +4660,14 @@ int HP_login_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) { int HP_login_sync_ip_addresses(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_sync_ip_addresses_pre ) { + if (HPMHooks.count.HP_login_sync_ip_addresses_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_sync_ip_addresses_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3024,11 +4675,11 @@ int HP_login_sync_ip_addresses(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.login.sync_ip_addresses(tid, tick, id, data); } - if( HPMHooks.count.HP_login_sync_ip_addresses_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_post; hIndex++ ) { + if (HPMHooks.count.HP_login_sync_ip_addresses_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_sync_ip_addresses_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_sync_ip_addresses_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -3036,14 +4687,14 @@ int HP_login_sync_ip_addresses(int tid, int64 tick, int id, intptr_t data) { bool HP_login_check_encrypted(const char *str1, const char *str2, const char *passwd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_login_check_encrypted_pre ) { - bool (*preHookFunc) (const char *str1, const char *str2, const char *passwd); + if (HPMHooks.count.HP_login_check_encrypted_pre > 0) { + bool (*preHookFunc) (const char **str1, const char **str2, const char **passwd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_check_encrypted_pre[hIndex].func; - retVal___ = preHookFunc(str1, str2, passwd); + retVal___ = preHookFunc(&str1, &str2, &passwd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3051,9 +4702,9 @@ bool HP_login_check_encrypted(const char *str1, const char *str2, const char *pa { retVal___ = HPMHooks.source.login.check_encrypted(str1, str2, passwd); } - if( HPMHooks.count.HP_login_check_encrypted_post ) { + if (HPMHooks.count.HP_login_check_encrypted_post > 0) { bool (*postHookFunc) (bool retVal___, const char *str1, const char *str2, const char *passwd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_check_encrypted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_check_encrypted_post[hIndex].func; retVal___ = postHookFunc(retVal___, str1, str2, passwd); } @@ -3063,14 +4714,14 @@ bool HP_login_check_encrypted(const char *str1, const char *str2, const char *pa bool HP_login_check_password(const char *md5key, int passwdenc, const char *passwd, const char *refpass) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_login_check_password_pre ) { - bool (*preHookFunc) (const char *md5key, int *passwdenc, const char *passwd, const char *refpass); + if (HPMHooks.count.HP_login_check_password_pre > 0) { + bool (*preHookFunc) (const char **md5key, int *passwdenc, const char **passwd, const char **refpass); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_check_password_pre[hIndex].func; - retVal___ = preHookFunc(md5key, &passwdenc, passwd, refpass); + retVal___ = preHookFunc(&md5key, &passwdenc, &passwd, &refpass); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3078,11 +4729,11 @@ bool HP_login_check_password(const char *md5key, int passwdenc, const char *pass { retVal___ = HPMHooks.source.login.check_password(md5key, passwdenc, passwd, refpass); } - if( HPMHooks.count.HP_login_check_password_post ) { - bool (*postHookFunc) (bool retVal___, const char *md5key, int *passwdenc, const char *passwd, const char *refpass); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_post; hIndex++ ) { + if (HPMHooks.count.HP_login_check_password_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *md5key, int passwdenc, const char *passwd, const char *refpass); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_check_password_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_check_password_post[hIndex].func; - retVal___ = postHookFunc(retVal___, md5key, &passwdenc, passwd, refpass); + retVal___ = postHookFunc(retVal___, md5key, passwdenc, passwd, refpass); } } return retVal___; @@ -3090,14 +4741,14 @@ bool HP_login_check_password(const char *md5key, int passwdenc, const char *pass uint32 HP_login_lan_subnet_check(uint32 ip) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_login_lan_subnet_check_pre ) { + if (HPMHooks.count.HP_login_lan_subnet_check_pre > 0) { uint32 (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_lan_subnet_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3105,25 +4756,25 @@ uint32 HP_login_lan_subnet_check(uint32 ip) { { retVal___ = HPMHooks.source.login.lan_subnet_check(ip); } - if( HPMHooks.count.HP_login_lan_subnet_check_post ) { - uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_post; hIndex++ ) { + if (HPMHooks.count.HP_login_lan_subnet_check_post > 0) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_lan_subnet_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip); + retVal___ = postHookFunc(retVal___, ip); } } return retVal___; } void HP_login_fromchar_accinfo(int fd, int account_id, int u_fd, int u_aid, int u_group, int map_fd, struct mmo_account *acc) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_accinfo_pre ) { - void (*preHookFunc) (int *fd, int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd, struct mmo_account *acc); + if (HPMHooks.count.HP_login_fromchar_accinfo_pre > 0) { + void (*preHookFunc) (int *fd, int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd, struct mmo_account **acc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_accinfo_pre[hIndex].func; - preHookFunc(&fd, &account_id, &u_fd, &u_aid, &u_group, &map_fd, acc); + preHookFunc(&fd, &account_id, &u_fd, &u_aid, &u_group, &map_fd, &acc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3131,25 +4782,25 @@ void HP_login_fromchar_accinfo(int fd, int account_id, int u_fd, int u_aid, int { HPMHooks.source.login.fromchar_accinfo(fd, account_id, u_fd, u_aid, u_group, map_fd, acc); } - if( HPMHooks.count.HP_login_fromchar_accinfo_post ) { - void (*postHookFunc) (int *fd, int *account_id, int *u_fd, int *u_aid, int *u_group, int *map_fd, struct mmo_account *acc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_accinfo_post > 0) { + void (*postHookFunc) (int fd, int account_id, int u_fd, int u_aid, int u_group, int map_fd, struct mmo_account *acc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_accinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_accinfo_post[hIndex].func; - postHookFunc(&fd, &account_id, &u_fd, &u_aid, &u_group, &map_fd, acc); + postHookFunc(fd, account_id, u_fd, u_aid, u_group, map_fd, acc); } } return; } void HP_login_fromchar_account(int fd, int account_id, struct mmo_account *acc) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_account_pre ) { - void (*preHookFunc) (int *fd, int *account_id, struct mmo_account *acc); + if (HPMHooks.count.HP_login_fromchar_account_pre > 0) { + void (*preHookFunc) (int *fd, int *account_id, struct mmo_account **acc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_account_pre[hIndex].func; - preHookFunc(&fd, &account_id, acc); + preHookFunc(&fd, &account_id, &acc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3157,25 +4808,25 @@ void HP_login_fromchar_account(int fd, int account_id, struct mmo_account *acc) { HPMHooks.source.login.fromchar_account(fd, account_id, acc); } - if( HPMHooks.count.HP_login_fromchar_account_post ) { - void (*postHookFunc) (int *fd, int *account_id, struct mmo_account *acc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_account_post > 0) { + void (*postHookFunc) (int fd, int account_id, struct mmo_account *acc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_account_post[hIndex].func; - postHookFunc(&fd, &account_id, acc); + postHookFunc(fd, account_id, acc); } } return; } void HP_login_fromchar_account_update_other(int account_id, unsigned int state) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_account_update_other_pre ) { + if (HPMHooks.count.HP_login_fromchar_account_update_other_pre > 0) { void (*preHookFunc) (int *account_id, unsigned int *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_account_update_other_pre[hIndex].func; preHookFunc(&account_id, &state); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3183,25 +4834,25 @@ void HP_login_fromchar_account_update_other(int account_id, unsigned int state) { HPMHooks.source.login.fromchar_account_update_other(account_id, state); } - if( HPMHooks.count.HP_login_fromchar_account_update_other_post ) { - void (*postHookFunc) (int *account_id, unsigned int *state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_account_update_other_post > 0) { + void (*postHookFunc) (int account_id, unsigned int state); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_account_update_other_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_account_update_other_post[hIndex].func; - postHookFunc(&account_id, &state); + postHookFunc(account_id, state); } } return; } void HP_login_fromchar_auth_ack(int fd, int account_id, uint32 login_id1, uint32 login_id2, uint8 sex, int request_id, struct login_auth_node *node) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_auth_ack_pre ) { - void (*preHookFunc) (int *fd, int *account_id, uint32 *login_id1, uint32 *login_id2, uint8 *sex, int *request_id, struct login_auth_node *node); + if (HPMHooks.count.HP_login_fromchar_auth_ack_pre > 0) { + void (*preHookFunc) (int *fd, int *account_id, uint32 *login_id1, uint32 *login_id2, uint8 *sex, int *request_id, struct login_auth_node **node); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_auth_ack_pre[hIndex].func; - preHookFunc(&fd, &account_id, &login_id1, &login_id2, &sex, &request_id, node); + preHookFunc(&fd, &account_id, &login_id1, &login_id2, &sex, &request_id, &node); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3209,25 +4860,25 @@ void HP_login_fromchar_auth_ack(int fd, int account_id, uint32 login_id1, uint32 { HPMHooks.source.login.fromchar_auth_ack(fd, account_id, login_id1, login_id2, sex, request_id, node); } - if( HPMHooks.count.HP_login_fromchar_auth_ack_post ) { - void (*postHookFunc) (int *fd, int *account_id, uint32 *login_id1, uint32 *login_id2, uint8 *sex, int *request_id, struct login_auth_node *node); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_auth_ack_post > 0) { + void (*postHookFunc) (int fd, int account_id, uint32 login_id1, uint32 login_id2, uint8 sex, int request_id, struct login_auth_node *node); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_auth_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_auth_ack_post[hIndex].func; - postHookFunc(&fd, &account_id, &login_id1, &login_id2, &sex, &request_id, node); + postHookFunc(fd, account_id, login_id1, login_id2, sex, request_id, node); } } return; } void HP_login_fromchar_ban(int account_id, time_t timestamp) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_ban_pre ) { + if (HPMHooks.count.HP_login_fromchar_ban_pre > 0) { void (*preHookFunc) (int *account_id, time_t *timestamp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_ban_pre[hIndex].func; preHookFunc(&account_id, ×tamp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3235,25 +4886,25 @@ void HP_login_fromchar_ban(int account_id, time_t timestamp) { { HPMHooks.source.login.fromchar_ban(account_id, timestamp); } - if( HPMHooks.count.HP_login_fromchar_ban_post ) { - void (*postHookFunc) (int *account_id, time_t *timestamp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_ban_post > 0) { + void (*postHookFunc) (int account_id, time_t timestamp); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_ban_post[hIndex].func; - postHookFunc(&account_id, ×tamp); + postHookFunc(account_id, timestamp); } } return; } void HP_login_fromchar_change_sex_other(int account_id, char sex) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_change_sex_other_pre ) { + if (HPMHooks.count.HP_login_fromchar_change_sex_other_pre > 0) { void (*preHookFunc) (int *account_id, char *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_change_sex_other_pre[hIndex].func; preHookFunc(&account_id, &sex); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3261,25 +4912,25 @@ void HP_login_fromchar_change_sex_other(int account_id, char sex) { { HPMHooks.source.login.fromchar_change_sex_other(account_id, sex); } - if( HPMHooks.count.HP_login_fromchar_change_sex_other_post ) { - void (*postHookFunc) (int *account_id, char *sex); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_change_sex_other_post > 0) { + void (*postHookFunc) (int account_id, char sex); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_change_sex_other_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_change_sex_other_post[hIndex].func; - postHookFunc(&account_id, &sex); + postHookFunc(account_id, sex); } } return; } void HP_login_fromchar_pong(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_pong_pre ) { + if (HPMHooks.count.HP_login_fromchar_pong_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_pong_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3287,25 +4938,25 @@ void HP_login_fromchar_pong(int fd) { { HPMHooks.source.login.fromchar_pong(fd); } - if( HPMHooks.count.HP_login_fromchar_pong_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_pong_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_pong_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_pong_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_login_fromchar_parse_auth(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_auth_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + if (HPMHooks.count.HP_login_fromchar_parse_auth_pre > 0) { + void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_auth_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3313,25 +4964,25 @@ void HP_login_fromchar_parse_auth(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_auth(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_auth_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_auth_post > 0) { + void (*postHookFunc) (int fd, int id, const char *ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_auth_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_auth_post[hIndex].func; - postHookFunc(&fd, &id, ip); + postHookFunc(fd, id, ip); } } return; } void HP_login_fromchar_parse_update_users(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_update_users_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_update_users_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_users_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3339,25 +4990,25 @@ void HP_login_fromchar_parse_update_users(int fd, int id) { { HPMHooks.source.login.fromchar_parse_update_users(fd, id); } - if( HPMHooks.count.HP_login_fromchar_parse_update_users_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_update_users_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_users_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_users_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_login_fromchar_parse_request_change_email(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + if (HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre > 0) { + void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_change_email_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3365,25 +5016,25 @@ void HP_login_fromchar_parse_request_change_email(int fd, int id, const char *ip { HPMHooks.source.login.fromchar_parse_request_change_email(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_request_change_email_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_request_change_email_post > 0) { + void (*postHookFunc) (int fd, int id, const char *ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_change_email_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_change_email_post[hIndex].func; - postHookFunc(&fd, &id, ip); + postHookFunc(fd, id, ip); } } return; } void HP_login_fromchar_parse_account_data(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_data_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + if (HPMHooks.count.HP_login_fromchar_parse_account_data_pre > 0) { + void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_data_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3391,25 +5042,25 @@ void HP_login_fromchar_parse_account_data(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_account_data(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_account_data_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_data_post > 0) { + void (*postHookFunc) (int fd, int id, const char *ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_data_post[hIndex].func; - postHookFunc(&fd, &id, ip); + postHookFunc(fd, id, ip); } } return; } void HP_login_fromchar_parse_ping(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_ping_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_ping_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_ping_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3417,25 +5068,25 @@ void HP_login_fromchar_parse_ping(int fd) { { HPMHooks.source.login.fromchar_parse_ping(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_ping_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_ping_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_ping_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_login_fromchar_parse_change_email(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_change_email_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + if (HPMHooks.count.HP_login_fromchar_parse_change_email_pre > 0) { + void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_email_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3443,25 +5094,25 @@ void HP_login_fromchar_parse_change_email(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_change_email(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_change_email_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_change_email_post > 0) { + void (*postHookFunc) (int fd, int id, const char *ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_email_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_email_post[hIndex].func; - postHookFunc(&fd, &id, ip); + postHookFunc(fd, id, ip); } } return; } void HP_login_fromchar_parse_account_update(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_update_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + if (HPMHooks.count.HP_login_fromchar_parse_account_update_pre > 0) { + void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_update_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3469,25 +5120,25 @@ void HP_login_fromchar_parse_account_update(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_account_update(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_account_update_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_update_post > 0) { + void (*postHookFunc) (int fd, int id, const char *ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_update_post[hIndex].func; - postHookFunc(&fd, &id, ip); + postHookFunc(fd, id, ip); } } return; } void HP_login_fromchar_parse_ban(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_ban_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + if (HPMHooks.count.HP_login_fromchar_parse_ban_pre > 0) { + void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_ban_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3495,25 +5146,25 @@ void HP_login_fromchar_parse_ban(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_ban(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_ban_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_ban_post > 0) { + void (*postHookFunc) (int fd, int id, const char *ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_ban_post[hIndex].func; - postHookFunc(&fd, &id, ip); + postHookFunc(fd, id, ip); } } return; } void HP_login_fromchar_parse_change_sex(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_change_sex_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + if (HPMHooks.count.HP_login_fromchar_parse_change_sex_pre > 0) { + void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_sex_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3521,25 +5172,25 @@ void HP_login_fromchar_parse_change_sex(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_change_sex(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_change_sex_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_change_sex_post > 0) { + void (*postHookFunc) (int fd, int id, const char *ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_sex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_sex_post[hIndex].func; - postHookFunc(&fd, &id, ip); + postHookFunc(fd, id, ip); } } return; } void HP_login_fromchar_parse_account_reg2(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + if (HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre > 0) { + void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_reg2_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3547,25 +5198,25 @@ void HP_login_fromchar_parse_account_reg2(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_account_reg2(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_account_reg2_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_reg2_post > 0) { + void (*postHookFunc) (int fd, int id, const char *ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_reg2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_reg2_post[hIndex].func; - postHookFunc(&fd, &id, ip); + postHookFunc(fd, id, ip); } } return; } void HP_login_fromchar_parse_unban(int fd, int id, const char *ip) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_unban_pre ) { - void (*preHookFunc) (int *fd, int *id, const char *ip); + if (HPMHooks.count.HP_login_fromchar_parse_unban_pre > 0) { + void (*preHookFunc) (int *fd, int *id, const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_unban_pre[hIndex].func; - preHookFunc(&fd, &id, ip); + preHookFunc(&fd, &id, &ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3573,25 +5224,25 @@ void HP_login_fromchar_parse_unban(int fd, int id, const char *ip) { { HPMHooks.source.login.fromchar_parse_unban(fd, id, ip); } - if( HPMHooks.count.HP_login_fromchar_parse_unban_post ) { - void (*postHookFunc) (int *fd, int *id, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_unban_post > 0) { + void (*postHookFunc) (int fd, int id, const char *ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_unban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_unban_post[hIndex].func; - postHookFunc(&fd, &id, ip); + postHookFunc(fd, id, ip); } } return; } void HP_login_fromchar_parse_account_online(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_online_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_online_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_online_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3599,25 +5250,25 @@ void HP_login_fromchar_parse_account_online(int fd, int id) { { HPMHooks.source.login.fromchar_parse_account_online(fd, id); } - if( HPMHooks.count.HP_login_fromchar_parse_account_online_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_online_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_online_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_online_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_login_fromchar_parse_account_offline(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_account_offline_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_offline_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_offline_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3625,25 +5276,25 @@ void HP_login_fromchar_parse_account_offline(int fd) { { HPMHooks.source.login.fromchar_parse_account_offline(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_account_offline_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_account_offline_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_account_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_account_offline_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_login_fromchar_parse_online_accounts(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_online_accounts_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3651,25 +5302,25 @@ void HP_login_fromchar_parse_online_accounts(int fd, int id) { { HPMHooks.source.login.fromchar_parse_online_accounts(fd, id); } - if( HPMHooks.count.HP_login_fromchar_parse_online_accounts_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_online_accounts_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_online_accounts_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_online_accounts_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_login_fromchar_parse_request_account_reg2(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_account_reg2_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3677,25 +5328,25 @@ void HP_login_fromchar_parse_request_account_reg2(int fd) { { HPMHooks.source.login.fromchar_parse_request_account_reg2(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_request_account_reg2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_request_account_reg2_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_login_fromchar_parse_update_wan_ip(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_wan_ip_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3703,25 +5354,25 @@ void HP_login_fromchar_parse_update_wan_ip(int fd, int id) { { HPMHooks.source.login.fromchar_parse_update_wan_ip(fd, id); } - if( HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_update_wan_ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_update_wan_ip_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_login_fromchar_parse_all_offline(int fd, int id) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_all_offline_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_all_offline_pre > 0) { void (*preHookFunc) (int *fd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_all_offline_pre[hIndex].func; preHookFunc(&fd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3729,25 +5380,25 @@ void HP_login_fromchar_parse_all_offline(int fd, int id) { { HPMHooks.source.login.fromchar_parse_all_offline(fd, id); } - if( HPMHooks.count.HP_login_fromchar_parse_all_offline_post ) { - void (*postHookFunc) (int *fd, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_all_offline_post > 0) { + void (*postHookFunc) (int fd, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_all_offline_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_all_offline_post[hIndex].func; - postHookFunc(&fd, &id); + postHookFunc(fd, id); } } return; } void HP_login_fromchar_parse_change_pincode(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_pincode_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3755,11 +5406,11 @@ void HP_login_fromchar_parse_change_pincode(int fd) { { HPMHooks.source.login.fromchar_parse_change_pincode(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_change_pincode_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_change_pincode_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_change_pincode_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_change_pincode_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -3767,14 +5418,14 @@ void HP_login_fromchar_parse_change_pincode(int fd) { bool HP_login_fromchar_parse_wrong_pincode(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_wrong_pincode_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3782,25 +5433,25 @@ bool HP_login_fromchar_parse_wrong_pincode(int fd) { { retVal___ = HPMHooks.source.login.fromchar_parse_wrong_pincode(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post ) { - bool (*postHookFunc) (bool retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post > 0) { + bool (*postHookFunc) (bool retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_wrong_pincode_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_wrong_pincode_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } void HP_login_fromchar_parse_accinfo(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_login_fromchar_parse_accinfo_pre ) { + if (HPMHooks.count.HP_login_fromchar_parse_accinfo_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_fromchar_parse_accinfo_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3808,11 +5459,11 @@ void HP_login_fromchar_parse_accinfo(int fd) { { HPMHooks.source.login.fromchar_parse_accinfo(fd); } - if( HPMHooks.count.HP_login_fromchar_parse_accinfo_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_post; hIndex++ ) { + if (HPMHooks.count.HP_login_fromchar_parse_accinfo_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_fromchar_parse_accinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_fromchar_parse_accinfo_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -3820,14 +5471,14 @@ void HP_login_fromchar_parse_accinfo(int fd) { int HP_login_parse_fromchar(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_login_parse_fromchar_pre ) { + if (HPMHooks.count.HP_login_parse_fromchar_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_parse_fromchar_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3835,51 +5486,25 @@ int HP_login_parse_fromchar(int fd) { { retVal___ = HPMHooks.source.login.parse_fromchar(fd); } - if( HPMHooks.count.HP_login_parse_fromchar_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_post; hIndex++ ) { + if (HPMHooks.count.HP_login_parse_fromchar_post > 0) { + int (*postHookFunc) (int retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_fromchar_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_parse_fromchar_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } -void HP_login_connection_problem(int fd, uint8 status) { - int hIndex = 0; - if( HPMHooks.count.HP_login_connection_problem_pre ) { - void (*preHookFunc) (int *fd, uint8 *status); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_connection_problem_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_connection_problem_pre[hIndex].func; - preHookFunc(&fd, &status); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return; - } - } - { - HPMHooks.source.login.connection_problem(fd, status); - } - if( HPMHooks.count.HP_login_connection_problem_post ) { - void (*postHookFunc) (int *fd, uint8 *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_connection_problem_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_connection_problem_post[hIndex].func; - postHookFunc(&fd, &status); - } - } - return; -} void HP_login_kick(struct login_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_login_kick_pre ) { - void (*preHookFunc) (struct login_session_data *sd); + if (HPMHooks.count.HP_login_kick_pre > 0) { + void (*preHookFunc) (struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_kick_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3887,9 +5512,9 @@ void HP_login_kick(struct login_session_data *sd) { { HPMHooks.source.login.kick(sd); } - if( HPMHooks.count.HP_login_kick_post ) { + if (HPMHooks.count.HP_login_kick_post > 0) { void (*postHookFunc) (struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_kick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_kick_post[hIndex].func; postHookFunc(sd); } @@ -3898,14 +5523,14 @@ void HP_login_kick(struct login_session_data *sd) { } void HP_login_auth_ok(struct login_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_login_auth_ok_pre ) { - void (*preHookFunc) (struct login_session_data *sd); + if (HPMHooks.count.HP_login_auth_ok_pre > 0) { + void (*preHookFunc) (struct login_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_auth_ok_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3913,9 +5538,9 @@ void HP_login_auth_ok(struct login_session_data *sd) { { HPMHooks.source.login.auth_ok(sd); } - if( HPMHooks.count.HP_login_auth_ok_post ) { + if (HPMHooks.count.HP_login_auth_ok_post > 0) { void (*postHookFunc) (struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_auth_ok_post[hIndex].func; postHookFunc(sd); } @@ -3924,14 +5549,14 @@ void HP_login_auth_ok(struct login_session_data *sd) { } void HP_login_auth_failed(struct login_session_data *sd, int result) { int hIndex = 0; - if( HPMHooks.count.HP_login_auth_failed_pre ) { - void (*preHookFunc) (struct login_session_data *sd, int *result); + if (HPMHooks.count.HP_login_auth_failed_pre > 0) { + void (*preHookFunc) (struct login_session_data **sd, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_login_auth_failed_pre[hIndex].func; - preHookFunc(sd, &result); + preHookFunc(&sd, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3939,688 +5564,1142 @@ void HP_login_auth_failed(struct login_session_data *sd, int result) { { HPMHooks.source.login.auth_failed(sd, result); } - if( HPMHooks.count.HP_login_auth_failed_post ) { - void (*postHookFunc) (struct login_session_data *sd, int *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_post; hIndex++ ) { + if (HPMHooks.count.HP_login_auth_failed_post > 0) { + void (*postHookFunc) (struct login_session_data *sd, int result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_auth_failed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_login_auth_failed_post[hIndex].func; - postHookFunc(sd, &result); + postHookFunc(sd, result); + } + } + return; +} +bool HP_login_client_login(int fd, struct login_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_client_login_pre > 0) { + bool (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_client_login_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.client_login(fd, sd); + } + if (HPMHooks.count.HP_login_client_login_post > 0) { + bool (*postHookFunc) (bool retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_client_login_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +bool HP_login_client_login_otp(int fd, struct login_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_client_login_otp_pre > 0) { + bool (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_otp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_client_login_otp_pre[hIndex].func; + retVal___ = preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.client_login_otp(fd, sd); + } + if (HPMHooks.count.HP_login_client_login_otp_post > 0) { + bool (*postHookFunc) (bool retVal___, int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_otp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_client_login_otp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fd, sd); + } + } + return retVal___; +} +void HP_login_client_login_mobile_otp_request(int fd, struct login_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_login_client_login_mobile_otp_request_pre > 0) { + void (*preHookFunc) (int *fd, struct login_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_mobile_otp_request_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_client_login_mobile_otp_request_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.client_login_mobile_otp_request(fd, sd); + } + if (HPMHooks.count.HP_login_client_login_mobile_otp_request_post > 0) { + void (*postHookFunc) (int fd, struct login_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_client_login_mobile_otp_request_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_client_login_mobile_otp_request_post[hIndex].func; + postHookFunc(fd, sd); } } return; } -void HP_login_login_error(int fd, uint8 status) { +void HP_login_char_server_connection_status(int fd, struct login_session_data *sd, uint8 status) { int hIndex = 0; - if( HPMHooks.count.HP_login_login_error_pre ) { - void (*preHookFunc) (int *fd, uint8 *status); + if (HPMHooks.count.HP_login_char_server_connection_status_pre > 0) { + void (*preHookFunc) (int *fd, struct login_session_data **sd, uint8 *status); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_login_error_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_login_error_pre[hIndex].func; - preHookFunc(&fd, &status); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_char_server_connection_status_pre[hIndex].func; + preHookFunc(&fd, &sd, &status); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.login.login_error(fd, status); + HPMHooks.source.login.char_server_connection_status(fd, sd, status); } - if( HPMHooks.count.HP_login_login_error_post ) { - void (*postHookFunc) (int *fd, uint8 *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_login_error_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_login_error_post[hIndex].func; - postHookFunc(&fd, &status); + if (HPMHooks.count.HP_login_char_server_connection_status_post > 0) { + void (*postHookFunc) (int fd, struct login_session_data *sd, uint8 status); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_char_server_connection_status_post[hIndex].func; + postHookFunc(fd, sd, status); } } return; } -void HP_login_parse_ping(int fd, struct login_session_data *sd) { +void HP_login_parse_request_connection(int fd, struct login_session_data *sd, const char *ip, uint32 ipl) { int hIndex = 0; - if( HPMHooks.count.HP_login_parse_ping_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); + if (HPMHooks.count.HP_login_parse_request_connection_pre > 0) { + void (*preHookFunc) (int *fd, struct login_session_data **sd, const char **ip, uint32 *ipl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_ping_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_ping_pre[hIndex].func; - preHookFunc(&fd, sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_parse_request_connection_pre[hIndex].func; + preHookFunc(&fd, &sd, &ip, &ipl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.login.parse_ping(fd, sd); + HPMHooks.source.login.parse_request_connection(fd, sd, ip, ipl); } - if( HPMHooks.count.HP_login_parse_ping_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_ping_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_ping_post[hIndex].func; - postHookFunc(&fd, sd); + if (HPMHooks.count.HP_login_parse_request_connection_post > 0) { + void (*postHookFunc) (int fd, struct login_session_data *sd, const char *ip, uint32 ipl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_parse_request_connection_post[hIndex].func; + postHookFunc(fd, sd, ip, ipl); } } return; } -void HP_login_parse_client_md5(int fd, struct login_session_data *sd) { +void HP_login_config_set_defaults(void) { int hIndex = 0; - if( HPMHooks.count.HP_login_parse_client_md5_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); + if (HPMHooks.count.HP_login_config_set_defaults_pre > 0) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_md5_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_client_md5_pre[hIndex].func; - preHookFunc(&fd, sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_defaults_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_set_defaults_pre[hIndex].func; + preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.login.parse_client_md5(fd, sd); + HPMHooks.source.login.config_set_defaults(); } - if( HPMHooks.count.HP_login_parse_client_md5_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_md5_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_client_md5_post[hIndex].func; - postHookFunc(&fd, sd); + if (HPMHooks.count.HP_login_config_set_defaults_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_defaults_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_set_defaults_post[hIndex].func; + postHookFunc(); } } return; } -bool HP_login_parse_client_login(int fd, struct login_session_data *sd, const char *ip) { +bool HP_login_config_read(const char *filename, bool included) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_login_parse_client_login_pre ) { - bool (*preHookFunc) (int *fd, struct login_session_data *sd, const char *ip); + if (HPMHooks.count.HP_login_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *included); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_login_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_client_login_pre[hIndex].func; - retVal___ = preHookFunc(&fd, sd, ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &included); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.login.parse_client_login(fd, sd, ip); + retVal___ = HPMHooks.source.login.config_read(filename, included); } - if( HPMHooks.count.HP_login_parse_client_login_post ) { - bool (*postHookFunc) (bool retVal___, int *fd, struct login_session_data *sd, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_client_login_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_client_login_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, sd, ip); + if (HPMHooks.count.HP_login_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool included); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, included); } } return retVal___; } -void HP_login_send_coding_key(int fd, struct login_session_data *sd) { +bool HP_login_config_read_inter(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - if( HPMHooks.count.HP_login_send_coding_key_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_inter_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_send_coding_key_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_send_coding_key_pre[hIndex].func; - preHookFunc(&fd, sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_inter_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_inter_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.send_coding_key(fd, sd); + retVal___ = HPMHooks.source.login.config_read_inter(filename, config, imported); } - if( HPMHooks.count.HP_login_send_coding_key_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_send_coding_key_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_send_coding_key_post[hIndex].func; - postHookFunc(&fd, sd); + if (HPMHooks.count.HP_login_config_read_inter_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_inter_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_inter_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } - return; + return retVal___; } -void HP_login_parse_request_coding_key(int fd, struct login_session_data *sd) { +bool HP_login_config_read_console(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - if( HPMHooks.count.HP_login_parse_request_coding_key_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_console_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_coding_key_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_request_coding_key_pre[hIndex].func; - preHookFunc(&fd, sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_console_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_console_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.parse_request_coding_key(fd, sd); + retVal___ = HPMHooks.source.login.config_read_console(filename, config, imported); } - if( HPMHooks.count.HP_login_parse_request_coding_key_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_coding_key_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_request_coding_key_post[hIndex].func; - postHookFunc(&fd, sd); + if (HPMHooks.count.HP_login_config_read_console_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_console_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_console_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } - return; + return retVal___; } -void HP_login_char_server_connection_status(int fd, struct login_session_data *sd, uint8 status) { +bool HP_login_config_read_log(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - if( HPMHooks.count.HP_login_char_server_connection_status_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd, uint8 *status); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_log_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_char_server_connection_status_pre[hIndex].func; - preHookFunc(&fd, sd, &status); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_log_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_log_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.char_server_connection_status(fd, sd, status); + retVal___ = HPMHooks.source.login.config_read_log(filename, config, imported); } - if( HPMHooks.count.HP_login_char_server_connection_status_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd, uint8 *status); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_char_server_connection_status_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_char_server_connection_status_post[hIndex].func; - postHookFunc(&fd, sd, &status); + if (HPMHooks.count.HP_login_config_read_log_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_log_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_log_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } - return; + return retVal___; } -void HP_login_parse_request_connection(int fd, struct login_session_data *sd, const char *ip, uint32 ipl) { +bool HP_login_config_read_account(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - if( HPMHooks.count.HP_login_parse_request_connection_pre ) { - void (*preHookFunc) (int *fd, struct login_session_data *sd, const char *ip, uint32 *ipl); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_account_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_request_connection_pre[hIndex].func; - preHookFunc(&fd, sd, ip, &ipl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_account_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_account_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.parse_request_connection(fd, sd, ip, ipl); + retVal___ = HPMHooks.source.login.config_read_account(filename, config, imported); } - if( HPMHooks.count.HP_login_parse_request_connection_post ) { - void (*postHookFunc) (int *fd, struct login_session_data *sd, const char *ip, uint32 *ipl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_request_connection_post[hIndex].func; - postHookFunc(&fd, sd, ip, &ipl); + if (HPMHooks.count.HP_login_config_read_account_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_account_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_account_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } - return; + return retVal___; } -int HP_login_parse_login(int fd) { +bool HP_login_config_read_permission(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_parse_login_pre ) { - int (*preHookFunc) (int *fd); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_login_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_parse_login_pre[hIndex].func; - retVal___ = preHookFunc(&fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.login.parse_login(fd); + retVal___ = HPMHooks.source.login.config_read_permission(filename, config, imported); } - if( HPMHooks.count.HP_login_parse_login_post ) { - int (*postHookFunc) (int retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_login_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_parse_login_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + if (HPMHooks.count.HP_login_config_read_permission_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -void HP_login_config_set_defaults(void) { +bool HP_login_config_read_permission_hash(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - if( HPMHooks.count.HP_login_config_set_defaults_pre ) { - void (*preHookFunc) (void); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_hash_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_defaults_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_config_set_defaults_pre[hIndex].func; - preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_hash_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_hash_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.login.config_set_defaults(); + retVal___ = HPMHooks.source.login.config_read_permission_hash(filename, config, imported); } - if( HPMHooks.count.HP_login_config_set_defaults_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_defaults_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_config_set_defaults_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_login_config_read_permission_hash_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_hash_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_hash_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } - return; + return retVal___; } -int HP_login_config_read(const char *cfgName) { +bool HP_login_config_read_permission_blacklist(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_login_config_read_pre ) { - int (*preHookFunc) (const char *cfgName); + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_permission_blacklist_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_login_config_read_pre[hIndex].func; - retVal___ = preHookFunc(cfgName); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_blacklist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_permission_blacklist_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.login.config_read(cfgName); + retVal___ = HPMHooks.source.login.config_read_permission_blacklist(filename, config, imported); } - if( HPMHooks.count.HP_login_config_read_post ) { - int (*postHookFunc) (int retVal___, const char *cfgName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_login_config_read_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cfgName); + if (HPMHooks.count.HP_login_config_read_permission_blacklist_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_permission_blacklist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_permission_blacklist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_login_config_read_users(const char *filename, struct config_t *config, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_login_config_read_users_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_users_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_read_users_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.login.config_read_users(filename, config, imported); + } + if (HPMHooks.count.HP_login_config_read_users_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_read_users_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_read_users_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -/* iMalloc */ -void HP_iMalloc_init(void) { +void HP_login_clear_dnsbl_servers(void) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_pre ) { + if (HPMHooks.count.HP_login_clear_dnsbl_servers_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_dnsbl_servers_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_clear_dnsbl_servers_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.init(); + HPMHooks.source.login.clear_dnsbl_servers(); } - if( HPMHooks.count.HP_iMalloc_init_post ) { + if (HPMHooks.count.HP_login_clear_dnsbl_servers_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_dnsbl_servers_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_clear_dnsbl_servers_post[hIndex].func; postHookFunc(); } } return; } -void HP_iMalloc_final(void) { +void HP_login_config_set_dnsbl_servers(struct config_setting_t *setting) { + int hIndex = 0; + if (HPMHooks.count.HP_login_config_set_dnsbl_servers_pre > 0) { + void (*preHookFunc) (struct config_setting_t **setting); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_dnsbl_servers_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_set_dnsbl_servers_pre[hIndex].func; + preHookFunc(&setting); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.config_set_dnsbl_servers(setting); + } + if (HPMHooks.count.HP_login_config_set_dnsbl_servers_post > 0) { + void (*postHookFunc) (struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_dnsbl_servers_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_set_dnsbl_servers_post[hIndex].func; + postHookFunc(setting); + } + } + return; +} +void HP_login_clear_client_hash_nodes(void) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_final_pre ) { + if (HPMHooks.count.HP_login_clear_client_hash_nodes_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_client_hash_nodes_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_clear_client_hash_nodes_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.final(); + HPMHooks.source.login.clear_client_hash_nodes(); } - if( HPMHooks.count.HP_iMalloc_final_post ) { + if (HPMHooks.count.HP_login_clear_client_hash_nodes_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_clear_client_hash_nodes_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_clear_client_hash_nodes_post[hIndex].func; postHookFunc(); } } return; } -void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) { +void HP_login_config_set_md5hash(struct config_setting_t *setting) { int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_malloc_pre ) { - void* (*preHookFunc) (size_t *size, const char *file, int *line, const char *func); + if (HPMHooks.count.HP_login_config_set_md5hash_pre > 0) { + void (*preHookFunc) (struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func; - retVal___ = preHookFunc(&size, file, &line, func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_md5hash_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_config_set_md5hash_pre[hIndex].func; + preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.login.config_set_md5hash(setting); + } + if (HPMHooks.count.HP_login_config_set_md5hash_post > 0) { + void (*postHookFunc) (struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_config_set_md5hash_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_config_set_md5hash_post[hIndex].func; + postHookFunc(setting); + } + } + return; +} +uint16 HP_login_convert_users_to_colors(uint16 users) { + int hIndex = 0; + uint16 retVal___ = 0; + if (HPMHooks.count.HP_login_convert_users_to_colors_pre > 0) { + uint16 (*preHookFunc) (uint16 *users); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_convert_users_to_colors_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_login_convert_users_to_colors_pre[hIndex].func; + retVal___ = preHookFunc(&users); + } + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func); + retVal___ = HPMHooks.source.login.convert_users_to_colors(users); } - if( HPMHooks.count.HP_iMalloc_malloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &size, file, &line, func); + if (HPMHooks.count.HP_login_convert_users_to_colors_post > 0) { + uint16 (*postHookFunc) (uint16 retVal___, uint16 users); + for (hIndex = 0; hIndex < HPMHooks.count.HP_login_convert_users_to_colors_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_login_convert_users_to_colors_post[hIndex].func; + retVal___ = postHookFunc(retVal___, users); } } return retVal___; } -void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) { +/* loginlog_interface */ +unsigned long HP_loginlog_failedattempts(uint32 ip, unsigned int minutes) { int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_calloc_pre ) { - void* (*preHookFunc) (size_t *num, size_t *size, const char *file, int *line, const char *func); + unsigned long retVal___ = 0; + if (HPMHooks.count.HP_loginlog_failedattempts_pre > 0) { + unsigned long (*preHookFunc) (uint32 *ip, unsigned int *minutes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func; - retVal___ = preHookFunc(&num, &size, file, &line, func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_failedattempts_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_loginlog_failedattempts_pre[hIndex].func; + retVal___ = preHookFunc(&ip, &minutes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func); + retVal___ = HPMHooks.source.loginlog.failedattempts(ip, minutes); } - if( HPMHooks.count.HP_iMalloc_calloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t *num, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &num, &size, file, &line, func); + if (HPMHooks.count.HP_loginlog_failedattempts_post > 0) { + unsigned long (*postHookFunc) (unsigned long retVal___, uint32 ip, unsigned int minutes); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_failedattempts_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_loginlog_failedattempts_post[hIndex].func; + retVal___ = postHookFunc(retVal___, ip, minutes); } } return retVal___; } -void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) { +void HP_loginlog_log(uint32 ip, const char *username, int rcode, const char *message) { int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_realloc_pre ) { - void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); + if (HPMHooks.count.HP_loginlog_log_pre > 0) { + void (*preHookFunc) (uint32 *ip, const char **username, int *rcode, const char **message); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_log_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_loginlog_log_pre[hIndex].func; + preHookFunc(&ip, &username, &rcode, &message); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.loginlog.log(ip, username, rcode, message); + } + if (HPMHooks.count.HP_loginlog_log_post > 0) { + void (*postHookFunc) (uint32 ip, const char *username, int rcode, const char *message); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_log_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_loginlog_log_post[hIndex].func; + postHookFunc(ip, username, rcode, message); + } + } + return; +} +bool HP_loginlog_init(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_loginlog_init_pre > 0) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func; - retVal___ = preHookFunc(p, &size, file, &line, func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_loginlog_init_pre[hIndex].func; + retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func); + retVal___ = HPMHooks.source.loginlog.init(); } - if( HPMHooks.count.HP_iMalloc_realloc_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); + if (HPMHooks.count.HP_loginlog_init_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_loginlog_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) { +bool HP_loginlog_final(void) { int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_reallocz_pre ) { - void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); + bool retVal___ = false; + if (HPMHooks.count.HP_loginlog_final_pre > 0) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func; - retVal___ = preHookFunc(p, &size, file, &line, func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_loginlog_final_pre[hIndex].func; + retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func); + retVal___ = HPMHooks.source.loginlog.final(); } - if( HPMHooks.count.HP_iMalloc_reallocz_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); + if (HPMHooks.count.HP_loginlog_final_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_loginlog_final_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) { +bool HP_loginlog_config_read_names(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrdup_pre ) { - char* (*preHookFunc) (const char *p, const char *file, int *line, const char *func); + bool retVal___ = false; + if (HPMHooks.count.HP_loginlog_config_read_names_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func; - retVal___ = preHookFunc(p, file, &line, func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_names_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_loginlog_config_read_names_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func); + retVal___ = HPMHooks.source.loginlog.config_read_names(filename, config, imported); } - if( HPMHooks.count.HP_iMalloc_astrdup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, file, &line, func); + if (HPMHooks.count.HP_loginlog_config_read_names_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_names_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_loginlog_config_read_names_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) { +bool HP_loginlog_config_read_log(const char *filename, struct config_t *config, bool imported) { int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrndup_pre ) { - char* (*preHookFunc) (const char *p, size_t *size, const char *file, int *line, const char *func); + bool retVal___ = false; + if (HPMHooks.count.HP_loginlog_config_read_log_pre > 0) { + bool (*preHookFunc) (const char **filename, struct config_t **config, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_log_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_loginlog_config_read_log_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.loginlog.config_read_log(filename, config, imported); + } + if (HPMHooks.count.HP_loginlog_config_read_log_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_log_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_loginlog_config_read_log_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); + } + } + return retVal___; +} +bool HP_loginlog_config_read(const char *filename, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_loginlog_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func; - retVal___ = preHookFunc(p, &size, file, &line, func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_loginlog_config_read_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func); + retVal___ = HPMHooks.source.loginlog.config_read(filename, imported); } - if( HPMHooks.count.HP_iMalloc_astrndup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); + if (HPMHooks.count.HP_loginlog_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_loginlog_config_read_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_loginlog_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, imported); } } return retVal___; } -void HP_iMalloc_free(void *p, const char *file, int line, const char *func) { +/* md5_interface */ +void HP_md5_string(const char *string, char *output) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_free_pre ) { - void (*preHookFunc) (void *p, const char *file, int *line, const char *func); + if (HPMHooks.count.HP_md5_string_pre > 0) { + void (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func; - preHookFunc(p, file, &line, func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_md5_string_pre[hIndex].func; + preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.free(p, file, line, func); + HPMHooks.source.md5.string(string, output); } - if( HPMHooks.count.HP_iMalloc_free_post ) { - void (*postHookFunc) (void *p, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func; - postHookFunc(p, file, &line, func); + if (HPMHooks.count.HP_md5_string_post > 0) { + void (*postHookFunc) (const char *string, char *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_md5_string_post[hIndex].func; + postHookFunc(string, output); } } return; } -void HP_iMalloc_memory_check(void) { +void HP_md5_binary(const uint8 *buf, const int buf_size, uint8 *output) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_memory_check_pre ) { - void (*preHookFunc) (void); + if (HPMHooks.count.HP_md5_binary_pre > 0) { + void (*preHookFunc) (const uint8 **buf, const int *buf_size, uint8 **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func; - preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_md5_binary_pre[hIndex].func; + preHookFunc(&buf, &buf_size, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.memory_check(); + HPMHooks.source.md5.binary(buf, buf_size, output); } - if( HPMHooks.count.HP_iMalloc_memory_check_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_md5_binary_post > 0) { + void (*postHookFunc) (const uint8 *buf, const int buf_size, uint8 *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_md5_binary_post[hIndex].func; + postHookFunc(buf, buf_size, output); + } + } + return; +} +void HP_md5_salt(int len, char *output) { + int hIndex = 0; + if (HPMHooks.count.HP_md5_salt_pre > 0) { + void (*preHookFunc) (int *len, char **output); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_md5_salt_pre[hIndex].func; + preHookFunc(&len, &output); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.md5.salt(len, output); + } + if (HPMHooks.count.HP_md5_salt_post > 0) { + void (*postHookFunc) (int len, char *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_md5_salt_post[hIndex].func; + postHookFunc(len, output); + } + } + return; +} +/* mutex_interface */ +struct mutex_data* HP_mutex_create(void) { + int hIndex = 0; + struct mutex_data* retVal___ = NULL; + if (HPMHooks.count.HP_mutex_create_pre > 0) { + struct mutex_data* (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_create_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mutex.create(); + } + if (HPMHooks.count.HP_mutex_create_post > 0) { + struct mutex_data* (*postHookFunc) (struct mutex_data* retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_mutex_destroy(struct mutex_data *m) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_destroy_pre > 0) { + void (*preHookFunc) (struct mutex_data **m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_destroy_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.destroy(m); + } + if (HPMHooks.count.HP_mutex_destroy_post > 0) { + void (*postHookFunc) (struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_destroy_post[hIndex].func; + postHookFunc(m); } } return; } -bool HP_iMalloc_verify_ptr(void *ptr) { +void HP_mutex_lock(struct mutex_data *m) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_lock_pre > 0) { + void (*preHookFunc) (struct mutex_data **m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_lock_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.lock(m); + } + if (HPMHooks.count.HP_mutex_lock_post > 0) { + void (*postHookFunc) (struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_lock_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +bool HP_mutex_trylock(struct mutex_data *m) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) { - bool (*preHookFunc) (void *ptr); + if (HPMHooks.count.HP_mutex_trylock_pre > 0) { + bool (*preHookFunc) (struct mutex_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func; - retVal___ = preHookFunc(ptr); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_trylock_pre[hIndex].func; + retVal___ = preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr); + retVal___ = HPMHooks.source.mutex.trylock(m); } - if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) { - bool (*postHookFunc) (bool retVal___, void *ptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ptr); + if (HPMHooks.count.HP_mutex_trylock_post > 0) { + bool (*postHookFunc) (bool retVal___, struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_trylock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m); } } return retVal___; } -size_t HP_iMalloc_usage(void) { +void HP_mutex_unlock(struct mutex_data *m) { int hIndex = 0; - size_t retVal___ = 0; - if( HPMHooks.count.HP_iMalloc_usage_pre ) { - size_t (*preHookFunc) (void); + if (HPMHooks.count.HP_mutex_unlock_pre > 0) { + void (*preHookFunc) (struct mutex_data **m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_unlock_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.unlock(m); + } + if (HPMHooks.count.HP_mutex_unlock_post > 0) { + void (*postHookFunc) (struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_unlock_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +struct cond_data* HP_mutex_cond_create(void) { + int hIndex = 0; + struct cond_data* retVal___ = NULL; + if (HPMHooks.count.HP_mutex_cond_create_pre > 0) { + struct cond_data* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_create_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.iMalloc.usage(); + retVal___ = HPMHooks.source.mutex.cond_create(); } - if( HPMHooks.count.HP_iMalloc_usage_post ) { - size_t (*postHookFunc) (size_t retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func; + if (HPMHooks.count.HP_mutex_cond_create_post > 0) { + struct cond_data* (*postHookFunc) (struct cond_data* retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_create_post[hIndex].func; retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_iMalloc_post_shutdown(void) { +void HP_mutex_cond_destroy(struct cond_data *c) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_destroy_pre > 0) { + void (*preHookFunc) (struct cond_data **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_destroy_pre[hIndex].func; + preHookFunc(&c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_destroy(c); + } + if (HPMHooks.count.HP_mutex_cond_destroy_post > 0) { + void (*postHookFunc) (struct cond_data *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_destroy_post[hIndex].func; + postHookFunc(c); + } + } + return; +} +void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeout_ticks) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_wait_pre > 0) { + void (*preHookFunc) (struct cond_data **c, struct mutex_data **m, sysint *timeout_ticks); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_wait_pre[hIndex].func; + preHookFunc(&c, &m, &timeout_ticks); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_wait(c, m, timeout_ticks); + } + if (HPMHooks.count.HP_mutex_cond_wait_post > 0) { + void (*postHookFunc) (struct cond_data *c, struct mutex_data *m, sysint timeout_ticks); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_wait_post[hIndex].func; + postHookFunc(c, m, timeout_ticks); + } + } + return; +} +void HP_mutex_cond_signal(struct cond_data *c) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_signal_pre > 0) { + void (*preHookFunc) (struct cond_data **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_signal_pre[hIndex].func; + preHookFunc(&c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_signal(c); + } + if (HPMHooks.count.HP_mutex_cond_signal_post > 0) { + void (*postHookFunc) (struct cond_data *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_signal_post[hIndex].func; + postHookFunc(c); + } + } + return; +} +void HP_mutex_cond_broadcast(struct cond_data *c) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_broadcast_pre > 0) { + void (*preHookFunc) (struct cond_data **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_pre[hIndex].func; + preHookFunc(&c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_broadcast(c); + } + if (HPMHooks.count.HP_mutex_cond_broadcast_post > 0) { + void (*postHookFunc) (struct cond_data *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_post[hIndex].func; + postHookFunc(c); + } + } + return; +} +/* nullpo_interface */ +void HP_nullpo_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) { + if (HPMHooks.count.HP_nullpo_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_nullpo_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.post_shutdown(); + HPMHooks.source.nullpo.init(); } - if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) { + if (HPMHooks.count.HP_nullpo_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_nullpo_init_post[hIndex].func; postHookFunc(); } } return; } -void HP_iMalloc_init_messages(void) { +void HP_nullpo_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_messages_pre ) { + if (HPMHooks.count.HP_nullpo_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_nullpo_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.init_messages(); + HPMHooks.source.nullpo.final(); } - if( HPMHooks.count.HP_iMalloc_init_messages_post ) { + if (HPMHooks.count.HP_nullpo_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_nullpo_final_post[hIndex].func; postHookFunc(); } } return; } -/* nullpo */ void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { int hIndex = 0; - if( HPMHooks.count.HP_nullpo_assert_report_pre ) { - void (*preHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); + if (HPMHooks.count.HP_nullpo_assert_report_pre > 0) { + void (*preHookFunc) (const char **file, int *line, const char **func, const char **targetname, const char **title); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func; - preHookFunc(file, &line, func, targetname, title); + preHookFunc(&file, &line, &func, &targetname, &title); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4628,26 +6707,345 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const { HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title); } - if( HPMHooks.count.HP_nullpo_assert_report_post ) { - void (*postHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) { + if (HPMHooks.count.HP_nullpo_assert_report_post > 0) { + void (*postHookFunc) (const char *file, int line, const char *func, const char *targetname, const char *title); + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++) { postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func; - postHookFunc(file, &line, func, targetname, title); + postHookFunc(file, line, func, targetname, title); + } + } + return; +} +/* packets_interface */ +void HP_packets_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.init(); + } + if (HPMHooks.count.HP_packets_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.final(); + } + if (HPMHooks.count.HP_packets_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_addLens(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_addLens_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLens_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_addLens_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.addLens(); + } + if (HPMHooks.count.HP_packets_addLens_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLens_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_addLens_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_addLen(int id, int len) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_addLen_pre > 0) { + void (*preHookFunc) (int *id, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLen_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_addLen_pre[hIndex].func; + preHookFunc(&id, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.addLen(id, len); + } + if (HPMHooks.count.HP_packets_addLen_post > 0) { + void (*postHookFunc) (int id, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLen_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_addLen_post[hIndex].func; + postHookFunc(id, len); + } + } + return; +} +/* rnd_interface */ +void HP_rnd_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_rnd_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rnd.init(); + } + if (HPMHooks.count.HP_rnd_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_rnd_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_rnd_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rnd.final(); + } + if (HPMHooks.count.HP_rnd_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_final_post[hIndex].func; + postHookFunc(); } } return; } -/* showmsg */ +void HP_rnd_seed(uint32 seed) { + int hIndex = 0; + if (HPMHooks.count.HP_rnd_seed_pre > 0) { + void (*preHookFunc) (uint32 *seed); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_seed_pre[hIndex].func; + preHookFunc(&seed); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rnd.seed(seed); + } + if (HPMHooks.count.HP_rnd_seed_post > 0) { + void (*postHookFunc) (uint32 seed); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_seed_post[hIndex].func; + postHookFunc(seed); + } + } + return; +} +int32 HP_rnd_random(void) { + int hIndex = 0; + int32 retVal___ = 0; + if (HPMHooks.count.HP_rnd_random_pre > 0) { + int32 (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_random_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.random(); + } + if (HPMHooks.count.HP_rnd_random_post > 0) { + int32 (*postHookFunc) (int32 retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_random_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +uint32 HP_rnd_roll(uint32 dice_faces) { + int hIndex = 0; + uint32 retVal___ = 0; + if (HPMHooks.count.HP_rnd_roll_pre > 0) { + uint32 (*preHookFunc) (uint32 *dice_faces); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_roll_pre[hIndex].func; + retVal___ = preHookFunc(&dice_faces); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.roll(dice_faces); + } + if (HPMHooks.count.HP_rnd_roll_post > 0) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 dice_faces); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_roll_post[hIndex].func; + retVal___ = postHookFunc(retVal___, dice_faces); + } + } + return retVal___; +} +int32 HP_rnd_value(int32 min, int32 max) { + int hIndex = 0; + int32 retVal___ = 0; + if (HPMHooks.count.HP_rnd_value_pre > 0) { + int32 (*preHookFunc) (int32 *min, int32 *max); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_value_pre[hIndex].func; + retVal___ = preHookFunc(&min, &max); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.value(min, max); + } + if (HPMHooks.count.HP_rnd_value_post > 0) { + int32 (*postHookFunc) (int32 retVal___, int32 min, int32 max); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, min, max); + } + } + return retVal___; +} +double HP_rnd_uniform(void) { + int hIndex = 0; + double retVal___ = 0.; + if (HPMHooks.count.HP_rnd_uniform_pre > 0) { + double (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_uniform_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.uniform(); + } + if (HPMHooks.count.HP_rnd_uniform_post > 0) { + double (*postHookFunc) (double retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_uniform_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +double HP_rnd_uniform53(void) { + int hIndex = 0; + double retVal___ = 0.; + if (HPMHooks.count.HP_rnd_uniform53_pre > 0) { + double (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_uniform53_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.uniform53(); + } + if (HPMHooks.count.HP_rnd_uniform53_post > 0) { + double (*postHookFunc) (double retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_uniform53_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +/* showmsg_interface */ void HP_showmsg_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_init_pre ) { + if (HPMHooks.count.HP_showmsg_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4655,9 +7053,9 @@ void HP_showmsg_init(void) { { HPMHooks.source.showmsg.init(); } - if( HPMHooks.count.HP_showmsg_init_post ) { + if (HPMHooks.count.HP_showmsg_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func; postHookFunc(); } @@ -4666,14 +7064,14 @@ void HP_showmsg_init(void) { } void HP_showmsg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_final_pre ) { + if (HPMHooks.count.HP_showmsg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4681,9 +7079,9 @@ void HP_showmsg_final(void) { { HPMHooks.source.showmsg.final(); } - if( HPMHooks.count.HP_showmsg_final_post ) { + if (HPMHooks.count.HP_showmsg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func; postHookFunc(); } @@ -4692,14 +7090,14 @@ void HP_showmsg_final(void) { } void HP_showmsg_clearScreen(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_clearScreen_pre ) { + if (HPMHooks.count.HP_showmsg_clearScreen_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4707,9 +7105,9 @@ void HP_showmsg_clearScreen(void) { { HPMHooks.source.showmsg.clearScreen(); } - if( HPMHooks.count.HP_showmsg_clearScreen_post ) { + if (HPMHooks.count.HP_showmsg_clearScreen_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func; postHookFunc(); } @@ -4719,16 +7117,16 @@ void HP_showmsg_clearScreen(void) { int HP_showmsg_showMessageV(const char *string, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_showmsg_showMessageV_pre ) { - int (*preHookFunc) (const char *string, va_list ap); + if (HPMHooks.count.HP_showmsg_showMessageV_pre > 0) { + int (*preHookFunc) (const char **string, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func; - retVal___ = preHookFunc(string, ap___copy); + retVal___ = preHookFunc(&string, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4738,9 +7136,9 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { retVal___ = HPMHooks.source.showmsg.showMessageV(string, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_showmsg_showMessageV_post ) { + if (HPMHooks.count.HP_showmsg_showMessageV_post > 0) { int (*postHookFunc) (int retVal___, const char *string, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, ap___copy); @@ -4749,17 +7147,17 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { } return retVal___; } -/* sockt */ +/* socket_interface */ void HP_sockt_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_init_pre ) { + if (HPMHooks.count.HP_sockt_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4767,9 +7165,9 @@ void HP_sockt_init(void) { { HPMHooks.source.sockt.init(); } - if( HPMHooks.count.HP_sockt_init_post ) { + if (HPMHooks.count.HP_sockt_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func; postHookFunc(); } @@ -4778,14 +7176,14 @@ void HP_sockt_init(void) { } void HP_sockt_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_final_pre ) { + if (HPMHooks.count.HP_sockt_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4793,9 +7191,9 @@ void HP_sockt_final(void) { { HPMHooks.source.sockt.final(); } - if( HPMHooks.count.HP_sockt_final_post ) { + if (HPMHooks.count.HP_sockt_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func; postHookFunc(); } @@ -4805,14 +7203,14 @@ void HP_sockt_final(void) { int HP_sockt_perform(int next) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_perform_pre ) { + if (HPMHooks.count.HP_sockt_perform_pre > 0) { int (*preHookFunc) (int *next); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func; retVal___ = preHookFunc(&next); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4820,25 +7218,25 @@ int HP_sockt_perform(int next) { { retVal___ = HPMHooks.source.sockt.perform(next); } - if( HPMHooks.count.HP_sockt_perform_post ) { - int (*postHookFunc) (int retVal___, int *next); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_perform_post > 0) { + int (*postHookFunc) (int retVal___, int next); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &next); + retVal___ = postHookFunc(retVal___, next); } } return retVal___; } void HP_sockt_datasync(int fd, bool send) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_datasync_pre ) { + if (HPMHooks.count.HP_sockt_datasync_pre > 0) { void (*preHookFunc) (int *fd, bool *send); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func; preHookFunc(&fd, &send); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4846,11 +7244,11 @@ void HP_sockt_datasync(int fd, bool send) { { HPMHooks.source.sockt.datasync(fd, send); } - if( HPMHooks.count.HP_sockt_datasync_post ) { - void (*postHookFunc) (int *fd, bool *send); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_datasync_post > 0) { + void (*postHookFunc) (int fd, bool send); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func; - postHookFunc(&fd, &send); + postHookFunc(fd, send); } } return; @@ -4858,14 +7256,14 @@ void HP_sockt_datasync(int fd, bool send) { int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_pre > 0) { int (*preHookFunc) (uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func; retVal___ = preHookFunc(&ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4873,11 +7271,11 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port); } - if( HPMHooks.count.HP_sockt_make_listen_bind_post ) { - int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_post > 0) { + int (*postHookFunc) (int retVal___, uint32 ip, uint16 port); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, &port); + retVal___ = postHookFunc(retVal___, ip, port); } } return retVal___; @@ -4885,14 +7283,14 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_connection_pre ) { - int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt *opt); + if (HPMHooks.count.HP_sockt_make_connection_pre > 0) { + int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func; - retVal___ = preHookFunc(&ip, &port, opt); + retVal___ = preHookFunc(&ip, &port, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4900,11 +7298,11 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { { retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt); } - if( HPMHooks.count.HP_sockt_make_connection_post ) { - int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port, struct hSockOpt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_make_connection_post > 0) { + int (*postHookFunc) (int retVal___, uint32 ip, uint16 port, struct hSockOpt *opt); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, &port, opt); + retVal___ = postHookFunc(retVal___, ip, port, opt); } } return retVal___; @@ -4912,14 +7310,14 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_pre > 0) { int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4927,11 +7325,11 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si { retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size); } - if( HPMHooks.count.HP_sockt_realloc_fifo_post ) { - int (*postHookFunc) (int retVal___, int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_post > 0) { + int (*postHookFunc) (int retVal___, int fd, unsigned int rfifo_size, unsigned int wfifo_size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &rfifo_size, &wfifo_size); + retVal___ = postHookFunc(retVal___, fd, rfifo_size, wfifo_size); } } return retVal___; @@ -4939,14 +7337,14 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si int HP_sockt_realloc_writefifo(int fd, size_t addition) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_pre > 0) { int (*preHookFunc) (int *fd, size_t *addition); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &addition); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4954,53 +7352,79 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) { { retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition); } - if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) { - int (*postHookFunc) (int retVal___, int *fd, size_t *addition); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_post > 0) { + int (*postHookFunc) (int retVal___, int fd, size_t addition); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &addition); + retVal___ = postHookFunc(retVal___, fd, addition); } } return retVal___; } -int HP_sockt_wfifoset(int fd, size_t len) { +int HP_sockt_wfifoset(int fd, size_t len, bool validate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_wfifoset_pre ) { - int (*preHookFunc) (int *fd, size_t *len); + if (HPMHooks.count.HP_sockt_wfifoset_pre > 0) { + int (*preHookFunc) (int *fd, size_t *len, bool *validate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &len); + retVal___ = preHookFunc(&fd, &len, &validate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.sockt.wfifoset(fd, len); + retVal___ = HPMHooks.source.sockt.wfifoset(fd, len, validate); } - if( HPMHooks.count.HP_sockt_wfifoset_post ) { - int (*postHookFunc) (int retVal___, int *fd, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_wfifoset_post > 0) { + int (*postHookFunc) (int retVal___, int fd, size_t len, bool validate); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &len); + retVal___ = postHookFunc(retVal___, fd, len, validate); } } return retVal___; } +void HP_sockt_wfifohead(int fd, size_t len) { + int hIndex = 0; + if (HPMHooks.count.HP_sockt_wfifohead_pre > 0) { + void (*preHookFunc) (int *fd, size_t *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_wfifohead_pre[hIndex].func; + preHookFunc(&fd, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.wfifohead(fd, len); + } + if (HPMHooks.count.HP_sockt_wfifohead_post > 0) { + void (*postHookFunc) (int fd, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_wfifohead_post[hIndex].func; + postHookFunc(fd, len); + } + } + return; +} int HP_sockt_rfifoskip(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_rfifoskip_pre ) { + if (HPMHooks.count.HP_sockt_rfifoskip_pre > 0) { int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func; retVal___ = preHookFunc(&fd, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5008,25 +7432,25 @@ int HP_sockt_rfifoskip(int fd, size_t len) { { retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len); } - if( HPMHooks.count.HP_sockt_rfifoskip_post ) { - int (*postHookFunc) (int retVal___, int *fd, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_rfifoskip_post > 0) { + int (*postHookFunc) (int retVal___, int fd, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &len); + retVal___ = postHookFunc(retVal___, fd, len); } } return retVal___; } void HP_sockt_close(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_close_pre ) { + if (HPMHooks.count.HP_sockt_close_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5034,11 +7458,37 @@ void HP_sockt_close(int fd) { { HPMHooks.source.sockt.close(fd); } - if( HPMHooks.count.HP_sockt_close_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_close_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); + } + } + return; +} +void HP_sockt_validateWfifo(int fd, size_t len) { + int hIndex = 0; + if (HPMHooks.count.HP_sockt_validateWfifo_pre > 0) { + void (*preHookFunc) (int *fd, size_t *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_validateWfifo_pre[hIndex].func; + preHookFunc(&fd, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.validateWfifo(fd, len); + } + if (HPMHooks.count.HP_sockt_validateWfifo_post > 0) { + void (*postHookFunc) (int fd, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_validateWfifo_post[hIndex].func; + postHookFunc(fd, len); } } return; @@ -5046,14 +7496,14 @@ void HP_sockt_close(int fd) { bool HP_sockt_session_is_valid(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_valid_pre ) { + if (HPMHooks.count.HP_sockt_session_is_valid_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5061,11 +7511,11 @@ bool HP_sockt_session_is_valid(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_valid(fd); } - if( HPMHooks.count.HP_sockt_session_is_valid_post ) { - bool (*postHookFunc) (bool retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_session_is_valid_post > 0) { + bool (*postHookFunc) (bool retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -5073,14 +7523,14 @@ bool HP_sockt_session_is_valid(int fd) { bool HP_sockt_session_is_active(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_active_pre ) { + if (HPMHooks.count.HP_sockt_session_is_active_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5088,25 +7538,25 @@ bool HP_sockt_session_is_active(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_active(fd); } - if( HPMHooks.count.HP_sockt_session_is_active_post ) { - bool (*postHookFunc) (bool retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_session_is_active_post > 0) { + bool (*postHookFunc) (bool retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } void HP_sockt_flush(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_pre ) { + if (HPMHooks.count.HP_sockt_flush_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5114,25 +7564,25 @@ void HP_sockt_flush(int fd) { { HPMHooks.source.sockt.flush(fd); } - if( HPMHooks.count.HP_sockt_flush_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_flush_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_sockt_flush_fifos(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_fifos_pre ) { + if (HPMHooks.count.HP_sockt_flush_fifos_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5140,25 +7590,52 @@ void HP_sockt_flush_fifos(void) { { HPMHooks.source.sockt.flush_fifos(); } - if( HPMHooks.count.HP_sockt_flush_fifos_post ) { + if (HPMHooks.count.HP_sockt_flush_fifos_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func; postHookFunc(); } } return; } +int HP_sockt_connect_client(int listen_fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_sockt_connect_client_pre > 0) { + int (*preHookFunc) (int *listen_fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_connect_client_pre[hIndex].func; + retVal___ = preHookFunc(&listen_fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.connect_client(listen_fd); + } + if (HPMHooks.count.HP_sockt_connect_client_post > 0) { + int (*postHookFunc) (int retVal___, int listen_fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_connect_client_post[hIndex].func; + retVal___ = postHookFunc(retVal___, listen_fd); + } + } + return retVal___; +} void HP_sockt_set_nonblocking(int fd, unsigned long yes) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) { void (*preHookFunc) (int *fd, unsigned long *yes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func; preHookFunc(&fd, &yes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5166,25 +7643,25 @@ void HP_sockt_set_nonblocking(int fd, unsigned long yes) { { HPMHooks.source.sockt.set_nonblocking(fd, yes); } - if( HPMHooks.count.HP_sockt_set_nonblocking_post ) { - void (*postHookFunc) (int *fd, unsigned long *yes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_post > 0) { + void (*postHookFunc) (int fd, unsigned long yes); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func; - postHookFunc(&fd, &yes); + postHookFunc(fd, yes); } } return; } void HP_sockt_set_defaultparse(ParseFunc defaultparse) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_pre > 0) { void (*preHookFunc) (ParseFunc *defaultparse); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func; preHookFunc(&defaultparse); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5192,11 +7669,11 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { { HPMHooks.source.sockt.set_defaultparse(defaultparse); } - if( HPMHooks.count.HP_sockt_set_defaultparse_post ) { - void (*postHookFunc) (ParseFunc *defaultparse); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_post > 0) { + void (*postHookFunc) (ParseFunc defaultparse); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func; - postHookFunc(&defaultparse); + postHookFunc(defaultparse); } } return; @@ -5204,14 +7681,14 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { uint32 HP_sockt_host2ip(const char *hostname) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_host2ip_pre ) { - uint32 (*preHookFunc) (const char *hostname); + if (HPMHooks.count.HP_sockt_host2ip_pre > 0) { + uint32 (*preHookFunc) (const char **hostname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func; - retVal___ = preHookFunc(hostname); + retVal___ = preHookFunc(&hostname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5219,9 +7696,9 @@ uint32 HP_sockt_host2ip(const char *hostname) { { retVal___ = HPMHooks.source.sockt.host2ip(hostname); } - if( HPMHooks.count.HP_sockt_host2ip_post ) { + if (HPMHooks.count.HP_sockt_host2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *hostname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, hostname); } @@ -5231,14 +7708,14 @@ uint32 HP_sockt_host2ip(const char *hostname) { const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sockt_ip2str_pre ) { - const char* (*preHookFunc) (uint32 *ip, char *ip_str); + if (HPMHooks.count.HP_sockt_ip2str_pre > 0) { + const char* (*preHookFunc) (uint32 *ip, char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func; - retVal___ = preHookFunc(&ip, ip_str); + retVal___ = preHookFunc(&ip, &ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5246,11 +7723,11 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { { retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str); } - if( HPMHooks.count.HP_sockt_ip2str_post ) { - const char* (*postHookFunc) (const char* retVal___, uint32 *ip, char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_ip2str_post > 0) { + const char* (*postHookFunc) (const char* retVal___, uint32 ip, char *ip_str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, ip_str); + retVal___ = postHookFunc(retVal___, ip, ip_str); } } return retVal___; @@ -5258,14 +7735,14 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { uint32 HP_sockt_str2ip(const char *ip_str) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_str2ip_pre ) { - uint32 (*preHookFunc) (const char *ip_str); + if (HPMHooks.count.HP_sockt_str2ip_pre > 0) { + uint32 (*preHookFunc) (const char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func; - retVal___ = preHookFunc(ip_str); + retVal___ = preHookFunc(&ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5273,9 +7750,9 @@ uint32 HP_sockt_str2ip(const char *ip_str) { { retVal___ = HPMHooks.source.sockt.str2ip(ip_str); } - if( HPMHooks.count.HP_sockt_str2ip_post ) { + if (HPMHooks.count.HP_sockt_str2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip_str); } @@ -5285,14 +7762,14 @@ uint32 HP_sockt_str2ip(const char *ip_str) { uint16 HP_sockt_ntows(uint16 netshort) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_sockt_ntows_pre ) { + if (HPMHooks.count.HP_sockt_ntows_pre > 0) { uint16 (*preHookFunc) (uint16 *netshort); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func; retVal___ = preHookFunc(&netshort); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5300,11 +7777,11 @@ uint16 HP_sockt_ntows(uint16 netshort) { { retVal___ = HPMHooks.source.sockt.ntows(netshort); } - if( HPMHooks.count.HP_sockt_ntows_post ) { - uint16 (*postHookFunc) (uint16 retVal___, uint16 *netshort); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_ntows_post > 0) { + uint16 (*postHookFunc) (uint16 retVal___, uint16 netshort); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &netshort); + retVal___ = postHookFunc(retVal___, netshort); } } return retVal___; @@ -5312,14 +7789,14 @@ uint16 HP_sockt_ntows(uint16 netshort) { int HP_sockt_getips(uint32 *ips, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_getips_pre ) { - int (*preHookFunc) (uint32 *ips, int *max); + if (HPMHooks.count.HP_sockt_getips_pre > 0) { + int (*preHookFunc) (uint32 **ips, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func; - retVal___ = preHookFunc(ips, &max); + retVal___ = preHookFunc(&ips, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5327,25 +7804,25 @@ int HP_sockt_getips(uint32 *ips, int max) { { retVal___ = HPMHooks.source.sockt.getips(ips, max); } - if( HPMHooks.count.HP_sockt_getips_post ) { - int (*postHookFunc) (int retVal___, uint32 *ips, int *max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_getips_post > 0) { + int (*postHookFunc) (int retVal___, uint32 *ips, int max); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ips, &max); + retVal___ = postHookFunc(retVal___, ips, max); } } return retVal___; } void HP_sockt_eof(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_eof_pre ) { + if (HPMHooks.count.HP_sockt_eof_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5353,11 +7830,11 @@ void HP_sockt_eof(int fd) { { HPMHooks.source.sockt.eof(fd); } - if( HPMHooks.count.HP_sockt_eof_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_eof_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -5365,14 +7842,14 @@ void HP_sockt_eof(int fd) { uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) { - uint32 (*preHookFunc) (uint32 *ip, struct s_subnet *info); + if (HPMHooks.count.HP_sockt_lan_subnet_check_pre > 0) { + uint32 (*preHookFunc) (uint32 *ip, struct s_subnet **info); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func; - retVal___ = preHookFunc(&ip, info); + retVal___ = preHookFunc(&ip, &info); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5380,11 +7857,11 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { { retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info); } - if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) { - uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip, struct s_subnet *info); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_lan_subnet_check_post > 0) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 ip, struct s_subnet *info); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, info); + retVal___ = postHookFunc(retVal___, ip, info); } } return retVal___; @@ -5392,14 +7869,14 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { bool HP_sockt_allowed_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5407,11 +7884,11 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip); } - if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) { - bool (*postHookFunc) (bool retVal___, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_post > 0) { + bool (*postHookFunc) (bool retVal___, uint32 ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip); + retVal___ = postHookFunc(retVal___, ip); } } return retVal___; @@ -5419,14 +7896,14 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { bool HP_sockt_trusted_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5434,11 +7911,11 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip); } - if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) { - bool (*postHookFunc) (bool retVal___, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_post > 0) { + bool (*postHookFunc) (bool retVal___, uint32 ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip); + retVal___ = postHookFunc(retVal___, ip); } } return retVal___; @@ -5446,14 +7923,14 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) { - int (*preHookFunc) (struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname); + if (HPMHooks.count.HP_sockt_net_config_read_sub_pre > 0) { + int (*preHookFunc) (struct config_setting_t **t, struct s_subnet_vector **list, const char **filename, const char **groupname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func; - retVal___ = preHookFunc(t, list, filename, groupname); + retVal___ = preHookFunc(&t, &list, &filename, &groupname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5461,9 +7938,9 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec { retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, filename, groupname); } - if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_sub_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, t, list, filename, groupname); } @@ -5472,14 +7949,14 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec } void HP_sockt_net_config_read(const char *filename) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_net_config_read_pre ) { - void (*preHookFunc) (const char *filename); + if (HPMHooks.count.HP_sockt_net_config_read_pre > 0) { + void (*preHookFunc) (const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func; - preHookFunc(filename); + preHookFunc(&filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5487,27 +7964,27 @@ void HP_sockt_net_config_read(const char *filename) { { HPMHooks.source.sockt.net_config_read(filename); } - if( HPMHooks.count.HP_sockt_net_config_read_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_post > 0) { void (*postHookFunc) (const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func; postHookFunc(filename); } } return; } -/* SQL */ +/* sql_interface */ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Connect_pre ) { - int (*preHookFunc) (struct Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); + if (HPMHooks.count.HP_SQL_Connect_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **user, const char **passwd, const char **host, uint16 *port, const char **db); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func; - retVal___ = preHookFunc(self, user, passwd, host, &port, db); + retVal___ = preHookFunc(&self, &user, &passwd, &host, &port, &db); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5515,11 +7992,11 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const { retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db); } - if( HPMHooks.count.HP_SQL_Connect_post ) { - int (*postHookFunc) (int retVal___, struct Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_Connect_post > 0) { + int (*postHookFunc) (int retVal___, struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, user, passwd, host, &port, db); + retVal___ = postHookFunc(retVal___, self, user, passwd, host, port, db); } } return retVal___; @@ -5527,14 +8004,14 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetTimeout_pre ) { - int (*preHookFunc) (struct Sql *self, uint32 *out_timeout); + if (HPMHooks.count.HP_SQL_GetTimeout_pre > 0) { + int (*preHookFunc) (struct Sql **self, uint32 **out_timeout); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func; - retVal___ = preHookFunc(self, out_timeout); + retVal___ = preHookFunc(&self, &out_timeout); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5542,9 +8019,9 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { { retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout); } - if( HPMHooks.count.HP_SQL_GetTimeout_post ) { + if (HPMHooks.count.HP_SQL_GetTimeout_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, uint32 *out_timeout); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_timeout); } @@ -5554,14 +8031,14 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) { - int (*preHookFunc) (struct Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); + if (HPMHooks.count.HP_SQL_GetColumnNames_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **table, char **out_buf, size_t *buf_len, char *sep); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func; - retVal___ = preHookFunc(self, table, out_buf, &buf_len, &sep); + retVal___ = preHookFunc(&self, &table, &out_buf, &buf_len, &sep); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5569,11 +8046,11 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si { retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep); } - if( HPMHooks.count.HP_SQL_GetColumnNames_post ) { - int (*postHookFunc) (int retVal___, struct Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_GetColumnNames_post > 0) { + int (*postHookFunc) (int retVal___, struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, table, out_buf, &buf_len, &sep); + retVal___ = postHookFunc(retVal___, self, table, out_buf, buf_len, sep); } } return retVal___; @@ -5581,14 +8058,14 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_SetEncoding_pre ) { - int (*preHookFunc) (struct Sql *self, const char *encoding); + if (HPMHooks.count.HP_SQL_SetEncoding_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **encoding); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func; - retVal___ = preHookFunc(self, encoding); + retVal___ = preHookFunc(&self, &encoding); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5596,9 +8073,9 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { { retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding); } - if( HPMHooks.count.HP_SQL_SetEncoding_post ) { + if (HPMHooks.count.HP_SQL_SetEncoding_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *encoding); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, encoding); } @@ -5608,14 +8085,14 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int HP_SQL_Ping(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Ping_pre ) { - int (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_Ping_pre > 0) { + int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5623,9 +8100,9 @@ int HP_SQL_Ping(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.Ping(self); } - if( HPMHooks.count.HP_SQL_Ping_post ) { + if (HPMHooks.count.HP_SQL_Ping_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -5635,14 +8112,14 @@ int HP_SQL_Ping(struct Sql *self) { size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeString_pre ) { - size_t (*preHookFunc) (struct Sql *self, char *out_to, const char *from); + if (HPMHooks.count.HP_SQL_EscapeString_pre > 0) { + size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func; - retVal___ = preHookFunc(self, out_to, from); + retVal___ = preHookFunc(&self, &out_to, &from); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5650,9 +8127,9 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { { retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from); } - if( HPMHooks.count.HP_SQL_EscapeString_post ) { + if (HPMHooks.count.HP_SQL_EscapeString_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_to, from); } @@ -5662,14 +8139,14 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, size_t from_len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) { - size_t (*preHookFunc) (struct Sql *self, char *out_to, const char *from, size_t *from_len); + if (HPMHooks.count.HP_SQL_EscapeStringLen_pre > 0) { + size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from, size_t *from_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func; - retVal___ = preHookFunc(self, out_to, from, &from_len); + retVal___ = preHookFunc(&self, &out_to, &from, &from_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5677,11 +8154,11 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, { retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len); } - if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) { - size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from, size_t *from_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_EscapeStringLen_post > 0) { + size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from, size_t from_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, out_to, from, &from_len); + retVal___ = postHookFunc(retVal___, self, out_to, from, from_len); } } return retVal___; @@ -5689,16 +8166,16 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryV_pre ) { - int (*preHookFunc) (struct Sql *self, const char *query, va_list args); + if (HPMHooks.count.HP_SQL_QueryV_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func; - retVal___ = preHookFunc(self, query, args___copy); + retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5708,9 +8185,9 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_QueryV_post ) { + if (HPMHooks.count.HP_SQL_QueryV_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -5722,14 +8199,14 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int HP_SQL_QueryStr(struct Sql *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryStr_pre ) { - int (*preHookFunc) (struct Sql *self, const char *query); + if (HPMHooks.count.HP_SQL_QueryStr_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func; - retVal___ = preHookFunc(self, query); + retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5737,9 +8214,9 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { { retVal___ = HPMHooks.source.SQL.QueryStr(self, query); } - if( HPMHooks.count.HP_SQL_QueryStr_post ) { + if (HPMHooks.count.HP_SQL_QueryStr_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -5749,14 +8226,14 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { uint64 HP_SQL_LastInsertId(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_LastInsertId_pre ) { - uint64 (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_LastInsertId_pre > 0) { + uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5764,9 +8241,9 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.LastInsertId(self); } - if( HPMHooks.count.HP_SQL_LastInsertId_post ) { + if (HPMHooks.count.HP_SQL_LastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -5776,14 +8253,14 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { uint32 HP_SQL_NumColumns(struct Sql *self) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumColumns_pre ) { - uint32 (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_NumColumns_pre > 0) { + uint32 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5791,9 +8268,9 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumColumns(self); } - if( HPMHooks.count.HP_SQL_NumColumns_post ) { + if (HPMHooks.count.HP_SQL_NumColumns_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -5803,14 +8280,14 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { uint64 HP_SQL_NumRows(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumRows_pre ) { - uint64 (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_NumRows_pre > 0) { + uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5818,9 +8295,9 @@ uint64 HP_SQL_NumRows(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumRows(self); } - if( HPMHooks.count.HP_SQL_NumRows_post ) { + if (HPMHooks.count.HP_SQL_NumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -5830,14 +8307,14 @@ uint64 HP_SQL_NumRows(struct Sql *self) { int HP_SQL_NextRow(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_NextRow_pre ) { - int (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_NextRow_pre > 0) { + int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5845,9 +8322,9 @@ int HP_SQL_NextRow(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NextRow(self); } - if( HPMHooks.count.HP_SQL_NextRow_post ) { + if (HPMHooks.count.HP_SQL_NextRow_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -5857,14 +8334,14 @@ int HP_SQL_NextRow(struct Sql *self) { int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetData_pre ) { - int (*preHookFunc) (struct Sql *self, size_t *col, char **out_buf, size_t *out_len); + if (HPMHooks.count.HP_SQL_GetData_pre > 0) { + int (*preHookFunc) (struct Sql **self, size_t *col, char ***out_buf, size_t **out_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func; - retVal___ = preHookFunc(self, &col, out_buf, out_len); + retVal___ = preHookFunc(&self, &col, &out_buf, &out_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5872,25 +8349,25 @@ int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len { retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len); } - if( HPMHooks.count.HP_SQL_GetData_post ) { - int (*postHookFunc) (int retVal___, struct Sql *self, size_t *col, char **out_buf, size_t *out_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_GetData_post > 0) { + int (*postHookFunc) (int retVal___, struct Sql *self, size_t col, char **out_buf, size_t *out_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, &col, out_buf, out_len); + retVal___ = postHookFunc(retVal___, self, col, out_buf, out_len); } } return retVal___; } void HP_SQL_FreeResult(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_FreeResult_pre ) { - void (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_FreeResult_pre > 0) { + void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5898,9 +8375,9 @@ void HP_SQL_FreeResult(struct Sql *self) { { HPMHooks.source.SQL.FreeResult(self); } - if( HPMHooks.count.HP_SQL_FreeResult_post ) { + if (HPMHooks.count.HP_SQL_FreeResult_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func; postHookFunc(self); } @@ -5909,14 +8386,14 @@ void HP_SQL_FreeResult(struct Sql *self) { } void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_ShowDebug__pre ) { - void (*preHookFunc) (struct Sql *self, const char *debug_file, const unsigned long *debug_line); + if (HPMHooks.count.HP_SQL_ShowDebug__pre > 0) { + void (*preHookFunc) (struct Sql **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func; - preHookFunc(self, debug_file, &debug_line); + preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5924,25 +8401,25 @@ void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned { HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_ShowDebug__post ) { - void (*postHookFunc) (struct Sql *self, const char *debug_file, const unsigned long *debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_ShowDebug__post > 0) { + void (*postHookFunc) (struct Sql *self, const char *debug_file, const unsigned long debug_line); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func; - postHookFunc(self, debug_file, &debug_line); + postHookFunc(self, debug_file, debug_line); } } return; } void HP_SQL_Free(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_Free_pre ) { - void (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_Free_pre > 0) { + void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5950,9 +8427,9 @@ void HP_SQL_Free(struct Sql *self) { { HPMHooks.source.SQL.Free(self); } - if( HPMHooks.count.HP_SQL_Free_post ) { + if (HPMHooks.count.HP_SQL_Free_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func; postHookFunc(self); } @@ -5962,14 +8439,14 @@ void HP_SQL_Free(struct Sql *self) { struct Sql* HP_SQL_Malloc(void) { int hIndex = 0; struct Sql* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_Malloc_pre ) { + if (HPMHooks.count.HP_SQL_Malloc_pre > 0) { struct Sql* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5977,9 +8454,9 @@ struct Sql* HP_SQL_Malloc(void) { { retVal___ = HPMHooks.source.SQL.Malloc(); } - if( HPMHooks.count.HP_SQL_Malloc_post ) { + if (HPMHooks.count.HP_SQL_Malloc_post > 0) { struct Sql* (*postHookFunc) (struct Sql* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5989,14 +8466,14 @@ struct Sql* HP_SQL_Malloc(void) { struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int hIndex = 0; struct SqlStmt* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) { - struct SqlStmt* (*preHookFunc) (struct Sql *sql); + if (HPMHooks.count.HP_SQL_StmtMalloc_pre > 0) { + struct SqlStmt* (*preHookFunc) (struct Sql **sql); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func; - retVal___ = preHookFunc(sql); + retVal___ = preHookFunc(&sql); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6004,9 +8481,9 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { { retVal___ = HPMHooks.source.SQL.StmtMalloc(sql); } - if( HPMHooks.count.HP_SQL_StmtMalloc_post ) { + if (HPMHooks.count.HP_SQL_StmtMalloc_post > 0) { struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, struct Sql *sql); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func; retVal___ = postHookFunc(retVal___, sql); } @@ -6016,16 +8493,16 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) { - int (*preHookFunc) (struct SqlStmt *self, const char *query, va_list args); + if (HPMHooks.count.HP_SQL_StmtPrepareV_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func; - retVal___ = preHookFunc(self, query, args___copy); + retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6035,9 +8512,9 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareV_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -6049,14 +8526,14 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) { - int (*preHookFunc) (struct SqlStmt *self, const char *query); + if (HPMHooks.count.HP_SQL_StmtPrepareStr_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func; - retVal___ = preHookFunc(self, query); + retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6064,9 +8541,9 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { { retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query); } - if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareStr_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -6076,14 +8553,14 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) { - size_t (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNumParams_pre > 0) { + size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6091,9 +8568,9 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumParams(self); } - if( HPMHooks.count.HP_SQL_StmtNumParams_post ) { + if (HPMHooks.count.HP_SQL_StmtNumParams_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6103,14 +8580,14 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) { - int (*preHookFunc) (struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, const void *buffer, size_t *buffer_len); + if (HPMHooks.count.HP_SQL_StmtBindParam_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, const void **buffer, size_t *buffer_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func; - retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len); + retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6118,11 +8595,11 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff { retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len); } - if( HPMHooks.count.HP_SQL_StmtBindParam_post ) { - int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, const void *buffer, size_t *buffer_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_StmtBindParam_post > 0) { + int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len); + retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len); } } return retVal___; @@ -6130,14 +8607,14 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff int HP_SQL_StmtExecute(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtExecute_pre ) { - int (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtExecute_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6145,9 +8622,9 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtExecute(self); } - if( HPMHooks.count.HP_SQL_StmtExecute_post ) { + if (HPMHooks.count.HP_SQL_StmtExecute_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6157,14 +8634,14 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) { - uint64 (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtLastInsertId_pre > 0) { + uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6172,9 +8649,9 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self); } - if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) { + if (HPMHooks.count.HP_SQL_StmtLastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6184,14 +8661,14 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) { - size_t (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNumColumns_pre > 0) { + size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6199,9 +8676,9 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumColumns(self); } - if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) { + if (HPMHooks.count.HP_SQL_StmtNumColumns_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6211,14 +8688,14 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) { - int (*preHookFunc) (struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); + if (HPMHooks.count.HP_SQL_StmtBindColumn_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, void **buffer, size_t *buffer_len, uint32 **out_length, int8 **out_is_null); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func; - retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); + retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len, &out_length, &out_is_null); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6226,11 +8703,11 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf { retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } - if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) { - int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_StmtBindColumn_post > 0) { + int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); + retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } } return retVal___; @@ -6238,14 +8715,14 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) { - uint64 (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNumRows_pre > 0) { + uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6253,9 +8730,9 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumRows(self); } - if( HPMHooks.count.HP_SQL_StmtNumRows_post ) { + if (HPMHooks.count.HP_SQL_StmtNumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6265,14 +8742,14 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int HP_SQL_StmtNextRow(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) { - int (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNextRow_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6280,9 +8757,9 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNextRow(self); } - if( HPMHooks.count.HP_SQL_StmtNextRow_post ) { + if (HPMHooks.count.HP_SQL_StmtNextRow_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6291,14 +8768,14 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { } void HP_SQL_StmtFreeResult(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) { - void (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtFreeResult_pre > 0) { + void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6306,9 +8783,9 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFreeResult(self); } - if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) { + if (HPMHooks.count.HP_SQL_StmtFreeResult_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func; postHookFunc(self); } @@ -6317,14 +8794,14 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { } void HP_SQL_StmtFree(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFree_pre ) { - void (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtFree_pre > 0) { + void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6332,9 +8809,9 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFree(self); } - if( HPMHooks.count.HP_SQL_StmtFree_post ) { + if (HPMHooks.count.HP_SQL_StmtFree_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func; postHookFunc(self); } @@ -6343,14 +8820,14 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { } void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) { - void (*preHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long *debug_line); + if (HPMHooks.count.HP_SQL_StmtShowDebug__pre > 0) { + void (*preHookFunc) (struct SqlStmt **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func; - preHookFunc(self, debug_file, &debug_line); + preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6358,27 +8835,27 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u { HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) { - void (*postHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long *debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_StmtShowDebug__post > 0) { + void (*postHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long debug_line); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func; - postHookFunc(self, debug_file, &debug_line); + postHookFunc(self, debug_file, debug_line); } } return; } -/* StrBuf */ +/* stringbuf_interface */ StringBuf* HP_StrBuf_Malloc(void) { int hIndex = 0; StringBuf* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Malloc_pre ) { + if (HPMHooks.count.HP_StrBuf_Malloc_pre > 0) { StringBuf* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6386,9 +8863,9 @@ StringBuf* HP_StrBuf_Malloc(void) { { retVal___ = HPMHooks.source.StrBuf.Malloc(); } - if( HPMHooks.count.HP_StrBuf_Malloc_post ) { + if (HPMHooks.count.HP_StrBuf_Malloc_post > 0) { StringBuf* (*postHookFunc) (StringBuf* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -6397,14 +8874,14 @@ StringBuf* HP_StrBuf_Malloc(void) { } void HP_StrBuf_Init(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Init_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Init_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6412,9 +8889,9 @@ void HP_StrBuf_Init(StringBuf *self) { { HPMHooks.source.StrBuf.Init(self); } - if( HPMHooks.count.HP_StrBuf_Init_post ) { + if (HPMHooks.count.HP_StrBuf_Init_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func; postHookFunc(self); } @@ -6424,16 +8901,16 @@ void HP_StrBuf_Init(StringBuf *self) { int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) { - int (*preHookFunc) (StringBuf *self, const char *fmt, va_list args); + if (HPMHooks.count.HP_StrBuf_Vprintf_pre > 0) { + int (*preHookFunc) (StringBuf **self, const char **fmt, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func; - retVal___ = preHookFunc(self, fmt, args___copy); + retVal___ = preHookFunc(&self, &fmt, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6443,9 +8920,9 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_StrBuf_Vprintf_post ) { + if (HPMHooks.count.HP_StrBuf_Vprintf_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, fmt, args___copy); @@ -6457,14 +8934,14 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Append_pre ) { - int (*preHookFunc) (StringBuf *self, const StringBuf *sbuf); + if (HPMHooks.count.HP_StrBuf_Append_pre > 0) { + int (*preHookFunc) (StringBuf **self, const StringBuf **sbuf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func; - retVal___ = preHookFunc(self, sbuf); + retVal___ = preHookFunc(&self, &sbuf); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6472,9 +8949,9 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { { retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf); } - if( HPMHooks.count.HP_StrBuf_Append_post ) { + if (HPMHooks.count.HP_StrBuf_Append_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, sbuf); } @@ -6484,14 +8961,14 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) { - int (*preHookFunc) (StringBuf *self, const char *str); + if (HPMHooks.count.HP_StrBuf_AppendStr_pre > 0) { + int (*preHookFunc) (StringBuf **self, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func; - retVal___ = preHookFunc(self, str); + retVal___ = preHookFunc(&self, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6499,9 +8976,9 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { { retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str); } - if( HPMHooks.count.HP_StrBuf_AppendStr_post ) { + if (HPMHooks.count.HP_StrBuf_AppendStr_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, str); } @@ -6511,14 +8988,14 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int HP_StrBuf_Length(StringBuf *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Length_pre ) { - int (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Length_pre > 0) { + int (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6526,9 +9003,9 @@ int HP_StrBuf_Length(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Length(self); } - if( HPMHooks.count.HP_StrBuf_Length_post ) { + if (HPMHooks.count.HP_StrBuf_Length_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6538,14 +9015,14 @@ int HP_StrBuf_Length(StringBuf *self) { char* HP_StrBuf_Value(StringBuf *self) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Value_pre ) { - char* (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Value_pre > 0) { + char* (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6553,9 +9030,9 @@ char* HP_StrBuf_Value(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Value(self); } - if( HPMHooks.count.HP_StrBuf_Value_post ) { + if (HPMHooks.count.HP_StrBuf_Value_post > 0) { char* (*postHookFunc) (char* retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -6564,14 +9041,14 @@ char* HP_StrBuf_Value(StringBuf *self) { } void HP_StrBuf_Clear(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Clear_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Clear_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6579,9 +9056,9 @@ void HP_StrBuf_Clear(StringBuf *self) { { HPMHooks.source.StrBuf.Clear(self); } - if( HPMHooks.count.HP_StrBuf_Clear_post ) { + if (HPMHooks.count.HP_StrBuf_Clear_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func; postHookFunc(self); } @@ -6590,14 +9067,14 @@ void HP_StrBuf_Clear(StringBuf *self) { } void HP_StrBuf_Destroy(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Destroy_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Destroy_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6605,9 +9082,9 @@ void HP_StrBuf_Destroy(StringBuf *self) { { HPMHooks.source.StrBuf.Destroy(self); } - if( HPMHooks.count.HP_StrBuf_Destroy_post ) { + if (HPMHooks.count.HP_StrBuf_Destroy_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func; postHookFunc(self); } @@ -6616,14 +9093,14 @@ void HP_StrBuf_Destroy(StringBuf *self) { } void HP_StrBuf_Free(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Free_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Free_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6631,27 +9108,27 @@ void HP_StrBuf_Free(StringBuf *self) { { HPMHooks.source.StrBuf.Free(self); } - if( HPMHooks.count.HP_StrBuf_Free_post ) { + if (HPMHooks.count.HP_StrBuf_Free_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func; postHookFunc(self); } } return; } -/* strlib */ +/* strlib_interface */ char* HP_strlib_jstrescape(char *pt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescape_pre ) { - char* (*preHookFunc) (char *pt); + if (HPMHooks.count.HP_strlib_jstrescape_pre > 0) { + char* (*preHookFunc) (char **pt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func; - retVal___ = preHookFunc(pt); + retVal___ = preHookFunc(&pt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6659,9 +9136,9 @@ char* HP_strlib_jstrescape(char *pt) { { retVal___ = HPMHooks.source.strlib.jstrescape(pt); } - if( HPMHooks.count.HP_strlib_jstrescape_post ) { + if (HPMHooks.count.HP_strlib_jstrescape_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt); } @@ -6671,14 +9148,14 @@ char* HP_strlib_jstrescape(char *pt) { char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) { - char* (*preHookFunc) (char *pt, const char *spt); + if (HPMHooks.count.HP_strlib_jstrescapecpy_pre > 0) { + char* (*preHookFunc) (char **pt, const char **spt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func; - retVal___ = preHookFunc(pt, spt); + retVal___ = preHookFunc(&pt, &spt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6686,9 +9163,9 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { { retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt); } - if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) { + if (HPMHooks.count.HP_strlib_jstrescapecpy_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt, const char *spt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt, spt); } @@ -6698,14 +9175,14 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) { - int (*preHookFunc) (char *pt, const char *spt, int *size); + if (HPMHooks.count.HP_strlib_jmemescapecpy_pre > 0) { + int (*preHookFunc) (char **pt, const char **spt, int *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func; - retVal___ = preHookFunc(pt, spt, &size); + retVal___ = preHookFunc(&pt, &spt, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6713,11 +9190,11 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { { retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size); } - if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) { - int (*postHookFunc) (int retVal___, char *pt, const char *spt, int *size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_jmemescapecpy_post > 0) { + int (*postHookFunc) (int retVal___, char *pt, const char *spt, int size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func; - retVal___ = postHookFunc(retVal___, pt, spt, &size); + retVal___ = postHookFunc(retVal___, pt, spt, size); } } return retVal___; @@ -6725,14 +9202,14 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int HP_strlib_remove_control_chars_(char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) { - int (*preHookFunc) (char *str); + if (HPMHooks.count.HP_strlib_remove_control_chars__pre > 0) { + int (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6740,9 +9217,9 @@ int HP_strlib_remove_control_chars_(char *str) { { retVal___ = HPMHooks.source.strlib.remove_control_chars_(str); } - if( HPMHooks.count.HP_strlib_remove_control_chars__post ) { + if (HPMHooks.count.HP_strlib_remove_control_chars__post > 0) { int (*postHookFunc) (int retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -6752,14 +9229,14 @@ int HP_strlib_remove_control_chars_(char *str) { char* HP_strlib_trim_(char *str) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_trim__pre ) { - char* (*preHookFunc) (char *str); + if (HPMHooks.count.HP_strlib_trim__pre > 0) { + char* (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6767,9 +9244,9 @@ char* HP_strlib_trim_(char *str) { { retVal___ = HPMHooks.source.strlib.trim_(str); } - if( HPMHooks.count.HP_strlib_trim__post ) { + if (HPMHooks.count.HP_strlib_trim__post > 0) { char* (*postHookFunc) (char* retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -6779,14 +9256,14 @@ char* HP_strlib_trim_(char *str) { char* HP_strlib_normalize_name_(char *str, const char *delims) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_normalize_name__pre ) { - char* (*preHookFunc) (char *str, const char *delims); + if (HPMHooks.count.HP_strlib_normalize_name__pre > 0) { + char* (*preHookFunc) (char **str, const char **delims); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func; - retVal___ = preHookFunc(str, delims); + retVal___ = preHookFunc(&str, &delims); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6794,9 +9271,9 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { { retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims); } - if( HPMHooks.count.HP_strlib_normalize_name__post ) { + if (HPMHooks.count.HP_strlib_normalize_name__post > 0) { char* (*postHookFunc) (char* retVal___, char *str, const char *delims); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func; retVal___ = postHookFunc(retVal___, str, delims); } @@ -6806,14 +9283,14 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { const char* HP_strlib_stristr_(const char *haystack, const char *needle) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_stristr__pre ) { - const char* (*preHookFunc) (const char *haystack, const char *needle); + if (HPMHooks.count.HP_strlib_stristr__pre > 0) { + const char* (*preHookFunc) (const char **haystack, const char **needle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func; - retVal___ = preHookFunc(haystack, needle); + retVal___ = preHookFunc(&haystack, &needle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6821,9 +9298,9 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { { retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle); } - if( HPMHooks.count.HP_strlib_stristr__post ) { + if (HPMHooks.count.HP_strlib_stristr__post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func; retVal___ = postHookFunc(retVal___, haystack, needle); } @@ -6833,14 +9310,14 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_strnlen__pre ) { - size_t (*preHookFunc) (const char *string, size_t *maxlen); + if (HPMHooks.count.HP_strlib_strnlen__pre > 0) { + size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func; - retVal___ = preHookFunc(string, &maxlen); + retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6848,11 +9325,11 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_strnlen__post ) { - size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_strnlen__post > 0) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func; - retVal___ = postHookFunc(retVal___, string, &maxlen); + retVal___ = postHookFunc(retVal___, string, maxlen); } } return retVal___; @@ -6860,14 +9337,14 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_strtok_r__pre ) { - char* (*preHookFunc) (char *s1, const char *s2, char **lasts); + if (HPMHooks.count.HP_strlib_strtok_r__pre > 0) { + char* (*preHookFunc) (char **s1, const char **s2, char ***lasts); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func; - retVal___ = preHookFunc(s1, s2, lasts); + retVal___ = preHookFunc(&s1, &s2, &lasts); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6875,9 +9352,9 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { { retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts); } - if( HPMHooks.count.HP_strlib_strtok_r__post ) { + if (HPMHooks.count.HP_strlib_strtok_r__post > 0) { char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func; retVal___ = postHookFunc(retVal___, s1, s2, lasts); } @@ -6887,14 +9364,14 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int HP_strlib_e_mail_check_(char *email) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_e_mail_check__pre ) { - int (*preHookFunc) (char *email); + if (HPMHooks.count.HP_strlib_e_mail_check__pre > 0) { + int (*preHookFunc) (char **email); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func; - retVal___ = preHookFunc(email); + retVal___ = preHookFunc(&email); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6902,9 +9379,9 @@ int HP_strlib_e_mail_check_(char *email) { { retVal___ = HPMHooks.source.strlib.e_mail_check_(email); } - if( HPMHooks.count.HP_strlib_e_mail_check__post ) { + if (HPMHooks.count.HP_strlib_e_mail_check__post > 0) { int (*postHookFunc) (int retVal___, char *email); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func; retVal___ = postHookFunc(retVal___, email); } @@ -6914,14 +9391,14 @@ int HP_strlib_e_mail_check_(char *email) { int HP_strlib_config_switch_(const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_config_switch__pre ) { - int (*preHookFunc) (const char *str); + if (HPMHooks.count.HP_strlib_config_switch__pre > 0) { + int (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6929,9 +9406,9 @@ int HP_strlib_config_switch_(const char *str) { { retVal___ = HPMHooks.source.strlib.config_switch_(str); } - if( HPMHooks.count.HP_strlib_config_switch__post ) { + if (HPMHooks.count.HP_strlib_config_switch__post > 0) { int (*postHookFunc) (int retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -6941,14 +9418,14 @@ int HP_strlib_config_switch_(const char *str) { char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_safestrncpy__pre ) { - char* (*preHookFunc) (char *dst, const char *src, size_t *n); + if (HPMHooks.count.HP_strlib_safestrncpy__pre > 0) { + char* (*preHookFunc) (char **dst, const char **src, size_t *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func; - retVal___ = preHookFunc(dst, src, &n); + retVal___ = preHookFunc(&dst, &src, &n); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6956,11 +9433,11 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { { retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n); } - if( HPMHooks.count.HP_strlib_safestrncpy__post ) { - char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t *n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_safestrncpy__post > 0) { + char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func; - retVal___ = postHookFunc(retVal___, dst, src, &n); + retVal___ = postHookFunc(retVal___, dst, src, n); } } return retVal___; @@ -6968,14 +9445,14 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_safestrnlen__pre ) { - size_t (*preHookFunc) (const char *string, size_t *maxlen); + if (HPMHooks.count.HP_strlib_safestrnlen__pre > 0) { + size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func; - retVal___ = preHookFunc(string, &maxlen); + retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6983,11 +9460,11 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_safestrnlen__post ) { - size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_safestrnlen__post > 0) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func; - retVal___ = postHookFunc(retVal___, string, &maxlen); + retVal___ = postHookFunc(retVal___, string, maxlen); } } return retVal___; @@ -6995,14 +9472,14 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int HP_strlib_strline_(const char *str, size_t pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_strline__pre ) { - int (*preHookFunc) (const char *str, size_t *pos); + if (HPMHooks.count.HP_strlib_strline__pre > 0) { + int (*preHookFunc) (const char **str, size_t *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func; - retVal___ = preHookFunc(str, &pos); + retVal___ = preHookFunc(&str, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7010,26 +9487,26 @@ int HP_strlib_strline_(const char *str, size_t pos) { { retVal___ = HPMHooks.source.strlib.strline_(str, pos); } - if( HPMHooks.count.HP_strlib_strline__post ) { - int (*postHookFunc) (int retVal___, const char *str, size_t *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_strline__post > 0) { + int (*postHookFunc) (int retVal___, const char *str, size_t pos); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &pos); + retVal___ = postHookFunc(retVal___, str, pos); } } return retVal___; } -bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { +bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_strlib_bin2hex__pre ) { - bool (*preHookFunc) (char *output, unsigned char *input, size_t *count); + if (HPMHooks.count.HP_strlib_bin2hex__pre > 0) { + bool (*preHookFunc) (char **output, const unsigned char **input, size_t *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; - retVal___ = preHookFunc(output, input, &count); + retVal___ = preHookFunc(&output, &input, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7037,27 +9514,27 @@ bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { { retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); } - if( HPMHooks.count.HP_strlib_bin2hex__post ) { - bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_bin2hex__post > 0) { + bool (*postHookFunc) (bool retVal___, char *output, const unsigned char *input, size_t count); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; - retVal___ = postHookFunc(retVal___, output, input, &count); + retVal___ = postHookFunc(retVal___, output, input, count); } } return retVal___; } -/* sv */ +/* sv_interface */ int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_next_pre ) { - int (*preHookFunc) (struct s_svstate *svstate); + if (HPMHooks.count.HP_sv_parse_next_pre > 0) { + int (*preHookFunc) (struct s_svstate **svstate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func; - retVal___ = preHookFunc(svstate); + retVal___ = preHookFunc(&svstate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7065,9 +9542,9 @@ int HP_sv_parse_next(struct s_svstate *svstate) { { retVal___ = HPMHooks.source.sv.parse_next(svstate); } - if( HPMHooks.count.HP_sv_parse_next_post ) { + if (HPMHooks.count.HP_sv_parse_next_post > 0) { int (*postHookFunc) (int retVal___, struct s_svstate *svstate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func; retVal___ = postHookFunc(retVal___, svstate); } @@ -7077,14 +9554,14 @@ int HP_sv_parse_next(struct s_svstate *svstate) { int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_pre ) { - int (*preHookFunc) (const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); + if (HPMHooks.count.HP_sv_parse_pre > 0) { + int (*preHookFunc) (const char **str, int *len, int *startoff, char *delim, int **out_pos, int *npos, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func; - retVal___ = preHookFunc(str, &len, &startoff, &delim, out_pos, &npos, &opt); + retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_pos, &npos, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7092,11 +9569,11 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos { retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt); } - if( HPMHooks.count.HP_sv_parse_post ) { - int (*postHookFunc) (int retVal___, const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_parse_post > 0) { + int (*postHookFunc) (int retVal___, const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_pos, &npos, &opt); + retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_pos, npos, opt); } } return retVal___; @@ -7104,14 +9581,14 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_split_pre ) { - int (*preHookFunc) (char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); + if (HPMHooks.count.HP_sv_split_pre > 0) { + int (*preHookFunc) (char **str, int *len, int *startoff, char *delim, char ***out_fields, int *nfields, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func; - retVal___ = preHookFunc(str, &len, &startoff, &delim, out_fields, &nfields, &opt); + retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_fields, &nfields, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7119,11 +9596,11 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, { retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt); } - if( HPMHooks.count.HP_sv_split_post ) { - int (*postHookFunc) (int retVal___, char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_split_post > 0) { + int (*postHookFunc) (int retVal___, char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_fields, &nfields, &opt); + retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_fields, nfields, opt); } } return retVal___; @@ -7131,14 +9608,14 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_escape_c_pre ) { - size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len, const char *escapes); + if (HPMHooks.count.HP_sv_escape_c_pre > 0) { + size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len, const char **escapes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func; - retVal___ = preHookFunc(out_dest, src, &len, escapes); + retVal___ = preHookFunc(&out_dest, &src, &len, &escapes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7146,11 +9623,11 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e { retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes); } - if( HPMHooks.count.HP_sv_escape_c_post ) { - size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len, const char *escapes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_escape_c_post > 0) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len, const char *escapes); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func; - retVal___ = postHookFunc(retVal___, out_dest, src, &len, escapes); + retVal___ = postHookFunc(retVal___, out_dest, src, len, escapes); } } return retVal___; @@ -7158,14 +9635,14 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_unescape_c_pre ) { - size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len); + if (HPMHooks.count.HP_sv_unescape_c_pre > 0) { + size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func; - retVal___ = preHookFunc(out_dest, src, &len); + retVal___ = preHookFunc(&out_dest, &src, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7173,11 +9650,11 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { { retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len); } - if( HPMHooks.count.HP_sv_unescape_c_post ) { - size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_unescape_c_post > 0) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func; - retVal___ = postHookFunc(retVal___, out_dest, src, &len); + retVal___ = postHookFunc(retVal___, out_dest, src, len); } } return retVal___; @@ -7185,14 +9662,14 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { const char* HP_sv_skip_escaped_c(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) { - const char* (*preHookFunc) (const char *p); + if (HPMHooks.count.HP_sv_skip_escaped_c_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func; - retVal___ = preHookFunc(p); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7200,9 +9677,9 @@ const char* HP_sv_skip_escaped_c(const char *p) { { retVal___ = HPMHooks.source.sv.skip_escaped_c(p); } - if( HPMHooks.count.HP_sv_skip_escaped_c_post ) { + if (HPMHooks.count.HP_sv_skip_escaped_c_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -7212,14 +9689,14 @@ const char* HP_sv_skip_escaped_c(const char *p) { bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sv_readdb_pre ) { - bool (*preHookFunc) (const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); + if (HPMHooks.count.HP_sv_readdb_pre > 0) { + bool (*preHookFunc) (const char **directory, const char **filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( **parseproc ) (char *fields[], int columns, int current)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func; - retVal___ = preHookFunc(directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); + retVal___ = preHookFunc(&directory, &filename, &delim, &mincols, &maxcols, &maxrows, &parseproc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7227,27 +9704,27 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m { retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc); } - if( HPMHooks.count.HP_sv_readdb_post ) { - bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_readdb_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); + retVal___ = postHookFunc(retVal___, directory, filename, delim, mincols, maxcols, maxrows, parseproc); } } return retVal___; } -/* sysinfo */ +/* sysinfo_interface */ int HP_sysinfo_getpagesize(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7255,9 +9732,9 @@ int HP_sysinfo_getpagesize(void) { { retVal___ = HPMHooks.source.sysinfo.getpagesize(); } - if( HPMHooks.count.HP_sysinfo_getpagesize_post ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7267,14 +9744,14 @@ int HP_sysinfo_getpagesize(void) { const char* HP_sysinfo_platform(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_platform_pre ) { + if (HPMHooks.count.HP_sysinfo_platform_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7282,9 +9759,9 @@ const char* HP_sysinfo_platform(void) { { retVal___ = HPMHooks.source.sysinfo.platform(); } - if( HPMHooks.count.HP_sysinfo_platform_post ) { + if (HPMHooks.count.HP_sysinfo_platform_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7294,14 +9771,14 @@ const char* HP_sysinfo_platform(void) { const char* HP_sysinfo_osversion(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_osversion_pre ) { + if (HPMHooks.count.HP_sysinfo_osversion_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7309,9 +9786,9 @@ const char* HP_sysinfo_osversion(void) { { retVal___ = HPMHooks.source.sysinfo.osversion(); } - if( HPMHooks.count.HP_sysinfo_osversion_post ) { + if (HPMHooks.count.HP_sysinfo_osversion_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7321,14 +9798,14 @@ const char* HP_sysinfo_osversion(void) { const char* HP_sysinfo_cpu(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cpu_pre ) { + if (HPMHooks.count.HP_sysinfo_cpu_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7336,9 +9813,9 @@ const char* HP_sysinfo_cpu(void) { { retVal___ = HPMHooks.source.sysinfo.cpu(); } - if( HPMHooks.count.HP_sysinfo_cpu_post ) { + if (HPMHooks.count.HP_sysinfo_cpu_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7348,14 +9825,14 @@ const char* HP_sysinfo_cpu(void) { int HP_sysinfo_cpucores(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_cpucores_pre ) { + if (HPMHooks.count.HP_sysinfo_cpucores_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7363,9 +9840,9 @@ int HP_sysinfo_cpucores(void) { { retVal___ = HPMHooks.source.sysinfo.cpucores(); } - if( HPMHooks.count.HP_sysinfo_cpucores_post ) { + if (HPMHooks.count.HP_sysinfo_cpucores_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7375,14 +9852,14 @@ int HP_sysinfo_cpucores(void) { const char* HP_sysinfo_arch(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_arch_pre ) { + if (HPMHooks.count.HP_sysinfo_arch_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7390,9 +9867,9 @@ const char* HP_sysinfo_arch(void) { { retVal___ = HPMHooks.source.sysinfo.arch(); } - if( HPMHooks.count.HP_sysinfo_arch_post ) { + if (HPMHooks.count.HP_sysinfo_arch_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7402,14 +9879,14 @@ const char* HP_sysinfo_arch(void) { bool HP_sysinfo_is64bit(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is64bit_pre ) { + if (HPMHooks.count.HP_sysinfo_is64bit_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7417,9 +9894,9 @@ bool HP_sysinfo_is64bit(void) { { retVal___ = HPMHooks.source.sysinfo.is64bit(); } - if( HPMHooks.count.HP_sysinfo_is64bit_post ) { + if (HPMHooks.count.HP_sysinfo_is64bit_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7429,14 +9906,14 @@ bool HP_sysinfo_is64bit(void) { const char* HP_sysinfo_compiler(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_compiler_pre ) { + if (HPMHooks.count.HP_sysinfo_compiler_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7444,9 +9921,9 @@ const char* HP_sysinfo_compiler(void) { { retVal___ = HPMHooks.source.sysinfo.compiler(); } - if( HPMHooks.count.HP_sysinfo_compiler_post ) { + if (HPMHooks.count.HP_sysinfo_compiler_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7456,14 +9933,14 @@ const char* HP_sysinfo_compiler(void) { const char* HP_sysinfo_cflags(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cflags_pre ) { + if (HPMHooks.count.HP_sysinfo_cflags_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7471,9 +9948,9 @@ const char* HP_sysinfo_cflags(void) { { retVal___ = HPMHooks.source.sysinfo.cflags(); } - if( HPMHooks.count.HP_sysinfo_cflags_post ) { + if (HPMHooks.count.HP_sysinfo_cflags_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7483,14 +9960,14 @@ const char* HP_sysinfo_cflags(void) { const char* HP_sysinfo_time(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_time_pre ) { + if (HPMHooks.count.HP_sysinfo_time_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_time_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7498,9 +9975,9 @@ const char* HP_sysinfo_time(void) { { retVal___ = HPMHooks.source.sysinfo.time(); } - if( HPMHooks.count.HP_sysinfo_time_post ) { + if (HPMHooks.count.HP_sysinfo_time_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_time_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7510,14 +9987,14 @@ const char* HP_sysinfo_time(void) { const char* HP_sysinfo_vcstype(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcstype_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstype_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7525,9 +10002,9 @@ const char* HP_sysinfo_vcstype(void) { { retVal___ = HPMHooks.source.sysinfo.vcstype(); } - if( HPMHooks.count.HP_sysinfo_vcstype_post ) { + if (HPMHooks.count.HP_sysinfo_vcstype_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7537,14 +10014,14 @@ const char* HP_sysinfo_vcstype(void) { int HP_sysinfo_vcstypeid(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7552,9 +10029,9 @@ int HP_sysinfo_vcstypeid(void) { { retVal___ = HPMHooks.source.sysinfo.vcstypeid(); } - if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7564,14 +10041,14 @@ int HP_sysinfo_vcstypeid(void) { const char* HP_sysinfo_vcsrevision_src(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7579,9 +10056,9 @@ const char* HP_sysinfo_vcsrevision_src(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_src(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7591,14 +10068,14 @@ const char* HP_sysinfo_vcsrevision_src(void) { const char* HP_sysinfo_vcsrevision_scripts(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7606,9 +10083,9 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7617,14 +10094,14 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { } void HP_sysinfo_vcsrevision_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7632,9 +10109,9 @@ void HP_sysinfo_vcsrevision_reload(void) { { HPMHooks.source.sysinfo.vcsrevision_reload(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func; postHookFunc(); } @@ -7644,14 +10121,14 @@ void HP_sysinfo_vcsrevision_reload(void) { bool HP_sysinfo_is_superuser(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7659,9 +10136,9 @@ bool HP_sysinfo_is_superuser(void) { { retVal___ = HPMHooks.source.sysinfo.is_superuser(); } - if( HPMHooks.count.HP_sysinfo_is_superuser_post ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7670,14 +10147,14 @@ bool HP_sysinfo_is_superuser(void) { } void HP_sysinfo_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_init_pre ) { + if (HPMHooks.count.HP_sysinfo_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7685,9 +10162,9 @@ void HP_sysinfo_init(void) { { HPMHooks.source.sysinfo.init(); } - if( HPMHooks.count.HP_sysinfo_init_post ) { + if (HPMHooks.count.HP_sysinfo_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func; postHookFunc(); } @@ -7696,14 +10173,14 @@ void HP_sysinfo_init(void) { } void HP_sysinfo_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_final_pre ) { + if (HPMHooks.count.HP_sysinfo_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7711,27 +10188,320 @@ void HP_sysinfo_final(void) { { HPMHooks.source.sysinfo.final(); } - if( HPMHooks.count.HP_sysinfo_final_post ) { + if (HPMHooks.count.HP_sysinfo_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func; postHookFunc(); } } return; } -/* timer */ +/* thread_interface */ +void HP_thread_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.init(); + } + if (HPMHooks.count.HP_thread_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_thread_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.final(); + } + if (HPMHooks.count.HP_thread_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { + int hIndex = 0; + struct thread_handle* retVal___ = NULL; + if (HPMHooks.count.HP_thread_create_pre > 0) { + struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_create_pre[hIndex].func; + retVal___ = preHookFunc(&entry_point, ¶m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.create(entry_point, param); + } + if (HPMHooks.count.HP_thread_create_post > 0) { + struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry_point, param); + } + } + return retVal___; +} +struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio) { + int hIndex = 0; + struct thread_handle* retVal___ = NULL; + if (HPMHooks.count.HP_thread_create_opt_pre > 0) { + struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param, size_t *stack_size, enum thread_priority *prio); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_create_opt_pre[hIndex].func; + retVal___ = preHookFunc(&entry_point, ¶m, &stack_size, &prio); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.create_opt(entry_point, param, stack_size, prio); + } + if (HPMHooks.count.HP_thread_create_opt_post > 0) { + struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_create_opt_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry_point, param, stack_size, prio); + } + } + return retVal___; +} +void HP_thread_destroy(struct thread_handle *handle) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_destroy_pre > 0) { + void (*preHookFunc) (struct thread_handle **handle); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_destroy_pre[hIndex].func; + preHookFunc(&handle); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.destroy(handle); + } + if (HPMHooks.count.HP_thread_destroy_post > 0) { + void (*postHookFunc) (struct thread_handle *handle); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_destroy_post[hIndex].func; + postHookFunc(handle); + } + } + return; +} +struct thread_handle* HP_thread_self(void) { + int hIndex = 0; + struct thread_handle* retVal___ = NULL; + if (HPMHooks.count.HP_thread_self_pre > 0) { + struct thread_handle* (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_self_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.self(); + } + if (HPMHooks.count.HP_thread_self_post > 0) { + struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_self_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_thread_get_tid(void) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_thread_get_tid_pre > 0) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_get_tid_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.get_tid(); + } + if (HPMHooks.count.HP_thread_get_tid_post > 0) { + int (*postHookFunc) (int retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_get_tid_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_thread_wait_pre > 0) { + bool (*preHookFunc) (struct thread_handle **handle, void ***out_exit_code); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_wait_pre[hIndex].func; + retVal___ = preHookFunc(&handle, &out_exit_code); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.wait(handle, out_exit_code); + } + if (HPMHooks.count.HP_thread_wait_post > 0) { + bool (*postHookFunc) (bool retVal___, struct thread_handle *handle, void **out_exit_code); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_wait_post[hIndex].func; + retVal___ = postHookFunc(retVal___, handle, out_exit_code); + } + } + return retVal___; +} +void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_prio_set_pre > 0) { + void (*preHookFunc) (struct thread_handle **handle, enum thread_priority *prio); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_prio_set_pre[hIndex].func; + preHookFunc(&handle, &prio); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.prio_set(handle, prio); + } + if (HPMHooks.count.HP_thread_prio_set_post > 0) { + void (*postHookFunc) (struct thread_handle *handle, enum thread_priority prio); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_prio_set_post[hIndex].func; + postHookFunc(handle, prio); + } + } + return; +} +enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { + int hIndex = 0; + enum thread_priority retVal___ = THREADPRIO_NORMAL; + if (HPMHooks.count.HP_thread_prio_get_pre > 0) { + enum thread_priority (*preHookFunc) (struct thread_handle **handle); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_prio_get_pre[hIndex].func; + retVal___ = preHookFunc(&handle); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.prio_get(handle); + } + if (HPMHooks.count.HP_thread_prio_get_post > 0) { + enum thread_priority (*postHookFunc) (enum thread_priority retVal___, struct thread_handle *handle); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_prio_get_post[hIndex].func; + retVal___ = postHookFunc(retVal___, handle); + } + } + return retVal___; +} +void HP_thread_yield(void) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_yield_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_yield_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.yield(); + } + if (HPMHooks.count.HP_thread_yield_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_yield_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* timer_interface */ int64 HP_timer_gettick(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_pre ) { + if (HPMHooks.count.HP_timer_gettick_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7739,9 +10509,9 @@ int64 HP_timer_gettick(void) { { retVal___ = HPMHooks.source.timer.gettick(); } - if( HPMHooks.count.HP_timer_gettick_post ) { + if (HPMHooks.count.HP_timer_gettick_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7751,14 +10521,14 @@ int64 HP_timer_gettick(void) { int64 HP_timer_gettick_nocache(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_nocache_pre ) { + if (HPMHooks.count.HP_timer_gettick_nocache_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7766,9 +10536,9 @@ int64 HP_timer_gettick_nocache(void) { { retVal___ = HPMHooks.source.timer.gettick_nocache(); } - if( HPMHooks.count.HP_timer_gettick_nocache_post ) { + if (HPMHooks.count.HP_timer_gettick_nocache_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7778,14 +10548,14 @@ int64 HP_timer_gettick_nocache(void) { int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_pre ) { + if (HPMHooks.count.HP_timer_add_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7793,11 +10563,11 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { { retVal___ = HPMHooks.source.timer.add(tick, func, id, data); } - if( HPMHooks.count.HP_timer_add_post ) { - int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_add_post > 0) { + int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data); + retVal___ = postHookFunc(retVal___, tick, func, id, data); } } return retVal___; @@ -7805,14 +10575,14 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_interval_pre ) { + if (HPMHooks.count.HP_timer_add_interval_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data, &interval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7820,11 +10590,11 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int { retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval); } - if( HPMHooks.count.HP_timer_add_interval_post ) { - int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_add_interval_post > 0) { + int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data, int interval); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data, &interval); + retVal___ = postHookFunc(retVal___, tick, func, id, data, interval); } } return retVal___; @@ -7832,14 +10602,14 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int const struct TimerData* HP_timer_get(int tid) { int hIndex = 0; const struct TimerData* retVal___ = NULL; - if( HPMHooks.count.HP_timer_get_pre ) { + if (HPMHooks.count.HP_timer_get_pre > 0) { const struct TimerData* (*preHookFunc) (int *tid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func; retVal___ = preHookFunc(&tid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7847,11 +10617,11 @@ const struct TimerData* HP_timer_get(int tid) { { retVal___ = HPMHooks.source.timer.get(tid); } - if( HPMHooks.count.HP_timer_get_post ) { - const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int *tid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_get_post > 0) { + const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int tid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid); + retVal___ = postHookFunc(retVal___, tid); } } return retVal___; @@ -7859,14 +10629,14 @@ const struct TimerData* HP_timer_get(int tid) { int HP_timer_delete(int tid, TimerFunc func) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_delete_pre ) { + if (HPMHooks.count.HP_timer_delete_pre > 0) { int (*preHookFunc) (int *tid, TimerFunc *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func; retVal___ = preHookFunc(&tid, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7874,11 +10644,11 @@ int HP_timer_delete(int tid, TimerFunc func) { { retVal___ = HPMHooks.source.timer.delete(tid, func); } - if( HPMHooks.count.HP_timer_delete_post ) { - int (*postHookFunc) (int retVal___, int *tid, TimerFunc *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_delete_post > 0) { + int (*postHookFunc) (int retVal___, int tid, TimerFunc func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &func); + retVal___ = postHookFunc(retVal___, tid, func); } } return retVal___; @@ -7886,14 +10656,14 @@ int HP_timer_delete(int tid, TimerFunc func) { int64 HP_timer_addtick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_addtick_pre ) { + if (HPMHooks.count.HP_timer_addtick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7901,11 +10671,11 @@ int64 HP_timer_addtick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.addtick(tid, tick); } - if( HPMHooks.count.HP_timer_addtick_post ) { - int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_addtick_post > 0) { + int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick); + retVal___ = postHookFunc(retVal___, tid, tick); } } return retVal___; @@ -7913,14 +10683,14 @@ int64 HP_timer_addtick(int tid, int64 tick) { int64 HP_timer_settick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_settick_pre ) { + if (HPMHooks.count.HP_timer_settick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7928,11 +10698,11 @@ int64 HP_timer_settick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.settick(tid, tick); } - if( HPMHooks.count.HP_timer_settick_post ) { - int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_settick_post > 0) { + int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick); + retVal___ = postHookFunc(retVal___, tid, tick); } } return retVal___; @@ -7940,14 +10710,14 @@ int64 HP_timer_settick(int tid, int64 tick) { int HP_timer_add_func_list(TimerFunc func, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_func_list_pre ) { - int (*preHookFunc) (TimerFunc *func, char *name); + if (HPMHooks.count.HP_timer_add_func_list_pre > 0) { + int (*preHookFunc) (TimerFunc *func, char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func; - retVal___ = preHookFunc(&func, name); + retVal___ = preHookFunc(&func, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7955,11 +10725,11 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { { retVal___ = HPMHooks.source.timer.add_func_list(func, name); } - if( HPMHooks.count.HP_timer_add_func_list_post ) { - int (*postHookFunc) (int retVal___, TimerFunc *func, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_add_func_list_post > 0) { + int (*postHookFunc) (int retVal___, TimerFunc func, char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &func, name); + retVal___ = postHookFunc(retVal___, func, name); } } return retVal___; @@ -7967,14 +10737,14 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { unsigned long HP_timer_get_uptime(void) { int hIndex = 0; unsigned long retVal___ = 0; - if( HPMHooks.count.HP_timer_get_uptime_pre ) { + if (HPMHooks.count.HP_timer_get_uptime_pre > 0) { unsigned long (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7982,9 +10752,9 @@ unsigned long HP_timer_get_uptime(void) { { retVal___ = HPMHooks.source.timer.get_uptime(); } - if( HPMHooks.count.HP_timer_get_uptime_post ) { + if (HPMHooks.count.HP_timer_get_uptime_post > 0) { unsigned long (*postHookFunc) (unsigned long retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -7994,14 +10764,14 @@ unsigned long HP_timer_get_uptime(void) { int HP_timer_perform(int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_perform_pre ) { + if (HPMHooks.count.HP_timer_perform_pre > 0) { int (*preHookFunc) (int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func; retVal___ = preHookFunc(&tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8009,25 +10779,25 @@ int HP_timer_perform(int64 tick) { { retVal___ = HPMHooks.source.timer.perform(tick); } - if( HPMHooks.count.HP_timer_perform_post ) { - int (*postHookFunc) (int retVal___, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_perform_post > 0) { + int (*postHookFunc) (int retVal___, int64 tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tick); + retVal___ = postHookFunc(retVal___, tick); } } return retVal___; } void HP_timer_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_init_pre ) { + if (HPMHooks.count.HP_timer_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8035,9 +10805,9 @@ void HP_timer_init(void) { { HPMHooks.source.timer.init(); } - if( HPMHooks.count.HP_timer_init_post ) { + if (HPMHooks.count.HP_timer_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func; postHookFunc(); } @@ -8046,14 +10816,14 @@ void HP_timer_init(void) { } void HP_timer_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_final_pre ) { + if (HPMHooks.count.HP_timer_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8061,9 +10831,9 @@ void HP_timer_final(void) { { HPMHooks.source.timer.final(); } - if( HPMHooks.count.HP_timer_final_post ) { + if (HPMHooks.count.HP_timer_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func; postHookFunc(); } diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc index bbc1cecbc..8a548bedc 100644 --- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,20 +23,33 @@ * as it will get overwritten. */ -memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface)); -memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface)); -memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface)); -memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface)); -memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface)); -memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface)); -memcpy(&HPMHooks.source.login, login, sizeof(struct login_interface)); -memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface)); -memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface)); -memcpy(&HPMHooks.source.showmsg, showmsg, sizeof(struct showmsg_interface)); -memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface)); -memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface)); -memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface)); -memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface)); -memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface)); -memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface)); -memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_interface)); +/* GENERATED FILE DO NOT EDIT */ + +HPMHooks.source.HCache = *HCache; +HPMHooks.source.account = *account; +HPMHooks.source.cmdline = *cmdline; +HPMHooks.source.console = *console; +HPMHooks.source.core = *core; +HPMHooks.source.DB = *DB; +HPMHooks.source.des = *des; +HPMHooks.source.ipban = *ipban; +HPMHooks.source.lchrif = *lchrif; +HPMHooks.source.lclif = *lclif; +HPMHooks.source.PRIV__lclif = *lclif->p; +HPMHooks.source.libconfig = *libconfig; +HPMHooks.source.login = *login; +HPMHooks.source.loginlog = *loginlog; +HPMHooks.source.md5 = *md5; +HPMHooks.source.mutex = *mutex; +HPMHooks.source.nullpo = *nullpo; +HPMHooks.source.packets = *packets; +HPMHooks.source.rnd = *rnd; +HPMHooks.source.showmsg = *showmsg; +HPMHooks.source.sockt = *sockt; +HPMHooks.source.SQL = *SQL; +HPMHooks.source.StrBuf = *StrBuf; +HPMHooks.source.strlib = *strlib; +HPMHooks.source.sv = *sv; +HPMHooks.source.sysinfo = *sysinfo; +HPMHooks.source.thread = *thread; +HPMHooks.source.timer = *timer; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index a11e964c2..70bc309f3 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,6 +23,8 @@ * as it will get overwritten. */ +/* GENERATED FILE DO NOT EDIT */ + struct { struct HPMHookPoint *HP_HCache_init_pre; struct HPMHookPoint *HP_HCache_init_post; @@ -30,6 +32,114 @@ struct { struct HPMHookPoint *HP_HCache_check_post; struct HPMHookPoint *HP_HCache_open_pre; struct HPMHookPoint *HP_HCache_open_post; + struct HPMHookPoint *HP_achievement_init_pre; + struct HPMHookPoint *HP_achievement_init_post; + struct HPMHookPoint *HP_achievement_final_pre; + struct HPMHookPoint *HP_achievement_final_post; + struct HPMHookPoint *HP_achievement_db_finalize_pre; + struct HPMHookPoint *HP_achievement_db_finalize_post; + struct HPMHookPoint *HP_achievement_readdb_pre; + struct HPMHookPoint *HP_achievement_readdb_post; + struct HPMHookPoint *HP_achievement_readdb_objectives_sub_pre; + struct HPMHookPoint *HP_achievement_readdb_objectives_sub_post; + struct HPMHookPoint *HP_achievement_readdb_objectives_pre; + struct HPMHookPoint *HP_achievement_readdb_objectives_post; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_mobid_pre; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_mobid_post; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_jobid_pre; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_jobid_post; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_itemid_pre; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_itemid_post; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_statustype_pre; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_statustype_post; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_itemtype_pre; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_itemtype_post; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_weaponlv_pre; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_weaponlv_post; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_achievement_pre; + struct HPMHookPoint *HP_achievement_readdb_validate_criteria_achievement_post; + struct HPMHookPoint *HP_achievement_readdb_rewards_pre; + struct HPMHookPoint *HP_achievement_readdb_rewards_post; + struct HPMHookPoint *HP_achievement_readdb_validate_reward_items_pre; + struct HPMHookPoint *HP_achievement_readdb_validate_reward_items_post; + struct HPMHookPoint *HP_achievement_readdb_validate_reward_item_sub_pre; + struct HPMHookPoint *HP_achievement_readdb_validate_reward_item_sub_post; + struct HPMHookPoint *HP_achievement_readdb_validate_reward_bonus_pre; + struct HPMHookPoint *HP_achievement_readdb_validate_reward_bonus_post; + struct HPMHookPoint *HP_achievement_readdb_validate_reward_titleid_pre; + struct HPMHookPoint *HP_achievement_readdb_validate_reward_titleid_post; + struct HPMHookPoint *HP_achievement_readdb_additional_fields_pre; + struct HPMHookPoint *HP_achievement_readdb_additional_fields_post; + struct HPMHookPoint *HP_achievement_readdb_ranks_pre; + struct HPMHookPoint *HP_achievement_readdb_ranks_post; + struct HPMHookPoint *HP_achievement_get_pre; + struct HPMHookPoint *HP_achievement_get_post; + struct HPMHookPoint *HP_achievement_ensure_pre; + struct HPMHookPoint *HP_achievement_ensure_post; + struct HPMHookPoint *HP_achievement_calculate_totals_pre; + struct HPMHookPoint *HP_achievement_calculate_totals_post; + struct HPMHookPoint *HP_achievement_check_complete_pre; + struct HPMHookPoint *HP_achievement_check_complete_post; + struct HPMHookPoint *HP_achievement_progress_add_pre; + struct HPMHookPoint *HP_achievement_progress_add_post; + struct HPMHookPoint *HP_achievement_progress_set_pre; + struct HPMHookPoint *HP_achievement_progress_set_post; + struct HPMHookPoint *HP_achievement_check_criteria_pre; + struct HPMHookPoint *HP_achievement_check_criteria_post; + struct HPMHookPoint *HP_achievement_validate_pre; + struct HPMHookPoint *HP_achievement_validate_post; + struct HPMHookPoint *HP_achievement_validate_type_pre; + struct HPMHookPoint *HP_achievement_validate_type_post; + struct HPMHookPoint *HP_achievement_validate_mob_kill_pre; + struct HPMHookPoint *HP_achievement_validate_mob_kill_post; + struct HPMHookPoint *HP_achievement_validate_mob_damage_pre; + struct HPMHookPoint *HP_achievement_validate_mob_damage_post; + struct HPMHookPoint *HP_achievement_validate_pc_kill_pre; + struct HPMHookPoint *HP_achievement_validate_pc_kill_post; + struct HPMHookPoint *HP_achievement_validate_pc_damage_pre; + struct HPMHookPoint *HP_achievement_validate_pc_damage_post; + struct HPMHookPoint *HP_achievement_validate_jobchange_pre; + struct HPMHookPoint *HP_achievement_validate_jobchange_post; + struct HPMHookPoint *HP_achievement_validate_stats_pre; + struct HPMHookPoint *HP_achievement_validate_stats_post; + struct HPMHookPoint *HP_achievement_validate_chatroom_create_pre; + struct HPMHookPoint *HP_achievement_validate_chatroom_create_post; + struct HPMHookPoint *HP_achievement_validate_chatroom_members_pre; + struct HPMHookPoint *HP_achievement_validate_chatroom_members_post; + struct HPMHookPoint *HP_achievement_validate_friend_add_pre; + struct HPMHookPoint *HP_achievement_validate_friend_add_post; + struct HPMHookPoint *HP_achievement_validate_party_create_pre; + struct HPMHookPoint *HP_achievement_validate_party_create_post; + struct HPMHookPoint *HP_achievement_validate_marry_pre; + struct HPMHookPoint *HP_achievement_validate_marry_post; + struct HPMHookPoint *HP_achievement_validate_adopt_pre; + struct HPMHookPoint *HP_achievement_validate_adopt_post; + struct HPMHookPoint *HP_achievement_validate_zeny_pre; + struct HPMHookPoint *HP_achievement_validate_zeny_post; + struct HPMHookPoint *HP_achievement_validate_refine_pre; + struct HPMHookPoint *HP_achievement_validate_refine_post; + struct HPMHookPoint *HP_achievement_validate_item_get_pre; + struct HPMHookPoint *HP_achievement_validate_item_get_post; + struct HPMHookPoint *HP_achievement_validate_item_sell_pre; + struct HPMHookPoint *HP_achievement_validate_item_sell_post; + struct HPMHookPoint *HP_achievement_validate_achieve_pre; + struct HPMHookPoint *HP_achievement_validate_achieve_post; + struct HPMHookPoint *HP_achievement_validate_taming_pre; + struct HPMHookPoint *HP_achievement_validate_taming_post; + struct HPMHookPoint *HP_achievement_validate_achievement_rank_pre; + struct HPMHookPoint *HP_achievement_validate_achievement_rank_post; + struct HPMHookPoint *HP_achievement_type_requires_criteria_pre; + struct HPMHookPoint *HP_achievement_type_requires_criteria_post; + struct HPMHookPoint *HP_achievement_init_titles_pre; + struct HPMHookPoint *HP_achievement_init_titles_post; + struct HPMHookPoint *HP_achievement_check_title_pre; + struct HPMHookPoint *HP_achievement_check_title_post; + struct HPMHookPoint *HP_achievement_get_rewards_pre; + struct HPMHookPoint *HP_achievement_get_rewards_post; + struct HPMHookPoint *HP_achievement_get_rewards_buffs_pre; + struct HPMHookPoint *HP_achievement_get_rewards_buffs_post; + struct HPMHookPoint *HP_achievement_get_rewards_items_pre; + struct HPMHookPoint *HP_achievement_get_rewards_items_post; struct HPMHookPoint *HP_atcommand_init_pre; struct HPMHookPoint *HP_atcommand_init_post; struct HPMHookPoint *HP_atcommand_final_pre; @@ -108,12 +218,16 @@ struct { 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_pc_damage_pre; + struct HPMHookPoint *HP_battle_calc_pc_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_check_arrows_pre; + struct HPMHookPoint *HP_battle_check_arrows_post; struct HPMHookPoint *HP_battle_calc_weapon_attack_pre; struct HPMHookPoint *HP_battle_calc_weapon_attack_post; struct HPMHookPoint *HP_battle_delay_damage_pre; @@ -122,6 +236,8 @@ struct { struct HPMHookPoint *HP_battle_drain_post; struct HPMHookPoint *HP_battle_reflect_damage_pre; struct HPMHookPoint *HP_battle_reflect_damage_post; + struct HPMHookPoint *HP_battle_reflect_trap_pre; + struct HPMHookPoint *HP_battle_reflect_trap_post; struct HPMHookPoint *HP_battle_attr_ratio_pre; struct HPMHookPoint *HP_battle_attr_ratio_post; struct HPMHookPoint *HP_battle_attr_fix_pre; @@ -192,6 +308,8 @@ struct { 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_sub_pre; + struct HPMHookPoint *HP_battle_config_set_value_sub_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; @@ -422,8 +540,6 @@ struct { 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_pre; struct HPMHookPoint *HP_chrif_flush_post; struct HPMHookPoint *HP_chrif_skillid2idx_pre; @@ -496,6 +612,60 @@ struct { struct HPMHookPoint *HP_chrif_save_scdata_single_post; struct HPMHookPoint *HP_chrif_del_scdata_single_pre; struct HPMHookPoint *HP_chrif_del_scdata_single_post; + struct HPMHookPoint *HP_clan_init_pre; + struct HPMHookPoint *HP_clan_init_post; + struct HPMHookPoint *HP_clan_final_pre; + struct HPMHookPoint *HP_clan_final_post; + struct HPMHookPoint *HP_clan_config_read_pre; + struct HPMHookPoint *HP_clan_config_read_post; + struct HPMHookPoint *HP_clan_config_read_additional_settings_pre; + struct HPMHookPoint *HP_clan_config_read_additional_settings_post; + struct HPMHookPoint *HP_clan_read_db_pre; + struct HPMHookPoint *HP_clan_read_db_post; + struct HPMHookPoint *HP_clan_read_db_sub_pre; + struct HPMHookPoint *HP_clan_read_db_sub_post; + struct HPMHookPoint *HP_clan_read_db_additional_fields_pre; + struct HPMHookPoint *HP_clan_read_db_additional_fields_post; + struct HPMHookPoint *HP_clan_read_buffs_pre; + struct HPMHookPoint *HP_clan_read_buffs_post; + struct HPMHookPoint *HP_clan_search_pre; + struct HPMHookPoint *HP_clan_search_post; + struct HPMHookPoint *HP_clan_searchname_pre; + struct HPMHookPoint *HP_clan_searchname_post; + struct HPMHookPoint *HP_clan_getonlinesd_pre; + struct HPMHookPoint *HP_clan_getonlinesd_post; + struct HPMHookPoint *HP_clan_getindex_pre; + struct HPMHookPoint *HP_clan_getindex_post; + struct HPMHookPoint *HP_clan_join_pre; + struct HPMHookPoint *HP_clan_join_post; + struct HPMHookPoint *HP_clan_member_online_pre; + struct HPMHookPoint *HP_clan_member_online_post; + struct HPMHookPoint *HP_clan_leave_pre; + struct HPMHookPoint *HP_clan_leave_post; + struct HPMHookPoint *HP_clan_send_message_pre; + struct HPMHookPoint *HP_clan_send_message_post; + struct HPMHookPoint *HP_clan_recv_message_pre; + struct HPMHookPoint *HP_clan_recv_message_post; + struct HPMHookPoint *HP_clan_member_offline_pre; + struct HPMHookPoint *HP_clan_member_offline_post; + struct HPMHookPoint *HP_clan_set_constants_pre; + struct HPMHookPoint *HP_clan_set_constants_post; + struct HPMHookPoint *HP_clan_get_id_pre; + struct HPMHookPoint *HP_clan_get_id_post; + struct HPMHookPoint *HP_clan_buff_start_pre; + struct HPMHookPoint *HP_clan_buff_start_post; + struct HPMHookPoint *HP_clan_buff_end_pre; + struct HPMHookPoint *HP_clan_buff_end_post; + struct HPMHookPoint *HP_clan_reload_pre; + struct HPMHookPoint *HP_clan_reload_post; + struct HPMHookPoint *HP_clan_rejoin_pre; + struct HPMHookPoint *HP_clan_rejoin_post; + struct HPMHookPoint *HP_clan_inactivity_kick_pre; + struct HPMHookPoint *HP_clan_inactivity_kick_post; + struct HPMHookPoint *HP_clan_request_kickoffline_pre; + struct HPMHookPoint *HP_clan_request_kickoffline_post; + struct HPMHookPoint *HP_clan_request_membercount_pre; + struct HPMHookPoint *HP_clan_request_membercount_post; struct HPMHookPoint *HP_clif_init_pre; struct HPMHookPoint *HP_clif_init_post; struct HPMHookPoint *HP_clif_final_pre; @@ -524,6 +694,8 @@ struct { struct HPMHookPoint *HP_clif_decrypt_cmd_post; struct HPMHookPoint *HP_clif_authok_pre; struct HPMHookPoint *HP_clif_authok_post; + struct HPMHookPoint *HP_clif_auth_error_pre; + struct HPMHookPoint *HP_clif_auth_error_post; struct HPMHookPoint *HP_clif_authrefuse_pre; struct HPMHookPoint *HP_clif_authrefuse_post; struct HPMHookPoint *HP_clif_authfail_fd_pre; @@ -542,6 +714,8 @@ struct { struct HPMHookPoint *HP_clif_delitem_post; struct HPMHookPoint *HP_clif_takeitem_pre; struct HPMHookPoint *HP_clif_takeitem_post; + struct HPMHookPoint *HP_clif_item_movefailed_pre; + struct HPMHookPoint *HP_clif_item_movefailed_post; struct HPMHookPoint *HP_clif_item_equip_pre; struct HPMHookPoint *HP_clif_item_equip_post; struct HPMHookPoint *HP_clif_item_normal_pre; @@ -564,8 +738,6 @@ struct { 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; @@ -574,6 +746,8 @@ struct { 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_cashShopSchedule_pre; + struct HPMHookPoint *HP_clif_cashShopSchedule_post; struct HPMHookPoint *HP_clif_package_announce_pre; struct HPMHookPoint *HP_clif_package_announce_post; struct HPMHookPoint *HP_clif_item_drop_announce_pre; @@ -638,6 +812,8 @@ struct { struct HPMHookPoint *HP_clif_spawn_post; struct HPMHookPoint *HP_clif_changemap_pre; struct HPMHookPoint *HP_clif_changemap_post; + struct HPMHookPoint *HP_clif_changemap_airship_pre; + struct HPMHookPoint *HP_clif_changemap_airship_post; struct HPMHookPoint *HP_clif_changemapcell_pre; struct HPMHookPoint *HP_clif_changemapcell_post; struct HPMHookPoint *HP_clif_map_property_pre; @@ -654,6 +830,8 @@ struct { struct HPMHookPoint *HP_clif_maptypeproperty2_post; struct HPMHookPoint *HP_clif_changemapserver_pre; struct HPMHookPoint *HP_clif_changemapserver_post; + struct HPMHookPoint *HP_clif_changemapserver_airship_pre; + struct HPMHookPoint *HP_clif_changemapserver_airship_post; struct HPMHookPoint *HP_clif_npcbuysell_pre; struct HPMHookPoint *HP_clif_npcbuysell_post; struct HPMHookPoint *HP_clif_buylist_pre; @@ -708,12 +886,18 @@ struct { struct HPMHookPoint *HP_clif_fame_taekwon_post; struct HPMHookPoint *HP_clif_ranklist_pre; struct HPMHookPoint *HP_clif_ranklist_post; + struct HPMHookPoint *HP_clif_ranklist_sub_pre; + struct HPMHookPoint *HP_clif_ranklist_sub_post; + struct HPMHookPoint *HP_clif_ranklist_sub2_pre; + struct HPMHookPoint *HP_clif_ranklist_sub2_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_hotkeysAll_pre; + struct HPMHookPoint *HP_clif_hotkeysAll_post; struct HPMHookPoint *HP_clif_insight_pre; struct HPMHookPoint *HP_clif_insight_post; struct HPMHookPoint *HP_clif_outsight_pre; @@ -738,14 +922,34 @@ struct { 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_status_change_sub_pre; + struct HPMHookPoint *HP_clif_status_change_sub_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_inventoryList_pre; + struct HPMHookPoint *HP_clif_inventoryList_post; + struct HPMHookPoint *HP_clif_inventoryItems_pre; + struct HPMHookPoint *HP_clif_inventoryItems_post; + struct HPMHookPoint *HP_clif_equipList_pre; + struct HPMHookPoint *HP_clif_equipList_post; + struct HPMHookPoint *HP_clif_equipItems_pre; + struct HPMHookPoint *HP_clif_equipItems_post; + struct HPMHookPoint *HP_clif_cartList_pre; + struct HPMHookPoint *HP_clif_cartList_post; + struct HPMHookPoint *HP_clif_cartItems_pre; + struct HPMHookPoint *HP_clif_cartItems_post; + struct HPMHookPoint *HP_clif_inventoryExpansionInfo_pre; + struct HPMHookPoint *HP_clif_inventoryExpansionInfo_post; + struct HPMHookPoint *HP_clif_inventoryExpandAck_pre; + struct HPMHookPoint *HP_clif_inventoryExpandAck_post; + struct HPMHookPoint *HP_clif_inventoryExpandResult_pre; + struct HPMHookPoint *HP_clif_inventoryExpandResult_post; + struct HPMHookPoint *HP_clif_pInventoryExpansion_pre; + struct HPMHookPoint *HP_clif_pInventoryExpansion_post; + struct HPMHookPoint *HP_clif_pInventoryExpansionConfirmed_pre; + struct HPMHookPoint *HP_clif_pInventoryExpansionConfirmed_post; + struct HPMHookPoint *HP_clif_pInventoryExpansionRejected_pre; + struct HPMHookPoint *HP_clif_pInventoryExpansionRejected_post; struct HPMHookPoint *HP_clif_favorite_item_pre; struct HPMHookPoint *HP_clif_favorite_item_post; struct HPMHookPoint *HP_clif_clearcart_pre; @@ -772,8 +976,36 @@ struct { 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_blname_ack_pre; + struct HPMHookPoint *HP_clif_blname_ack_post; + struct HPMHookPoint *HP_clif_pcname_ack_pre; + struct HPMHookPoint *HP_clif_pcname_ack_post; + struct HPMHookPoint *HP_clif_homname_ack_pre; + struct HPMHookPoint *HP_clif_homname_ack_post; + struct HPMHookPoint *HP_clif_mername_ack_pre; + struct HPMHookPoint *HP_clif_mername_ack_post; + struct HPMHookPoint *HP_clif_petname_ack_pre; + struct HPMHookPoint *HP_clif_petname_ack_post; + struct HPMHookPoint *HP_clif_npcname_ack_pre; + struct HPMHookPoint *HP_clif_npcname_ack_post; + struct HPMHookPoint *HP_clif_mobname_ack_pre; + struct HPMHookPoint *HP_clif_mobname_ack_post; + struct HPMHookPoint *HP_clif_mobname_guardian_ack_pre; + struct HPMHookPoint *HP_clif_mobname_guardian_ack_post; + struct HPMHookPoint *HP_clif_mobname_additional_ack_pre; + struct HPMHookPoint *HP_clif_mobname_additional_ack_post; + struct HPMHookPoint *HP_clif_mobname_normal_ack_pre; + struct HPMHookPoint *HP_clif_mobname_normal_ack_post; + struct HPMHookPoint *HP_clif_chatname_ack_pre; + struct HPMHookPoint *HP_clif_chatname_ack_post; + struct HPMHookPoint *HP_clif_elemname_ack_pre; + struct HPMHookPoint *HP_clif_elemname_ack_post; + struct HPMHookPoint *HP_clif_skillname_ack_pre; + struct HPMHookPoint *HP_clif_skillname_ack_post; + struct HPMHookPoint *HP_clif_itemname_ack_pre; + struct HPMHookPoint *HP_clif_itemname_ack_post; + struct HPMHookPoint *HP_clif_unknownname_ack_pre; + struct HPMHookPoint *HP_clif_unknownname_ack_post; struct HPMHookPoint *HP_clif_monster_hp_bar_pre; struct HPMHookPoint *HP_clif_monster_hp_bar_post; struct HPMHookPoint *HP_clif_hpmeter_pre; @@ -802,8 +1034,8 @@ struct { 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_zc_config_pre; + struct HPMHookPoint *HP_clif_zc_config_post; struct HPMHookPoint *HP_clif_viewequip_ack_pre; struct HPMHookPoint *HP_clif_viewequip_ack_post; struct HPMHookPoint *HP_clif_equpcheckbox_pre; @@ -816,6 +1048,8 @@ struct { struct HPMHookPoint *HP_clif_progressbar_post; struct HPMHookPoint *HP_clif_progressbar_abort_pre; struct HPMHookPoint *HP_clif_progressbar_abort_post; + struct HPMHookPoint *HP_clif_progressbar_unit_pre; + struct HPMHookPoint *HP_clif_progressbar_unit_post; struct HPMHookPoint *HP_clif_showdigit_pre; struct HPMHookPoint *HP_clif_showdigit_post; struct HPMHookPoint *HP_clif_elementalconverter_list_pre; @@ -832,6 +1066,8 @@ struct { 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_continue_pre; + struct HPMHookPoint *HP_clif_sc_continue_post; struct HPMHookPoint *HP_clif_sc_end_pre; struct HPMHookPoint *HP_clif_sc_end_post; struct HPMHookPoint *HP_clif_initialstatus_pre; @@ -872,6 +1108,8 @@ struct { struct HPMHookPoint *HP_clif_misceffect_post; struct HPMHookPoint *HP_clif_changeoption_pre; struct HPMHookPoint *HP_clif_changeoption_post; + struct HPMHookPoint *HP_clif_changeoption_target_pre; + struct HPMHookPoint *HP_clif_changeoption_target_post; struct HPMHookPoint *HP_clif_changeoption2_pre; struct HPMHookPoint *HP_clif_changeoption2_post; struct HPMHookPoint *HP_clif_emotion_pre; @@ -894,8 +1132,8 @@ struct { 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_useskill_pre; + struct HPMHookPoint *HP_clif_useskill_post; struct HPMHookPoint *HP_clif_produce_effect_pre; struct HPMHookPoint *HP_clif_produce_effect_post; struct HPMHookPoint *HP_clif_devotion_pre; @@ -922,6 +1160,12 @@ struct { 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_specialeffect_value_single_pre; + struct HPMHookPoint *HP_clif_specialeffect_value_single_post; + struct HPMHookPoint *HP_clif_removeSpecialEffect_pre; + struct HPMHookPoint *HP_clif_removeSpecialEffect_post; + struct HPMHookPoint *HP_clif_removeSpecialEffect_single_pre; + struct HPMHookPoint *HP_clif_removeSpecialEffect_single_post; struct HPMHookPoint *HP_clif_millenniumshield_pre; struct HPMHookPoint *HP_clif_millenniumshield_post; struct HPMHookPoint *HP_clif_spiritcharm_pre; @@ -952,6 +1196,8 @@ struct { struct HPMHookPoint *HP_clif_addchat_post; struct HPMHookPoint *HP_clif_changechatowner_pre; struct HPMHookPoint *HP_clif_changechatowner_post; + struct HPMHookPoint *HP_clif_chatRoleChange_pre; + struct HPMHookPoint *HP_clif_chatRoleChange_post; struct HPMHookPoint *HP_clif_clearchat_pre; struct HPMHookPoint *HP_clif_clearchat_post; struct HPMHookPoint *HP_clif_leavechat_pre; @@ -972,20 +1218,32 @@ struct { struct HPMHookPoint *HP_clif_messagecolor_self_post; struct HPMHookPoint *HP_clif_messagecolor_pre; struct HPMHookPoint *HP_clif_messagecolor_post; + struct HPMHookPoint *HP_clif_serviceMessageColor_pre; + struct HPMHookPoint *HP_clif_serviceMessageColor_post; struct HPMHookPoint *HP_clif_disp_overhead_pre; struct HPMHookPoint *HP_clif_disp_overhead_post; + struct HPMHookPoint *HP_clif_notify_playerchat_pre; + struct HPMHookPoint *HP_clif_notify_playerchat_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_msgtable_skill_pre; struct HPMHookPoint *HP_clif_msgtable_skill_post; + struct HPMHookPoint *HP_clif_msgtable_str_pre; + struct HPMHookPoint *HP_clif_msgtable_str_post; + struct HPMHookPoint *HP_clif_msgtable_str_color_pre; + struct HPMHookPoint *HP_clif_msgtable_str_color_post; + struct HPMHookPoint *HP_clif_msgtable_color_pre; + struct HPMHookPoint *HP_clif_msgtable_color_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_process_message_pre; - struct HPMHookPoint *HP_clif_process_message_post; + struct HPMHookPoint *HP_clif_process_chat_message_pre; + struct HPMHookPoint *HP_clif_process_chat_message_post; + struct HPMHookPoint *HP_clif_process_whisper_message_pre; + struct HPMHookPoint *HP_clif_process_whisper_message_post; struct HPMHookPoint *HP_clif_wisexin_pre; struct HPMHookPoint *HP_clif_wisexin_post; struct HPMHookPoint *HP_clif_wisall_pre; @@ -1022,10 +1280,20 @@ struct { struct HPMHookPoint *HP_clif_buyvending_post; struct HPMHookPoint *HP_clif_openvending_pre; struct HPMHookPoint *HP_clif_openvending_post; + struct HPMHookPoint *HP_clif_openvendingAck_pre; + struct HPMHookPoint *HP_clif_openvendingAck_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_storageList_pre; + struct HPMHookPoint *HP_clif_storageList_post; + struct HPMHookPoint *HP_clif_guildStorageList_pre; + struct HPMHookPoint *HP_clif_guildStorageList_post; + struct HPMHookPoint *HP_clif_storageItems_pre; + struct HPMHookPoint *HP_clif_storageItems_post; + struct HPMHookPoint *HP_clif_inventoryStart_pre; + struct HPMHookPoint *HP_clif_inventoryStart_post; + struct HPMHookPoint *HP_clif_inventoryEnd_pre; + struct HPMHookPoint *HP_clif_inventoryEnd_post; struct HPMHookPoint *HP_clif_updatestorageamount_pre; struct HPMHookPoint *HP_clif_updatestorageamount_post; struct HPMHookPoint *HP_clif_storageitemadded_pre; @@ -1044,12 +1312,16 @@ struct { struct HPMHookPoint *HP_clif_addskill_post; struct HPMHookPoint *HP_clif_deleteskill_pre; struct HPMHookPoint *HP_clif_deleteskill_post; + struct HPMHookPoint *HP_clif_playerSkillToPacket_pre; + struct HPMHookPoint *HP_clif_playerSkillToPacket_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_job_and_level_pre; + struct HPMHookPoint *HP_clif_party_job_and_level_post; struct HPMHookPoint *HP_clif_party_invite_pre; struct HPMHookPoint *HP_clif_party_invite_post; struct HPMHookPoint *HP_clif_party_inviteack_pre; @@ -1084,6 +1356,10 @@ struct { 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_castlelist_pre; + struct HPMHookPoint *HP_clif_guild_castlelist_post; + struct HPMHookPoint *HP_clif_guild_castleinfo_pre; + struct HPMHookPoint *HP_clif_guild_castleinfo_post; struct HPMHookPoint *HP_clif_guild_memberlist_pre; struct HPMHookPoint *HP_clif_guild_memberlist_post; struct HPMHookPoint *HP_clif_guild_skillinfo_pre; @@ -1134,6 +1410,10 @@ struct { 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_guild_set_position_pre; + struct HPMHookPoint *HP_clif_guild_set_position_post; + struct HPMHookPoint *HP_clif_guild_position_selected_pre; + struct HPMHookPoint *HP_clif_guild_position_selected_post; struct HPMHookPoint *HP_clif_validate_emblem_pre; struct HPMHookPoint *HP_clif_validate_emblem_post; struct HPMHookPoint *HP_clif_bg_hp_pre; @@ -1216,6 +1496,8 @@ struct { 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_notify_objective_pre; + struct HPMHookPoint *HP_clif_quest_notify_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; @@ -1380,6 +1662,8 @@ struct { struct HPMHookPoint *HP_clif_parse_roulette_db_post; struct HPMHookPoint *HP_clif_roulette_generate_ack_pre; struct HPMHookPoint *HP_clif_roulette_generate_ack_post; + struct HPMHookPoint *HP_clif_roulette_close_pre; + struct HPMHookPoint *HP_clif_roulette_close_post; struct HPMHookPoint *HP_clif_openmergeitem_pre; struct HPMHookPoint *HP_clif_openmergeitem_post; struct HPMHookPoint *HP_clif_cancelmergeitem_pre; @@ -1388,14 +1672,36 @@ struct { struct HPMHookPoint *HP_clif_comparemergeitem_post; struct HPMHookPoint *HP_clif_ackmergeitems_pre; struct HPMHookPoint *HP_clif_ackmergeitems_post; + struct HPMHookPoint *HP_clif_mergeitems_pre; + struct HPMHookPoint *HP_clif_mergeitems_post; + struct HPMHookPoint *HP_clif_isdisguised_pre; + struct HPMHookPoint *HP_clif_isdisguised_post; + struct HPMHookPoint *HP_clif_navigate_to_pre; + struct HPMHookPoint *HP_clif_navigate_to_post; + struct HPMHookPoint *HP_clif_bl_type_pre; + struct HPMHookPoint *HP_clif_bl_type_post; + struct HPMHookPoint *HP_clif_achievement_send_list_pre; + struct HPMHookPoint *HP_clif_achievement_send_list_post; + struct HPMHookPoint *HP_clif_achievement_send_update_pre; + struct HPMHookPoint *HP_clif_achievement_send_update_post; + struct HPMHookPoint *HP_clif_pAchievementGetReward_pre; + struct HPMHookPoint *HP_clif_pAchievementGetReward_post; + struct HPMHookPoint *HP_clif_achievement_reward_ack_pre; + struct HPMHookPoint *HP_clif_achievement_reward_ack_post; + struct HPMHookPoint *HP_clif_change_title_ack_pre; + struct HPMHookPoint *HP_clif_change_title_ack_post; + struct HPMHookPoint *HP_clif_pChangeTitle_pre; + struct HPMHookPoint *HP_clif_pChangeTitle_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_pHotkey1_pre; + struct HPMHookPoint *HP_clif_pHotkey1_post; + struct HPMHookPoint *HP_clif_pHotkey2_pre; + struct HPMHookPoint *HP_clif_pHotkey2_post; struct HPMHookPoint *HP_clif_pProgressbar_pre; struct HPMHookPoint *HP_clif_pProgressbar_post; struct HPMHookPoint *HP_clif_pWalkToXY_pre; @@ -1480,8 +1786,14 @@ struct { struct HPMHookPoint *HP_clif_pStatusUp_post; struct HPMHookPoint *HP_clif_pSkillUp_pre; struct HPMHookPoint *HP_clif_pSkillUp_post; + struct HPMHookPoint *HP_clif_useSkillToIdReal_pre; + struct HPMHookPoint *HP_clif_useSkillToIdReal_post; struct HPMHookPoint *HP_clif_pUseSkillToId_pre; struct HPMHookPoint *HP_clif_pUseSkillToId_post; + struct HPMHookPoint *HP_clif_pStartUseSkillToId_pre; + struct HPMHookPoint *HP_clif_pStartUseSkillToId_post; + struct HPMHookPoint *HP_clif_pStopUseSkillToId_pre; + struct HPMHookPoint *HP_clif_pStopUseSkillToId_post; struct HPMHookPoint *HP_clif_pUseSkillToId_homun_pre; struct HPMHookPoint *HP_clif_pUseSkillToId_homun_post; struct HPMHookPoint *HP_clif_pUseSkillToId_mercenary_pre; @@ -1748,8 +2060,8 @@ struct { 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_p_cz_config_pre; + struct HPMHookPoint *HP_clif_p_cz_config_post; struct HPMHookPoint *HP_clif_pquestStateAck_pre; struct HPMHookPoint *HP_clif_pquestStateAck_post; struct HPMHookPoint *HP_clif_pmercenary_action_pre; @@ -1784,6 +2096,8 @@ struct { struct HPMHookPoint *HP_clif_pMoveItem_post; struct HPMHookPoint *HP_clif_pDull_pre; struct HPMHookPoint *HP_clif_pDull_post; + struct HPMHookPoint *HP_clif_p_cz_blocking_play_cancel_pre; + struct HPMHookPoint *HP_clif_p_cz_blocking_play_cancel_post; struct HPMHookPoint *HP_clif_pBGQueueRegister_pre; struct HPMHookPoint *HP_clif_pBGQueueRegister_post; struct HPMHookPoint *HP_clif_pBGQueueCheckState_pre; @@ -1792,8 +2106,12 @@ struct { 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_pCashShopOpen1_pre; + struct HPMHookPoint *HP_clif_pCashShopOpen1_post; + struct HPMHookPoint *HP_clif_pCashShopOpen2_pre; + struct HPMHookPoint *HP_clif_pCashShopOpen2_post; + struct HPMHookPoint *HP_clif_pCashShopLimitedReq_pre; + struct HPMHookPoint *HP_clif_pCashShopLimitedReq_post; struct HPMHookPoint *HP_clif_pCashShopClose_pre; struct HPMHookPoint *HP_clif_pCashShopClose_post; struct HPMHookPoint *HP_clif_pCashShopReqTab_pre; @@ -1806,6 +2124,10 @@ struct { struct HPMHookPoint *HP_clif_pPartyTick_post; struct HPMHookPoint *HP_clif_pGuildInvite2_pre; struct HPMHookPoint *HP_clif_pGuildInvite2_post; + struct HPMHookPoint *HP_clif_cashShopBuyAck_pre; + struct HPMHookPoint *HP_clif_cashShopBuyAck_post; + struct HPMHookPoint *HP_clif_cashShopOpen_pre; + struct HPMHookPoint *HP_clif_cashShopOpen_post; struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_pre; struct HPMHookPoint *HP_clif_pPartyBookingAddFilter_post; struct HPMHookPoint *HP_clif_pPartyBookingSubFilter_pre; @@ -1842,10 +2164,12 @@ struct { struct HPMHookPoint *HP_clif_pNPCMarketClosed_post; struct HPMHookPoint *HP_clif_pNPCMarketPurchase_pre; struct HPMHookPoint *HP_clif_pNPCMarketPurchase_post; - struct HPMHookPoint *HP_clif_add_random_options_pre; - struct HPMHookPoint *HP_clif_add_random_options_post; - struct HPMHookPoint *HP_clif_pHotkeyRowShift_pre; - struct HPMHookPoint *HP_clif_pHotkeyRowShift_post; + struct HPMHookPoint *HP_clif_add_item_options_pre; + struct HPMHookPoint *HP_clif_add_item_options_post; + struct HPMHookPoint *HP_clif_pHotkeyRowShift1_pre; + struct HPMHookPoint *HP_clif_pHotkeyRowShift1_post; + struct HPMHookPoint *HP_clif_pHotkeyRowShift2_pre; + struct HPMHookPoint *HP_clif_pHotkeyRowShift2_post; struct HPMHookPoint *HP_clif_dressroom_open_pre; struct HPMHookPoint *HP_clif_dressroom_open_post; struct HPMHookPoint *HP_clif_pOneClick_ItemIdentify_pre; @@ -1856,6 +2180,192 @@ struct { struct HPMHookPoint *HP_clif_pSelectCart_post; struct HPMHookPoint *HP_clif_get_bl_name_pre; struct HPMHookPoint *HP_clif_get_bl_name_post; + struct HPMHookPoint *HP_clif_pRodexOpenWriteMail_pre; + struct HPMHookPoint *HP_clif_pRodexOpenWriteMail_post; + struct HPMHookPoint *HP_clif_rodex_open_write_mail_pre; + struct HPMHookPoint *HP_clif_rodex_open_write_mail_post; + struct HPMHookPoint *HP_clif_pRodexAddItem_pre; + struct HPMHookPoint *HP_clif_pRodexAddItem_post; + struct HPMHookPoint *HP_clif_rodex_add_item_result_pre; + struct HPMHookPoint *HP_clif_rodex_add_item_result_post; + struct HPMHookPoint *HP_clif_pRodexRemoveItem_pre; + struct HPMHookPoint *HP_clif_pRodexRemoveItem_post; + struct HPMHookPoint *HP_clif_rodex_remove_item_result_pre; + struct HPMHookPoint *HP_clif_rodex_remove_item_result_post; + struct HPMHookPoint *HP_clif_pRodexSendMail_pre; + struct HPMHookPoint *HP_clif_pRodexSendMail_post; + struct HPMHookPoint *HP_clif_rodex_send_mail_result_pre; + struct HPMHookPoint *HP_clif_rodex_send_mail_result_post; + struct HPMHookPoint *HP_clif_rodex_send_maillist_pre; + struct HPMHookPoint *HP_clif_rodex_send_maillist_post; + struct HPMHookPoint *HP_clif_rodex_send_refresh_pre; + struct HPMHookPoint *HP_clif_rodex_send_refresh_post; + struct HPMHookPoint *HP_clif_rodex_send_mails_all_pre; + struct HPMHookPoint *HP_clif_rodex_send_mails_all_post; + struct HPMHookPoint *HP_clif_pRodexReadMail_pre; + struct HPMHookPoint *HP_clif_pRodexReadMail_post; + struct HPMHookPoint *HP_clif_rodex_read_mail_pre; + struct HPMHookPoint *HP_clif_rodex_read_mail_post; + struct HPMHookPoint *HP_clif_pRodexNextMaillist_pre; + struct HPMHookPoint *HP_clif_pRodexNextMaillist_post; + struct HPMHookPoint *HP_clif_pRodexCloseMailbox_pre; + struct HPMHookPoint *HP_clif_pRodexCloseMailbox_post; + struct HPMHookPoint *HP_clif_pRodexCancelWriteMail_pre; + struct HPMHookPoint *HP_clif_pRodexCancelWriteMail_post; + struct HPMHookPoint *HP_clif_pRodexOpenMailbox_pre; + struct HPMHookPoint *HP_clif_pRodexOpenMailbox_post; + struct HPMHookPoint *HP_clif_pRodexCheckName_pre; + struct HPMHookPoint *HP_clif_pRodexCheckName_post; + struct HPMHookPoint *HP_clif_rodex_checkname_result_pre; + struct HPMHookPoint *HP_clif_rodex_checkname_result_post; + struct HPMHookPoint *HP_clif_pRodexDeleteMail_pre; + struct HPMHookPoint *HP_clif_pRodexDeleteMail_post; + struct HPMHookPoint *HP_clif_rodex_delete_mail_pre; + struct HPMHookPoint *HP_clif_rodex_delete_mail_post; + struct HPMHookPoint *HP_clif_pRodexRefreshMaillist_pre; + struct HPMHookPoint *HP_clif_pRodexRefreshMaillist_post; + struct HPMHookPoint *HP_clif_pRodexRequestZeny_pre; + struct HPMHookPoint *HP_clif_pRodexRequestZeny_post; + struct HPMHookPoint *HP_clif_rodex_request_zeny_pre; + struct HPMHookPoint *HP_clif_rodex_request_zeny_post; + struct HPMHookPoint *HP_clif_pRodexRequestItems_pre; + struct HPMHookPoint *HP_clif_pRodexRequestItems_post; + struct HPMHookPoint *HP_clif_rodex_request_items_pre; + struct HPMHookPoint *HP_clif_rodex_request_items_post; + struct HPMHookPoint *HP_clif_rodex_icon_pre; + struct HPMHookPoint *HP_clif_rodex_icon_post; + struct HPMHookPoint *HP_clif_skill_scale_pre; + struct HPMHookPoint *HP_clif_skill_scale_post; + struct HPMHookPoint *HP_clif_clan_basicinfo_pre; + struct HPMHookPoint *HP_clif_clan_basicinfo_post; + struct HPMHookPoint *HP_clif_clan_onlinecount_pre; + struct HPMHookPoint *HP_clif_clan_onlinecount_post; + struct HPMHookPoint *HP_clif_clan_leave_pre; + struct HPMHookPoint *HP_clif_clan_leave_post; + struct HPMHookPoint *HP_clif_clan_message_pre; + struct HPMHookPoint *HP_clif_clan_message_post; + struct HPMHookPoint *HP_clif_pClanMessage_pre; + struct HPMHookPoint *HP_clif_pClanMessage_post; + struct HPMHookPoint *HP_clif_hat_effect_pre; + struct HPMHookPoint *HP_clif_hat_effect_post; + struct HPMHookPoint *HP_clif_hat_effect_single_pre; + struct HPMHookPoint *HP_clif_hat_effect_single_post; + struct HPMHookPoint *HP_clif_overweight_percent_pre; + struct HPMHookPoint *HP_clif_overweight_percent_post; + struct HPMHookPoint *HP_clif_pChangeDress_pre; + struct HPMHookPoint *HP_clif_pChangeDress_post; + struct HPMHookPoint *HP_clif_pAttendanceDB_pre; + struct HPMHookPoint *HP_clif_pAttendanceDB_post; + struct HPMHookPoint *HP_clif_attendancedb_libconfig_sub_pre; + struct HPMHookPoint *HP_clif_attendancedb_libconfig_sub_post; + struct HPMHookPoint *HP_clif_attendance_timediff_pre; + struct HPMHookPoint *HP_clif_attendance_timediff_post; + struct HPMHookPoint *HP_clif_attendance_getendtime_pre; + struct HPMHookPoint *HP_clif_attendance_getendtime_post; + struct HPMHookPoint *HP_clif_pOpenUIRequest_pre; + struct HPMHookPoint *HP_clif_pOpenUIRequest_post; + struct HPMHookPoint *HP_clif_open_ui_pre; + struct HPMHookPoint *HP_clif_open_ui_post; + struct HPMHookPoint *HP_clif_pAttendanceRewardRequest_pre; + struct HPMHookPoint *HP_clif_pAttendanceRewardRequest_post; + struct HPMHookPoint *HP_clif_ui_action_pre; + struct HPMHookPoint *HP_clif_ui_action_post; + struct HPMHookPoint *HP_clif_pPrivateAirshipRequest_pre; + struct HPMHookPoint *HP_clif_pPrivateAirshipRequest_post; + struct HPMHookPoint *HP_clif_PrivateAirshipResponse_pre; + struct HPMHookPoint *HP_clif_PrivateAirshipResponse_post; + struct HPMHookPoint *HP_clif_pReqStyleChange_pre; + struct HPMHookPoint *HP_clif_pReqStyleChange_post; + struct HPMHookPoint *HP_clif_pReqStyleChange2_pre; + struct HPMHookPoint *HP_clif_pReqStyleChange2_post; + struct HPMHookPoint *HP_clif_pStyleClose_pre; + struct HPMHookPoint *HP_clif_pStyleClose_post; + struct HPMHookPoint *HP_clif_style_change_response_pre; + struct HPMHookPoint *HP_clif_style_change_response_post; + struct HPMHookPoint *HP_clif_pPetEvolution_pre; + struct HPMHookPoint *HP_clif_pPetEvolution_post; + struct HPMHookPoint *HP_clif_petEvolutionResult_pre; + struct HPMHookPoint *HP_clif_petEvolutionResult_post; + struct HPMHookPoint *HP_clif_party_dead_notification_pre; + struct HPMHookPoint *HP_clif_party_dead_notification_post; + struct HPMHookPoint *HP_clif_pMemorialDungeonCommand_pre; + struct HPMHookPoint *HP_clif_pMemorialDungeonCommand_post; + struct HPMHookPoint *HP_clif_camera_showWindow_pre; + struct HPMHookPoint *HP_clif_camera_showWindow_post; + struct HPMHookPoint *HP_clif_camera_change_pre; + struct HPMHookPoint *HP_clif_camera_change_post; + struct HPMHookPoint *HP_clif_pCameraInfo_pre; + struct HPMHookPoint *HP_clif_pCameraInfo_post; + struct HPMHookPoint *HP_clif_item_preview_pre; + struct HPMHookPoint *HP_clif_item_preview_post; + struct HPMHookPoint *HP_clif_enchant_equipment_pre; + struct HPMHookPoint *HP_clif_enchant_equipment_post; + struct HPMHookPoint *HP_clif_pReqRemainTime_pre; + struct HPMHookPoint *HP_clif_pReqRemainTime_post; + struct HPMHookPoint *HP_clif_npc_barter_open_pre; + struct HPMHookPoint *HP_clif_npc_barter_open_post; + struct HPMHookPoint *HP_clif_pNPCBarterClosed_pre; + struct HPMHookPoint *HP_clif_pNPCBarterClosed_post; + struct HPMHookPoint *HP_clif_pNPCBarterPurchase_pre; + struct HPMHookPoint *HP_clif_pNPCBarterPurchase_post; + struct HPMHookPoint *HP_clif_pNPCExpandedBarterClosed_pre; + struct HPMHookPoint *HP_clif_pNPCExpandedBarterClosed_post; + struct HPMHookPoint *HP_clif_pNPCExpandedBarterPurchase_pre; + struct HPMHookPoint *HP_clif_pNPCExpandedBarterPurchase_post; + struct HPMHookPoint *HP_clif_npc_expanded_barter_open_pre; + struct HPMHookPoint *HP_clif_npc_expanded_barter_open_post; + struct HPMHookPoint *HP_clif_pClientVersion_pre; + struct HPMHookPoint *HP_clif_pClientVersion_post; + struct HPMHookPoint *HP_clif_pPing_pre; + struct HPMHookPoint *HP_clif_pPing_post; + struct HPMHookPoint *HP_clif_ping_pre; + struct HPMHookPoint *HP_clif_ping_post; + struct HPMHookPoint *HP_clif_pingTimer_pre; + struct HPMHookPoint *HP_clif_pingTimer_post; + struct HPMHookPoint *HP_clif_pingTimerSub_pre; + struct HPMHookPoint *HP_clif_pingTimerSub_post; + struct HPMHookPoint *HP_clif_pResetCooldown_pre; + struct HPMHookPoint *HP_clif_pResetCooldown_post; + struct HPMHookPoint *HP_clif_loadConfirm_pre; + struct HPMHookPoint *HP_clif_loadConfirm_post; + struct HPMHookPoint *HP_clif_send_selforarea_pre; + struct HPMHookPoint *HP_clif_send_selforarea_post; + struct HPMHookPoint *HP_clif_OpenRefineryUI_pre; + struct HPMHookPoint *HP_clif_OpenRefineryUI_post; + struct HPMHookPoint *HP_clif_pAddItemRefineryUI_pre; + struct HPMHookPoint *HP_clif_pAddItemRefineryUI_post; + struct HPMHookPoint *HP_clif_AddItemRefineryUIAck_pre; + struct HPMHookPoint *HP_clif_AddItemRefineryUIAck_post; + struct HPMHookPoint *HP_clif_pRefineryUIClose_pre; + struct HPMHookPoint *HP_clif_pRefineryUIClose_post; + struct HPMHookPoint *HP_clif_pRefineryUIRefine_pre; + struct HPMHookPoint *HP_clif_pRefineryUIRefine_post; + struct HPMHookPoint *HP_clif_announce_refine_status_pre; + struct HPMHookPoint *HP_clif_announce_refine_status_post; + struct HPMHookPoint *HP_clif_pGuildCastleTeleportRequest_pre; + struct HPMHookPoint *HP_clif_pGuildCastleTeleportRequest_post; + struct HPMHookPoint *HP_clif_pGuildCastleInfoRequest_pre; + struct HPMHookPoint *HP_clif_pGuildCastleInfoRequest_post; + struct HPMHookPoint *HP_clif_guild_castleteleport_res_pre; + struct HPMHookPoint *HP_clif_guild_castleteleport_res_post; + struct HPMHookPoint *HP_clif_lapineDdukDdak_open_pre; + struct HPMHookPoint *HP_clif_lapineDdukDdak_open_post; + struct HPMHookPoint *HP_clif_lapineDdukDdak_result_pre; + struct HPMHookPoint *HP_clif_lapineDdukDdak_result_post; + struct HPMHookPoint *HP_clif_plapineDdukDdak_ack_pre; + struct HPMHookPoint *HP_clif_plapineDdukDdak_ack_post; + struct HPMHookPoint *HP_clif_plapineDdukDdak_close_pre; + struct HPMHookPoint *HP_clif_plapineDdukDdak_close_post; + struct HPMHookPoint *HP_clif_lapineUpgrade_open_pre; + struct HPMHookPoint *HP_clif_lapineUpgrade_open_post; + struct HPMHookPoint *HP_clif_lapineUpgrade_result_pre; + struct HPMHookPoint *HP_clif_lapineUpgrade_result_post; + struct HPMHookPoint *HP_clif_pLapineUpgrade_close_pre; + struct HPMHookPoint *HP_clif_pLapineUpgrade_close_post; + struct HPMHookPoint *HP_clif_pLapineUpgrade_makeItem_pre; + struct HPMHookPoint *HP_clif_pLapineUpgrade_makeItem_post; + struct HPMHookPoint *HP_clif_pReqGearOff_pre; + struct HPMHookPoint *HP_clif_pReqGearOff_post; struct HPMHookPoint *HP_cmdline_init_pre; struct HPMHookPoint *HP_cmdline_init_post; struct HPMHookPoint *HP_cmdline_final_pre; @@ -1916,6 +2426,10 @@ struct { struct HPMHookPoint *HP_DB_init_post; struct HPMHookPoint *HP_DB_final_pre; struct HPMHookPoint *HP_DB_final_post; + struct HPMHookPoint *HP_des_decrypt_block_pre; + struct HPMHookPoint *HP_des_decrypt_block_post; + struct HPMHookPoint *HP_des_decrypt_pre; + struct HPMHookPoint *HP_des_decrypt_post; struct HPMHookPoint *HP_duel_create_pre; struct HPMHookPoint *HP_duel_create_post; struct HPMHookPoint *HP_duel_invite_pre; @@ -1928,8 +2442,8 @@ struct { 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_difftime_pre; + struct HPMHookPoint *HP_duel_difftime_post; struct HPMHookPoint *HP_duel_init_pre; struct HPMHookPoint *HP_duel_init_post; struct HPMHookPoint *HP_duel_final_pre; @@ -1998,6 +2512,20 @@ struct { struct HPMHookPoint *HP_elemental_ai_timer_post; struct HPMHookPoint *HP_elemental_read_db_pre; struct HPMHookPoint *HP_elemental_read_db_post; + struct HPMHookPoint *HP_grfio_init_pre; + struct HPMHookPoint *HP_grfio_init_post; + struct HPMHookPoint *HP_grfio_final_pre; + struct HPMHookPoint *HP_grfio_final_post; + struct HPMHookPoint *HP_grfio_reads_pre; + struct HPMHookPoint *HP_grfio_reads_post; + struct HPMHookPoint *HP_grfio_find_file_pre; + struct HPMHookPoint *HP_grfio_find_file_post; + struct HPMHookPoint *HP_grfio_crc32_pre; + struct HPMHookPoint *HP_grfio_crc32_post; + struct HPMHookPoint *HP_grfio_decode_zip_pre; + struct HPMHookPoint *HP_grfio_decode_zip_post; + struct HPMHookPoint *HP_grfio_encode_zip_pre; + struct HPMHookPoint *HP_grfio_encode_zip_post; struct HPMHookPoint *HP_guild_init_pre; struct HPMHookPoint *HP_guild_init_post; struct HPMHookPoint *HP_guild_final_pre; @@ -2096,8 +2624,6 @@ struct { 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; @@ -2142,8 +2668,12 @@ struct { 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_read_castledb_libconfig_pre; + struct HPMHookPoint *HP_guild_read_castledb_libconfig_post; + struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_pre; + struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_post; + struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_warp_pre; + struct HPMHookPoint *HP_guild_read_castledb_libconfig_sub_warp_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; @@ -2240,6 +2770,8 @@ struct { struct HPMHookPoint *HP_homun_mutate_post; struct HPMHookPoint *HP_homun_gainexp_pre; struct HPMHookPoint *HP_homun_gainexp_post; + struct HPMHookPoint *HP_homun_gainexp_real_pre; + struct HPMHookPoint *HP_homun_gainexp_real_post; struct HPMHookPoint *HP_homun_add_intimacy_pre; struct HPMHookPoint *HP_homun_add_intimacy_post; struct HPMHookPoint *HP_homun_consume_intimacy_pre; @@ -2332,24 +2864,20 @@ struct { struct HPMHookPoint *HP_instance_valid_post; struct HPMHookPoint *HP_instance_destroy_timer_pre; struct HPMHookPoint *HP_instance_destroy_timer_post; + struct HPMHookPoint *HP_instance_force_destroy_pre; + struct HPMHookPoint *HP_instance_force_destroy_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_account_storage_pre; + struct HPMHookPoint *HP_intif_request_account_storage_post; + struct HPMHookPoint *HP_intif_send_account_storage_pre; + struct HPMHookPoint *HP_intif_send_account_storage_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; @@ -2368,8 +2896,6 @@ struct { 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; @@ -2384,8 +2910,6 @@ struct { 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; @@ -2466,24 +2990,42 @@ struct { 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_rodex_requestinbox_pre; + struct HPMHookPoint *HP_intif_rodex_requestinbox_post; + struct HPMHookPoint *HP_intif_rodex_checkhasnew_pre; + struct HPMHookPoint *HP_intif_rodex_checkhasnew_post; + struct HPMHookPoint *HP_intif_rodex_updatemail_pre; + struct HPMHookPoint *HP_intif_rodex_updatemail_post; + struct HPMHookPoint *HP_intif_rodex_sendmail_pre; + struct HPMHookPoint *HP_intif_rodex_sendmail_post; + struct HPMHookPoint *HP_intif_rodex_checkname_pre; + struct HPMHookPoint *HP_intif_rodex_checkname_post; + struct HPMHookPoint *HP_intif_pGetZenyAck_pre; + struct HPMHookPoint *HP_intif_pGetZenyAck_post; + struct HPMHookPoint *HP_intif_pGetItemsAck_pre; + struct HPMHookPoint *HP_intif_pGetItemsAck_post; + struct HPMHookPoint *HP_intif_clan_kickoffline_pre; + struct HPMHookPoint *HP_intif_clan_kickoffline_post; + struct HPMHookPoint *HP_intif_clan_membercount_pre; + struct HPMHookPoint *HP_intif_clan_membercount_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_achievements_request_pre; + struct HPMHookPoint *HP_intif_achievements_request_post; + struct HPMHookPoint *HP_intif_achievements_save_pre; + struct HPMHookPoint *HP_intif_achievements_save_post; struct HPMHookPoint *HP_intif_pRegisters_pre; struct HPMHookPoint *HP_intif_pRegisters_post; + struct HPMHookPoint *HP_intif_pAccountStorage_pre; + struct HPMHookPoint *HP_intif_pAccountStorage_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_pAccountStorageSaveAck_pre; + struct HPMHookPoint *HP_intif_pAccountStorageSaveAck_post; struct HPMHookPoint *HP_intif_pLoadGuildStorage_pre; struct HPMHookPoint *HP_intif_pLoadGuildStorage_post; struct HPMHookPoint *HP_intif_pSaveGuildStorage_pre; @@ -2502,8 +3044,6 @@ struct { 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; @@ -2516,8 +3056,6 @@ struct { 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; @@ -2594,6 +3132,18 @@ struct { struct HPMHookPoint *HP_intif_pSaveHomunculusOk_post; struct HPMHookPoint *HP_intif_pDeleteHomunculusOk_pre; struct HPMHookPoint *HP_intif_pDeleteHomunculusOk_post; + struct HPMHookPoint *HP_intif_pRequestRodexOpenInbox_pre; + struct HPMHookPoint *HP_intif_pRequestRodexOpenInbox_post; + struct HPMHookPoint *HP_intif_pRodexHasNew_pre; + struct HPMHookPoint *HP_intif_pRodexHasNew_post; + struct HPMHookPoint *HP_intif_pRodexSendMail_pre; + struct HPMHookPoint *HP_intif_pRodexSendMail_post; + struct HPMHookPoint *HP_intif_pRodexCheckName_pre; + struct HPMHookPoint *HP_intif_pRodexCheckName_post; + struct HPMHookPoint *HP_intif_pRecvClanMemberAction_pre; + struct HPMHookPoint *HP_intif_pRecvClanMemberAction_post; + struct HPMHookPoint *HP_intif_pAchievementsLoad_pre; + struct HPMHookPoint *HP_intif_pAchievementsLoad_post; struct HPMHookPoint *HP_ircbot_init_pre; struct HPMHookPoint *HP_ircbot_init_post; struct HPMHookPoint *HP_ircbot_final_pre; @@ -2612,6 +3162,10 @@ struct { 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_queue_timer_pre; + struct HPMHookPoint *HP_ircbot_queue_timer_post; + struct HPMHookPoint *HP_ircbot_queue_pre; + struct HPMHookPoint *HP_ircbot_queue_post; struct HPMHookPoint *HP_ircbot_send_pre; struct HPMHookPoint *HP_ircbot_send_post; struct HPMHookPoint *HP_ircbot_relay_pre; @@ -2620,6 +3174,8 @@ struct { struct HPMHookPoint *HP_ircbot_pong_post; struct HPMHookPoint *HP_ircbot_privmsg_pre; struct HPMHookPoint *HP_ircbot_privmsg_post; + struct HPMHookPoint *HP_ircbot_privmsg_ctcp_pre; + struct HPMHookPoint *HP_ircbot_privmsg_ctcp_post; struct HPMHookPoint *HP_ircbot_userjoin_pre; struct HPMHookPoint *HP_ircbot_userjoin_post; struct HPMHookPoint *HP_ircbot_userleave_pre; @@ -2640,6 +3196,8 @@ struct { 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_read_options_pre; + struct HPMHookPoint *HP_itemdb_read_options_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; @@ -2656,6 +3214,8 @@ struct { struct HPMHookPoint *HP_itemdb_search_post; struct HPMHookPoint *HP_itemdb_exists_pre; struct HPMHookPoint *HP_itemdb_exists_post; + struct HPMHookPoint *HP_itemdb_option_exists_pre; + struct HPMHookPoint *HP_itemdb_option_exists_post; struct HPMHookPoint *HP_itemdb_in_group_pre; struct HPMHookPoint *HP_itemdb_in_group_post; struct HPMHookPoint *HP_itemdb_group_item_pre; @@ -2712,14 +3272,16 @@ struct { struct HPMHookPoint *HP_itemdb_isidentified_post; struct HPMHookPoint *HP_itemdb_isidentified2_pre; struct HPMHookPoint *HP_itemdb_isidentified2_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_read_combodb_libconfig_pre; + struct HPMHookPoint *HP_itemdb_read_combodb_libconfig_post; + struct HPMHookPoint *HP_itemdb_read_combodb_libconfig_sub_pre; + struct HPMHookPoint *HP_itemdb_read_combodb_libconfig_sub_post; struct HPMHookPoint *HP_itemdb_gendercheck_pre; struct HPMHookPoint *HP_itemdb_gendercheck_post; struct HPMHookPoint *HP_itemdb_validate_entry_pre; struct HPMHookPoint *HP_itemdb_validate_entry_post; + struct HPMHookPoint *HP_itemdb_readdb_options_additional_fields_pre; + struct HPMHookPoint *HP_itemdb_readdb_options_additional_fields_post; struct HPMHookPoint *HP_itemdb_readdb_additional_fields_pre; struct HPMHookPoint *HP_itemdb_readdb_additional_fields_post; struct HPMHookPoint *HP_itemdb_readdb_job_sub_pre; @@ -2736,6 +3298,8 @@ struct { 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_itemdb_options_final_sub_pre; + struct HPMHookPoint *HP_itemdb_options_final_sub_post; struct HPMHookPoint *HP_itemdb_clear_pre; struct HPMHookPoint *HP_itemdb_clear_post; struct HPMHookPoint *HP_itemdb_id2combo_pre; @@ -2744,6 +3308,20 @@ struct { struct HPMHookPoint *HP_itemdb_is_item_usable_post; struct HPMHookPoint *HP_itemdb_lookup_const_pre; struct HPMHookPoint *HP_itemdb_lookup_const_post; + struct HPMHookPoint *HP_itemdb_lookup_const_mask_pre; + struct HPMHookPoint *HP_itemdb_lookup_const_mask_post; + struct HPMHookPoint *HP_itemdb_addname_sub_pre; + struct HPMHookPoint *HP_itemdb_addname_sub_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_sub_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_sub_post; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_sub_sources_pre; + struct HPMHookPoint *HP_itemdb_read_libconfig_lapineddukddak_sub_sources_post; + struct HPMHookPoint *HP_libconfig_set_db_path_pre; + struct HPMHookPoint *HP_libconfig_set_db_path_post; + struct HPMHookPoint *HP_libconfig_format_db_path_pre; + struct HPMHookPoint *HP_libconfig_format_db_path_post; struct HPMHookPoint *HP_libconfig_read_pre; struct HPMHookPoint *HP_libconfig_read_post; struct HPMHookPoint *HP_libconfig_write_pre; @@ -2942,44 +3520,20 @@ struct { struct HPMHookPoint *HP_mail_deliveryfail_post; struct HPMHookPoint *HP_mail_invalid_operation_pre; struct HPMHookPoint *HP_mail_invalid_operation_post; - struct HPMHookPoint *HP_iMalloc_init_pre; - struct HPMHookPoint *HP_iMalloc_init_post; - struct HPMHookPoint *HP_iMalloc_final_pre; - struct HPMHookPoint *HP_iMalloc_final_post; - struct HPMHookPoint *HP_iMalloc_malloc_pre; - struct HPMHookPoint *HP_iMalloc_malloc_post; - struct HPMHookPoint *HP_iMalloc_calloc_pre; - struct HPMHookPoint *HP_iMalloc_calloc_post; - struct HPMHookPoint *HP_iMalloc_realloc_pre; - struct HPMHookPoint *HP_iMalloc_realloc_post; - struct HPMHookPoint *HP_iMalloc_reallocz_pre; - struct HPMHookPoint *HP_iMalloc_reallocz_post; - struct HPMHookPoint *HP_iMalloc_astrdup_pre; - struct HPMHookPoint *HP_iMalloc_astrdup_post; - struct HPMHookPoint *HP_iMalloc_astrndup_pre; - struct HPMHookPoint *HP_iMalloc_astrndup_post; - struct HPMHookPoint *HP_iMalloc_free_pre; - struct HPMHookPoint *HP_iMalloc_free_post; - struct HPMHookPoint *HP_iMalloc_memory_check_pre; - struct HPMHookPoint *HP_iMalloc_memory_check_post; - struct HPMHookPoint *HP_iMalloc_verify_ptr_pre; - struct HPMHookPoint *HP_iMalloc_verify_ptr_post; - struct HPMHookPoint *HP_iMalloc_usage_pre; - struct HPMHookPoint *HP_iMalloc_usage_post; - struct HPMHookPoint *HP_iMalloc_post_shutdown_pre; - struct HPMHookPoint *HP_iMalloc_post_shutdown_post; - struct HPMHookPoint *HP_iMalloc_init_messages_pre; - struct HPMHookPoint *HP_iMalloc_init_messages_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_remove_all_pre; + struct HPMHookPoint *HP_map_zone_remove_all_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_zone_reload_pre; + struct HPMHookPoint *HP_map_zone_reload_post; struct HPMHookPoint *HP_map_getcell_pre; struct HPMHookPoint *HP_map_getcell_post; struct HPMHookPoint *HP_map_setgatcell_pre; @@ -3176,10 +3730,10 @@ struct { 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_readfromcache_v1_pre; + struct HPMHookPoint *HP_map_readfromcache_v1_post; struct HPMHookPoint *HP_map_addmap_pre; struct HPMHookPoint *HP_map_addmap_post; struct HPMHookPoint *HP_map_delmapid_pre; @@ -3196,12 +3750,14 @@ struct { 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_read_npclist_pre; + struct HPMHookPoint *HP_map_read_npclist_post; struct HPMHookPoint *HP_map_inter_config_read_pre; struct HPMHookPoint *HP_map_inter_config_read_post; + struct HPMHookPoint *HP_map_inter_config_read_database_names_pre; + struct HPMHookPoint *HP_map_inter_config_read_database_names_post; + struct HPMHookPoint *HP_map_inter_config_read_connection_pre; + struct HPMHookPoint *HP_map_inter_config_read_connection_post; struct HPMHookPoint *HP_map_sql_init_pre; struct HPMHookPoint *HP_map_sql_init_post; struct HPMHookPoint *HP_map_sql_close_pre; @@ -3236,6 +3792,10 @@ struct { struct HPMHookPoint *HP_map_merge_zone_post; struct HPMHookPoint *HP_map_zone_clear_single_pre; struct HPMHookPoint *HP_map_zone_clear_single_post; + struct HPMHookPoint *HP_mapindex_config_read_dbpath_pre; + struct HPMHookPoint *HP_mapindex_config_read_dbpath_post; + struct HPMHookPoint *HP_mapindex_config_read_pre; + struct HPMHookPoint *HP_mapindex_config_read_post; struct HPMHookPoint *HP_mapindex_init_pre; struct HPMHookPoint *HP_mapindex_init_post; struct HPMHookPoint *HP_mapindex_final_pre; @@ -3292,6 +3852,12 @@ struct { struct HPMHookPoint *HP_mapreg_reload_post; struct HPMHookPoint *HP_mapreg_config_read_pre; struct HPMHookPoint *HP_mapreg_config_read_post; + struct HPMHookPoint *HP_md5_string_pre; + struct HPMHookPoint *HP_md5_string_post; + struct HPMHookPoint *HP_md5_binary_pre; + struct HPMHookPoint *HP_md5_binary_post; + struct HPMHookPoint *HP_md5_salt_pre; + struct HPMHookPoint *HP_md5_salt_post; struct HPMHookPoint *HP_mercenary_init_pre; struct HPMHookPoint *HP_mercenary_init_post; struct HPMHookPoint *HP_mercenary_class_pre; @@ -3348,6 +3914,8 @@ struct { struct HPMHookPoint *HP_mob_final_post; struct HPMHookPoint *HP_mob_reload_pre; struct HPMHookPoint *HP_mob_reload_post; + struct HPMHookPoint *HP_mob_reload_sub_mob_pre; + struct HPMHookPoint *HP_mob_reload_sub_mob_post; struct HPMHookPoint *HP_mob_db_pre; struct HPMHookPoint *HP_mob_db_post; struct HPMHookPoint *HP_mob_chat_pre; @@ -3362,6 +3930,10 @@ struct { 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_spawn_delayed_pre; + struct HPMHookPoint *HP_mob_mvptomb_spawn_delayed_post; + struct HPMHookPoint *HP_mob_mvptomb_delayspawn_pre; + struct HPMHookPoint *HP_mob_mvptomb_delayspawn_post; struct HPMHookPoint *HP_mob_mvptomb_create_pre; struct HPMHookPoint *HP_mob_mvptomb_create_post; struct HPMHookPoint *HP_mob_mvptomb_destroy_pre; @@ -3416,6 +3988,8 @@ struct { 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_is_in_battle_state_pre; + struct HPMHookPoint *HP_mob_is_in_battle_state_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; @@ -3436,6 +4010,8 @@ struct { 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_options_pre; + struct HPMHookPoint *HP_mob_setdropitem_options_post; struct HPMHookPoint *HP_mob_setdropitem_pre; struct HPMHookPoint *HP_mob_setdropitem_post; struct HPMHookPoint *HP_mob_setlootitem_pre; @@ -3502,6 +4078,14 @@ struct { 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_read_optdrops_option_pre; + struct HPMHookPoint *HP_mob_read_optdrops_option_post; + struct HPMHookPoint *HP_mob_read_optdrops_optslot_pre; + struct HPMHookPoint *HP_mob_read_optdrops_optslot_post; + struct HPMHookPoint *HP_mob_read_optdrops_group_pre; + struct HPMHookPoint *HP_mob_read_optdrops_group_post; + struct HPMHookPoint *HP_mob_read_optdrops_db_pre; + struct HPMHookPoint *HP_mob_read_optdrops_db_post; struct HPMHookPoint *HP_mob_readdb_pre; struct HPMHookPoint *HP_mob_readdb_post; struct HPMHookPoint *HP_mob_lookup_const_pre; @@ -3522,20 +4106,22 @@ struct { struct HPMHookPoint *HP_mob_read_db_mvpdrops_sub_post; struct HPMHookPoint *HP_mob_read_db_mode_sub_pre; struct HPMHookPoint *HP_mob_read_db_mode_sub_post; + struct HPMHookPoint *HP_mob_read_db_drops_option_pre; + struct HPMHookPoint *HP_mob_read_db_drops_option_post; struct HPMHookPoint *HP_mob_read_db_stats_sub_pre; struct HPMHookPoint *HP_mob_read_db_stats_sub_post; + struct HPMHookPoint *HP_mob_read_db_viewdata_sub_pre; + struct HPMHookPoint *HP_mob_read_db_viewdata_sub_post; struct HPMHookPoint *HP_mob_name_constants_pre; struct HPMHookPoint *HP_mob_name_constants_post; - struct HPMHookPoint *HP_mob_readdb_mobavail_pre; - struct HPMHookPoint *HP_mob_readdb_mobavail_post; + struct HPMHookPoint *HP_mob_mobavail_removal_notice_pre; + struct HPMHookPoint *HP_mob_mobavail_removal_notice_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_readdb_race2_pre; @@ -3546,8 +4132,42 @@ struct { struct HPMHookPoint *HP_mob_load_post; struct HPMHookPoint *HP_mob_clear_spawninfo_pre; struct HPMHookPoint *HP_mob_clear_spawninfo_post; + struct HPMHookPoint *HP_mob_get_item_drop_ratio_pre; + struct HPMHookPoint *HP_mob_get_item_drop_ratio_post; + struct HPMHookPoint *HP_mob_set_item_drop_ratio_pre; + struct HPMHookPoint *HP_mob_set_item_drop_ratio_post; + struct HPMHookPoint *HP_mob_final_ratio_sub_pre; + struct HPMHookPoint *HP_mob_final_ratio_sub_post; struct HPMHookPoint *HP_mob_destroy_mob_db_pre; struct HPMHookPoint *HP_mob_destroy_mob_db_post; + struct HPMHookPoint *HP_mob_destroy_drop_groups_pre; + struct HPMHookPoint *HP_mob_destroy_drop_groups_post; + struct HPMHookPoint *HP_mob_skill_db_libconfig_pre; + struct HPMHookPoint *HP_mob_skill_db_libconfig_post; + struct HPMHookPoint *HP_mob_skill_db_libconfig_sub_pre; + struct HPMHookPoint *HP_mob_skill_db_libconfig_sub_post; + struct HPMHookPoint *HP_mob_skill_db_libconfig_sub_skill_pre; + struct HPMHookPoint *HP_mob_skill_db_libconfig_sub_skill_post; + struct HPMHookPoint *HP_mutex_create_pre; + struct HPMHookPoint *HP_mutex_create_post; + struct HPMHookPoint *HP_mutex_destroy_pre; + struct HPMHookPoint *HP_mutex_destroy_post; + struct HPMHookPoint *HP_mutex_lock_pre; + struct HPMHookPoint *HP_mutex_lock_post; + struct HPMHookPoint *HP_mutex_trylock_pre; + struct HPMHookPoint *HP_mutex_trylock_post; + struct HPMHookPoint *HP_mutex_unlock_pre; + struct HPMHookPoint *HP_mutex_unlock_post; + struct HPMHookPoint *HP_mutex_cond_create_pre; + struct HPMHookPoint *HP_mutex_cond_create_post; + struct HPMHookPoint *HP_mutex_cond_destroy_pre; + struct HPMHookPoint *HP_mutex_cond_destroy_post; + struct HPMHookPoint *HP_mutex_cond_wait_pre; + struct HPMHookPoint *HP_mutex_cond_wait_post; + struct HPMHookPoint *HP_mutex_cond_signal_pre; + struct HPMHookPoint *HP_mutex_cond_signal_post; + struct HPMHookPoint *HP_mutex_cond_broadcast_pre; + struct HPMHookPoint *HP_mutex_cond_broadcast_post; struct HPMHookPoint *HP_npc_chat_sub_pre; struct HPMHookPoint *HP_npc_chat_sub_post; struct HPMHookPoint *HP_npc_chat_finalize_pre; @@ -3672,6 +4292,8 @@ struct { 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_mob_pre; + struct HPMHookPoint *HP_npc_unload_mob_post; struct HPMHookPoint *HP_npc_unload_pre; struct HPMHookPoint *HP_npc_unload_post; struct HPMHookPoint *HP_npc_clearsrcfile_pre; @@ -3772,6 +4394,10 @@ struct { struct HPMHookPoint *HP_npc_trader_update_post; struct HPMHookPoint *HP_npc_market_buylist_pre; struct HPMHookPoint *HP_npc_market_buylist_post; + struct HPMHookPoint *HP_npc_barter_buylist_pre; + struct HPMHookPoint *HP_npc_barter_buylist_post; + struct HPMHookPoint *HP_npc_expanded_barter_buylist_pre; + struct HPMHookPoint *HP_npc_expanded_barter_buylist_post; struct HPMHookPoint *HP_npc_trader_open_pre; struct HPMHookPoint *HP_npc_trader_open_post; struct HPMHookPoint *HP_npc_market_fromsql_pre; @@ -3782,12 +4408,44 @@ struct { struct HPMHookPoint *HP_npc_market_delfromsql_post; struct HPMHookPoint *HP_npc_market_delfromsql_sub_pre; struct HPMHookPoint *HP_npc_market_delfromsql_sub_post; + struct HPMHookPoint *HP_npc_barter_fromsql_pre; + struct HPMHookPoint *HP_npc_barter_fromsql_post; + struct HPMHookPoint *HP_npc_barter_tosql_pre; + struct HPMHookPoint *HP_npc_barter_tosql_post; + struct HPMHookPoint *HP_npc_barter_delfromsql_pre; + struct HPMHookPoint *HP_npc_barter_delfromsql_post; + struct HPMHookPoint *HP_npc_barter_delfromsql_sub_pre; + struct HPMHookPoint *HP_npc_barter_delfromsql_sub_post; + struct HPMHookPoint *HP_npc_expanded_barter_fromsql_pre; + struct HPMHookPoint *HP_npc_expanded_barter_fromsql_post; + struct HPMHookPoint *HP_npc_expanded_barter_tosql_pre; + struct HPMHookPoint *HP_npc_expanded_barter_tosql_post; + struct HPMHookPoint *HP_npc_expanded_barter_delfromsql_pre; + struct HPMHookPoint *HP_npc_expanded_barter_delfromsql_post; + struct HPMHookPoint *HP_npc_expanded_barter_delfromsql_sub_pre; + struct HPMHookPoint *HP_npc_expanded_barter_delfromsql_sub_post; struct HPMHookPoint *HP_npc_db_checkid_pre; struct HPMHookPoint *HP_npc_db_checkid_post; + struct HPMHookPoint *HP_npc_refresh_pre; + struct HPMHookPoint *HP_npc_refresh_post; + struct HPMHookPoint *HP_npc_questinfo_clear_pre; + struct HPMHookPoint *HP_npc_questinfo_clear_post; struct HPMHookPoint *HP_npc_secure_timeout_timer_pre; struct HPMHookPoint *HP_npc_secure_timeout_timer_post; + struct HPMHookPoint *HP_nullpo_init_pre; + struct HPMHookPoint *HP_nullpo_init_post; + struct HPMHookPoint *HP_nullpo_final_pre; + struct HPMHookPoint *HP_nullpo_final_post; struct HPMHookPoint *HP_nullpo_assert_report_pre; struct HPMHookPoint *HP_nullpo_assert_report_post; + struct HPMHookPoint *HP_packets_init_pre; + struct HPMHookPoint *HP_packets_init_post; + struct HPMHookPoint *HP_packets_final_pre; + struct HPMHookPoint *HP_packets_final_post; + struct HPMHookPoint *HP_packets_addLens_pre; + struct HPMHookPoint *HP_packets_addLens_post; + struct HPMHookPoint *HP_packets_addLen_pre; + struct HPMHookPoint *HP_packets_addLen_post; struct HPMHookPoint *HP_party_init_pre; struct HPMHookPoint *HP_party_init_post; struct HPMHookPoint *HP_party_final_pre; @@ -3842,8 +4500,6 @@ struct { 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; @@ -3958,6 +4614,8 @@ struct { struct HPMHookPoint *HP_pc_isequip_post; struct HPMHookPoint *HP_pc_equippoint_pre; struct HPMHookPoint *HP_pc_equippoint_post; + struct HPMHookPoint *HP_pc_item_equippoint_pre; + struct HPMHookPoint *HP_pc_item_equippoint_post; struct HPMHookPoint *HP_pc_setinventorydata_pre; struct HPMHookPoint *HP_pc_setinventorydata_post; struct HPMHookPoint *HP_pc_checkskill_pre; @@ -3970,6 +4628,10 @@ struct { 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_clear_pre; + struct HPMHookPoint *HP_pc_calc_skilltree_clear_post; + struct HPMHookPoint *HP_pc_calc_skilltree_bonus_pre; + struct HPMHookPoint *HP_pc_calc_skilltree_bonus_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; @@ -4066,6 +4728,8 @@ struct { struct HPMHookPoint *HP_pc_maxjoblv_post; struct HPMHookPoint *HP_pc_checkbaselevelup_pre; struct HPMHookPoint *HP_pc_checkbaselevelup_post; + struct HPMHookPoint *HP_pc_checkbaselevelup_sc_pre; + struct HPMHookPoint *HP_pc_checkbaselevelup_sc_post; struct HPMHookPoint *HP_pc_checkjoblevelup_pre; struct HPMHookPoint *HP_pc_checkjoblevelup_post; struct HPMHookPoint *HP_pc_gainexp_pre; @@ -4098,6 +4762,8 @@ struct { struct HPMHookPoint *HP_pc_resetstate_post; struct HPMHookPoint *HP_pc_resetskill_pre; struct HPMHookPoint *HP_pc_resetskill_post; + struct HPMHookPoint *HP_pc_resetskill_job_pre; + struct HPMHookPoint *HP_pc_resetskill_job_post; struct HPMHookPoint *HP_pc_resetfeel_pre; struct HPMHookPoint *HP_pc_resetfeel_post; struct HPMHookPoint *HP_pc_resethate_pre; @@ -4114,6 +4780,8 @@ struct { struct HPMHookPoint *HP_pc_checkitem_post; struct HPMHookPoint *HP_pc_useitem_pre; struct HPMHookPoint *HP_pc_useitem_post; + struct HPMHookPoint *HP_pc_autocast_clear_pre; + struct HPMHookPoint *HP_pc_autocast_clear_post; struct HPMHookPoint *HP_pc_skillatk_bonus_pre; struct HPMHookPoint *HP_pc_skillatk_bonus_post; struct HPMHookPoint *HP_pc_skillheal_bonus_pre; @@ -4134,6 +4802,10 @@ struct { struct HPMHookPoint *HP_pc_percentheal_post; struct HPMHookPoint *HP_pc_jobchange_pre; struct HPMHookPoint *HP_pc_jobchange_post; + struct HPMHookPoint *HP_pc_hide_pre; + struct HPMHookPoint *HP_pc_hide_post; + struct HPMHookPoint *HP_pc_unhide_pre; + struct HPMHookPoint *HP_pc_unhide_post; struct HPMHookPoint *HP_pc_setoption_pre; struct HPMHookPoint *HP_pc_setoption_post; struct HPMHookPoint *HP_pc_setcart_pre; @@ -4218,18 +4890,30 @@ struct { struct HPMHookPoint *HP_pc_delinvincibletimer_post; struct HPMHookPoint *HP_pc_addspiritball_pre; struct HPMHookPoint *HP_pc_addspiritball_post; + struct HPMHookPoint *HP_pc_addspiritball_sub_pre; + struct HPMHookPoint *HP_pc_addspiritball_sub_post; struct HPMHookPoint *HP_pc_delspiritball_pre; struct HPMHookPoint *HP_pc_delspiritball_post; + struct HPMHookPoint *HP_pc_delspiritball_sub_pre; + struct HPMHookPoint *HP_pc_delspiritball_sub_post; struct HPMHookPoint *HP_pc_getmaxspiritball_pre; struct HPMHookPoint *HP_pc_getmaxspiritball_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_fame_rank_pre; + struct HPMHookPoint *HP_pc_fame_rank_post; + struct HPMHookPoint *HP_pc_famelist_type_pre; + struct HPMHookPoint *HP_pc_famelist_type_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_read_exp_db_pre; + struct HPMHookPoint *HP_pc_read_exp_db_post; + struct HPMHookPoint *HP_pc_read_exp_db_sub_pre; + struct HPMHookPoint *HP_pc_read_exp_db_sub_post; + struct HPMHookPoint *HP_pc_read_exp_db_sub_class_pre; + struct HPMHookPoint *HP_pc_read_exp_db_sub_class_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; @@ -4306,6 +4990,8 @@ struct { 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_read_skill_job_skip_pre; + struct HPMHookPoint *HP_pc_read_skill_job_skip_post; struct HPMHookPoint *HP_pc_clear_skill_tree_pre; struct HPMHookPoint *HP_pc_clear_skill_tree_post; struct HPMHookPoint *HP_pc_isUseitem_pre; @@ -4338,6 +5024,14 @@ struct { struct HPMHookPoint *HP_pc_db_checkid_post; struct HPMHookPoint *HP_pc_validate_levels_pre; struct HPMHookPoint *HP_pc_validate_levels_post; + struct HPMHookPoint *HP_pc_update_job_and_level_pre; + struct HPMHookPoint *HP_pc_update_job_and_level_post; + struct HPMHookPoint *HP_pc_clear_exp_groups_pre; + struct HPMHookPoint *HP_pc_clear_exp_groups_post; + struct HPMHookPoint *HP_pc_init_exp_groups_pre; + struct HPMHookPoint *HP_pc_init_exp_groups_post; + struct HPMHookPoint *HP_pc_job_is_dummy_pre; + struct HPMHookPoint *HP_pc_job_is_dummy_post; struct HPMHookPoint *HP_pc_autotrade_load_pre; struct HPMHookPoint *HP_pc_autotrade_load_post; struct HPMHookPoint *HP_pc_autotrade_update_pre; @@ -4356,6 +5050,26 @@ struct { struct HPMHookPoint *HP_pc_update_idle_time_post; struct HPMHookPoint *HP_pc_have_magnifier_pre; struct HPMHookPoint *HP_pc_have_magnifier_post; + struct HPMHookPoint *HP_pc_have_item_chain_pre; + struct HPMHookPoint *HP_pc_have_item_chain_post; + struct HPMHookPoint *HP_pc_process_chat_message_pre; + struct HPMHookPoint *HP_pc_process_chat_message_post; + struct HPMHookPoint *HP_pc_wis_message_to_gm_pre; + struct HPMHookPoint *HP_pc_wis_message_to_gm_post; + struct HPMHookPoint *HP_pc_wis_message_to_gm_sub_pre; + struct HPMHookPoint *HP_pc_wis_message_to_gm_sub_post; + struct HPMHookPoint *HP_pc_check_supernovice_call_pre; + struct HPMHookPoint *HP_pc_check_supernovice_call_post; + struct HPMHookPoint *HP_pc_check_basicskill_pre; + struct HPMHookPoint *HP_pc_check_basicskill_post; + struct HPMHookPoint *HP_pc_isDeathPenaltyJob_pre; + struct HPMHookPoint *HP_pc_isDeathPenaltyJob_post; + struct HPMHookPoint *HP_pc_has_second_costume_pre; + struct HPMHookPoint *HP_pc_has_second_costume_post; + struct HPMHookPoint *HP_pc_expandInventory_pre; + struct HPMHookPoint *HP_pc_expandInventory_post; + struct HPMHookPoint *HP_pc_auto_exp_insurance_pre; + struct HPMHookPoint *HP_pc_auto_exp_insurance_post; struct HPMHookPoint *HP_libpcre_compile_pre; struct HPMHookPoint *HP_libpcre_compile_post; struct HPMHookPoint *HP_libpcre_study_pre; @@ -4378,6 +5092,8 @@ struct { 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_hunger_pre; + struct HPMHookPoint *HP_pet_set_hunger_post; struct HPMHookPoint *HP_pet_set_intimate_pre; struct HPMHookPoint *HP_pet_set_intimate_post; struct HPMHookPoint *HP_pet_create_egg_pre; @@ -4448,6 +5164,16 @@ struct { 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_pet_read_db_libconfig_pre; + struct HPMHookPoint *HP_pet_read_db_libconfig_post; + struct HPMHookPoint *HP_pet_read_db_sub_pre; + struct HPMHookPoint *HP_pet_read_db_sub_post; + struct HPMHookPoint *HP_pet_read_db_sub_intimacy_pre; + struct HPMHookPoint *HP_pet_read_db_sub_intimacy_post; + struct HPMHookPoint *HP_pet_read_db_clear_pre; + struct HPMHookPoint *HP_pet_read_db_clear_post; + struct HPMHookPoint *HP_pet_read_db_sub_evolution_pre; + struct HPMHookPoint *HP_pet_read_db_sub_evolution_post; struct HPMHookPoint *HP_quest_init_pre; struct HPMHookPoint *HP_quest_init_post; struct HPMHookPoint *HP_quest_final_pre; @@ -4478,6 +5204,114 @@ struct { struct HPMHookPoint *HP_quest_read_db_post; struct HPMHookPoint *HP_quest_read_db_sub_pre; struct HPMHookPoint *HP_quest_read_db_sub_post; + struct HPMHookPoint *HP_quest_questinfo_validate_icon_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_icon_post; + struct HPMHookPoint *HP_quest_questinfo_refresh_pre; + struct HPMHookPoint *HP_quest_questinfo_refresh_post; + struct HPMHookPoint *HP_quest_questinfo_validate_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_post; + struct HPMHookPoint *HP_quest_questinfo_validate_job_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_job_post; + struct HPMHookPoint *HP_quest_questinfo_validate_sex_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_sex_post; + struct HPMHookPoint *HP_quest_questinfo_validate_baselevel_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_baselevel_post; + struct HPMHookPoint *HP_quest_questinfo_validate_joblevel_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_joblevel_post; + struct HPMHookPoint *HP_quest_questinfo_validate_items_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_items_post; + struct HPMHookPoint *HP_quest_questinfo_validate_homunculus_level_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_homunculus_level_post; + struct HPMHookPoint *HP_quest_questinfo_validate_homunculus_type_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_homunculus_type_post; + struct HPMHookPoint *HP_quest_questinfo_validate_quests_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_quests_post; + struct HPMHookPoint *HP_quest_questinfo_validate_mercenary_class_pre; + struct HPMHookPoint *HP_quest_questinfo_validate_mercenary_class_post; + struct HPMHookPoint *HP_refine_init_pre; + struct HPMHookPoint *HP_refine_init_post; + struct HPMHookPoint *HP_refine_final_pre; + struct HPMHookPoint *HP_refine_final_post; + struct HPMHookPoint *HP_refine_get_refine_chance_pre; + struct HPMHookPoint *HP_refine_get_refine_chance_post; + struct HPMHookPoint *HP_refine_get_bonus_pre; + struct HPMHookPoint *HP_refine_get_bonus_post; + struct HPMHookPoint *HP_refine_get_randombonus_max_pre; + struct HPMHookPoint *HP_refine_get_randombonus_max_post; + struct HPMHookPoint *HP_refine_refinery_add_item_pre; + struct HPMHookPoint *HP_refine_refinery_add_item_post; + struct HPMHookPoint *HP_refine_refinery_refine_request_pre; + struct HPMHookPoint *HP_refine_refinery_refine_request_post; + struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_sub_pre; + struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_sub_post; + struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_pre; + struct HPMHookPoint *HP_PRIV__refine_readdb_refine_libconfig_post; + struct HPMHookPoint *HP_PRIV__refine_announce_behavior_string2enum_pre; + struct HPMHookPoint *HP_PRIV__refine_announce_behavior_string2enum_post; + struct HPMHookPoint *HP_PRIV__refine_failure_behavior_string2enum_pre; + struct HPMHookPoint *HP_PRIV__refine_failure_behavior_string2enum_post; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_items_pre; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_items_post; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_sub_post; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_pre; + struct HPMHookPoint *HP_PRIV__refine_readdb_refinery_ui_settings_post; + struct HPMHookPoint *HP_PRIV__refine_is_refinable_pre; + struct HPMHookPoint *HP_PRIV__refine_is_refinable_post; + struct HPMHookPoint *HP_rnd_init_pre; + struct HPMHookPoint *HP_rnd_init_post; + struct HPMHookPoint *HP_rnd_final_pre; + struct HPMHookPoint *HP_rnd_final_post; + struct HPMHookPoint *HP_rnd_seed_pre; + struct HPMHookPoint *HP_rnd_seed_post; + struct HPMHookPoint *HP_rnd_random_pre; + struct HPMHookPoint *HP_rnd_random_post; + struct HPMHookPoint *HP_rnd_roll_pre; + struct HPMHookPoint *HP_rnd_roll_post; + struct HPMHookPoint *HP_rnd_value_pre; + struct HPMHookPoint *HP_rnd_value_post; + struct HPMHookPoint *HP_rnd_uniform_pre; + struct HPMHookPoint *HP_rnd_uniform_post; + struct HPMHookPoint *HP_rnd_uniform53_pre; + struct HPMHookPoint *HP_rnd_uniform53_post; + struct HPMHookPoint *HP_rodex_init_pre; + struct HPMHookPoint *HP_rodex_init_post; + struct HPMHookPoint *HP_rodex_final_pre; + struct HPMHookPoint *HP_rodex_final_post; + struct HPMHookPoint *HP_rodex_isenabled_pre; + struct HPMHookPoint *HP_rodex_isenabled_post; + struct HPMHookPoint *HP_rodex_open_pre; + struct HPMHookPoint *HP_rodex_open_post; + struct HPMHookPoint *HP_rodex_next_page_pre; + struct HPMHookPoint *HP_rodex_next_page_post; + struct HPMHookPoint *HP_rodex_refresh_pre; + struct HPMHookPoint *HP_rodex_refresh_post; + struct HPMHookPoint *HP_rodex_add_item_pre; + struct HPMHookPoint *HP_rodex_add_item_post; + struct HPMHookPoint *HP_rodex_remove_item_pre; + struct HPMHookPoint *HP_rodex_remove_item_post; + struct HPMHookPoint *HP_rodex_check_player_pre; + struct HPMHookPoint *HP_rodex_check_player_post; + struct HPMHookPoint *HP_rodex_send_mail_pre; + struct HPMHookPoint *HP_rodex_send_mail_post; + struct HPMHookPoint *HP_rodex_send_mail_result_pre; + struct HPMHookPoint *HP_rodex_send_mail_result_post; + struct HPMHookPoint *HP_rodex_get_mail_pre; + struct HPMHookPoint *HP_rodex_get_mail_post; + struct HPMHookPoint *HP_rodex_read_mail_pre; + struct HPMHookPoint *HP_rodex_read_mail_post; + struct HPMHookPoint *HP_rodex_get_zeny_pre; + struct HPMHookPoint *HP_rodex_get_zeny_post; + struct HPMHookPoint *HP_rodex_get_items_pre; + struct HPMHookPoint *HP_rodex_get_items_post; + struct HPMHookPoint *HP_rodex_delete_mail_pre; + struct HPMHookPoint *HP_rodex_delete_mail_post; + struct HPMHookPoint *HP_rodex_clean_pre; + struct HPMHookPoint *HP_rodex_clean_post; + struct HPMHookPoint *HP_rodex_getZenyAck_pre; + struct HPMHookPoint *HP_rodex_getZenyAck_post; + struct HPMHookPoint *HP_rodex_getItemsAck_pre; + struct HPMHookPoint *HP_rodex_getItemsAck_post; struct HPMHookPoint *HP_script_init_pre; struct HPMHookPoint *HP_script_init_post; struct HPMHookPoint *HP_script_final_pre; @@ -4520,6 +5354,8 @@ struct { struct HPMHookPoint *HP_script_get_val_post; struct HPMHookPoint *HP_script_get_val_ref_str_pre; struct HPMHookPoint *HP_script_get_val_ref_str_post; + struct HPMHookPoint *HP_script_get_val_pc_ref_str_pre; + struct HPMHookPoint *HP_script_get_val_pc_ref_str_post; struct HPMHookPoint *HP_script_get_val_scope_str_pre; struct HPMHookPoint *HP_script_get_val_scope_str_post; struct HPMHookPoint *HP_script_get_val_npc_str_pre; @@ -4528,6 +5364,8 @@ struct { struct HPMHookPoint *HP_script_get_val_instance_str_post; struct HPMHookPoint *HP_script_get_val_ref_num_pre; struct HPMHookPoint *HP_script_get_val_ref_num_post; + struct HPMHookPoint *HP_script_get_val_pc_ref_num_pre; + struct HPMHookPoint *HP_script_get_val_pc_ref_num_post; struct HPMHookPoint *HP_script_get_val_scope_num_pre; struct HPMHookPoint *HP_script_get_val_scope_num_post; struct HPMHookPoint *HP_script_get_val_npc_num_pre; @@ -4586,6 +5424,8 @@ struct { 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_add_variable_pre; + struct HPMHookPoint *HP_script_add_variable_post; struct HPMHookPoint *HP_script_get_str_pre; struct HPMHookPoint *HP_script_get_str_post; struct HPMHookPoint *HP_script_search_str_pre; @@ -4654,6 +5494,16 @@ struct { 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_simpleexpr_paren_pre; + struct HPMHookPoint *HP_script_parse_simpleexpr_paren_post; + struct HPMHookPoint *HP_script_parse_simpleexpr_number_pre; + struct HPMHookPoint *HP_script_parse_simpleexpr_number_post; + struct HPMHookPoint *HP_script_parse_simpleexpr_string_pre; + struct HPMHookPoint *HP_script_parse_simpleexpr_string_post; + struct HPMHookPoint *HP_script_parse_simpleexpr_name_pre; + struct HPMHookPoint *HP_script_parse_simpleexpr_name_post; + struct HPMHookPoint *HP_script_add_translatable_string_pre; + struct HPMHookPoint *HP_script_add_translatable_string_post; struct HPMHookPoint *HP_script_parse_expr_pre; struct HPMHookPoint *HP_script_parse_expr_post; struct HPMHookPoint *HP_script_parse_line_pre; @@ -4672,6 +5522,8 @@ struct { struct HPMHookPoint *HP_script_set_reg_post; struct HPMHookPoint *HP_script_set_reg_ref_str_pre; struct HPMHookPoint *HP_script_set_reg_ref_str_post; + struct HPMHookPoint *HP_script_set_reg_pc_ref_str_pre; + struct HPMHookPoint *HP_script_set_reg_pc_ref_str_post; struct HPMHookPoint *HP_script_set_reg_scope_str_pre; struct HPMHookPoint *HP_script_set_reg_scope_str_post; struct HPMHookPoint *HP_script_set_reg_npc_str_pre; @@ -4680,6 +5532,8 @@ struct { struct HPMHookPoint *HP_script_set_reg_instance_str_post; struct HPMHookPoint *HP_script_set_reg_ref_num_pre; struct HPMHookPoint *HP_script_set_reg_ref_num_post; + struct HPMHookPoint *HP_script_set_reg_pc_ref_num_pre; + struct HPMHookPoint *HP_script_set_reg_pc_ref_num_post; struct HPMHookPoint *HP_script_set_reg_scope_num_pre; struct HPMHookPoint *HP_script_set_reg_scope_num_post; struct HPMHookPoint *HP_script_set_reg_npc_num_pre; @@ -4710,6 +5564,12 @@ struct { 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_recovery_sub_pre; + struct HPMHookPoint *HP_script_buildin_recovery_sub_post; + struct HPMHookPoint *HP_script_buildin_recovery_pc_sub_pre; + struct HPMHookPoint *HP_script_buildin_recovery_pc_sub_post; + struct HPMHookPoint *HP_script_buildin_recovery_bl_sub_pre; + struct HPMHookPoint *HP_script_buildin_recovery_bl_sub_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; @@ -4758,6 +5618,8 @@ struct { struct HPMHookPoint *HP_script_cleanfloor_sub_post; struct HPMHookPoint *HP_script_run_func_pre; struct HPMHookPoint *HP_script_run_func_post; + struct HPMHookPoint *HP_script_sprintf_helper_pre; + struct HPMHookPoint *HP_script_sprintf_helper_post; struct HPMHookPoint *HP_script_getfuncname_pre; struct HPMHookPoint *HP_script_getfuncname_post; struct HPMHookPoint *HP_script_calc_hash_ci_pre; @@ -4796,6 +5658,10 @@ struct { struct HPMHookPoint *HP_script_string_dup_post; struct HPMHookPoint *HP_script_load_translations_pre; struct HPMHookPoint *HP_script_load_translations_post; + struct HPMHookPoint *HP_script_load_translation_addstring_pre; + struct HPMHookPoint *HP_script_load_translation_addstring_post; + struct HPMHookPoint *HP_script_load_translation_file_pre; + struct HPMHookPoint *HP_script_load_translation_file_post; struct HPMHookPoint *HP_script_load_translation_pre; struct HPMHookPoint *HP_script_load_translation_post; struct HPMHookPoint *HP_script_translation_db_destroyer_pre; @@ -4806,8 +5672,8 @@ struct { struct HPMHookPoint *HP_script_parse_cleanup_timer_post; struct HPMHookPoint *HP_script_add_language_pre; struct HPMHookPoint *HP_script_add_language_post; - struct HPMHookPoint *HP_script_get_translation_file_name_pre; - struct HPMHookPoint *HP_script_get_translation_file_name_post; + struct HPMHookPoint *HP_script_get_translation_dir_name_pre; + struct HPMHookPoint *HP_script_get_translation_dir_name_post; struct HPMHookPoint *HP_script_parser_clean_leftovers_pre; struct HPMHookPoint *HP_script_parser_clean_leftovers_post; struct HPMHookPoint *HP_script_run_use_script_pre; @@ -4816,6 +5682,14 @@ struct { struct HPMHookPoint *HP_script_run_item_equip_script_post; struct HPMHookPoint *HP_script_run_item_unequip_script_pre; struct HPMHookPoint *HP_script_run_item_unequip_script_post; + struct HPMHookPoint *HP_script_run_item_rental_end_script_pre; + struct HPMHookPoint *HP_script_run_item_rental_end_script_post; + struct HPMHookPoint *HP_script_run_item_rental_start_script_pre; + struct HPMHookPoint *HP_script_run_item_rental_start_script_post; + struct HPMHookPoint *HP_script_run_item_lapineddukddak_script_pre; + struct HPMHookPoint *HP_script_run_item_lapineddukddak_script_post; + struct HPMHookPoint *HP_script_sellitemcurrency_add_pre; + struct HPMHookPoint *HP_script_sellitemcurrency_add_post; struct HPMHookPoint *HP_searchstore_open_pre; struct HPMHookPoint *HP_searchstore_open_post; struct HPMHookPoint *HP_searchstore_query_pre; @@ -4878,10 +5752,18 @@ struct { 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_hp_rate_pre; + struct HPMHookPoint *HP_skill_get_hp_rate_post; + struct HPMHookPoint *HP_skill_get_sp_rate_pre; + struct HPMHookPoint *HP_skill_get_sp_rate_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_itemid_pre; + struct HPMHookPoint *HP_skill_get_itemid_post; + struct HPMHookPoint *HP_skill_get_itemqty_pre; + struct HPMHookPoint *HP_skill_get_itemqty_post; struct HPMHookPoint *HP_skill_get_zeny_pre; struct HPMHookPoint *HP_skill_get_zeny_post; struct HPMHookPoint *HP_skill_get_num_pre; @@ -4938,8 +5820,6 @@ struct { 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; @@ -5040,10 +5920,16 @@ struct { 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_unknown_pre; + struct HPMHookPoint *HP_skill_not_ok_unknown_post; struct HPMHookPoint *HP_skill_not_ok_hom_pre; struct HPMHookPoint *HP_skill_not_ok_hom_post; + struct HPMHookPoint *HP_skill_not_ok_hom_unknown_pre; + struct HPMHookPoint *HP_skill_not_ok_hom_unknown_post; struct HPMHookPoint *HP_skill_not_ok_mercenary_pre; struct HPMHookPoint *HP_skill_not_ok_mercenary_post; + struct HPMHookPoint *HP_skill_validate_autocast_data_pre; + struct HPMHookPoint *HP_skill_validate_autocast_data_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; @@ -5052,6 +5938,8 @@ struct { 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_type_pre; + struct HPMHookPoint *HP_skill_castend_type_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; @@ -5090,6 +5978,8 @@ struct { struct HPMHookPoint *HP_skill_cell_overlap_post; struct HPMHookPoint *HP_skill_timerskill_pre; struct HPMHookPoint *HP_skill_timerskill_post; + struct HPMHookPoint *HP_skill_trap_do_splash_pre; + struct HPMHookPoint *HP_skill_trap_do_splash_post; struct HPMHookPoint *HP_skill_trap_splash_pre; struct HPMHookPoint *HP_skill_trap_splash_post; struct HPMHookPoint *HP_skill_check_condition_mercenary_pre; @@ -5136,6 +6026,8 @@ struct { 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_onplace_timer_unknown_pre; + struct HPMHookPoint *HP_skill_unit_onplace_timer_unknown_post; struct HPMHookPoint *HP_skill_unit_effect_pre; struct HPMHookPoint *HP_skill_unit_effect_post; struct HPMHookPoint *HP_skill_unit_timer_sub_onplace_pre; @@ -5156,16 +6048,50 @@ struct { 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_init_unit_layout_unknown_pre; + struct HPMHookPoint *HP_skill_init_unit_layout_unknown_post; + struct HPMHookPoint *HP_skill_validate_hittype_pre; + struct HPMHookPoint *HP_skill_validate_hittype_post; + struct HPMHookPoint *HP_skill_validate_skilltype_pre; + struct HPMHookPoint *HP_skill_validate_skilltype_post; + struct HPMHookPoint *HP_skill_validate_attacktype_pre; + struct HPMHookPoint *HP_skill_validate_attacktype_post; + struct HPMHookPoint *HP_skill_validate_element_pre; + struct HPMHookPoint *HP_skill_validate_element_post; + struct HPMHookPoint *HP_skill_validate_skillinfo_pre; + struct HPMHookPoint *HP_skill_validate_skillinfo_post; + struct HPMHookPoint *HP_skill_validate_damagetype_pre; + struct HPMHookPoint *HP_skill_validate_damagetype_post; + struct HPMHookPoint *HP_skill_validate_castnodex_pre; + struct HPMHookPoint *HP_skill_validate_castnodex_post; + struct HPMHookPoint *HP_skill_validate_weapontype_pre; + struct HPMHookPoint *HP_skill_validate_weapontype_post; + struct HPMHookPoint *HP_skill_validate_ammotype_pre; + struct HPMHookPoint *HP_skill_validate_ammotype_post; + struct HPMHookPoint *HP_skill_validate_state_pre; + struct HPMHookPoint *HP_skill_validate_state_post; + struct HPMHookPoint *HP_skill_validate_item_requirements_pre; + struct HPMHookPoint *HP_skill_validate_item_requirements_post; + struct HPMHookPoint *HP_skill_validate_unit_target_pre; + struct HPMHookPoint *HP_skill_validate_unit_target_post; + struct HPMHookPoint *HP_skill_validate_unit_flag_pre; + struct HPMHookPoint *HP_skill_validate_unit_flag_post; + struct HPMHookPoint *HP_skill_validate_additional_fields_pre; + struct HPMHookPoint *HP_skill_validate_additional_fields_post; + struct HPMHookPoint *HP_skill_validate_skilldb_pre; + struct HPMHookPoint *HP_skill_validate_skilldb_post; + struct HPMHookPoint *HP_skill_validate_weapontype_sub_pre; + struct HPMHookPoint *HP_skill_validate_weapontype_sub_post; + struct HPMHookPoint *HP_skill_validate_ammotype_sub_pre; + struct HPMHookPoint *HP_skill_validate_ammotype_sub_post; + struct HPMHookPoint *HP_skill_validate_unit_flag_sub_pre; + struct HPMHookPoint *HP_skill_validate_unit_flag_sub_post; + struct HPMHookPoint *HP_skill_read_skilldb_pre; + struct HPMHookPoint *HP_skill_read_skilldb_post; + struct HPMHookPoint *HP_skill_config_set_level_pre; + struct HPMHookPoint *HP_skill_config_set_level_post; + struct HPMHookPoint *HP_skill_level_set_value_pre; + struct HPMHookPoint *HP_skill_level_set_value_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; @@ -5176,8 +6102,6 @@ struct { 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; @@ -5278,6 +6202,14 @@ struct { struct HPMHookPoint *HP_skill_get_requirement_item_unknown_post; struct HPMHookPoint *HP_skill_get_requirement_unknown_pre; struct HPMHookPoint *HP_skill_get_requirement_unknown_post; + struct HPMHookPoint *HP_skill_splash_target_pre; + struct HPMHookPoint *HP_skill_splash_target_post; + struct HPMHookPoint *HP_skill_check_npc_chaospanic_pre; + struct HPMHookPoint *HP_skill_check_npc_chaospanic_post; + struct HPMHookPoint *HP_skill_count_wos_pre; + struct HPMHookPoint *HP_skill_count_wos_post; + struct HPMHookPoint *HP_skill_get_linked_song_dance_id_pre; + struct HPMHookPoint *HP_skill_get_linked_song_dance_id_post; struct HPMHookPoint *HP_sockt_init_pre; struct HPMHookPoint *HP_sockt_init_post; struct HPMHookPoint *HP_sockt_final_pre; @@ -5296,10 +6228,14 @@ struct { struct HPMHookPoint *HP_sockt_realloc_writefifo_post; struct HPMHookPoint *HP_sockt_wfifoset_pre; struct HPMHookPoint *HP_sockt_wfifoset_post; + struct HPMHookPoint *HP_sockt_wfifohead_pre; + struct HPMHookPoint *HP_sockt_wfifohead_post; struct HPMHookPoint *HP_sockt_rfifoskip_pre; struct HPMHookPoint *HP_sockt_rfifoskip_post; struct HPMHookPoint *HP_sockt_close_pre; struct HPMHookPoint *HP_sockt_close_post; + struct HPMHookPoint *HP_sockt_validateWfifo_pre; + struct HPMHookPoint *HP_sockt_validateWfifo_post; struct HPMHookPoint *HP_sockt_session_is_valid_pre; struct HPMHookPoint *HP_sockt_session_is_valid_post; struct HPMHookPoint *HP_sockt_session_is_active_pre; @@ -5308,6 +6244,8 @@ struct { struct HPMHookPoint *HP_sockt_flush_post; struct HPMHookPoint *HP_sockt_flush_fifos_pre; struct HPMHookPoint *HP_sockt_flush_fifos_post; + struct HPMHookPoint *HP_sockt_connect_client_pre; + struct HPMHookPoint *HP_sockt_connect_client_post; struct HPMHookPoint *HP_sockt_set_nonblocking_pre; struct HPMHookPoint *HP_sockt_set_nonblocking_post; struct HPMHookPoint *HP_sockt_set_defaultparse_pre; @@ -5402,18 +6340,18 @@ struct { 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_relevant_bl_types_pre; + struct HPMHookPoint *HP_status_get_sc_relevant_bl_types_post; struct HPMHookPoint *HP_status_get_sc_type_pre; struct HPMHookPoint *HP_status_get_sc_type_post; + struct HPMHookPoint *HP_status_get_sc_icon_pre; + struct HPMHookPoint *HP_status_get_sc_icon_post; struct HPMHookPoint *HP_status_damage_pre; struct HPMHookPoint *HP_status_damage_post; struct HPMHookPoint *HP_status_charge_pre; @@ -5474,8 +6412,26 @@ struct { 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_start_sub_pre; + struct HPMHookPoint *HP_status_change_start_sub_post; struct HPMHookPoint *HP_status_change_end__pre; struct HPMHookPoint *HP_status_change_end__post; + struct HPMHookPoint *HP_status_is_immune_to_status_pre; + struct HPMHookPoint *HP_status_is_immune_to_status_post; + struct HPMHookPoint *HP_status_is_boss_resist_sc_pre; + struct HPMHookPoint *HP_status_is_boss_resist_sc_post; + struct HPMHookPoint *HP_status_end_sc_before_start_pre; + struct HPMHookPoint *HP_status_end_sc_before_start_post; + struct HPMHookPoint *HP_status_change_start_stop_action_pre; + struct HPMHookPoint *HP_status_change_start_stop_action_post; + struct HPMHookPoint *HP_status_change_start_set_option_pre; + struct HPMHookPoint *HP_status_change_start_set_option_post; + struct HPMHookPoint *HP_status_get_val_flag_pre; + struct HPMHookPoint *HP_status_get_val_flag_post; + struct HPMHookPoint *HP_status_change_start_display_pre; + struct HPMHookPoint *HP_status_change_start_display_post; + struct HPMHookPoint *HP_status_change_start_unknown_sc_pre; + struct HPMHookPoint *HP_status_change_start_unknown_sc_post; struct HPMHookPoint *HP_status_kaahi_heal_timer_pre; struct HPMHookPoint *HP_status_kaahi_heal_timer_post; struct HPMHookPoint *HP_status_change_timer_pre; @@ -5496,6 +6452,8 @@ struct { struct HPMHookPoint *HP_status_calc_pc__post; struct HPMHookPoint *HP_status_calc_pc_additional_pre; struct HPMHookPoint *HP_status_calc_pc_additional_post; + struct HPMHookPoint *HP_status_calc_pc_recover_hp_pre; + struct HPMHookPoint *HP_status_calc_pc_recover_hp_post; struct HPMHookPoint *HP_status_calc_homunculus__pre; struct HPMHookPoint *HP_status_calc_homunculus__post; struct HPMHookPoint *HP_status_calc_mercenary__pre; @@ -5550,6 +6508,10 @@ struct { struct HPMHookPoint *HP_status_get_base_maxhp_post; struct HPMHookPoint *HP_status_get_base_maxsp_pre; struct HPMHookPoint *HP_status_get_base_maxsp_post; + struct HPMHookPoint *HP_status_get_restart_hp_pre; + struct HPMHookPoint *HP_status_get_restart_hp_post; + struct HPMHookPoint *HP_status_get_restart_sp_pre; + struct HPMHookPoint *HP_status_get_restart_sp_post; struct HPMHookPoint *HP_status_calc_npc__pre; struct HPMHookPoint *HP_status_calc_npc__post; struct HPMHookPoint *HP_status_calc_str_pre; @@ -5612,16 +6574,26 @@ struct { 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_libconfig_pre; - struct HPMHookPoint *HP_status_readdb_refine_libconfig_post; - struct HPMHookPoint *HP_status_readdb_refine_libconfig_sub_pre; - struct HPMHookPoint *HP_status_readdb_refine_libconfig_sub_post; - struct HPMHookPoint *HP_status_readdb_scconfig_pre; - struct HPMHookPoint *HP_status_readdb_scconfig_post; + struct HPMHookPoint *HP_status_read_scdb_libconfig_pre; + struct HPMHookPoint *HP_status_read_scdb_libconfig_post; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_pre; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_post; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_flag_pre; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_flag_post; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_flag_additional_pre; + struct HPMHookPoint *HP_status_read_scdb_libconfig_sub_flag_additional_post; struct HPMHookPoint *HP_status_read_job_db_pre; struct HPMHookPoint *HP_status_read_job_db_post; struct HPMHookPoint *HP_status_read_job_db_sub_pre; struct HPMHookPoint *HP_status_read_job_db_sub_post; + struct HPMHookPoint *HP_status_set_sc_pre; + struct HPMHookPoint *HP_status_set_sc_post; + struct HPMHookPoint *HP_status_copy_pre; + struct HPMHookPoint *HP_status_copy_post; + struct HPMHookPoint *HP_status_base_matk_min_pre; + struct HPMHookPoint *HP_status_base_matk_min_post; + struct HPMHookPoint *HP_status_base_matk_max_pre; + struct HPMHookPoint *HP_status_base_matk_max_post; struct HPMHookPoint *HP_storage_reconnect_pre; struct HPMHookPoint *HP_storage_reconnect_post; struct HPMHookPoint *HP_storage_delitem_pre; @@ -5698,6 +6670,24 @@ struct { struct HPMHookPoint *HP_strlib_strline__post; struct HPMHookPoint *HP_strlib_bin2hex__pre; struct HPMHookPoint *HP_strlib_bin2hex__post; + struct HPMHookPoint *HP_stylist_init_pre; + struct HPMHookPoint *HP_stylist_init_post; + struct HPMHookPoint *HP_stylist_final_pre; + struct HPMHookPoint *HP_stylist_final_post; + struct HPMHookPoint *HP_stylist_vector_init_pre; + struct HPMHookPoint *HP_stylist_vector_init_post; + struct HPMHookPoint *HP_stylist_vector_clear_pre; + struct HPMHookPoint *HP_stylist_vector_clear_post; + struct HPMHookPoint *HP_stylist_read_db_libconfig_pre; + struct HPMHookPoint *HP_stylist_read_db_libconfig_post; + struct HPMHookPoint *HP_stylist_read_db_libconfig_sub_pre; + struct HPMHookPoint *HP_stylist_read_db_libconfig_sub_post; + struct HPMHookPoint *HP_stylist_request_style_change_pre; + struct HPMHookPoint *HP_stylist_request_style_change_post; + struct HPMHookPoint *HP_stylist_validate_requirements_pre; + struct HPMHookPoint *HP_stylist_validate_requirements_post; + struct HPMHookPoint *HP_stylist_send_rodexitem_pre; + struct HPMHookPoint *HP_stylist_send_rodexitem_post; struct HPMHookPoint *HP_sv_parse_next_pre; struct HPMHookPoint *HP_sv_parse_next_post; struct HPMHookPoint *HP_sv_parse_pre; @@ -5748,6 +6738,28 @@ struct { struct HPMHookPoint *HP_sysinfo_init_post; struct HPMHookPoint *HP_sysinfo_final_pre; struct HPMHookPoint *HP_sysinfo_final_post; + struct HPMHookPoint *HP_thread_init_pre; + struct HPMHookPoint *HP_thread_init_post; + struct HPMHookPoint *HP_thread_final_pre; + struct HPMHookPoint *HP_thread_final_post; + struct HPMHookPoint *HP_thread_create_pre; + struct HPMHookPoint *HP_thread_create_post; + struct HPMHookPoint *HP_thread_create_opt_pre; + struct HPMHookPoint *HP_thread_create_opt_post; + struct HPMHookPoint *HP_thread_destroy_pre; + struct HPMHookPoint *HP_thread_destroy_post; + struct HPMHookPoint *HP_thread_self_pre; + struct HPMHookPoint *HP_thread_self_post; + struct HPMHookPoint *HP_thread_get_tid_pre; + struct HPMHookPoint *HP_thread_get_tid_post; + struct HPMHookPoint *HP_thread_wait_pre; + struct HPMHookPoint *HP_thread_wait_post; + struct HPMHookPoint *HP_thread_prio_set_pre; + struct HPMHookPoint *HP_thread_prio_set_post; + struct HPMHookPoint *HP_thread_prio_get_pre; + struct HPMHookPoint *HP_thread_prio_get_post; + struct HPMHookPoint *HP_thread_yield_pre; + struct HPMHookPoint *HP_thread_yield_post; struct HPMHookPoint *HP_timer_gettick_pre; struct HPMHookPoint *HP_timer_gettick_post; struct HPMHookPoint *HP_timer_gettick_nocache_pre; @@ -5798,20 +6810,24 @@ struct { struct HPMHookPoint *HP_unit_final_post; struct HPMHookPoint *HP_unit_bl2ud_pre; struct HPMHookPoint *HP_unit_bl2ud_post; + struct HPMHookPoint *HP_unit_cbl2ud_pre; + struct HPMHookPoint *HP_unit_cbl2ud_post; struct HPMHookPoint *HP_unit_bl2ud2_pre; struct HPMHookPoint *HP_unit_bl2ud2_post; + struct HPMHookPoint *HP_unit_init_ud_pre; + struct HPMHookPoint *HP_unit_init_ud_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_walk_toxy_timer_pre; + struct HPMHookPoint *HP_unit_walk_toxy_timer_post; + struct HPMHookPoint *HP_unit_walk_toxy_sub_pre; + struct HPMHookPoint *HP_unit_walk_toxy_sub_post; + struct HPMHookPoint *HP_unit_delay_walk_toxy_timer_pre; + struct HPMHookPoint *HP_unit_delay_walk_toxy_timer_post; + struct HPMHookPoint *HP_unit_walk_toxy_pre; + struct HPMHookPoint *HP_unit_walk_toxy_post; + struct HPMHookPoint *HP_unit_walktobl_timer_pre; + struct HPMHookPoint *HP_unit_walktobl_timer_post; struct HPMHookPoint *HP_unit_walktobl_pre; struct HPMHookPoint *HP_unit_walktobl_post; struct HPMHookPoint *HP_unit_run_pre; @@ -5822,20 +6838,22 @@ struct { 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_set_dir_pre; + struct HPMHookPoint *HP_unit_set_dir_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_warpto_master_pre; + struct HPMHookPoint *HP_unit_warpto_master_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_step_timer_pre; - struct HPMHookPoint *HP_unit_step_timer_post; + struct HPMHookPoint *HP_unit_steptimer_pre; + struct HPMHookPoint *HP_unit_steptimer_post; struct HPMHookPoint *HP_unit_stop_stepaction_pre; struct HPMHookPoint *HP_unit_stop_stepaction_post; struct HPMHookPoint *HP_unit_is_walking_pre; @@ -5913,6 +6931,114 @@ struct { int HP_HCache_check_post; int HP_HCache_open_pre; int HP_HCache_open_post; + int HP_achievement_init_pre; + int HP_achievement_init_post; + int HP_achievement_final_pre; + int HP_achievement_final_post; + int HP_achievement_db_finalize_pre; + int HP_achievement_db_finalize_post; + int HP_achievement_readdb_pre; + int HP_achievement_readdb_post; + int HP_achievement_readdb_objectives_sub_pre; + int HP_achievement_readdb_objectives_sub_post; + int HP_achievement_readdb_objectives_pre; + int HP_achievement_readdb_objectives_post; + int HP_achievement_readdb_validate_criteria_mobid_pre; + int HP_achievement_readdb_validate_criteria_mobid_post; + int HP_achievement_readdb_validate_criteria_jobid_pre; + int HP_achievement_readdb_validate_criteria_jobid_post; + int HP_achievement_readdb_validate_criteria_itemid_pre; + int HP_achievement_readdb_validate_criteria_itemid_post; + int HP_achievement_readdb_validate_criteria_statustype_pre; + int HP_achievement_readdb_validate_criteria_statustype_post; + int HP_achievement_readdb_validate_criteria_itemtype_pre; + int HP_achievement_readdb_validate_criteria_itemtype_post; + int HP_achievement_readdb_validate_criteria_weaponlv_pre; + int HP_achievement_readdb_validate_criteria_weaponlv_post; + int HP_achievement_readdb_validate_criteria_achievement_pre; + int HP_achievement_readdb_validate_criteria_achievement_post; + int HP_achievement_readdb_rewards_pre; + int HP_achievement_readdb_rewards_post; + int HP_achievement_readdb_validate_reward_items_pre; + int HP_achievement_readdb_validate_reward_items_post; + int HP_achievement_readdb_validate_reward_item_sub_pre; + int HP_achievement_readdb_validate_reward_item_sub_post; + int HP_achievement_readdb_validate_reward_bonus_pre; + int HP_achievement_readdb_validate_reward_bonus_post; + int HP_achievement_readdb_validate_reward_titleid_pre; + int HP_achievement_readdb_validate_reward_titleid_post; + int HP_achievement_readdb_additional_fields_pre; + int HP_achievement_readdb_additional_fields_post; + int HP_achievement_readdb_ranks_pre; + int HP_achievement_readdb_ranks_post; + int HP_achievement_get_pre; + int HP_achievement_get_post; + int HP_achievement_ensure_pre; + int HP_achievement_ensure_post; + int HP_achievement_calculate_totals_pre; + int HP_achievement_calculate_totals_post; + int HP_achievement_check_complete_pre; + int HP_achievement_check_complete_post; + int HP_achievement_progress_add_pre; + int HP_achievement_progress_add_post; + int HP_achievement_progress_set_pre; + int HP_achievement_progress_set_post; + int HP_achievement_check_criteria_pre; + int HP_achievement_check_criteria_post; + int HP_achievement_validate_pre; + int HP_achievement_validate_post; + int HP_achievement_validate_type_pre; + int HP_achievement_validate_type_post; + int HP_achievement_validate_mob_kill_pre; + int HP_achievement_validate_mob_kill_post; + int HP_achievement_validate_mob_damage_pre; + int HP_achievement_validate_mob_damage_post; + int HP_achievement_validate_pc_kill_pre; + int HP_achievement_validate_pc_kill_post; + int HP_achievement_validate_pc_damage_pre; + int HP_achievement_validate_pc_damage_post; + int HP_achievement_validate_jobchange_pre; + int HP_achievement_validate_jobchange_post; + int HP_achievement_validate_stats_pre; + int HP_achievement_validate_stats_post; + int HP_achievement_validate_chatroom_create_pre; + int HP_achievement_validate_chatroom_create_post; + int HP_achievement_validate_chatroom_members_pre; + int HP_achievement_validate_chatroom_members_post; + int HP_achievement_validate_friend_add_pre; + int HP_achievement_validate_friend_add_post; + int HP_achievement_validate_party_create_pre; + int HP_achievement_validate_party_create_post; + int HP_achievement_validate_marry_pre; + int HP_achievement_validate_marry_post; + int HP_achievement_validate_adopt_pre; + int HP_achievement_validate_adopt_post; + int HP_achievement_validate_zeny_pre; + int HP_achievement_validate_zeny_post; + int HP_achievement_validate_refine_pre; + int HP_achievement_validate_refine_post; + int HP_achievement_validate_item_get_pre; + int HP_achievement_validate_item_get_post; + int HP_achievement_validate_item_sell_pre; + int HP_achievement_validate_item_sell_post; + int HP_achievement_validate_achieve_pre; + int HP_achievement_validate_achieve_post; + int HP_achievement_validate_taming_pre; + int HP_achievement_validate_taming_post; + int HP_achievement_validate_achievement_rank_pre; + int HP_achievement_validate_achievement_rank_post; + int HP_achievement_type_requires_criteria_pre; + int HP_achievement_type_requires_criteria_post; + int HP_achievement_init_titles_pre; + int HP_achievement_init_titles_post; + int HP_achievement_check_title_pre; + int HP_achievement_check_title_post; + int HP_achievement_get_rewards_pre; + int HP_achievement_get_rewards_post; + int HP_achievement_get_rewards_buffs_pre; + int HP_achievement_get_rewards_buffs_post; + int HP_achievement_get_rewards_items_pre; + int HP_achievement_get_rewards_items_post; int HP_atcommand_init_pre; int HP_atcommand_init_post; int HP_atcommand_final_pre; @@ -5991,12 +7117,16 @@ struct { int HP_battle_calc_attack_post; int HP_battle_calc_damage_pre; int HP_battle_calc_damage_post; + int HP_battle_calc_pc_damage_pre; + int HP_battle_calc_pc_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_check_arrows_pre; + int HP_battle_check_arrows_post; int HP_battle_calc_weapon_attack_pre; int HP_battle_calc_weapon_attack_post; int HP_battle_delay_damage_pre; @@ -6005,6 +7135,8 @@ struct { int HP_battle_drain_post; int HP_battle_reflect_damage_pre; int HP_battle_reflect_damage_post; + int HP_battle_reflect_trap_pre; + int HP_battle_reflect_trap_post; int HP_battle_attr_ratio_pre; int HP_battle_attr_ratio_post; int HP_battle_attr_fix_pre; @@ -6075,6 +7207,8 @@ struct { 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_sub_pre; + int HP_battle_config_set_value_sub_post; int HP_battle_config_set_value_pre; int HP_battle_config_set_value_post; int HP_battle_config_get_value_pre; @@ -6305,8 +7439,6 @@ struct { 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_pre; int HP_chrif_flush_post; int HP_chrif_skillid2idx_pre; @@ -6379,6 +7511,60 @@ struct { int HP_chrif_save_scdata_single_post; int HP_chrif_del_scdata_single_pre; int HP_chrif_del_scdata_single_post; + int HP_clan_init_pre; + int HP_clan_init_post; + int HP_clan_final_pre; + int HP_clan_final_post; + int HP_clan_config_read_pre; + int HP_clan_config_read_post; + int HP_clan_config_read_additional_settings_pre; + int HP_clan_config_read_additional_settings_post; + int HP_clan_read_db_pre; + int HP_clan_read_db_post; + int HP_clan_read_db_sub_pre; + int HP_clan_read_db_sub_post; + int HP_clan_read_db_additional_fields_pre; + int HP_clan_read_db_additional_fields_post; + int HP_clan_read_buffs_pre; + int HP_clan_read_buffs_post; + int HP_clan_search_pre; + int HP_clan_search_post; + int HP_clan_searchname_pre; + int HP_clan_searchname_post; + int HP_clan_getonlinesd_pre; + int HP_clan_getonlinesd_post; + int HP_clan_getindex_pre; + int HP_clan_getindex_post; + int HP_clan_join_pre; + int HP_clan_join_post; + int HP_clan_member_online_pre; + int HP_clan_member_online_post; + int HP_clan_leave_pre; + int HP_clan_leave_post; + int HP_clan_send_message_pre; + int HP_clan_send_message_post; + int HP_clan_recv_message_pre; + int HP_clan_recv_message_post; + int HP_clan_member_offline_pre; + int HP_clan_member_offline_post; + int HP_clan_set_constants_pre; + int HP_clan_set_constants_post; + int HP_clan_get_id_pre; + int HP_clan_get_id_post; + int HP_clan_buff_start_pre; + int HP_clan_buff_start_post; + int HP_clan_buff_end_pre; + int HP_clan_buff_end_post; + int HP_clan_reload_pre; + int HP_clan_reload_post; + int HP_clan_rejoin_pre; + int HP_clan_rejoin_post; + int HP_clan_inactivity_kick_pre; + int HP_clan_inactivity_kick_post; + int HP_clan_request_kickoffline_pre; + int HP_clan_request_kickoffline_post; + int HP_clan_request_membercount_pre; + int HP_clan_request_membercount_post; int HP_clif_init_pre; int HP_clif_init_post; int HP_clif_final_pre; @@ -6407,6 +7593,8 @@ struct { int HP_clif_decrypt_cmd_post; int HP_clif_authok_pre; int HP_clif_authok_post; + int HP_clif_auth_error_pre; + int HP_clif_auth_error_post; int HP_clif_authrefuse_pre; int HP_clif_authrefuse_post; int HP_clif_authfail_fd_pre; @@ -6425,6 +7613,8 @@ struct { int HP_clif_delitem_post; int HP_clif_takeitem_pre; int HP_clif_takeitem_post; + int HP_clif_item_movefailed_pre; + int HP_clif_item_movefailed_post; int HP_clif_item_equip_pre; int HP_clif_item_equip_post; int HP_clif_item_normal_pre; @@ -6447,8 +7637,6 @@ struct { 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; @@ -6457,6 +7645,8 @@ struct { int HP_clif_cart_additem_ack_post; int HP_clif_cashshop_load_pre; int HP_clif_cashshop_load_post; + int HP_clif_cashShopSchedule_pre; + int HP_clif_cashShopSchedule_post; int HP_clif_package_announce_pre; int HP_clif_package_announce_post; int HP_clif_item_drop_announce_pre; @@ -6521,6 +7711,8 @@ struct { int HP_clif_spawn_post; int HP_clif_changemap_pre; int HP_clif_changemap_post; + int HP_clif_changemap_airship_pre; + int HP_clif_changemap_airship_post; int HP_clif_changemapcell_pre; int HP_clif_changemapcell_post; int HP_clif_map_property_pre; @@ -6537,6 +7729,8 @@ struct { int HP_clif_maptypeproperty2_post; int HP_clif_changemapserver_pre; int HP_clif_changemapserver_post; + int HP_clif_changemapserver_airship_pre; + int HP_clif_changemapserver_airship_post; int HP_clif_npcbuysell_pre; int HP_clif_npcbuysell_post; int HP_clif_buylist_pre; @@ -6591,12 +7785,18 @@ struct { int HP_clif_fame_taekwon_post; int HP_clif_ranklist_pre; int HP_clif_ranklist_post; + int HP_clif_ranklist_sub_pre; + int HP_clif_ranklist_sub_post; + int HP_clif_ranklist_sub2_pre; + int HP_clif_ranklist_sub2_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_hotkeysAll_pre; + int HP_clif_hotkeysAll_post; int HP_clif_insight_pre; int HP_clif_insight_post; int HP_clif_outsight_pre; @@ -6621,14 +7821,34 @@ struct { int HP_clif_combo_delay_post; int HP_clif_status_change_pre; int HP_clif_status_change_post; + int HP_clif_status_change_sub_pre; + int HP_clif_status_change_sub_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_inventoryList_pre; + int HP_clif_inventoryList_post; + int HP_clif_inventoryItems_pre; + int HP_clif_inventoryItems_post; + int HP_clif_equipList_pre; + int HP_clif_equipList_post; + int HP_clif_equipItems_pre; + int HP_clif_equipItems_post; + int HP_clif_cartList_pre; + int HP_clif_cartList_post; + int HP_clif_cartItems_pre; + int HP_clif_cartItems_post; + int HP_clif_inventoryExpansionInfo_pre; + int HP_clif_inventoryExpansionInfo_post; + int HP_clif_inventoryExpandAck_pre; + int HP_clif_inventoryExpandAck_post; + int HP_clif_inventoryExpandResult_pre; + int HP_clif_inventoryExpandResult_post; + int HP_clif_pInventoryExpansion_pre; + int HP_clif_pInventoryExpansion_post; + int HP_clif_pInventoryExpansionConfirmed_pre; + int HP_clif_pInventoryExpansionConfirmed_post; + int HP_clif_pInventoryExpansionRejected_pre; + int HP_clif_pInventoryExpansionRejected_post; int HP_clif_favorite_item_pre; int HP_clif_favorite_item_post; int HP_clif_clearcart_pre; @@ -6655,8 +7875,36 @@ struct { 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_blname_ack_pre; + int HP_clif_blname_ack_post; + int HP_clif_pcname_ack_pre; + int HP_clif_pcname_ack_post; + int HP_clif_homname_ack_pre; + int HP_clif_homname_ack_post; + int HP_clif_mername_ack_pre; + int HP_clif_mername_ack_post; + int HP_clif_petname_ack_pre; + int HP_clif_petname_ack_post; + int HP_clif_npcname_ack_pre; + int HP_clif_npcname_ack_post; + int HP_clif_mobname_ack_pre; + int HP_clif_mobname_ack_post; + int HP_clif_mobname_guardian_ack_pre; + int HP_clif_mobname_guardian_ack_post; + int HP_clif_mobname_additional_ack_pre; + int HP_clif_mobname_additional_ack_post; + int HP_clif_mobname_normal_ack_pre; + int HP_clif_mobname_normal_ack_post; + int HP_clif_chatname_ack_pre; + int HP_clif_chatname_ack_post; + int HP_clif_elemname_ack_pre; + int HP_clif_elemname_ack_post; + int HP_clif_skillname_ack_pre; + int HP_clif_skillname_ack_post; + int HP_clif_itemname_ack_pre; + int HP_clif_itemname_ack_post; + int HP_clif_unknownname_ack_pre; + int HP_clif_unknownname_ack_post; int HP_clif_monster_hp_bar_pre; int HP_clif_monster_hp_bar_post; int HP_clif_hpmeter_pre; @@ -6685,8 +7933,8 @@ struct { 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_zc_config_pre; + int HP_clif_zc_config_post; int HP_clif_viewequip_ack_pre; int HP_clif_viewequip_ack_post; int HP_clif_equpcheckbox_pre; @@ -6699,6 +7947,8 @@ struct { int HP_clif_progressbar_post; int HP_clif_progressbar_abort_pre; int HP_clif_progressbar_abort_post; + int HP_clif_progressbar_unit_pre; + int HP_clif_progressbar_unit_post; int HP_clif_showdigit_pre; int HP_clif_showdigit_post; int HP_clif_elementalconverter_list_pre; @@ -6715,6 +7965,8 @@ struct { int HP_clif_skill_itemlistwindow_post; int HP_clif_sc_load_pre; int HP_clif_sc_load_post; + int HP_clif_sc_continue_pre; + int HP_clif_sc_continue_post; int HP_clif_sc_end_pre; int HP_clif_sc_end_post; int HP_clif_initialstatus_pre; @@ -6755,6 +8007,8 @@ struct { int HP_clif_misceffect_post; int HP_clif_changeoption_pre; int HP_clif_changeoption_post; + int HP_clif_changeoption_target_pre; + int HP_clif_changeoption_target_post; int HP_clif_changeoption2_pre; int HP_clif_changeoption2_post; int HP_clif_emotion_pre; @@ -6777,8 +8031,8 @@ struct { 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_useskill_pre; + int HP_clif_useskill_post; int HP_clif_produce_effect_pre; int HP_clif_produce_effect_post; int HP_clif_devotion_pre; @@ -6805,6 +8059,12 @@ struct { int HP_clif_specialeffect_single_post; int HP_clif_specialeffect_value_pre; int HP_clif_specialeffect_value_post; + int HP_clif_specialeffect_value_single_pre; + int HP_clif_specialeffect_value_single_post; + int HP_clif_removeSpecialEffect_pre; + int HP_clif_removeSpecialEffect_post; + int HP_clif_removeSpecialEffect_single_pre; + int HP_clif_removeSpecialEffect_single_post; int HP_clif_millenniumshield_pre; int HP_clif_millenniumshield_post; int HP_clif_spiritcharm_pre; @@ -6835,6 +8095,8 @@ struct { int HP_clif_addchat_post; int HP_clif_changechatowner_pre; int HP_clif_changechatowner_post; + int HP_clif_chatRoleChange_pre; + int HP_clif_chatRoleChange_post; int HP_clif_clearchat_pre; int HP_clif_clearchat_post; int HP_clif_leavechat_pre; @@ -6855,20 +8117,32 @@ struct { int HP_clif_messagecolor_self_post; int HP_clif_messagecolor_pre; int HP_clif_messagecolor_post; + int HP_clif_serviceMessageColor_pre; + int HP_clif_serviceMessageColor_post; int HP_clif_disp_overhead_pre; int HP_clif_disp_overhead_post; + int HP_clif_notify_playerchat_pre; + int HP_clif_notify_playerchat_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_msgtable_skill_pre; int HP_clif_msgtable_skill_post; + int HP_clif_msgtable_str_pre; + int HP_clif_msgtable_str_post; + int HP_clif_msgtable_str_color_pre; + int HP_clif_msgtable_str_color_post; + int HP_clif_msgtable_color_pre; + int HP_clif_msgtable_color_post; int HP_clif_message_pre; int HP_clif_message_post; int HP_clif_messageln_pre; int HP_clif_messageln_post; - int HP_clif_process_message_pre; - int HP_clif_process_message_post; + int HP_clif_process_chat_message_pre; + int HP_clif_process_chat_message_post; + int HP_clif_process_whisper_message_pre; + int HP_clif_process_whisper_message_post; int HP_clif_wisexin_pre; int HP_clif_wisexin_post; int HP_clif_wisall_pre; @@ -6905,10 +8179,20 @@ struct { int HP_clif_buyvending_post; int HP_clif_openvending_pre; int HP_clif_openvending_post; + int HP_clif_openvendingAck_pre; + int HP_clif_openvendingAck_post; int HP_clif_vendingreport_pre; int HP_clif_vendingreport_post; - int HP_clif_storagelist_pre; - int HP_clif_storagelist_post; + int HP_clif_storageList_pre; + int HP_clif_storageList_post; + int HP_clif_guildStorageList_pre; + int HP_clif_guildStorageList_post; + int HP_clif_storageItems_pre; + int HP_clif_storageItems_post; + int HP_clif_inventoryStart_pre; + int HP_clif_inventoryStart_post; + int HP_clif_inventoryEnd_pre; + int HP_clif_inventoryEnd_post; int HP_clif_updatestorageamount_pre; int HP_clif_updatestorageamount_post; int HP_clif_storageitemadded_pre; @@ -6927,12 +8211,16 @@ struct { int HP_clif_addskill_post; int HP_clif_deleteskill_pre; int HP_clif_deleteskill_post; + int HP_clif_playerSkillToPacket_pre; + int HP_clif_playerSkillToPacket_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_job_and_level_pre; + int HP_clif_party_job_and_level_post; int HP_clif_party_invite_pre; int HP_clif_party_invite_post; int HP_clif_party_inviteack_pre; @@ -6967,6 +8255,10 @@ struct { int HP_clif_guild_basicinfo_post; int HP_clif_guild_allianceinfo_pre; int HP_clif_guild_allianceinfo_post; + int HP_clif_guild_castlelist_pre; + int HP_clif_guild_castlelist_post; + int HP_clif_guild_castleinfo_pre; + int HP_clif_guild_castleinfo_post; int HP_clif_guild_memberlist_pre; int HP_clif_guild_memberlist_post; int HP_clif_guild_skillinfo_pre; @@ -7017,6 +8309,10 @@ struct { int HP_clif_guild_positioninfolist_post; int HP_clif_guild_expulsionlist_pre; int HP_clif_guild_expulsionlist_post; + int HP_clif_guild_set_position_pre; + int HP_clif_guild_set_position_post; + int HP_clif_guild_position_selected_pre; + int HP_clif_guild_position_selected_post; int HP_clif_validate_emblem_pre; int HP_clif_validate_emblem_post; int HP_clif_bg_hp_pre; @@ -7099,6 +8395,8 @@ struct { 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_notify_objective_pre; + int HP_clif_quest_notify_objective_post; int HP_clif_quest_show_event_pre; int HP_clif_quest_show_event_post; int HP_clif_mail_window_pre; @@ -7263,6 +8561,8 @@ struct { int HP_clif_parse_roulette_db_post; int HP_clif_roulette_generate_ack_pre; int HP_clif_roulette_generate_ack_post; + int HP_clif_roulette_close_pre; + int HP_clif_roulette_close_post; int HP_clif_openmergeitem_pre; int HP_clif_openmergeitem_post; int HP_clif_cancelmergeitem_pre; @@ -7271,14 +8571,36 @@ struct { int HP_clif_comparemergeitem_post; int HP_clif_ackmergeitems_pre; int HP_clif_ackmergeitems_post; + int HP_clif_mergeitems_pre; + int HP_clif_mergeitems_post; + int HP_clif_isdisguised_pre; + int HP_clif_isdisguised_post; + int HP_clif_navigate_to_pre; + int HP_clif_navigate_to_post; + int HP_clif_bl_type_pre; + int HP_clif_bl_type_post; + int HP_clif_achievement_send_list_pre; + int HP_clif_achievement_send_list_post; + int HP_clif_achievement_send_update_pre; + int HP_clif_achievement_send_update_post; + int HP_clif_pAchievementGetReward_pre; + int HP_clif_pAchievementGetReward_post; + int HP_clif_achievement_reward_ack_pre; + int HP_clif_achievement_reward_ack_post; + int HP_clif_change_title_ack_pre; + int HP_clif_change_title_ack_post; + int HP_clif_pChangeTitle_pre; + int HP_clif_pChangeTitle_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_pHotkey1_pre; + int HP_clif_pHotkey1_post; + int HP_clif_pHotkey2_pre; + int HP_clif_pHotkey2_post; int HP_clif_pProgressbar_pre; int HP_clif_pProgressbar_post; int HP_clif_pWalkToXY_pre; @@ -7363,8 +8685,14 @@ struct { int HP_clif_pStatusUp_post; int HP_clif_pSkillUp_pre; int HP_clif_pSkillUp_post; + int HP_clif_useSkillToIdReal_pre; + int HP_clif_useSkillToIdReal_post; int HP_clif_pUseSkillToId_pre; int HP_clif_pUseSkillToId_post; + int HP_clif_pStartUseSkillToId_pre; + int HP_clif_pStartUseSkillToId_post; + int HP_clif_pStopUseSkillToId_pre; + int HP_clif_pStopUseSkillToId_post; int HP_clif_pUseSkillToId_homun_pre; int HP_clif_pUseSkillToId_homun_post; int HP_clif_pUseSkillToId_mercenary_pre; @@ -7631,8 +8959,8 @@ struct { 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_p_cz_config_pre; + int HP_clif_p_cz_config_post; int HP_clif_pquestStateAck_pre; int HP_clif_pquestStateAck_post; int HP_clif_pmercenary_action_pre; @@ -7667,6 +8995,8 @@ struct { int HP_clif_pMoveItem_post; int HP_clif_pDull_pre; int HP_clif_pDull_post; + int HP_clif_p_cz_blocking_play_cancel_pre; + int HP_clif_p_cz_blocking_play_cancel_post; int HP_clif_pBGQueueRegister_pre; int HP_clif_pBGQueueRegister_post; int HP_clif_pBGQueueCheckState_pre; @@ -7675,8 +9005,12 @@ struct { 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_pCashShopOpen1_pre; + int HP_clif_pCashShopOpen1_post; + int HP_clif_pCashShopOpen2_pre; + int HP_clif_pCashShopOpen2_post; + int HP_clif_pCashShopLimitedReq_pre; + int HP_clif_pCashShopLimitedReq_post; int HP_clif_pCashShopClose_pre; int HP_clif_pCashShopClose_post; int HP_clif_pCashShopReqTab_pre; @@ -7689,6 +9023,10 @@ struct { int HP_clif_pPartyTick_post; int HP_clif_pGuildInvite2_pre; int HP_clif_pGuildInvite2_post; + int HP_clif_cashShopBuyAck_pre; + int HP_clif_cashShopBuyAck_post; + int HP_clif_cashShopOpen_pre; + int HP_clif_cashShopOpen_post; int HP_clif_pPartyBookingAddFilter_pre; int HP_clif_pPartyBookingAddFilter_post; int HP_clif_pPartyBookingSubFilter_pre; @@ -7725,10 +9063,12 @@ struct { int HP_clif_pNPCMarketClosed_post; int HP_clif_pNPCMarketPurchase_pre; int HP_clif_pNPCMarketPurchase_post; - int HP_clif_add_random_options_pre; - int HP_clif_add_random_options_post; - int HP_clif_pHotkeyRowShift_pre; - int HP_clif_pHotkeyRowShift_post; + int HP_clif_add_item_options_pre; + int HP_clif_add_item_options_post; + int HP_clif_pHotkeyRowShift1_pre; + int HP_clif_pHotkeyRowShift1_post; + int HP_clif_pHotkeyRowShift2_pre; + int HP_clif_pHotkeyRowShift2_post; int HP_clif_dressroom_open_pre; int HP_clif_dressroom_open_post; int HP_clif_pOneClick_ItemIdentify_pre; @@ -7739,6 +9079,192 @@ struct { int HP_clif_pSelectCart_post; int HP_clif_get_bl_name_pre; int HP_clif_get_bl_name_post; + int HP_clif_pRodexOpenWriteMail_pre; + int HP_clif_pRodexOpenWriteMail_post; + int HP_clif_rodex_open_write_mail_pre; + int HP_clif_rodex_open_write_mail_post; + int HP_clif_pRodexAddItem_pre; + int HP_clif_pRodexAddItem_post; + int HP_clif_rodex_add_item_result_pre; + int HP_clif_rodex_add_item_result_post; + int HP_clif_pRodexRemoveItem_pre; + int HP_clif_pRodexRemoveItem_post; + int HP_clif_rodex_remove_item_result_pre; + int HP_clif_rodex_remove_item_result_post; + int HP_clif_pRodexSendMail_pre; + int HP_clif_pRodexSendMail_post; + int HP_clif_rodex_send_mail_result_pre; + int HP_clif_rodex_send_mail_result_post; + int HP_clif_rodex_send_maillist_pre; + int HP_clif_rodex_send_maillist_post; + int HP_clif_rodex_send_refresh_pre; + int HP_clif_rodex_send_refresh_post; + int HP_clif_rodex_send_mails_all_pre; + int HP_clif_rodex_send_mails_all_post; + int HP_clif_pRodexReadMail_pre; + int HP_clif_pRodexReadMail_post; + int HP_clif_rodex_read_mail_pre; + int HP_clif_rodex_read_mail_post; + int HP_clif_pRodexNextMaillist_pre; + int HP_clif_pRodexNextMaillist_post; + int HP_clif_pRodexCloseMailbox_pre; + int HP_clif_pRodexCloseMailbox_post; + int HP_clif_pRodexCancelWriteMail_pre; + int HP_clif_pRodexCancelWriteMail_post; + int HP_clif_pRodexOpenMailbox_pre; + int HP_clif_pRodexOpenMailbox_post; + int HP_clif_pRodexCheckName_pre; + int HP_clif_pRodexCheckName_post; + int HP_clif_rodex_checkname_result_pre; + int HP_clif_rodex_checkname_result_post; + int HP_clif_pRodexDeleteMail_pre; + int HP_clif_pRodexDeleteMail_post; + int HP_clif_rodex_delete_mail_pre; + int HP_clif_rodex_delete_mail_post; + int HP_clif_pRodexRefreshMaillist_pre; + int HP_clif_pRodexRefreshMaillist_post; + int HP_clif_pRodexRequestZeny_pre; + int HP_clif_pRodexRequestZeny_post; + int HP_clif_rodex_request_zeny_pre; + int HP_clif_rodex_request_zeny_post; + int HP_clif_pRodexRequestItems_pre; + int HP_clif_pRodexRequestItems_post; + int HP_clif_rodex_request_items_pre; + int HP_clif_rodex_request_items_post; + int HP_clif_rodex_icon_pre; + int HP_clif_rodex_icon_post; + int HP_clif_skill_scale_pre; + int HP_clif_skill_scale_post; + int HP_clif_clan_basicinfo_pre; + int HP_clif_clan_basicinfo_post; + int HP_clif_clan_onlinecount_pre; + int HP_clif_clan_onlinecount_post; + int HP_clif_clan_leave_pre; + int HP_clif_clan_leave_post; + int HP_clif_clan_message_pre; + int HP_clif_clan_message_post; + int HP_clif_pClanMessage_pre; + int HP_clif_pClanMessage_post; + int HP_clif_hat_effect_pre; + int HP_clif_hat_effect_post; + int HP_clif_hat_effect_single_pre; + int HP_clif_hat_effect_single_post; + int HP_clif_overweight_percent_pre; + int HP_clif_overweight_percent_post; + int HP_clif_pChangeDress_pre; + int HP_clif_pChangeDress_post; + int HP_clif_pAttendanceDB_pre; + int HP_clif_pAttendanceDB_post; + int HP_clif_attendancedb_libconfig_sub_pre; + int HP_clif_attendancedb_libconfig_sub_post; + int HP_clif_attendance_timediff_pre; + int HP_clif_attendance_timediff_post; + int HP_clif_attendance_getendtime_pre; + int HP_clif_attendance_getendtime_post; + int HP_clif_pOpenUIRequest_pre; + int HP_clif_pOpenUIRequest_post; + int HP_clif_open_ui_pre; + int HP_clif_open_ui_post; + int HP_clif_pAttendanceRewardRequest_pre; + int HP_clif_pAttendanceRewardRequest_post; + int HP_clif_ui_action_pre; + int HP_clif_ui_action_post; + int HP_clif_pPrivateAirshipRequest_pre; + int HP_clif_pPrivateAirshipRequest_post; + int HP_clif_PrivateAirshipResponse_pre; + int HP_clif_PrivateAirshipResponse_post; + int HP_clif_pReqStyleChange_pre; + int HP_clif_pReqStyleChange_post; + int HP_clif_pReqStyleChange2_pre; + int HP_clif_pReqStyleChange2_post; + int HP_clif_pStyleClose_pre; + int HP_clif_pStyleClose_post; + int HP_clif_style_change_response_pre; + int HP_clif_style_change_response_post; + int HP_clif_pPetEvolution_pre; + int HP_clif_pPetEvolution_post; + int HP_clif_petEvolutionResult_pre; + int HP_clif_petEvolutionResult_post; + int HP_clif_party_dead_notification_pre; + int HP_clif_party_dead_notification_post; + int HP_clif_pMemorialDungeonCommand_pre; + int HP_clif_pMemorialDungeonCommand_post; + int HP_clif_camera_showWindow_pre; + int HP_clif_camera_showWindow_post; + int HP_clif_camera_change_pre; + int HP_clif_camera_change_post; + int HP_clif_pCameraInfo_pre; + int HP_clif_pCameraInfo_post; + int HP_clif_item_preview_pre; + int HP_clif_item_preview_post; + int HP_clif_enchant_equipment_pre; + int HP_clif_enchant_equipment_post; + int HP_clif_pReqRemainTime_pre; + int HP_clif_pReqRemainTime_post; + int HP_clif_npc_barter_open_pre; + int HP_clif_npc_barter_open_post; + int HP_clif_pNPCBarterClosed_pre; + int HP_clif_pNPCBarterClosed_post; + int HP_clif_pNPCBarterPurchase_pre; + int HP_clif_pNPCBarterPurchase_post; + int HP_clif_pNPCExpandedBarterClosed_pre; + int HP_clif_pNPCExpandedBarterClosed_post; + int HP_clif_pNPCExpandedBarterPurchase_pre; + int HP_clif_pNPCExpandedBarterPurchase_post; + int HP_clif_npc_expanded_barter_open_pre; + int HP_clif_npc_expanded_barter_open_post; + int HP_clif_pClientVersion_pre; + int HP_clif_pClientVersion_post; + int HP_clif_pPing_pre; + int HP_clif_pPing_post; + int HP_clif_ping_pre; + int HP_clif_ping_post; + int HP_clif_pingTimer_pre; + int HP_clif_pingTimer_post; + int HP_clif_pingTimerSub_pre; + int HP_clif_pingTimerSub_post; + int HP_clif_pResetCooldown_pre; + int HP_clif_pResetCooldown_post; + int HP_clif_loadConfirm_pre; + int HP_clif_loadConfirm_post; + int HP_clif_send_selforarea_pre; + int HP_clif_send_selforarea_post; + int HP_clif_OpenRefineryUI_pre; + int HP_clif_OpenRefineryUI_post; + int HP_clif_pAddItemRefineryUI_pre; + int HP_clif_pAddItemRefineryUI_post; + int HP_clif_AddItemRefineryUIAck_pre; + int HP_clif_AddItemRefineryUIAck_post; + int HP_clif_pRefineryUIClose_pre; + int HP_clif_pRefineryUIClose_post; + int HP_clif_pRefineryUIRefine_pre; + int HP_clif_pRefineryUIRefine_post; + int HP_clif_announce_refine_status_pre; + int HP_clif_announce_refine_status_post; + int HP_clif_pGuildCastleTeleportRequest_pre; + int HP_clif_pGuildCastleTeleportRequest_post; + int HP_clif_pGuildCastleInfoRequest_pre; + int HP_clif_pGuildCastleInfoRequest_post; + int HP_clif_guild_castleteleport_res_pre; + int HP_clif_guild_castleteleport_res_post; + int HP_clif_lapineDdukDdak_open_pre; + int HP_clif_lapineDdukDdak_open_post; + int HP_clif_lapineDdukDdak_result_pre; + int HP_clif_lapineDdukDdak_result_post; + int HP_clif_plapineDdukDdak_ack_pre; + int HP_clif_plapineDdukDdak_ack_post; + int HP_clif_plapineDdukDdak_close_pre; + int HP_clif_plapineDdukDdak_close_post; + int HP_clif_lapineUpgrade_open_pre; + int HP_clif_lapineUpgrade_open_post; + int HP_clif_lapineUpgrade_result_pre; + int HP_clif_lapineUpgrade_result_post; + int HP_clif_pLapineUpgrade_close_pre; + int HP_clif_pLapineUpgrade_close_post; + int HP_clif_pLapineUpgrade_makeItem_pre; + int HP_clif_pLapineUpgrade_makeItem_post; + int HP_clif_pReqGearOff_pre; + int HP_clif_pReqGearOff_post; int HP_cmdline_init_pre; int HP_cmdline_init_post; int HP_cmdline_final_pre; @@ -7799,6 +9325,10 @@ struct { int HP_DB_init_post; int HP_DB_final_pre; int HP_DB_final_post; + int HP_des_decrypt_block_pre; + int HP_des_decrypt_block_post; + int HP_des_decrypt_pre; + int HP_des_decrypt_post; int HP_duel_create_pre; int HP_duel_create_post; int HP_duel_invite_pre; @@ -7811,8 +9341,8 @@ struct { 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_difftime_pre; + int HP_duel_difftime_post; int HP_duel_init_pre; int HP_duel_init_post; int HP_duel_final_pre; @@ -7881,6 +9411,20 @@ struct { int HP_elemental_ai_timer_post; int HP_elemental_read_db_pre; int HP_elemental_read_db_post; + int HP_grfio_init_pre; + int HP_grfio_init_post; + int HP_grfio_final_pre; + int HP_grfio_final_post; + int HP_grfio_reads_pre; + int HP_grfio_reads_post; + int HP_grfio_find_file_pre; + int HP_grfio_find_file_post; + int HP_grfio_crc32_pre; + int HP_grfio_crc32_post; + int HP_grfio_decode_zip_pre; + int HP_grfio_decode_zip_post; + int HP_grfio_encode_zip_pre; + int HP_grfio_encode_zip_post; int HP_guild_init_pre; int HP_guild_init_post; int HP_guild_final_pre; @@ -7979,8 +9523,6 @@ struct { 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; @@ -8025,8 +9567,12 @@ struct { 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_read_castledb_libconfig_pre; + int HP_guild_read_castledb_libconfig_post; + int HP_guild_read_castledb_libconfig_sub_pre; + int HP_guild_read_castledb_libconfig_sub_post; + int HP_guild_read_castledb_libconfig_sub_warp_pre; + int HP_guild_read_castledb_libconfig_sub_warp_post; int HP_guild_payexp_timer_sub_pre; int HP_guild_payexp_timer_sub_post; int HP_guild_send_xy_timer_sub_pre; @@ -8123,6 +9669,8 @@ struct { int HP_homun_mutate_post; int HP_homun_gainexp_pre; int HP_homun_gainexp_post; + int HP_homun_gainexp_real_pre; + int HP_homun_gainexp_real_post; int HP_homun_add_intimacy_pre; int HP_homun_add_intimacy_post; int HP_homun_consume_intimacy_pre; @@ -8215,24 +9763,20 @@ struct { int HP_instance_valid_post; int HP_instance_destroy_timer_pre; int HP_instance_destroy_timer_post; + int HP_instance_force_destroy_pre; + int HP_instance_force_destroy_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_account_storage_pre; + int HP_intif_request_account_storage_post; + int HP_intif_send_account_storage_pre; + int HP_intif_send_account_storage_post; int HP_intif_request_guild_storage_pre; int HP_intif_request_guild_storage_post; int HP_intif_send_guild_storage_pre; @@ -8251,8 +9795,6 @@ struct { 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; @@ -8267,8 +9809,6 @@ struct { 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; @@ -8349,24 +9889,42 @@ struct { int HP_intif_elemental_delete_post; int HP_intif_elemental_save_pre; int HP_intif_elemental_save_post; + int HP_intif_rodex_requestinbox_pre; + int HP_intif_rodex_requestinbox_post; + int HP_intif_rodex_checkhasnew_pre; + int HP_intif_rodex_checkhasnew_post; + int HP_intif_rodex_updatemail_pre; + int HP_intif_rodex_updatemail_post; + int HP_intif_rodex_sendmail_pre; + int HP_intif_rodex_sendmail_post; + int HP_intif_rodex_checkname_pre; + int HP_intif_rodex_checkname_post; + int HP_intif_pGetZenyAck_pre; + int HP_intif_pGetZenyAck_post; + int HP_intif_pGetItemsAck_pre; + int HP_intif_pGetItemsAck_post; + int HP_intif_clan_kickoffline_pre; + int HP_intif_clan_kickoffline_post; + int HP_intif_clan_membercount_pre; + int HP_intif_clan_membercount_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_achievements_request_pre; + int HP_intif_achievements_request_post; + int HP_intif_achievements_save_pre; + int HP_intif_achievements_save_post; int HP_intif_pRegisters_pre; int HP_intif_pRegisters_post; + int HP_intif_pAccountStorage_pre; + int HP_intif_pAccountStorage_post; int HP_intif_pChangeNameOk_pre; int HP_intif_pChangeNameOk_post; int HP_intif_pMessageToFD_pre; int HP_intif_pMessageToFD_post; + int HP_intif_pAccountStorageSaveAck_pre; + int HP_intif_pAccountStorageSaveAck_post; int HP_intif_pLoadGuildStorage_pre; int HP_intif_pLoadGuildStorage_post; int HP_intif_pSaveGuildStorage_pre; @@ -8385,8 +9943,6 @@ struct { 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; @@ -8399,8 +9955,6 @@ struct { 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; @@ -8477,6 +10031,18 @@ struct { int HP_intif_pSaveHomunculusOk_post; int HP_intif_pDeleteHomunculusOk_pre; int HP_intif_pDeleteHomunculusOk_post; + int HP_intif_pRequestRodexOpenInbox_pre; + int HP_intif_pRequestRodexOpenInbox_post; + int HP_intif_pRodexHasNew_pre; + int HP_intif_pRodexHasNew_post; + int HP_intif_pRodexSendMail_pre; + int HP_intif_pRodexSendMail_post; + int HP_intif_pRodexCheckName_pre; + int HP_intif_pRodexCheckName_post; + int HP_intif_pRecvClanMemberAction_pre; + int HP_intif_pRecvClanMemberAction_post; + int HP_intif_pAchievementsLoad_pre; + int HP_intif_pAchievementsLoad_post; int HP_ircbot_init_pre; int HP_ircbot_init_post; int HP_ircbot_final_pre; @@ -8495,6 +10061,10 @@ struct { int HP_ircbot_identify_timer_post; int HP_ircbot_join_timer_pre; int HP_ircbot_join_timer_post; + int HP_ircbot_queue_timer_pre; + int HP_ircbot_queue_timer_post; + int HP_ircbot_queue_pre; + int HP_ircbot_queue_post; int HP_ircbot_send_pre; int HP_ircbot_send_post; int HP_ircbot_relay_pre; @@ -8503,6 +10073,8 @@ struct { int HP_ircbot_pong_post; int HP_ircbot_privmsg_pre; int HP_ircbot_privmsg_post; + int HP_ircbot_privmsg_ctcp_pre; + int HP_ircbot_privmsg_ctcp_post; int HP_ircbot_userjoin_pre; int HP_ircbot_userjoin_post; int HP_ircbot_userleave_pre; @@ -8523,6 +10095,8 @@ struct { int HP_itemdb_read_chains_post; int HP_itemdb_read_packages_pre; int HP_itemdb_read_packages_post; + int HP_itemdb_read_options_pre; + int HP_itemdb_read_options_post; int HP_itemdb_write_cached_packages_pre; int HP_itemdb_write_cached_packages_post; int HP_itemdb_read_cached_packages_pre; @@ -8539,6 +10113,8 @@ struct { int HP_itemdb_search_post; int HP_itemdb_exists_pre; int HP_itemdb_exists_post; + int HP_itemdb_option_exists_pre; + int HP_itemdb_option_exists_post; int HP_itemdb_in_group_pre; int HP_itemdb_in_group_post; int HP_itemdb_group_item_pre; @@ -8595,14 +10171,16 @@ struct { int HP_itemdb_isidentified_post; int HP_itemdb_isidentified2_pre; int HP_itemdb_isidentified2_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_read_combodb_libconfig_pre; + int HP_itemdb_read_combodb_libconfig_post; + int HP_itemdb_read_combodb_libconfig_sub_pre; + int HP_itemdb_read_combodb_libconfig_sub_post; int HP_itemdb_gendercheck_pre; int HP_itemdb_gendercheck_post; int HP_itemdb_validate_entry_pre; int HP_itemdb_validate_entry_post; + int HP_itemdb_readdb_options_additional_fields_pre; + int HP_itemdb_readdb_options_additional_fields_post; int HP_itemdb_readdb_additional_fields_pre; int HP_itemdb_readdb_additional_fields_post; int HP_itemdb_readdb_job_sub_pre; @@ -8619,6 +10197,8 @@ struct { int HP_itemdb_destroy_item_data_post; int HP_itemdb_final_sub_pre; int HP_itemdb_final_sub_post; + int HP_itemdb_options_final_sub_pre; + int HP_itemdb_options_final_sub_post; int HP_itemdb_clear_pre; int HP_itemdb_clear_post; int HP_itemdb_id2combo_pre; @@ -8627,6 +10207,20 @@ struct { int HP_itemdb_is_item_usable_post; int HP_itemdb_lookup_const_pre; int HP_itemdb_lookup_const_post; + int HP_itemdb_lookup_const_mask_pre; + int HP_itemdb_lookup_const_mask_post; + int HP_itemdb_addname_sub_pre; + int HP_itemdb_addname_sub_post; + int HP_itemdb_read_libconfig_lapineddukddak_pre; + int HP_itemdb_read_libconfig_lapineddukddak_post; + int HP_itemdb_read_libconfig_lapineddukddak_sub_pre; + int HP_itemdb_read_libconfig_lapineddukddak_sub_post; + int HP_itemdb_read_libconfig_lapineddukddak_sub_sources_pre; + int HP_itemdb_read_libconfig_lapineddukddak_sub_sources_post; + int HP_libconfig_set_db_path_pre; + int HP_libconfig_set_db_path_post; + int HP_libconfig_format_db_path_pre; + int HP_libconfig_format_db_path_post; int HP_libconfig_read_pre; int HP_libconfig_read_post; int HP_libconfig_write_pre; @@ -8825,44 +10419,20 @@ struct { int HP_mail_deliveryfail_post; int HP_mail_invalid_operation_pre; int HP_mail_invalid_operation_post; - int HP_iMalloc_init_pre; - int HP_iMalloc_init_post; - int HP_iMalloc_final_pre; - int HP_iMalloc_final_post; - int HP_iMalloc_malloc_pre; - int HP_iMalloc_malloc_post; - int HP_iMalloc_calloc_pre; - int HP_iMalloc_calloc_post; - int HP_iMalloc_realloc_pre; - int HP_iMalloc_realloc_post; - int HP_iMalloc_reallocz_pre; - int HP_iMalloc_reallocz_post; - int HP_iMalloc_astrdup_pre; - int HP_iMalloc_astrdup_post; - int HP_iMalloc_astrndup_pre; - int HP_iMalloc_astrndup_post; - int HP_iMalloc_free_pre; - int HP_iMalloc_free_post; - int HP_iMalloc_memory_check_pre; - int HP_iMalloc_memory_check_post; - int HP_iMalloc_verify_ptr_pre; - int HP_iMalloc_verify_ptr_post; - int HP_iMalloc_usage_pre; - int HP_iMalloc_usage_post; - int HP_iMalloc_post_shutdown_pre; - int HP_iMalloc_post_shutdown_post; - int HP_iMalloc_init_messages_pre; - int HP_iMalloc_init_messages_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_remove_all_pre; + int HP_map_zone_remove_all_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_zone_reload_pre; + int HP_map_zone_reload_post; int HP_map_getcell_pre; int HP_map_getcell_post; int HP_map_setgatcell_pre; @@ -9059,10 +10629,10 @@ struct { 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_readfromcache_v1_pre; + int HP_map_readfromcache_v1_post; int HP_map_addmap_pre; int HP_map_addmap_post; int HP_map_delmapid_pre; @@ -9079,12 +10649,14 @@ struct { 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_read_npclist_pre; + int HP_map_read_npclist_post; int HP_map_inter_config_read_pre; int HP_map_inter_config_read_post; + int HP_map_inter_config_read_database_names_pre; + int HP_map_inter_config_read_database_names_post; + int HP_map_inter_config_read_connection_pre; + int HP_map_inter_config_read_connection_post; int HP_map_sql_init_pre; int HP_map_sql_init_post; int HP_map_sql_close_pre; @@ -9119,6 +10691,10 @@ struct { int HP_map_merge_zone_post; int HP_map_zone_clear_single_pre; int HP_map_zone_clear_single_post; + int HP_mapindex_config_read_dbpath_pre; + int HP_mapindex_config_read_dbpath_post; + int HP_mapindex_config_read_pre; + int HP_mapindex_config_read_post; int HP_mapindex_init_pre; int HP_mapindex_init_post; int HP_mapindex_final_pre; @@ -9175,6 +10751,12 @@ struct { int HP_mapreg_reload_post; int HP_mapreg_config_read_pre; int HP_mapreg_config_read_post; + int HP_md5_string_pre; + int HP_md5_string_post; + int HP_md5_binary_pre; + int HP_md5_binary_post; + int HP_md5_salt_pre; + int HP_md5_salt_post; int HP_mercenary_init_pre; int HP_mercenary_init_post; int HP_mercenary_class_pre; @@ -9231,6 +10813,8 @@ struct { int HP_mob_final_post; int HP_mob_reload_pre; int HP_mob_reload_post; + int HP_mob_reload_sub_mob_pre; + int HP_mob_reload_sub_mob_post; int HP_mob_db_pre; int HP_mob_db_post; int HP_mob_chat_pre; @@ -9245,6 +10829,10 @@ struct { 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_spawn_delayed_pre; + int HP_mob_mvptomb_spawn_delayed_post; + int HP_mob_mvptomb_delayspawn_pre; + int HP_mob_mvptomb_delayspawn_post; int HP_mob_mvptomb_create_pre; int HP_mob_mvptomb_create_post; int HP_mob_mvptomb_destroy_pre; @@ -9299,6 +10887,8 @@ struct { int HP_mob_ai_sub_hard_lootsearch_post; int HP_mob_warpchase_sub_pre; int HP_mob_warpchase_sub_post; + int HP_mob_is_in_battle_state_pre; + int HP_mob_is_in_battle_state_post; int HP_mob_ai_sub_hard_slavemob_pre; int HP_mob_ai_sub_hard_slavemob_post; int HP_mob_unlocktarget_pre; @@ -9319,6 +10909,8 @@ struct { int HP_mob_ai_lazy_post; int HP_mob_ai_hard_pre; int HP_mob_ai_hard_post; + int HP_mob_setdropitem_options_pre; + int HP_mob_setdropitem_options_post; int HP_mob_setdropitem_pre; int HP_mob_setdropitem_post; int HP_mob_setlootitem_pre; @@ -9385,6 +10977,14 @@ struct { int HP_mob_drop_adjust_post; int HP_mob_item_dropratio_adjust_pre; int HP_mob_item_dropratio_adjust_post; + int HP_mob_read_optdrops_option_pre; + int HP_mob_read_optdrops_option_post; + int HP_mob_read_optdrops_optslot_pre; + int HP_mob_read_optdrops_optslot_post; + int HP_mob_read_optdrops_group_pre; + int HP_mob_read_optdrops_group_post; + int HP_mob_read_optdrops_db_pre; + int HP_mob_read_optdrops_db_post; int HP_mob_readdb_pre; int HP_mob_readdb_post; int HP_mob_lookup_const_pre; @@ -9405,20 +11005,22 @@ struct { int HP_mob_read_db_mvpdrops_sub_post; int HP_mob_read_db_mode_sub_pre; int HP_mob_read_db_mode_sub_post; + int HP_mob_read_db_drops_option_pre; + int HP_mob_read_db_drops_option_post; int HP_mob_read_db_stats_sub_pre; int HP_mob_read_db_stats_sub_post; + int HP_mob_read_db_viewdata_sub_pre; + int HP_mob_read_db_viewdata_sub_post; int HP_mob_name_constants_pre; int HP_mob_name_constants_post; - int HP_mob_readdb_mobavail_pre; - int HP_mob_readdb_mobavail_post; + int HP_mob_mobavail_removal_notice_pre; + int HP_mob_mobavail_removal_notice_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_readdb_race2_pre; @@ -9429,8 +11031,42 @@ struct { int HP_mob_load_post; int HP_mob_clear_spawninfo_pre; int HP_mob_clear_spawninfo_post; + int HP_mob_get_item_drop_ratio_pre; + int HP_mob_get_item_drop_ratio_post; + int HP_mob_set_item_drop_ratio_pre; + int HP_mob_set_item_drop_ratio_post; + int HP_mob_final_ratio_sub_pre; + int HP_mob_final_ratio_sub_post; int HP_mob_destroy_mob_db_pre; int HP_mob_destroy_mob_db_post; + int HP_mob_destroy_drop_groups_pre; + int HP_mob_destroy_drop_groups_post; + int HP_mob_skill_db_libconfig_pre; + int HP_mob_skill_db_libconfig_post; + int HP_mob_skill_db_libconfig_sub_pre; + int HP_mob_skill_db_libconfig_sub_post; + int HP_mob_skill_db_libconfig_sub_skill_pre; + int HP_mob_skill_db_libconfig_sub_skill_post; + int HP_mutex_create_pre; + int HP_mutex_create_post; + int HP_mutex_destroy_pre; + int HP_mutex_destroy_post; + int HP_mutex_lock_pre; + int HP_mutex_lock_post; + int HP_mutex_trylock_pre; + int HP_mutex_trylock_post; + int HP_mutex_unlock_pre; + int HP_mutex_unlock_post; + int HP_mutex_cond_create_pre; + int HP_mutex_cond_create_post; + int HP_mutex_cond_destroy_pre; + int HP_mutex_cond_destroy_post; + int HP_mutex_cond_wait_pre; + int HP_mutex_cond_wait_post; + int HP_mutex_cond_signal_pre; + int HP_mutex_cond_signal_post; + int HP_mutex_cond_broadcast_pre; + int HP_mutex_cond_broadcast_post; int HP_npc_chat_sub_pre; int HP_npc_chat_sub_post; int HP_npc_chat_finalize_pre; @@ -9555,6 +11191,8 @@ struct { int HP_npc_unload_dup_sub_post; int HP_npc_unload_duplicates_pre; int HP_npc_unload_duplicates_post; + int HP_npc_unload_mob_pre; + int HP_npc_unload_mob_post; int HP_npc_unload_pre; int HP_npc_unload_post; int HP_npc_clearsrcfile_pre; @@ -9655,6 +11293,10 @@ struct { int HP_npc_trader_update_post; int HP_npc_market_buylist_pre; int HP_npc_market_buylist_post; + int HP_npc_barter_buylist_pre; + int HP_npc_barter_buylist_post; + int HP_npc_expanded_barter_buylist_pre; + int HP_npc_expanded_barter_buylist_post; int HP_npc_trader_open_pre; int HP_npc_trader_open_post; int HP_npc_market_fromsql_pre; @@ -9665,12 +11307,44 @@ struct { int HP_npc_market_delfromsql_post; int HP_npc_market_delfromsql_sub_pre; int HP_npc_market_delfromsql_sub_post; + int HP_npc_barter_fromsql_pre; + int HP_npc_barter_fromsql_post; + int HP_npc_barter_tosql_pre; + int HP_npc_barter_tosql_post; + int HP_npc_barter_delfromsql_pre; + int HP_npc_barter_delfromsql_post; + int HP_npc_barter_delfromsql_sub_pre; + int HP_npc_barter_delfromsql_sub_post; + int HP_npc_expanded_barter_fromsql_pre; + int HP_npc_expanded_barter_fromsql_post; + int HP_npc_expanded_barter_tosql_pre; + int HP_npc_expanded_barter_tosql_post; + int HP_npc_expanded_barter_delfromsql_pre; + int HP_npc_expanded_barter_delfromsql_post; + int HP_npc_expanded_barter_delfromsql_sub_pre; + int HP_npc_expanded_barter_delfromsql_sub_post; int HP_npc_db_checkid_pre; int HP_npc_db_checkid_post; + int HP_npc_refresh_pre; + int HP_npc_refresh_post; + int HP_npc_questinfo_clear_pre; + int HP_npc_questinfo_clear_post; int HP_npc_secure_timeout_timer_pre; int HP_npc_secure_timeout_timer_post; + int HP_nullpo_init_pre; + int HP_nullpo_init_post; + int HP_nullpo_final_pre; + int HP_nullpo_final_post; int HP_nullpo_assert_report_pre; int HP_nullpo_assert_report_post; + int HP_packets_init_pre; + int HP_packets_init_post; + int HP_packets_final_pre; + int HP_packets_final_post; + int HP_packets_addLens_pre; + int HP_packets_addLens_post; + int HP_packets_addLen_pre; + int HP_packets_addLen_post; int HP_party_init_pre; int HP_party_init_post; int HP_party_final_pre; @@ -9725,8 +11399,6 @@ struct { 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; @@ -9841,6 +11513,8 @@ struct { int HP_pc_isequip_post; int HP_pc_equippoint_pre; int HP_pc_equippoint_post; + int HP_pc_item_equippoint_pre; + int HP_pc_item_equippoint_post; int HP_pc_setinventorydata_pre; int HP_pc_setinventorydata_post; int HP_pc_checkskill_pre; @@ -9853,6 +11527,10 @@ struct { int HP_pc_checkequip_post; int HP_pc_calc_skilltree_pre; int HP_pc_calc_skilltree_post; + int HP_pc_calc_skilltree_clear_pre; + int HP_pc_calc_skilltree_clear_post; + int HP_pc_calc_skilltree_bonus_pre; + int HP_pc_calc_skilltree_bonus_post; int HP_pc_calc_skilltree_normalize_job_pre; int HP_pc_calc_skilltree_normalize_job_post; int HP_pc_clean_skilltree_pre; @@ -9949,6 +11627,8 @@ struct { int HP_pc_maxjoblv_post; int HP_pc_checkbaselevelup_pre; int HP_pc_checkbaselevelup_post; + int HP_pc_checkbaselevelup_sc_pre; + int HP_pc_checkbaselevelup_sc_post; int HP_pc_checkjoblevelup_pre; int HP_pc_checkjoblevelup_post; int HP_pc_gainexp_pre; @@ -9981,6 +11661,8 @@ struct { int HP_pc_resetstate_post; int HP_pc_resetskill_pre; int HP_pc_resetskill_post; + int HP_pc_resetskill_job_pre; + int HP_pc_resetskill_job_post; int HP_pc_resetfeel_pre; int HP_pc_resetfeel_post; int HP_pc_resethate_pre; @@ -9997,6 +11679,8 @@ struct { int HP_pc_checkitem_post; int HP_pc_useitem_pre; int HP_pc_useitem_post; + int HP_pc_autocast_clear_pre; + int HP_pc_autocast_clear_post; int HP_pc_skillatk_bonus_pre; int HP_pc_skillatk_bonus_post; int HP_pc_skillheal_bonus_pre; @@ -10017,6 +11701,10 @@ struct { int HP_pc_percentheal_post; int HP_pc_jobchange_pre; int HP_pc_jobchange_post; + int HP_pc_hide_pre; + int HP_pc_hide_post; + int HP_pc_unhide_pre; + int HP_pc_unhide_post; int HP_pc_setoption_pre; int HP_pc_setoption_post; int HP_pc_setcart_pre; @@ -10101,18 +11789,30 @@ struct { int HP_pc_delinvincibletimer_post; int HP_pc_addspiritball_pre; int HP_pc_addspiritball_post; + int HP_pc_addspiritball_sub_pre; + int HP_pc_addspiritball_sub_post; int HP_pc_delspiritball_pre; int HP_pc_delspiritball_post; + int HP_pc_delspiritball_sub_pre; + int HP_pc_delspiritball_sub_post; int HP_pc_getmaxspiritball_pre; int HP_pc_getmaxspiritball_post; int HP_pc_addfame_pre; int HP_pc_addfame_post; - int HP_pc_famerank_pre; - int HP_pc_famerank_post; + int HP_pc_fame_rank_pre; + int HP_pc_fame_rank_post; + int HP_pc_famelist_type_pre; + int HP_pc_famelist_type_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_read_exp_db_pre; + int HP_pc_read_exp_db_post; + int HP_pc_read_exp_db_sub_pre; + int HP_pc_read_exp_db_sub_post; + int HP_pc_read_exp_db_sub_class_pre; + int HP_pc_read_exp_db_sub_class_post; int HP_pc_map_day_timer_pre; int HP_pc_map_day_timer_post; int HP_pc_map_night_timer_pre; @@ -10189,6 +11889,8 @@ struct { int HP_pc_follow_timer_post; int HP_pc_read_skill_tree_pre; int HP_pc_read_skill_tree_post; + int HP_pc_read_skill_job_skip_pre; + int HP_pc_read_skill_job_skip_post; int HP_pc_clear_skill_tree_pre; int HP_pc_clear_skill_tree_post; int HP_pc_isUseitem_pre; @@ -10221,6 +11923,14 @@ struct { int HP_pc_db_checkid_post; int HP_pc_validate_levels_pre; int HP_pc_validate_levels_post; + int HP_pc_update_job_and_level_pre; + int HP_pc_update_job_and_level_post; + int HP_pc_clear_exp_groups_pre; + int HP_pc_clear_exp_groups_post; + int HP_pc_init_exp_groups_pre; + int HP_pc_init_exp_groups_post; + int HP_pc_job_is_dummy_pre; + int HP_pc_job_is_dummy_post; int HP_pc_autotrade_load_pre; int HP_pc_autotrade_load_post; int HP_pc_autotrade_update_pre; @@ -10239,6 +11949,26 @@ struct { int HP_pc_update_idle_time_post; int HP_pc_have_magnifier_pre; int HP_pc_have_magnifier_post; + int HP_pc_have_item_chain_pre; + int HP_pc_have_item_chain_post; + int HP_pc_process_chat_message_pre; + int HP_pc_process_chat_message_post; + int HP_pc_wis_message_to_gm_pre; + int HP_pc_wis_message_to_gm_post; + int HP_pc_wis_message_to_gm_sub_pre; + int HP_pc_wis_message_to_gm_sub_post; + int HP_pc_check_supernovice_call_pre; + int HP_pc_check_supernovice_call_post; + int HP_pc_check_basicskill_pre; + int HP_pc_check_basicskill_post; + int HP_pc_isDeathPenaltyJob_pre; + int HP_pc_isDeathPenaltyJob_post; + int HP_pc_has_second_costume_pre; + int HP_pc_has_second_costume_post; + int HP_pc_expandInventory_pre; + int HP_pc_expandInventory_post; + int HP_pc_auto_exp_insurance_pre; + int HP_pc_auto_exp_insurance_post; int HP_libpcre_compile_pre; int HP_libpcre_compile_post; int HP_libpcre_study_pre; @@ -10261,6 +11991,8 @@ struct { int HP_pet_final_post; int HP_pet_hungry_val_pre; int HP_pet_hungry_val_post; + int HP_pet_set_hunger_pre; + int HP_pet_set_hunger_post; int HP_pet_set_intimate_pre; int HP_pet_set_intimate_post; int HP_pet_create_egg_pre; @@ -10331,6 +12063,16 @@ struct { int HP_pet_skill_support_timer_post; int HP_pet_read_db_pre; int HP_pet_read_db_post; + int HP_pet_read_db_libconfig_pre; + int HP_pet_read_db_libconfig_post; + int HP_pet_read_db_sub_pre; + int HP_pet_read_db_sub_post; + int HP_pet_read_db_sub_intimacy_pre; + int HP_pet_read_db_sub_intimacy_post; + int HP_pet_read_db_clear_pre; + int HP_pet_read_db_clear_post; + int HP_pet_read_db_sub_evolution_pre; + int HP_pet_read_db_sub_evolution_post; int HP_quest_init_pre; int HP_quest_init_post; int HP_quest_final_pre; @@ -10361,6 +12103,114 @@ struct { int HP_quest_read_db_post; int HP_quest_read_db_sub_pre; int HP_quest_read_db_sub_post; + int HP_quest_questinfo_validate_icon_pre; + int HP_quest_questinfo_validate_icon_post; + int HP_quest_questinfo_refresh_pre; + int HP_quest_questinfo_refresh_post; + int HP_quest_questinfo_validate_pre; + int HP_quest_questinfo_validate_post; + int HP_quest_questinfo_validate_job_pre; + int HP_quest_questinfo_validate_job_post; + int HP_quest_questinfo_validate_sex_pre; + int HP_quest_questinfo_validate_sex_post; + int HP_quest_questinfo_validate_baselevel_pre; + int HP_quest_questinfo_validate_baselevel_post; + int HP_quest_questinfo_validate_joblevel_pre; + int HP_quest_questinfo_validate_joblevel_post; + int HP_quest_questinfo_validate_items_pre; + int HP_quest_questinfo_validate_items_post; + int HP_quest_questinfo_validate_homunculus_level_pre; + int HP_quest_questinfo_validate_homunculus_level_post; + int HP_quest_questinfo_validate_homunculus_type_pre; + int HP_quest_questinfo_validate_homunculus_type_post; + int HP_quest_questinfo_validate_quests_pre; + int HP_quest_questinfo_validate_quests_post; + int HP_quest_questinfo_validate_mercenary_class_pre; + int HP_quest_questinfo_validate_mercenary_class_post; + int HP_refine_init_pre; + int HP_refine_init_post; + int HP_refine_final_pre; + int HP_refine_final_post; + int HP_refine_get_refine_chance_pre; + int HP_refine_get_refine_chance_post; + int HP_refine_get_bonus_pre; + int HP_refine_get_bonus_post; + int HP_refine_get_randombonus_max_pre; + int HP_refine_get_randombonus_max_post; + int HP_refine_refinery_add_item_pre; + int HP_refine_refinery_add_item_post; + int HP_refine_refinery_refine_request_pre; + int HP_refine_refinery_refine_request_post; + int HP_PRIV__refine_readdb_refine_libconfig_sub_pre; + int HP_PRIV__refine_readdb_refine_libconfig_sub_post; + int HP_PRIV__refine_readdb_refine_libconfig_pre; + int HP_PRIV__refine_readdb_refine_libconfig_post; + int HP_PRIV__refine_announce_behavior_string2enum_pre; + int HP_PRIV__refine_announce_behavior_string2enum_post; + int HP_PRIV__refine_failure_behavior_string2enum_pre; + int HP_PRIV__refine_failure_behavior_string2enum_post; + int HP_PRIV__refine_readdb_refinery_ui_settings_items_pre; + int HP_PRIV__refine_readdb_refinery_ui_settings_items_post; + int HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre; + int HP_PRIV__refine_readdb_refinery_ui_settings_sub_post; + int HP_PRIV__refine_readdb_refinery_ui_settings_pre; + int HP_PRIV__refine_readdb_refinery_ui_settings_post; + int HP_PRIV__refine_is_refinable_pre; + int HP_PRIV__refine_is_refinable_post; + int HP_rnd_init_pre; + int HP_rnd_init_post; + int HP_rnd_final_pre; + int HP_rnd_final_post; + int HP_rnd_seed_pre; + int HP_rnd_seed_post; + int HP_rnd_random_pre; + int HP_rnd_random_post; + int HP_rnd_roll_pre; + int HP_rnd_roll_post; + int HP_rnd_value_pre; + int HP_rnd_value_post; + int HP_rnd_uniform_pre; + int HP_rnd_uniform_post; + int HP_rnd_uniform53_pre; + int HP_rnd_uniform53_post; + int HP_rodex_init_pre; + int HP_rodex_init_post; + int HP_rodex_final_pre; + int HP_rodex_final_post; + int HP_rodex_isenabled_pre; + int HP_rodex_isenabled_post; + int HP_rodex_open_pre; + int HP_rodex_open_post; + int HP_rodex_next_page_pre; + int HP_rodex_next_page_post; + int HP_rodex_refresh_pre; + int HP_rodex_refresh_post; + int HP_rodex_add_item_pre; + int HP_rodex_add_item_post; + int HP_rodex_remove_item_pre; + int HP_rodex_remove_item_post; + int HP_rodex_check_player_pre; + int HP_rodex_check_player_post; + int HP_rodex_send_mail_pre; + int HP_rodex_send_mail_post; + int HP_rodex_send_mail_result_pre; + int HP_rodex_send_mail_result_post; + int HP_rodex_get_mail_pre; + int HP_rodex_get_mail_post; + int HP_rodex_read_mail_pre; + int HP_rodex_read_mail_post; + int HP_rodex_get_zeny_pre; + int HP_rodex_get_zeny_post; + int HP_rodex_get_items_pre; + int HP_rodex_get_items_post; + int HP_rodex_delete_mail_pre; + int HP_rodex_delete_mail_post; + int HP_rodex_clean_pre; + int HP_rodex_clean_post; + int HP_rodex_getZenyAck_pre; + int HP_rodex_getZenyAck_post; + int HP_rodex_getItemsAck_pre; + int HP_rodex_getItemsAck_post; int HP_script_init_pre; int HP_script_init_post; int HP_script_final_pre; @@ -10403,6 +12253,8 @@ struct { int HP_script_get_val_post; int HP_script_get_val_ref_str_pre; int HP_script_get_val_ref_str_post; + int HP_script_get_val_pc_ref_str_pre; + int HP_script_get_val_pc_ref_str_post; int HP_script_get_val_scope_str_pre; int HP_script_get_val_scope_str_post; int HP_script_get_val_npc_str_pre; @@ -10411,6 +12263,8 @@ struct { int HP_script_get_val_instance_str_post; int HP_script_get_val_ref_num_pre; int HP_script_get_val_ref_num_post; + int HP_script_get_val_pc_ref_num_pre; + int HP_script_get_val_pc_ref_num_post; int HP_script_get_val_scope_num_pre; int HP_script_get_val_scope_num_post; int HP_script_get_val_npc_num_pre; @@ -10469,6 +12323,8 @@ struct { int HP_script_config_read_post; int HP_script_add_str_pre; int HP_script_add_str_post; + int HP_script_add_variable_pre; + int HP_script_add_variable_post; int HP_script_get_str_pre; int HP_script_get_str_post; int HP_script_search_str_pre; @@ -10537,6 +12393,16 @@ struct { int HP_script_parse_variable_post; int HP_script_parse_simpleexpr_pre; int HP_script_parse_simpleexpr_post; + int HP_script_parse_simpleexpr_paren_pre; + int HP_script_parse_simpleexpr_paren_post; + int HP_script_parse_simpleexpr_number_pre; + int HP_script_parse_simpleexpr_number_post; + int HP_script_parse_simpleexpr_string_pre; + int HP_script_parse_simpleexpr_string_post; + int HP_script_parse_simpleexpr_name_pre; + int HP_script_parse_simpleexpr_name_post; + int HP_script_add_translatable_string_pre; + int HP_script_add_translatable_string_post; int HP_script_parse_expr_pre; int HP_script_parse_expr_post; int HP_script_parse_line_pre; @@ -10555,6 +12421,8 @@ struct { int HP_script_set_reg_post; int HP_script_set_reg_ref_str_pre; int HP_script_set_reg_ref_str_post; + int HP_script_set_reg_pc_ref_str_pre; + int HP_script_set_reg_pc_ref_str_post; int HP_script_set_reg_scope_str_pre; int HP_script_set_reg_scope_str_post; int HP_script_set_reg_npc_str_pre; @@ -10563,6 +12431,8 @@ struct { int HP_script_set_reg_instance_str_post; int HP_script_set_reg_ref_num_pre; int HP_script_set_reg_ref_num_post; + int HP_script_set_reg_pc_ref_num_pre; + int HP_script_set_reg_pc_ref_num_post; int HP_script_set_reg_scope_num_pre; int HP_script_set_reg_scope_num_post; int HP_script_set_reg_npc_num_pre; @@ -10593,6 +12463,12 @@ struct { int HP_script_add_autobonus_post; int HP_script_menu_countoptions_pre; int HP_script_menu_countoptions_post; + int HP_script_buildin_recovery_sub_pre; + int HP_script_buildin_recovery_sub_post; + int HP_script_buildin_recovery_pc_sub_pre; + int HP_script_buildin_recovery_pc_sub_post; + int HP_script_buildin_recovery_bl_sub_pre; + int HP_script_buildin_recovery_bl_sub_post; int HP_script_buildin_areawarp_sub_pre; int HP_script_buildin_areawarp_sub_post; int HP_script_buildin_areapercentheal_sub_pre; @@ -10641,6 +12517,8 @@ struct { int HP_script_cleanfloor_sub_post; int HP_script_run_func_pre; int HP_script_run_func_post; + int HP_script_sprintf_helper_pre; + int HP_script_sprintf_helper_post; int HP_script_getfuncname_pre; int HP_script_getfuncname_post; int HP_script_calc_hash_ci_pre; @@ -10679,6 +12557,10 @@ struct { int HP_script_string_dup_post; int HP_script_load_translations_pre; int HP_script_load_translations_post; + int HP_script_load_translation_addstring_pre; + int HP_script_load_translation_addstring_post; + int HP_script_load_translation_file_pre; + int HP_script_load_translation_file_post; int HP_script_load_translation_pre; int HP_script_load_translation_post; int HP_script_translation_db_destroyer_pre; @@ -10689,8 +12571,8 @@ struct { int HP_script_parse_cleanup_timer_post; int HP_script_add_language_pre; int HP_script_add_language_post; - int HP_script_get_translation_file_name_pre; - int HP_script_get_translation_file_name_post; + int HP_script_get_translation_dir_name_pre; + int HP_script_get_translation_dir_name_post; int HP_script_parser_clean_leftovers_pre; int HP_script_parser_clean_leftovers_post; int HP_script_run_use_script_pre; @@ -10699,6 +12581,14 @@ struct { int HP_script_run_item_equip_script_post; int HP_script_run_item_unequip_script_pre; int HP_script_run_item_unequip_script_post; + int HP_script_run_item_rental_end_script_pre; + int HP_script_run_item_rental_end_script_post; + int HP_script_run_item_rental_start_script_pre; + int HP_script_run_item_rental_start_script_post; + int HP_script_run_item_lapineddukddak_script_pre; + int HP_script_run_item_lapineddukddak_script_post; + int HP_script_sellitemcurrency_add_pre; + int HP_script_sellitemcurrency_add_post; int HP_searchstore_open_pre; int HP_searchstore_open_post; int HP_searchstore_query_pre; @@ -10761,10 +12651,18 @@ struct { int HP_skill_get_mhp_post; int HP_skill_get_sp_pre; int HP_skill_get_sp_post; + int HP_skill_get_hp_rate_pre; + int HP_skill_get_hp_rate_post; + int HP_skill_get_sp_rate_pre; + int HP_skill_get_sp_rate_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_itemid_pre; + int HP_skill_get_itemid_post; + int HP_skill_get_itemqty_pre; + int HP_skill_get_itemqty_post; int HP_skill_get_zeny_pre; int HP_skill_get_zeny_post; int HP_skill_get_num_pre; @@ -10821,8 +12719,6 @@ struct { 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; @@ -10923,10 +12819,16 @@ struct { int HP_skill_enchant_elemental_end_post; int HP_skill_not_ok_pre; int HP_skill_not_ok_post; + int HP_skill_not_ok_unknown_pre; + int HP_skill_not_ok_unknown_post; int HP_skill_not_ok_hom_pre; int HP_skill_not_ok_hom_post; + int HP_skill_not_ok_hom_unknown_pre; + int HP_skill_not_ok_hom_unknown_post; int HP_skill_not_ok_mercenary_pre; int HP_skill_not_ok_mercenary_post; + int HP_skill_validate_autocast_data_pre; + int HP_skill_validate_autocast_data_post; int HP_skill_chastle_mob_changetarget_pre; int HP_skill_chastle_mob_changetarget_post; int HP_skill_can_produce_mix_pre; @@ -10935,6 +12837,8 @@ struct { int HP_skill_produce_mix_post; int HP_skill_arrow_create_pre; int HP_skill_arrow_create_post; + int HP_skill_castend_type_pre; + int HP_skill_castend_type_post; int HP_skill_castend_nodamage_id_pre; int HP_skill_castend_nodamage_id_post; int HP_skill_castend_damage_id_pre; @@ -10973,6 +12877,8 @@ struct { int HP_skill_cell_overlap_post; int HP_skill_timerskill_pre; int HP_skill_timerskill_post; + int HP_skill_trap_do_splash_pre; + int HP_skill_trap_do_splash_post; int HP_skill_trap_splash_pre; int HP_skill_trap_splash_post; int HP_skill_check_condition_mercenary_pre; @@ -11019,6 +12925,8 @@ struct { int HP_skill_unitsetmapcell_post; int HP_skill_unit_onplace_timer_pre; int HP_skill_unit_onplace_timer_post; + int HP_skill_unit_onplace_timer_unknown_pre; + int HP_skill_unit_onplace_timer_unknown_post; int HP_skill_unit_effect_pre; int HP_skill_unit_effect_post; int HP_skill_unit_timer_sub_onplace_pre; @@ -11039,16 +12947,50 @@ struct { 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_init_unit_layout_unknown_pre; + int HP_skill_init_unit_layout_unknown_post; + int HP_skill_validate_hittype_pre; + int HP_skill_validate_hittype_post; + int HP_skill_validate_skilltype_pre; + int HP_skill_validate_skilltype_post; + int HP_skill_validate_attacktype_pre; + int HP_skill_validate_attacktype_post; + int HP_skill_validate_element_pre; + int HP_skill_validate_element_post; + int HP_skill_validate_skillinfo_pre; + int HP_skill_validate_skillinfo_post; + int HP_skill_validate_damagetype_pre; + int HP_skill_validate_damagetype_post; + int HP_skill_validate_castnodex_pre; + int HP_skill_validate_castnodex_post; + int HP_skill_validate_weapontype_pre; + int HP_skill_validate_weapontype_post; + int HP_skill_validate_ammotype_pre; + int HP_skill_validate_ammotype_post; + int HP_skill_validate_state_pre; + int HP_skill_validate_state_post; + int HP_skill_validate_item_requirements_pre; + int HP_skill_validate_item_requirements_post; + int HP_skill_validate_unit_target_pre; + int HP_skill_validate_unit_target_post; + int HP_skill_validate_unit_flag_pre; + int HP_skill_validate_unit_flag_post; + int HP_skill_validate_additional_fields_pre; + int HP_skill_validate_additional_fields_post; + int HP_skill_validate_skilldb_pre; + int HP_skill_validate_skilldb_post; + int HP_skill_validate_weapontype_sub_pre; + int HP_skill_validate_weapontype_sub_post; + int HP_skill_validate_ammotype_sub_pre; + int HP_skill_validate_ammotype_sub_post; + int HP_skill_validate_unit_flag_sub_pre; + int HP_skill_validate_unit_flag_sub_post; + int HP_skill_read_skilldb_pre; + int HP_skill_read_skilldb_post; + int HP_skill_config_set_level_pre; + int HP_skill_config_set_level_post; + int HP_skill_level_set_value_pre; + int HP_skill_level_set_value_post; int HP_skill_parse_row_producedb_pre; int HP_skill_parse_row_producedb_post; int HP_skill_parse_row_createarrowdb_pre; @@ -11059,8 +13001,6 @@ struct { 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; @@ -11161,6 +13101,14 @@ struct { int HP_skill_get_requirement_item_unknown_post; int HP_skill_get_requirement_unknown_pre; int HP_skill_get_requirement_unknown_post; + int HP_skill_splash_target_pre; + int HP_skill_splash_target_post; + int HP_skill_check_npc_chaospanic_pre; + int HP_skill_check_npc_chaospanic_post; + int HP_skill_count_wos_pre; + int HP_skill_count_wos_post; + int HP_skill_get_linked_song_dance_id_pre; + int HP_skill_get_linked_song_dance_id_post; int HP_sockt_init_pre; int HP_sockt_init_post; int HP_sockt_final_pre; @@ -11179,10 +13127,14 @@ struct { int HP_sockt_realloc_writefifo_post; int HP_sockt_wfifoset_pre; int HP_sockt_wfifoset_post; + int HP_sockt_wfifohead_pre; + int HP_sockt_wfifohead_post; int HP_sockt_rfifoskip_pre; int HP_sockt_rfifoskip_post; int HP_sockt_close_pre; int HP_sockt_close_post; + int HP_sockt_validateWfifo_pre; + int HP_sockt_validateWfifo_post; int HP_sockt_session_is_valid_pre; int HP_sockt_session_is_valid_post; int HP_sockt_session_is_active_pre; @@ -11191,6 +13143,8 @@ struct { int HP_sockt_flush_post; int HP_sockt_flush_fifos_pre; int HP_sockt_flush_fifos_post; + int HP_sockt_connect_client_pre; + int HP_sockt_connect_client_post; int HP_sockt_set_nonblocking_pre; int HP_sockt_set_nonblocking_post; int HP_sockt_set_defaultparse_pre; @@ -11285,18 +13239,18 @@ struct { 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_relevant_bl_types_pre; + int HP_status_get_sc_relevant_bl_types_post; int HP_status_get_sc_type_pre; int HP_status_get_sc_type_post; + int HP_status_get_sc_icon_pre; + int HP_status_get_sc_icon_post; int HP_status_damage_pre; int HP_status_damage_post; int HP_status_charge_pre; @@ -11357,8 +13311,26 @@ struct { int HP_status_get_sc_def_post; int HP_status_change_start_pre; int HP_status_change_start_post; + int HP_status_change_start_sub_pre; + int HP_status_change_start_sub_post; int HP_status_change_end__pre; int HP_status_change_end__post; + int HP_status_is_immune_to_status_pre; + int HP_status_is_immune_to_status_post; + int HP_status_is_boss_resist_sc_pre; + int HP_status_is_boss_resist_sc_post; + int HP_status_end_sc_before_start_pre; + int HP_status_end_sc_before_start_post; + int HP_status_change_start_stop_action_pre; + int HP_status_change_start_stop_action_post; + int HP_status_change_start_set_option_pre; + int HP_status_change_start_set_option_post; + int HP_status_get_val_flag_pre; + int HP_status_get_val_flag_post; + int HP_status_change_start_display_pre; + int HP_status_change_start_display_post; + int HP_status_change_start_unknown_sc_pre; + int HP_status_change_start_unknown_sc_post; int HP_status_kaahi_heal_timer_pre; int HP_status_kaahi_heal_timer_post; int HP_status_change_timer_pre; @@ -11379,6 +13351,8 @@ struct { int HP_status_calc_pc__post; int HP_status_calc_pc_additional_pre; int HP_status_calc_pc_additional_post; + int HP_status_calc_pc_recover_hp_pre; + int HP_status_calc_pc_recover_hp_post; int HP_status_calc_homunculus__pre; int HP_status_calc_homunculus__post; int HP_status_calc_mercenary__pre; @@ -11433,6 +13407,10 @@ struct { int HP_status_get_base_maxhp_post; int HP_status_get_base_maxsp_pre; int HP_status_get_base_maxsp_post; + int HP_status_get_restart_hp_pre; + int HP_status_get_restart_hp_post; + int HP_status_get_restart_sp_pre; + int HP_status_get_restart_sp_post; int HP_status_calc_npc__pre; int HP_status_calc_npc__post; int HP_status_calc_str_pre; @@ -11495,16 +13473,26 @@ struct { int HP_status_readdb_job2_post; int HP_status_readdb_sizefix_pre; int HP_status_readdb_sizefix_post; - int HP_status_readdb_refine_libconfig_pre; - int HP_status_readdb_refine_libconfig_post; - int HP_status_readdb_refine_libconfig_sub_pre; - int HP_status_readdb_refine_libconfig_sub_post; - int HP_status_readdb_scconfig_pre; - int HP_status_readdb_scconfig_post; + int HP_status_read_scdb_libconfig_pre; + int HP_status_read_scdb_libconfig_post; + int HP_status_read_scdb_libconfig_sub_pre; + int HP_status_read_scdb_libconfig_sub_post; + int HP_status_read_scdb_libconfig_sub_flag_pre; + int HP_status_read_scdb_libconfig_sub_flag_post; + int HP_status_read_scdb_libconfig_sub_flag_additional_pre; + int HP_status_read_scdb_libconfig_sub_flag_additional_post; int HP_status_read_job_db_pre; int HP_status_read_job_db_post; int HP_status_read_job_db_sub_pre; int HP_status_read_job_db_sub_post; + int HP_status_set_sc_pre; + int HP_status_set_sc_post; + int HP_status_copy_pre; + int HP_status_copy_post; + int HP_status_base_matk_min_pre; + int HP_status_base_matk_min_post; + int HP_status_base_matk_max_pre; + int HP_status_base_matk_max_post; int HP_storage_reconnect_pre; int HP_storage_reconnect_post; int HP_storage_delitem_pre; @@ -11581,6 +13569,24 @@ struct { int HP_strlib_strline__post; int HP_strlib_bin2hex__pre; int HP_strlib_bin2hex__post; + int HP_stylist_init_pre; + int HP_stylist_init_post; + int HP_stylist_final_pre; + int HP_stylist_final_post; + int HP_stylist_vector_init_pre; + int HP_stylist_vector_init_post; + int HP_stylist_vector_clear_pre; + int HP_stylist_vector_clear_post; + int HP_stylist_read_db_libconfig_pre; + int HP_stylist_read_db_libconfig_post; + int HP_stylist_read_db_libconfig_sub_pre; + int HP_stylist_read_db_libconfig_sub_post; + int HP_stylist_request_style_change_pre; + int HP_stylist_request_style_change_post; + int HP_stylist_validate_requirements_pre; + int HP_stylist_validate_requirements_post; + int HP_stylist_send_rodexitem_pre; + int HP_stylist_send_rodexitem_post; int HP_sv_parse_next_pre; int HP_sv_parse_next_post; int HP_sv_parse_pre; @@ -11631,6 +13637,28 @@ struct { int HP_sysinfo_init_post; int HP_sysinfo_final_pre; int HP_sysinfo_final_post; + int HP_thread_init_pre; + int HP_thread_init_post; + int HP_thread_final_pre; + int HP_thread_final_post; + int HP_thread_create_pre; + int HP_thread_create_post; + int HP_thread_create_opt_pre; + int HP_thread_create_opt_post; + int HP_thread_destroy_pre; + int HP_thread_destroy_post; + int HP_thread_self_pre; + int HP_thread_self_post; + int HP_thread_get_tid_pre; + int HP_thread_get_tid_post; + int HP_thread_wait_pre; + int HP_thread_wait_post; + int HP_thread_prio_set_pre; + int HP_thread_prio_set_post; + int HP_thread_prio_get_pre; + int HP_thread_prio_get_post; + int HP_thread_yield_pre; + int HP_thread_yield_post; int HP_timer_gettick_pre; int HP_timer_gettick_post; int HP_timer_gettick_nocache_pre; @@ -11681,20 +13709,24 @@ struct { int HP_unit_final_post; int HP_unit_bl2ud_pre; int HP_unit_bl2ud_post; + int HP_unit_cbl2ud_pre; + int HP_unit_cbl2ud_post; int HP_unit_bl2ud2_pre; int HP_unit_bl2ud2_post; + int HP_unit_init_ud_pre; + int HP_unit_init_ud_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_walk_toxy_timer_pre; + int HP_unit_walk_toxy_timer_post; + int HP_unit_walk_toxy_sub_pre; + int HP_unit_walk_toxy_sub_post; + int HP_unit_delay_walk_toxy_timer_pre; + int HP_unit_delay_walk_toxy_timer_post; + int HP_unit_walk_toxy_pre; + int HP_unit_walk_toxy_post; + int HP_unit_walktobl_timer_pre; + int HP_unit_walktobl_timer_post; int HP_unit_walktobl_pre; int HP_unit_walktobl_post; int HP_unit_run_pre; @@ -11705,20 +13737,22 @@ struct { 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_set_dir_pre; + int HP_unit_set_dir_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_warpto_master_pre; + int HP_unit_warpto_master_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_step_timer_pre; - int HP_unit_step_timer_post; + int HP_unit_steptimer_pre; + int HP_unit_steptimer_post; int HP_unit_stop_stepaction_pre; int HP_unit_stop_stepaction_post; int HP_unit_is_walking_pre; @@ -11791,6 +13825,7 @@ struct { struct { struct HCache_interface HCache; + struct achievement_interface achievement; struct atcommand_interface atcommand; struct battle_interface battle; struct battleground_interface bg; @@ -11798,13 +13833,16 @@ struct { struct channel_interface channel; struct chat_interface chat; struct chrif_interface chrif; + struct clan_interface clan; struct clif_interface clif; struct cmdline_interface cmdline; struct console_interface console; struct core_interface core; struct db_interface DB; + struct des_interface des; struct duel_interface duel; struct elemental_interface elemental; + struct grfio_interface grfio; struct guild_interface guild; struct guild_storage_interface gstorage; struct homunculus_interface homun; @@ -11815,16 +13853,18 @@ struct { struct libconfig_interface libconfig; struct log_interface logs; struct mail_interface mail; - struct malloc_interface iMalloc; struct map_interface map; struct mapindex_interface mapindex; struct mapit_interface mapit; struct mapreg_interface mapreg; + struct md5_interface md5; struct mercenary_interface mercenary; struct mob_interface mob; + struct mutex_interface mutex; struct npc_chat_interface npc_chat; struct npc_interface npc; struct nullpo_interface nullpo; + struct packets_interface packets; struct party_interface party; struct path_interface path; struct pc_groups_interface pcg; @@ -11832,6 +13872,10 @@ struct { struct pcre_interface libpcre; struct pet_interface pet; struct quest_interface quest; + struct refine_interface refine; + struct refine_interface_private PRIV__refine; + struct rnd_interface rnd; + struct rodex_interface rodex; struct script_interface script; struct searchstore_interface searchstore; struct showmsg_interface showmsg; @@ -11842,8 +13886,10 @@ struct { struct storage_interface storage; struct stringbuf_interface StrBuf; struct strlib_interface strlib; + struct stylist_interface stylist; struct sv_interface sv; struct sysinfo_interface sysinfo; + struct thread_interface thread; struct timer_interface timer; struct trade_interface trade; struct unit_interface unit; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index 714da27bf..c9b673a1f 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -1,7 +1,8 @@ /** * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,12 +23,69 @@ * as it will get overwritten. */ +/* GENERATED FILE DO NOT EDIT */ + struct HookingPointData HookingPoints[] = { -/* HCache */ +/* HCache_interface */ { HP_POP(HCache->init, HP_HCache_init) }, { HP_POP(HCache->check, HP_HCache_check) }, { HP_POP(HCache->open, HP_HCache_open) }, -/* atcommand */ +/* achievement_interface */ + { HP_POP(achievement->init, HP_achievement_init) }, + { HP_POP(achievement->final, HP_achievement_final) }, + { HP_POP(achievement->db_finalize, HP_achievement_db_finalize) }, + { HP_POP(achievement->readdb, HP_achievement_readdb) }, + { HP_POP(achievement->readdb_objectives_sub, HP_achievement_readdb_objectives_sub) }, + { HP_POP(achievement->readdb_objectives, HP_achievement_readdb_objectives) }, + { HP_POP(achievement->readdb_validate_criteria_mobid, HP_achievement_readdb_validate_criteria_mobid) }, + { HP_POP(achievement->readdb_validate_criteria_jobid, HP_achievement_readdb_validate_criteria_jobid) }, + { HP_POP(achievement->readdb_validate_criteria_itemid, HP_achievement_readdb_validate_criteria_itemid) }, + { HP_POP(achievement->readdb_validate_criteria_statustype, HP_achievement_readdb_validate_criteria_statustype) }, + { HP_POP(achievement->readdb_validate_criteria_itemtype, HP_achievement_readdb_validate_criteria_itemtype) }, + { HP_POP(achievement->readdb_validate_criteria_weaponlv, HP_achievement_readdb_validate_criteria_weaponlv) }, + { HP_POP(achievement->readdb_validate_criteria_achievement, HP_achievement_readdb_validate_criteria_achievement) }, + { HP_POP(achievement->readdb_rewards, HP_achievement_readdb_rewards) }, + { HP_POP(achievement->readdb_validate_reward_items, HP_achievement_readdb_validate_reward_items) }, + { HP_POP(achievement->readdb_validate_reward_item_sub, HP_achievement_readdb_validate_reward_item_sub) }, + { HP_POP(achievement->readdb_validate_reward_bonus, HP_achievement_readdb_validate_reward_bonus) }, + { HP_POP(achievement->readdb_validate_reward_titleid, HP_achievement_readdb_validate_reward_titleid) }, + { HP_POP(achievement->readdb_additional_fields, HP_achievement_readdb_additional_fields) }, + { HP_POP(achievement->readdb_ranks, HP_achievement_readdb_ranks) }, + { HP_POP(achievement->get, HP_achievement_get) }, + { HP_POP(achievement->ensure, HP_achievement_ensure) }, + { HP_POP(achievement->calculate_totals, HP_achievement_calculate_totals) }, + { HP_POP(achievement->check_complete, HP_achievement_check_complete) }, + { HP_POP(achievement->progress_add, HP_achievement_progress_add) }, + { HP_POP(achievement->progress_set, HP_achievement_progress_set) }, + { HP_POP(achievement->check_criteria, HP_achievement_check_criteria) }, + { HP_POP(achievement->validate, HP_achievement_validate) }, + { HP_POP(achievement->validate_type, HP_achievement_validate_type) }, + { HP_POP(achievement->validate_mob_kill, HP_achievement_validate_mob_kill) }, + { HP_POP(achievement->validate_mob_damage, HP_achievement_validate_mob_damage) }, + { HP_POP(achievement->validate_pc_kill, HP_achievement_validate_pc_kill) }, + { HP_POP(achievement->validate_pc_damage, HP_achievement_validate_pc_damage) }, + { HP_POP(achievement->validate_jobchange, HP_achievement_validate_jobchange) }, + { HP_POP(achievement->validate_stats, HP_achievement_validate_stats) }, + { HP_POP(achievement->validate_chatroom_create, HP_achievement_validate_chatroom_create) }, + { HP_POP(achievement->validate_chatroom_members, HP_achievement_validate_chatroom_members) }, + { HP_POP(achievement->validate_friend_add, HP_achievement_validate_friend_add) }, + { HP_POP(achievement->validate_party_create, HP_achievement_validate_party_create) }, + { HP_POP(achievement->validate_marry, HP_achievement_validate_marry) }, + { HP_POP(achievement->validate_adopt, HP_achievement_validate_adopt) }, + { HP_POP(achievement->validate_zeny, HP_achievement_validate_zeny) }, + { HP_POP(achievement->validate_refine, HP_achievement_validate_refine) }, + { HP_POP(achievement->validate_item_get, HP_achievement_validate_item_get) }, + { HP_POP(achievement->validate_item_sell, HP_achievement_validate_item_sell) }, + { HP_POP(achievement->validate_achieve, HP_achievement_validate_achieve) }, + { HP_POP(achievement->validate_taming, HP_achievement_validate_taming) }, + { HP_POP(achievement->validate_achievement_rank, HP_achievement_validate_achievement_rank) }, + { HP_POP(achievement->type_requires_criteria, HP_achievement_type_requires_criteria) }, + { HP_POP(achievement->init_titles, HP_achievement_init_titles) }, + { HP_POP(achievement->check_title, HP_achievement_check_title) }, + { HP_POP(achievement->get_rewards, HP_achievement_get_rewards) }, + { HP_POP(achievement->get_rewards_buffs, HP_achievement_get_rewards_buffs) }, + { HP_POP(achievement->get_rewards_items, HP_achievement_get_rewards_items) }, +/* atcommand_interface */ { HP_POP(atcommand->init, HP_atcommand_init) }, { HP_POP(atcommand->final, HP_atcommand_final) }, { HP_POP(atcommand->exec, HP_atcommand_exec) }, @@ -63,18 +121,21 @@ struct HookingPointData HookingPoints[] = { { HP_POP(atcommand->expand_message_table, HP_atcommand_expand_message_table) }, { HP_POP(atcommand->msgfd, HP_atcommand_msgfd) }, { HP_POP(atcommand->msgsd, HP_atcommand_msgsd) }, -/* battle */ +/* battle_interface */ { HP_POP(battle->init, HP_battle_init) }, { HP_POP(battle->final, HP_battle_final) }, { HP_POP(battle->calc_attack, HP_battle_calc_attack) }, { HP_POP(battle->calc_damage, HP_battle_calc_damage) }, + { HP_POP(battle->calc_pc_damage, HP_battle_calc_pc_damage) }, { HP_POP(battle->calc_gvg_damage, HP_battle_calc_gvg_damage) }, { HP_POP(battle->calc_bg_damage, HP_battle_calc_bg_damage) }, { HP_POP(battle->weapon_attack, HP_battle_weapon_attack) }, + { HP_POP(battle->check_arrows, HP_battle_check_arrows) }, { HP_POP(battle->calc_weapon_attack, HP_battle_calc_weapon_attack) }, { HP_POP(battle->delay_damage, HP_battle_delay_damage) }, { HP_POP(battle->drain, HP_battle_drain) }, { HP_POP(battle->reflect_damage, HP_battle_reflect_damage) }, + { HP_POP(battle->reflect_trap, HP_battle_reflect_trap) }, { HP_POP(battle->attr_ratio, HP_battle_attr_ratio) }, { HP_POP(battle->attr_fix, HP_battle_attr_fix) }, { HP_POP(battle->calc_cardfix, HP_battle_calc_cardfix) }, @@ -110,6 +171,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(battle->calc_drain, HP_battle_calc_drain) }, { HP_POP(battle->config_read, HP_battle_config_read) }, { HP_POP(battle->config_set_defaults, HP_battle_config_set_defaults) }, + { HP_POP(battle->config_set_value_sub, HP_battle_config_set_value_sub) }, { HP_POP(battle->config_set_value, HP_battle_config_set_value) }, { HP_POP(battle->config_get_value, HP_battle_config_get_value) }, { HP_POP(battle->config_adjust, HP_battle_config_adjust) }, @@ -119,7 +181,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(battle->calc_skillratio_magic_unknown, HP_battle_calc_skillratio_magic_unknown) }, { HP_POP(battle->calc_skillratio_weapon_unknown, HP_battle_calc_skillratio_weapon_unknown) }, { HP_POP(battle->calc_misc_attack_unknown, HP_battle_calc_misc_attack_unknown) }, -/* bg */ +/* battleground_interface */ { HP_POP(bg->init, HP_bg_init) }, { HP_POP(bg->final, HP_bg_final) }, { HP_POP(bg->name2arena, HP_bg_name2arena) }, @@ -151,7 +213,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(bg->team_db_final, HP_bg_team_db_final) }, { HP_POP(bg->str2teamtype, HP_bg_str2teamtype) }, { HP_POP(bg->config_read, HP_bg_config_read) }, -/* buyingstore */ +/* buyingstore_interface */ { HP_POP(buyingstore->setup, HP_buyingstore_setup) }, { HP_POP(buyingstore->create, HP_buyingstore_create) }, { HP_POP(buyingstore->close, HP_buyingstore_close) }, @@ -160,7 +222,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(buyingstore->search, HP_buyingstore_search) }, { HP_POP(buyingstore->searchall, HP_buyingstore_searchall) }, { HP_POP(buyingstore->getuid, HP_buyingstore_getuid) }, -/* channel */ +/* channel_interface */ { HP_POP(channel->init, HP_channel_init) }, { HP_POP(channel->final, HP_channel_final) }, { HP_POP(channel->search, HP_channel_search) }, @@ -182,7 +244,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(channel->quit_guild, HP_channel_quit_guild) }, { HP_POP(channel->irc_join, HP_channel_irc_join) }, { HP_POP(channel->config_read, HP_channel_config_read) }, -/* chat */ +/* chat_interface */ { HP_POP(chat->create_pc_chat, HP_chat_create_pc_chat) }, { HP_POP(chat->join, HP_chat_join) }, { HP_POP(chat->leave, HP_chat_leave) }, @@ -196,7 +258,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chat->npc_kick_all, HP_chat_npc_kick_all) }, { HP_POP(chat->trigger_event, HP_chat_trigger_event) }, { HP_POP(chat->create, HP_chat_create) }, -/* chrif */ +/* chrif_interface */ { HP_POP(chrif->init, HP_chrif_init) }, { HP_POP(chrif->final, HP_chrif_final) }, { HP_POP(chrif->setuserid, HP_chrif_setuserid) }, @@ -230,7 +292,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chrif->changesex, HP_chrif_changesex) }, { HP_POP(chrif->divorce, HP_chrif_divorce) }, { HP_POP(chrif->removefriend, HP_chrif_removefriend) }, - { HP_POP(chrif->send_report, HP_chrif_send_report) }, { HP_POP(chrif->flush, HP_chrif_flush) }, { HP_POP(chrif->skillid2idx, HP_chrif_skillid2idx) }, { HP_POP(chrif->sd_to_auth, HP_chrif_sd_to_auth) }, @@ -267,7 +328,35 @@ struct HookingPointData HookingPoints[] = { { HP_POP(chrif->parse, HP_chrif_parse) }, { HP_POP(chrif->save_scdata_single, HP_chrif_save_scdata_single) }, { HP_POP(chrif->del_scdata_single, HP_chrif_del_scdata_single) }, -/* clif */ +/* clan_interface */ + { HP_POP(clan->init, HP_clan_init) }, + { HP_POP(clan->final, HP_clan_final) }, + { HP_POP(clan->config_read, HP_clan_config_read) }, + { HP_POP(clan->config_read_additional_settings, HP_clan_config_read_additional_settings) }, + { HP_POP(clan->read_db, HP_clan_read_db) }, + { HP_POP(clan->read_db_sub, HP_clan_read_db_sub) }, + { HP_POP(clan->read_db_additional_fields, HP_clan_read_db_additional_fields) }, + { HP_POP(clan->read_buffs, HP_clan_read_buffs) }, + { HP_POP(clan->search, HP_clan_search) }, + { HP_POP(clan->searchname, HP_clan_searchname) }, + { HP_POP(clan->getonlinesd, HP_clan_getonlinesd) }, + { HP_POP(clan->getindex, HP_clan_getindex) }, + { HP_POP(clan->join, HP_clan_join) }, + { HP_POP(clan->member_online, HP_clan_member_online) }, + { HP_POP(clan->leave, HP_clan_leave) }, + { HP_POP(clan->send_message, HP_clan_send_message) }, + { HP_POP(clan->recv_message, HP_clan_recv_message) }, + { HP_POP(clan->member_offline, HP_clan_member_offline) }, + { HP_POP(clan->set_constants, HP_clan_set_constants) }, + { HP_POP(clan->get_id, HP_clan_get_id) }, + { HP_POP(clan->buff_start, HP_clan_buff_start) }, + { HP_POP(clan->buff_end, HP_clan_buff_end) }, + { HP_POP(clan->reload, HP_clan_reload) }, + { HP_POP(clan->rejoin, HP_clan_rejoin) }, + { HP_POP(clan->inactivity_kick, HP_clan_inactivity_kick) }, + { HP_POP(clan->request_kickoffline, HP_clan_request_kickoffline) }, + { HP_POP(clan->request_membercount, HP_clan_request_membercount) }, +/* clif_interface */ { HP_POP(clif->init, HP_clif_init) }, { HP_POP(clif->final, HP_clif_final) }, { HP_POP(clif->setip, HP_clif_setip) }, @@ -282,6 +371,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->parse_cmd, HP_clif_parse_cmd) }, { HP_POP(clif->decrypt_cmd, HP_clif_decrypt_cmd) }, { HP_POP(clif->authok, HP_clif_authok) }, + { HP_POP(clif->auth_error, HP_clif_auth_error) }, { HP_POP(clif->authrefuse, HP_clif_authrefuse) }, { HP_POP(clif->authfail_fd, HP_clif_authfail_fd) }, { HP_POP(clif->charselectok, HP_clif_charselectok) }, @@ -291,6 +381,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->dropitem, HP_clif_dropitem) }, { HP_POP(clif->delitem, HP_clif_delitem) }, { HP_POP(clif->takeitem, HP_clif_takeitem) }, + { HP_POP(clif->item_movefailed, HP_clif_item_movefailed) }, { HP_POP(clif->item_equip, HP_clif_item_equip) }, { HP_POP(clif->item_normal, HP_clif_item_normal) }, { HP_POP(clif->arrowequip, HP_clif_arrowequip) }, @@ -302,11 +393,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->unequipitemack, HP_clif_unequipitemack) }, { HP_POP(clif->useitemack, HP_clif_useitemack) }, { HP_POP(clif->addcards, HP_clif_addcards) }, - { HP_POP(clif->addcards2, HP_clif_addcards2) }, { HP_POP(clif->item_sub, HP_clif_item_sub) }, { HP_POP(clif->getareachar_item, HP_clif_getareachar_item) }, { HP_POP(clif->cart_additem_ack, HP_clif_cart_additem_ack) }, { HP_POP(clif->cashshop_load, HP_clif_cashshop_load) }, + { HP_POP(clif->cashShopSchedule, HP_clif_cashShopSchedule) }, { HP_POP(clif->package_announce, HP_clif_package_announce) }, { HP_POP(clif->item_drop_announce, HP_clif_item_drop_announce) }, { HP_POP(clif->clearunit_single, HP_clif_clearunit_single) }, @@ -339,6 +430,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->graffiti_entry, HP_clif_graffiti_entry) }, { HP_POP(clif->spawn, HP_clif_spawn) }, { HP_POP(clif->changemap, HP_clif_changemap) }, + { HP_POP(clif->changemap_airship, HP_clif_changemap_airship) }, { HP_POP(clif->changemapcell, HP_clif_changemapcell) }, { HP_POP(clif->map_property, HP_clif_map_property) }, { HP_POP(clif->pvpset, HP_clif_pvpset) }, @@ -347,6 +439,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->map_type, HP_clif_map_type) }, { HP_POP(clif->maptypeproperty2, HP_clif_maptypeproperty2) }, { HP_POP(clif->changemapserver, HP_clif_changemapserver) }, + { HP_POP(clif->changemapserver_airship, HP_clif_changemapserver_airship) }, { HP_POP(clif->npcbuysell, HP_clif_npcbuysell) }, { HP_POP(clif->buylist, HP_clif_buylist) }, { HP_POP(clif->selllist, HP_clif_selllist) }, @@ -374,9 +467,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->fame_alchemist, HP_clif_fame_alchemist) }, { HP_POP(clif->fame_taekwon, HP_clif_fame_taekwon) }, { HP_POP(clif->ranklist, HP_clif_ranklist) }, + { HP_POP(clif->ranklist_sub, HP_clif_ranklist_sub) }, + { HP_POP(clif->ranklist_sub2, HP_clif_ranklist_sub2) }, { HP_POP(clif->update_rankingpoint, HP_clif_update_rankingpoint) }, { HP_POP(clif->pRanklist, HP_clif_pRanklist) }, { HP_POP(clif->hotkeys, HP_clif_hotkeys) }, + { HP_POP(clif->hotkeysAll, HP_clif_hotkeysAll) }, { HP_POP(clif->insight, HP_clif_insight) }, { HP_POP(clif->outsight, HP_clif_outsight) }, { HP_POP(clif->skillcastcancel, HP_clif_skillcastcancel) }, @@ -389,10 +485,20 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->autospell, HP_clif_autospell) }, { HP_POP(clif->combo_delay, HP_clif_combo_delay) }, { HP_POP(clif->status_change, HP_clif_status_change) }, + { HP_POP(clif->status_change_sub, HP_clif_status_change_sub) }, { HP_POP(clif->insert_card, HP_clif_insert_card) }, - { HP_POP(clif->inventorylist, HP_clif_inventorylist) }, - { HP_POP(clif->equiplist, HP_clif_equiplist) }, - { HP_POP(clif->cartlist, HP_clif_cartlist) }, + { HP_POP(clif->inventoryList, HP_clif_inventoryList) }, + { HP_POP(clif->inventoryItems, HP_clif_inventoryItems) }, + { HP_POP(clif->equipList, HP_clif_equipList) }, + { HP_POP(clif->equipItems, HP_clif_equipItems) }, + { HP_POP(clif->cartList, HP_clif_cartList) }, + { HP_POP(clif->cartItems, HP_clif_cartItems) }, + { HP_POP(clif->inventoryExpansionInfo, HP_clif_inventoryExpansionInfo) }, + { HP_POP(clif->inventoryExpandAck, HP_clif_inventoryExpandAck) }, + { HP_POP(clif->inventoryExpandResult, HP_clif_inventoryExpandResult) }, + { HP_POP(clif->pInventoryExpansion, HP_clif_pInventoryExpansion) }, + { HP_POP(clif->pInventoryExpansionConfirmed, HP_clif_pInventoryExpansionConfirmed) }, + { HP_POP(clif->pInventoryExpansionRejected, HP_clif_pInventoryExpansionRejected) }, { HP_POP(clif->favorite_item, HP_clif_favorite_item) }, { HP_POP(clif->clearcart, HP_clif_clearcart) }, { HP_POP(clif->item_identify_list, HP_clif_item_identify_list) }, @@ -406,7 +512,21 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->mvp_exp, HP_clif_mvp_exp) }, { HP_POP(clif->mvp_noitem, HP_clif_mvp_noitem) }, { HP_POP(clif->changed_dir, HP_clif_changed_dir) }, - { HP_POP(clif->charnameack, HP_clif_charnameack) }, + { HP_POP(clif->blname_ack, HP_clif_blname_ack) }, + { HP_POP(clif->pcname_ack, HP_clif_pcname_ack) }, + { HP_POP(clif->homname_ack, HP_clif_homname_ack) }, + { HP_POP(clif->mername_ack, HP_clif_mername_ack) }, + { HP_POP(clif->petname_ack, HP_clif_petname_ack) }, + { HP_POP(clif->npcname_ack, HP_clif_npcname_ack) }, + { HP_POP(clif->mobname_ack, HP_clif_mobname_ack) }, + { HP_POP(clif->mobname_guardian_ack, HP_clif_mobname_guardian_ack) }, + { HP_POP(clif->mobname_additional_ack, HP_clif_mobname_additional_ack) }, + { HP_POP(clif->mobname_normal_ack, HP_clif_mobname_normal_ack) }, + { HP_POP(clif->chatname_ack, HP_clif_chatname_ack) }, + { HP_POP(clif->elemname_ack, HP_clif_elemname_ack) }, + { HP_POP(clif->skillname_ack, HP_clif_skillname_ack) }, + { HP_POP(clif->itemname_ack, HP_clif_itemname_ack) }, + { HP_POP(clif->unknownname_ack, HP_clif_unknownname_ack) }, { HP_POP(clif->monster_hp_bar, HP_clif_monster_hp_bar) }, { HP_POP(clif->hpmeter, HP_clif_hpmeter) }, { HP_POP(clif->hpmeter_single, HP_clif_hpmeter_single) }, @@ -421,13 +541,14 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->mission_info, HP_clif_mission_info) }, { HP_POP(clif->feel_hate_reset, HP_clif_feel_hate_reset) }, { HP_POP(clif->partytickack, HP_clif_partytickack) }, - { HP_POP(clif->equiptickack, HP_clif_equiptickack) }, + { HP_POP(clif->zc_config, HP_clif_zc_config) }, { HP_POP(clif->viewequip_ack, HP_clif_viewequip_ack) }, { HP_POP(clif->equpcheckbox, HP_clif_equpcheckbox) }, { HP_POP(clif->displayexp, HP_clif_displayexp) }, { HP_POP(clif->font, HP_clif_font) }, { HP_POP(clif->progressbar, HP_clif_progressbar) }, { HP_POP(clif->progressbar_abort, HP_clif_progressbar_abort) }, + { HP_POP(clif->progressbar_unit, HP_clif_progressbar_unit) }, { HP_POP(clif->showdigit, HP_clif_showdigit) }, { HP_POP(clif->elementalconverter_list, HP_clif_elementalconverter_list) }, { HP_POP(clif->spellbook_list, HP_clif_spellbook_list) }, @@ -436,6 +557,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->autoshadowspell_list, HP_clif_autoshadowspell_list) }, { HP_POP(clif->skill_itemlistwindow, HP_clif_skill_itemlistwindow) }, { HP_POP(clif->sc_load, HP_clif_sc_load) }, + { HP_POP(clif->sc_continue, HP_clif_sc_continue) }, { HP_POP(clif->sc_end, HP_clif_sc_end) }, { HP_POP(clif->initialstatus, HP_clif_initialstatus) }, { HP_POP(clif->cooldown_list, HP_clif_cooldown_list) }, @@ -456,6 +578,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->quitsave, HP_clif_quitsave) }, { HP_POP(clif->misceffect, HP_clif_misceffect) }, { HP_POP(clif->changeoption, HP_clif_changeoption) }, + { HP_POP(clif->changeoption_target, HP_clif_changeoption_target) }, { HP_POP(clif->changeoption2, HP_clif_changeoption2) }, { HP_POP(clif->emotion, HP_clif_emotion) }, { HP_POP(clif->talkiebox, HP_clif_talkiebox) }, @@ -467,7 +590,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->skill_poseffect, HP_clif_skill_poseffect) }, { HP_POP(clif->skill_estimation, HP_clif_skill_estimation) }, { HP_POP(clif->skill_warppoint, HP_clif_skill_warppoint) }, - { HP_POP(clif->skillcasting, HP_clif_skillcasting) }, + { HP_POP(clif->useskill, HP_clif_useskill) }, { HP_POP(clif->produce_effect, HP_clif_produce_effect) }, { HP_POP(clif->devotion, HP_clif_devotion) }, { HP_POP(clif->spiritball, HP_clif_spiritball) }, @@ -481,6 +604,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->specialeffect, HP_clif_specialeffect) }, { HP_POP(clif->specialeffect_single, HP_clif_specialeffect_single) }, { HP_POP(clif->specialeffect_value, HP_clif_specialeffect_value) }, + { HP_POP(clif->specialeffect_value_single, HP_clif_specialeffect_value_single) }, + { HP_POP(clif->removeSpecialEffect, HP_clif_removeSpecialEffect) }, + { HP_POP(clif->removeSpecialEffect_single, HP_clif_removeSpecialEffect_single) }, { HP_POP(clif->millenniumshield, HP_clif_millenniumshield) }, { HP_POP(clif->spiritcharm, HP_clif_spiritcharm) }, { HP_POP(clif->charm_single, HP_clif_charm_single) }, @@ -496,6 +622,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->joinchatok, HP_clif_joinchatok) }, { HP_POP(clif->addchat, HP_clif_addchat) }, { HP_POP(clif->changechatowner, HP_clif_changechatowner) }, + { HP_POP(clif->chatRoleChange, HP_clif_chatRoleChange) }, { HP_POP(clif->clearchat, HP_clif_clearchat) }, { HP_POP(clif->leavechat, HP_clif_leavechat) }, { HP_POP(clif->changechatstatus, HP_clif_changechatstatus) }, @@ -506,13 +633,19 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->broadcast2, HP_clif_broadcast2) }, { HP_POP(clif->messagecolor_self, HP_clif_messagecolor_self) }, { HP_POP(clif->messagecolor, HP_clif_messagecolor) }, + { HP_POP(clif->serviceMessageColor, HP_clif_serviceMessageColor) }, { HP_POP(clif->disp_overhead, HP_clif_disp_overhead) }, + { HP_POP(clif->notify_playerchat, HP_clif_notify_playerchat) }, { HP_POP(clif->msgtable, HP_clif_msgtable) }, { HP_POP(clif->msgtable_num, HP_clif_msgtable_num) }, { HP_POP(clif->msgtable_skill, HP_clif_msgtable_skill) }, + { HP_POP(clif->msgtable_str, HP_clif_msgtable_str) }, + { HP_POP(clif->msgtable_str_color, HP_clif_msgtable_str_color) }, + { HP_POP(clif->msgtable_color, HP_clif_msgtable_color) }, { HP_POP(clif->message, HP_clif_message) }, { HP_POP(clif->messageln, HP_clif_messageln) }, - { HP_POP(clif->process_message, HP_clif_process_message) }, + { HP_POP(clif->process_chat_message, HP_clif_process_chat_message) }, + { HP_POP(clif->process_whisper_message, HP_clif_process_whisper_message) }, { HP_POP(clif->wisexin, HP_clif_wisexin) }, { HP_POP(clif->wisall, HP_clif_wisall) }, { HP_POP(clif->PMIgnoreList, HP_clif_PMIgnoreList) }, @@ -531,8 +664,13 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->vendinglist, HP_clif_vendinglist) }, { HP_POP(clif->buyvending, HP_clif_buyvending) }, { HP_POP(clif->openvending, HP_clif_openvending) }, + { HP_POP(clif->openvendingAck, HP_clif_openvendingAck) }, { HP_POP(clif->vendingreport, HP_clif_vendingreport) }, - { HP_POP(clif->storagelist, HP_clif_storagelist) }, + { HP_POP(clif->storageList, HP_clif_storageList) }, + { HP_POP(clif->guildStorageList, HP_clif_guildStorageList) }, + { HP_POP(clif->storageItems, HP_clif_storageItems) }, + { HP_POP(clif->inventoryStart, HP_clif_inventoryStart) }, + { HP_POP(clif->inventoryEnd, HP_clif_inventoryEnd) }, { HP_POP(clif->updatestorageamount, HP_clif_updatestorageamount) }, { HP_POP(clif->storageitemadded, HP_clif_storageitemadded) }, { HP_POP(clif->storageitemremoved, HP_clif_storageitemremoved) }, @@ -542,9 +680,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->skillinfo, HP_clif_skillinfo) }, { HP_POP(clif->addskill, HP_clif_addskill) }, { HP_POP(clif->deleteskill, HP_clif_deleteskill) }, + { HP_POP(clif->playerSkillToPacket, HP_clif_playerSkillToPacket) }, { HP_POP(clif->party_created, HP_clif_party_created) }, { HP_POP(clif->party_member_info, HP_clif_party_member_info) }, { HP_POP(clif->party_info, HP_clif_party_info) }, + { HP_POP(clif->party_job_and_level, HP_clif_party_job_and_level) }, { HP_POP(clif->party_invite, HP_clif_party_invite) }, { HP_POP(clif->party_inviteack, HP_clif_party_inviteack) }, { HP_POP(clif->party_option, HP_clif_party_option) }, @@ -562,6 +702,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->guild_masterormember, HP_clif_guild_masterormember) }, { HP_POP(clif->guild_basicinfo, HP_clif_guild_basicinfo) }, { HP_POP(clif->guild_allianceinfo, HP_clif_guild_allianceinfo) }, + { HP_POP(clif->guild_castlelist, HP_clif_guild_castlelist) }, + { HP_POP(clif->guild_castleinfo, HP_clif_guild_castleinfo) }, { HP_POP(clif->guild_memberlist, HP_clif_guild_memberlist) }, { HP_POP(clif->guild_skillinfo, HP_clif_guild_skillinfo) }, { HP_POP(clif->guild_send_onlineinfo, HP_clif_guild_send_onlineinfo) }, @@ -587,6 +729,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->guild_positionnamelist, HP_clif_guild_positionnamelist) }, { HP_POP(clif->guild_positioninfolist, HP_clif_guild_positioninfolist) }, { HP_POP(clif->guild_expulsionlist, HP_clif_guild_expulsionlist) }, + { HP_POP(clif->guild_set_position, HP_clif_guild_set_position) }, + { HP_POP(clif->guild_position_selected, HP_clif_guild_position_selected) }, { HP_POP(clif->validate_emblem, HP_clif_validate_emblem) }, { HP_POP(clif->bg_hp, HP_clif_bg_hp) }, { HP_POP(clif->bg_xy, HP_clif_bg_xy) }, @@ -628,6 +772,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->quest_delete, HP_clif_quest_delete) }, { HP_POP(clif->quest_update_status, HP_clif_quest_update_status) }, { HP_POP(clif->quest_update_objective, HP_clif_quest_update_objective) }, + { HP_POP(clif->quest_notify_objective, HP_clif_quest_notify_objective) }, { HP_POP(clif->quest_show_event, HP_clif_quest_show_event) }, { HP_POP(clif->mail_window, HP_clif_mail_window) }, { HP_POP(clif->mail_read, HP_clif_mail_read) }, @@ -710,14 +855,26 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->npc_market_purchase_ack, HP_clif_npc_market_purchase_ack) }, { HP_POP(clif->parse_roulette_db, HP_clif_parse_roulette_db) }, { HP_POP(clif->roulette_generate_ack, HP_clif_roulette_generate_ack) }, + { HP_POP(clif->roulette_close, HP_clif_roulette_close) }, { HP_POP(clif->openmergeitem, HP_clif_openmergeitem) }, { HP_POP(clif->cancelmergeitem, HP_clif_cancelmergeitem) }, { HP_POP(clif->comparemergeitem, HP_clif_comparemergeitem) }, { HP_POP(clif->ackmergeitems, HP_clif_ackmergeitems) }, + { HP_POP(clif->mergeitems, HP_clif_mergeitems) }, + { HP_POP(clif->isdisguised, HP_clif_isdisguised) }, + { HP_POP(clif->navigate_to, HP_clif_navigate_to) }, + { HP_POP(clif->bl_type, HP_clif_bl_type) }, + { HP_POP(clif->achievement_send_list, HP_clif_achievement_send_list) }, + { HP_POP(clif->achievement_send_update, HP_clif_achievement_send_update) }, + { HP_POP(clif->pAchievementGetReward, HP_clif_pAchievementGetReward) }, + { HP_POP(clif->achievement_reward_ack, HP_clif_achievement_reward_ack) }, + { HP_POP(clif->change_title_ack, HP_clif_change_title_ack) }, + { HP_POP(clif->pChangeTitle, HP_clif_pChangeTitle) }, { HP_POP(clif->pWantToConnection, HP_clif_pWantToConnection) }, { HP_POP(clif->pLoadEndAck, HP_clif_pLoadEndAck) }, { HP_POP(clif->pTickSend, HP_clif_pTickSend) }, - { HP_POP(clif->pHotkey, HP_clif_pHotkey) }, + { HP_POP(clif->pHotkey1, HP_clif_pHotkey1) }, + { HP_POP(clif->pHotkey2, HP_clif_pHotkey2) }, { HP_POP(clif->pProgressbar, HP_clif_pProgressbar) }, { HP_POP(clif->pWalkToXY, HP_clif_pWalkToXY) }, { HP_POP(clif->pQuitGame, HP_clif_pQuitGame) }, @@ -760,7 +917,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pChangeCart, HP_clif_pChangeCart) }, { HP_POP(clif->pStatusUp, HP_clif_pStatusUp) }, { HP_POP(clif->pSkillUp, HP_clif_pSkillUp) }, + { HP_POP(clif->useSkillToIdReal, HP_clif_useSkillToIdReal) }, { HP_POP(clif->pUseSkillToId, HP_clif_pUseSkillToId) }, + { HP_POP(clif->pStartUseSkillToId, HP_clif_pStartUseSkillToId) }, + { HP_POP(clif->pStopUseSkillToId, HP_clif_pStopUseSkillToId) }, { HP_POP(clif->pUseSkillToId_homun, HP_clif_pUseSkillToId_homun) }, { HP_POP(clif->pUseSkillToId_mercenary, HP_clif_pUseSkillToId_mercenary) }, { HP_POP(clif->pUseSkillToPos, HP_clif_pUseSkillToPos) }, @@ -894,7 +1054,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pAdopt_request, HP_clif_pAdopt_request) }, { HP_POP(clif->pAdopt_reply, HP_clif_pAdopt_reply) }, { HP_POP(clif->pViewPlayerEquip, HP_clif_pViewPlayerEquip) }, - { HP_POP(clif->pEquipTick, HP_clif_pEquipTick) }, + { HP_POP(clif->p_cz_config, HP_clif_p_cz_config) }, { HP_POP(clif->pquestStateAck, HP_clif_pquestStateAck) }, { HP_POP(clif->pmercenary_action, HP_clif_pmercenary_action) }, { HP_POP(clif->pBattleChat, HP_clif_pBattleChat) }, @@ -912,17 +1072,22 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pSkillSelectMenu, HP_clif_pSkillSelectMenu) }, { HP_POP(clif->pMoveItem, HP_clif_pMoveItem) }, { HP_POP(clif->pDull, HP_clif_pDull) }, + { HP_POP(clif->p_cz_blocking_play_cancel, HP_clif_p_cz_blocking_play_cancel) }, { HP_POP(clif->pBGQueueRegister, HP_clif_pBGQueueRegister) }, { HP_POP(clif->pBGQueueCheckState, HP_clif_pBGQueueCheckState) }, { HP_POP(clif->pBGQueueRevokeReq, HP_clif_pBGQueueRevokeReq) }, { HP_POP(clif->pBGQueueBattleBeginAck, HP_clif_pBGQueueBattleBeginAck) }, - { HP_POP(clif->pCashShopOpen, HP_clif_pCashShopOpen) }, + { HP_POP(clif->pCashShopOpen1, HP_clif_pCashShopOpen1) }, + { HP_POP(clif->pCashShopOpen2, HP_clif_pCashShopOpen2) }, + { HP_POP(clif->pCashShopLimitedReq, HP_clif_pCashShopLimitedReq) }, { HP_POP(clif->pCashShopClose, HP_clif_pCashShopClose) }, { HP_POP(clif->pCashShopReqTab, HP_clif_pCashShopReqTab) }, { HP_POP(clif->pCashShopSchedule, HP_clif_pCashShopSchedule) }, { HP_POP(clif->pCashShopBuy, HP_clif_pCashShopBuy) }, { HP_POP(clif->pPartyTick, HP_clif_pPartyTick) }, { HP_POP(clif->pGuildInvite2, HP_clif_pGuildInvite2) }, + { HP_POP(clif->cashShopBuyAck, HP_clif_cashShopBuyAck) }, + { HP_POP(clif->cashShopOpen, HP_clif_cashShopOpen) }, { HP_POP(clif->pPartyBookingAddFilter, HP_clif_pPartyBookingAddFilter) }, { HP_POP(clif->pPartyBookingSubFilter, HP_clif_pPartyBookingSubFilter) }, { HP_POP(clif->pPartyBookingReqVolunteer, HP_clif_pPartyBookingReqVolunteer) }, @@ -941,28 +1106,122 @@ struct HookingPointData HookingPoints[] = { { HP_POP(clif->pNPCShopClosed, HP_clif_pNPCShopClosed) }, { HP_POP(clif->pNPCMarketClosed, HP_clif_pNPCMarketClosed) }, { HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) }, - { HP_POP(clif->add_random_options, HP_clif_add_random_options) }, - { HP_POP(clif->pHotkeyRowShift, HP_clif_pHotkeyRowShift) }, + { HP_POP(clif->add_item_options, HP_clif_add_item_options) }, + { HP_POP(clif->pHotkeyRowShift1, HP_clif_pHotkeyRowShift1) }, + { HP_POP(clif->pHotkeyRowShift2, HP_clif_pHotkeyRowShift2) }, { HP_POP(clif->dressroom_open, HP_clif_dressroom_open) }, { HP_POP(clif->pOneClick_ItemIdentify, HP_clif_pOneClick_ItemIdentify) }, { HP_POP(clif->selectcart, HP_clif_selectcart) }, { HP_POP(clif->pSelectCart, HP_clif_pSelectCart) }, { HP_POP(clif->get_bl_name, HP_clif_get_bl_name) }, -/* cmdline */ + { HP_POP(clif->pRodexOpenWriteMail, HP_clif_pRodexOpenWriteMail) }, + { HP_POP(clif->rodex_open_write_mail, HP_clif_rodex_open_write_mail) }, + { HP_POP(clif->pRodexAddItem, HP_clif_pRodexAddItem) }, + { HP_POP(clif->rodex_add_item_result, HP_clif_rodex_add_item_result) }, + { HP_POP(clif->pRodexRemoveItem, HP_clif_pRodexRemoveItem) }, + { HP_POP(clif->rodex_remove_item_result, HP_clif_rodex_remove_item_result) }, + { HP_POP(clif->pRodexSendMail, HP_clif_pRodexSendMail) }, + { HP_POP(clif->rodex_send_mail_result, HP_clif_rodex_send_mail_result) }, + { HP_POP(clif->rodex_send_maillist, HP_clif_rodex_send_maillist) }, + { HP_POP(clif->rodex_send_refresh, HP_clif_rodex_send_refresh) }, + { HP_POP(clif->rodex_send_mails_all, HP_clif_rodex_send_mails_all) }, + { HP_POP(clif->pRodexReadMail, HP_clif_pRodexReadMail) }, + { HP_POP(clif->rodex_read_mail, HP_clif_rodex_read_mail) }, + { HP_POP(clif->pRodexNextMaillist, HP_clif_pRodexNextMaillist) }, + { HP_POP(clif->pRodexCloseMailbox, HP_clif_pRodexCloseMailbox) }, + { HP_POP(clif->pRodexCancelWriteMail, HP_clif_pRodexCancelWriteMail) }, + { HP_POP(clif->pRodexOpenMailbox, HP_clif_pRodexOpenMailbox) }, + { HP_POP(clif->pRodexCheckName, HP_clif_pRodexCheckName) }, + { HP_POP(clif->rodex_checkname_result, HP_clif_rodex_checkname_result) }, + { HP_POP(clif->pRodexDeleteMail, HP_clif_pRodexDeleteMail) }, + { HP_POP(clif->rodex_delete_mail, HP_clif_rodex_delete_mail) }, + { HP_POP(clif->pRodexRefreshMaillist, HP_clif_pRodexRefreshMaillist) }, + { HP_POP(clif->pRodexRequestZeny, HP_clif_pRodexRequestZeny) }, + { HP_POP(clif->rodex_request_zeny, HP_clif_rodex_request_zeny) }, + { HP_POP(clif->pRodexRequestItems, HP_clif_pRodexRequestItems) }, + { HP_POP(clif->rodex_request_items, HP_clif_rodex_request_items) }, + { HP_POP(clif->rodex_icon, HP_clif_rodex_icon) }, + { HP_POP(clif->skill_scale, HP_clif_skill_scale) }, + { HP_POP(clif->clan_basicinfo, HP_clif_clan_basicinfo) }, + { HP_POP(clif->clan_onlinecount, HP_clif_clan_onlinecount) }, + { HP_POP(clif->clan_leave, HP_clif_clan_leave) }, + { HP_POP(clif->clan_message, HP_clif_clan_message) }, + { HP_POP(clif->pClanMessage, HP_clif_pClanMessage) }, + { HP_POP(clif->hat_effect, HP_clif_hat_effect) }, + { HP_POP(clif->hat_effect_single, HP_clif_hat_effect_single) }, + { HP_POP(clif->overweight_percent, HP_clif_overweight_percent) }, + { HP_POP(clif->pChangeDress, HP_clif_pChangeDress) }, + { HP_POP(clif->pAttendanceDB, HP_clif_pAttendanceDB) }, + { HP_POP(clif->attendancedb_libconfig_sub, HP_clif_attendancedb_libconfig_sub) }, + { HP_POP(clif->attendance_timediff, HP_clif_attendance_timediff) }, + { HP_POP(clif->attendance_getendtime, HP_clif_attendance_getendtime) }, + { HP_POP(clif->pOpenUIRequest, HP_clif_pOpenUIRequest) }, + { HP_POP(clif->open_ui, HP_clif_open_ui) }, + { HP_POP(clif->pAttendanceRewardRequest, HP_clif_pAttendanceRewardRequest) }, + { HP_POP(clif->ui_action, HP_clif_ui_action) }, + { HP_POP(clif->pPrivateAirshipRequest, HP_clif_pPrivateAirshipRequest) }, + { HP_POP(clif->PrivateAirshipResponse, HP_clif_PrivateAirshipResponse) }, + { HP_POP(clif->pReqStyleChange, HP_clif_pReqStyleChange) }, + { HP_POP(clif->pReqStyleChange2, HP_clif_pReqStyleChange2) }, + { HP_POP(clif->pStyleClose, HP_clif_pStyleClose) }, + { HP_POP(clif->style_change_response, HP_clif_style_change_response) }, + { HP_POP(clif->pPetEvolution, HP_clif_pPetEvolution) }, + { HP_POP(clif->petEvolutionResult, HP_clif_petEvolutionResult) }, + { HP_POP(clif->party_dead_notification, HP_clif_party_dead_notification) }, + { HP_POP(clif->pMemorialDungeonCommand, HP_clif_pMemorialDungeonCommand) }, + { HP_POP(clif->camera_showWindow, HP_clif_camera_showWindow) }, + { HP_POP(clif->camera_change, HP_clif_camera_change) }, + { HP_POP(clif->pCameraInfo, HP_clif_pCameraInfo) }, + { HP_POP(clif->item_preview, HP_clif_item_preview) }, + { HP_POP(clif->enchant_equipment, HP_clif_enchant_equipment) }, + { HP_POP(clif->pReqRemainTime, HP_clif_pReqRemainTime) }, + { HP_POP(clif->npc_barter_open, HP_clif_npc_barter_open) }, + { HP_POP(clif->pNPCBarterClosed, HP_clif_pNPCBarterClosed) }, + { HP_POP(clif->pNPCBarterPurchase, HP_clif_pNPCBarterPurchase) }, + { HP_POP(clif->pNPCExpandedBarterClosed, HP_clif_pNPCExpandedBarterClosed) }, + { HP_POP(clif->pNPCExpandedBarterPurchase, HP_clif_pNPCExpandedBarterPurchase) }, + { HP_POP(clif->npc_expanded_barter_open, HP_clif_npc_expanded_barter_open) }, + { HP_POP(clif->pClientVersion, HP_clif_pClientVersion) }, + { HP_POP(clif->pPing, HP_clif_pPing) }, + { HP_POP(clif->ping, HP_clif_ping) }, + { HP_POP(clif->pingTimer, HP_clif_pingTimer) }, + { HP_POP(clif->pingTimerSub, HP_clif_pingTimerSub) }, + { HP_POP(clif->pResetCooldown, HP_clif_pResetCooldown) }, + { HP_POP(clif->loadConfirm, HP_clif_loadConfirm) }, + { HP_POP(clif->send_selforarea, HP_clif_send_selforarea) }, + { HP_POP(clif->OpenRefineryUI, HP_clif_OpenRefineryUI) }, + { HP_POP(clif->pAddItemRefineryUI, HP_clif_pAddItemRefineryUI) }, + { HP_POP(clif->AddItemRefineryUIAck, HP_clif_AddItemRefineryUIAck) }, + { HP_POP(clif->pRefineryUIClose, HP_clif_pRefineryUIClose) }, + { HP_POP(clif->pRefineryUIRefine, HP_clif_pRefineryUIRefine) }, + { HP_POP(clif->announce_refine_status, HP_clif_announce_refine_status) }, + { HP_POP(clif->pGuildCastleTeleportRequest, HP_clif_pGuildCastleTeleportRequest) }, + { HP_POP(clif->pGuildCastleInfoRequest, HP_clif_pGuildCastleInfoRequest) }, + { HP_POP(clif->guild_castleteleport_res, HP_clif_guild_castleteleport_res) }, + { HP_POP(clif->lapineDdukDdak_open, HP_clif_lapineDdukDdak_open) }, + { HP_POP(clif->lapineDdukDdak_result, HP_clif_lapineDdukDdak_result) }, + { HP_POP(clif->plapineDdukDdak_ack, HP_clif_plapineDdukDdak_ack) }, + { HP_POP(clif->plapineDdukDdak_close, HP_clif_plapineDdukDdak_close) }, + { HP_POP(clif->lapineUpgrade_open, HP_clif_lapineUpgrade_open) }, + { HP_POP(clif->lapineUpgrade_result, HP_clif_lapineUpgrade_result) }, + { HP_POP(clif->pLapineUpgrade_close, HP_clif_pLapineUpgrade_close) }, + { HP_POP(clif->pLapineUpgrade_makeItem, HP_clif_pLapineUpgrade_makeItem) }, + { HP_POP(clif->pReqGearOff, HP_clif_pReqGearOff) }, +/* cmdline_interface */ { HP_POP(cmdline->init, HP_cmdline_init) }, { HP_POP(cmdline->final, HP_cmdline_final) }, { HP_POP(cmdline->arg_add, HP_cmdline_arg_add) }, { HP_POP(cmdline->exec, HP_cmdline_exec) }, { HP_POP(cmdline->arg_next_value, HP_cmdline_arg_next_value) }, { HP_POP(cmdline->arg_source, HP_cmdline_arg_source) }, -/* console */ +/* console_interface */ { HP_POP(console->init, HP_console_init) }, { HP_POP(console->final, HP_console_final) }, { HP_POP(console->display_title, HP_console_display_title) }, { HP_POP(console->display_gplnotice, HP_console_display_gplnotice) }, -/* core */ +/* core_interface */ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) }, -/* DB */ +/* db_interface */ { HP_POP(DB->fix_options, HP_DB_fix_options) }, { HP_POP(DB->default_cmp, HP_DB_default_cmp) }, { HP_POP(DB->default_hash, HP_DB_default_hash) }, @@ -982,17 +1241,20 @@ struct HookingPointData HookingPoints[] = { { HP_POP(DB->data2ptr, HP_DB_data2ptr) }, { HP_POP(DB->init, HP_DB_init) }, { HP_POP(DB->final, HP_DB_final) }, -/* duel */ +/* des_interface */ + { HP_POP(des->decrypt_block, HP_des_decrypt_block) }, + { HP_POP(des->decrypt, HP_des_decrypt) }, +/* duel_interface */ { HP_POP(duel->create, HP_duel_create) }, { HP_POP(duel->invite, HP_duel_invite) }, { HP_POP(duel->accept, HP_duel_accept) }, { HP_POP(duel->reject, HP_duel_reject) }, { HP_POP(duel->leave, HP_duel_leave) }, { HP_POP(duel->showinfo, HP_duel_showinfo) }, - { HP_POP(duel->checktime, HP_duel_checktime) }, + { HP_POP(duel->difftime, HP_duel_difftime) }, { HP_POP(duel->init, HP_duel_init) }, { HP_POP(duel->final, HP_duel_final) }, -/* elemental */ +/* elemental_interface */ { HP_POP(elemental->init, HP_elemental_init) }, { HP_POP(elemental->final, HP_elemental_final) }, { HP_POP(elemental->class, HP_elemental_class) }, @@ -1025,7 +1287,15 @@ struct HookingPointData HookingPoints[] = { { HP_POP(elemental->ai_sub_foreachclient, HP_elemental_ai_sub_foreachclient) }, { HP_POP(elemental->ai_timer, HP_elemental_ai_timer) }, { HP_POP(elemental->read_db, HP_elemental_read_db) }, -/* guild */ +/* grfio_interface */ + { HP_POP(grfio->init, HP_grfio_init) }, + { HP_POP(grfio->final, HP_grfio_final) }, + { HP_POP(grfio->reads, HP_grfio_reads) }, + { HP_POP(grfio->find_file, HP_grfio_find_file) }, + { HP_POP(grfio->crc32, HP_grfio_crc32) }, + { HP_POP(grfio->decode_zip, HP_grfio_decode_zip) }, + { HP_POP(grfio->encode_zip, HP_grfio_encode_zip) }, +/* guild_interface */ { HP_POP(guild->init, HP_guild_init) }, { HP_POP(guild->final, HP_guild_final) }, { HP_POP(guild->skill_get_max, HP_guild_skill_get_max) }, @@ -1075,7 +1345,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(guild->change_emblem, HP_guild_change_emblem) }, { HP_POP(guild->emblem_changed, HP_guild_emblem_changed) }, { HP_POP(guild->send_message, HP_guild_send_message) }, - { HP_POP(guild->recv_message, HP_guild_recv_message) }, { HP_POP(guild->send_dot_remove, HP_guild_send_dot_remove) }, { HP_POP(guild->skillupack, HP_guild_skillupack) }, { HP_POP(guild->dobreak, HP_guild_dobreak) }, @@ -1098,7 +1367,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(guild->payexp_timer, HP_guild_payexp_timer) }, { HP_POP(guild->sd_check, HP_guild_sd_check) }, { HP_POP(guild->read_guildskill_tree_db, HP_guild_read_guildskill_tree_db) }, - { HP_POP(guild->read_castledb, HP_guild_read_castledb) }, + { HP_POP(guild->read_castledb_libconfig, HP_guild_read_castledb_libconfig) }, + { HP_POP(guild->read_castledb_libconfig_sub, HP_guild_read_castledb_libconfig_sub) }, + { HP_POP(guild->read_castledb_libconfig_sub_warp, HP_guild_read_castledb_libconfig_sub_warp) }, { HP_POP(guild->payexp_timer_sub, HP_guild_payexp_timer_sub) }, { HP_POP(guild->send_xy_timer_sub, HP_guild_send_xy_timer_sub) }, { HP_POP(guild->send_xy_timer, HP_guild_send_xy_timer) }, @@ -1112,7 +1383,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(guild->check_member, HP_guild_check_member) }, { HP_POP(guild->get_alliance_count, HP_guild_get_alliance_count) }, { HP_POP(guild->castle_reconnect_sub, HP_guild_castle_reconnect_sub) }, -/* gstorage */ +/* guild_storage_interface */ { HP_POP(gstorage->ensure, HP_gstorage_ensure) }, { HP_POP(gstorage->init, HP_gstorage_init) }, { HP_POP(gstorage->final, HP_gstorage_final) }, @@ -1129,7 +1400,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(gstorage->save, HP_gstorage_save) }, { HP_POP(gstorage->saved, HP_gstorage_saved) }, { HP_POP(gstorage->create, HP_gstorage_create) }, -/* homun */ +/* homunculus_interface */ { HP_POP(homun->init, HP_homun_init) }, { HP_POP(homun->final, HP_homun_final) }, { HP_POP(homun->reload, HP_homun_reload) }, @@ -1149,6 +1420,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(homun->evolve, HP_homun_evolve) }, { HP_POP(homun->mutate, HP_homun_mutate) }, { HP_POP(homun->gainexp, HP_homun_gainexp) }, + { HP_POP(homun->gainexp_real, HP_homun_gainexp_real) }, { HP_POP(homun->add_intimacy, HP_homun_add_intimacy) }, { HP_POP(homun->consume_intimacy, HP_homun_consume_intimacy) }, { HP_POP(homun->healed, HP_homun_healed) }, @@ -1177,7 +1449,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(homun->addspiritball, HP_homun_addspiritball) }, { HP_POP(homun->delspiritball, HP_homun_delspiritball) }, { HP_POP(homun->get_intimacy_grade, HP_homun_get_intimacy_grade) }, -/* instance */ +/* instance_interface */ { HP_POP(instance->init, HP_instance_init) }, { HP_POP(instance->final, HP_instance_final) }, { HP_POP(instance->reload, HP_instance_reload) }, @@ -1196,16 +1468,14 @@ struct HookingPointData HookingPoints[] = { { HP_POP(instance->set_timeout, HP_instance_set_timeout) }, { HP_POP(instance->valid, HP_instance_valid) }, { HP_POP(instance->destroy_timer, HP_instance_destroy_timer) }, -/* intif */ + { HP_POP(instance->force_destroy, HP_instance_force_destroy) }, +/* intif_interface */ { HP_POP(intif->parse, HP_intif_parse) }, { HP_POP(intif->create_pet, HP_intif_create_pet) }, - { HP_POP(intif->broadcast, HP_intif_broadcast) }, - { HP_POP(intif->broadcast2, HP_intif_broadcast2) }, - { HP_POP(intif->main_message, HP_intif_main_message) }, - { HP_POP(intif->wis_message, HP_intif_wis_message) }, - { HP_POP(intif->wis_message_to_gm, HP_intif_wis_message_to_gm) }, { HP_POP(intif->saveregistry, HP_intif_saveregistry) }, { HP_POP(intif->request_registry, HP_intif_request_registry) }, + { HP_POP(intif->request_account_storage, HP_intif_request_account_storage) }, + { HP_POP(intif->send_account_storage, HP_intif_send_account_storage) }, { HP_POP(intif->request_guild_storage, HP_intif_request_guild_storage) }, { HP_POP(intif->send_guild_storage, HP_intif_send_guild_storage) }, { HP_POP(intif->create_party, HP_intif_create_party) }, @@ -1215,7 +1485,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->party_leave, HP_intif_party_leave) }, { HP_POP(intif->party_changemap, HP_intif_party_changemap) }, { HP_POP(intif->break_party, HP_intif_break_party) }, - { HP_POP(intif->party_message, HP_intif_party_message) }, { HP_POP(intif->party_leaderchange, HP_intif_party_leaderchange) }, { HP_POP(intif->guild_create, HP_intif_guild_create) }, { HP_POP(intif->guild_request_info, HP_intif_guild_request_info) }, @@ -1223,7 +1492,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->guild_leave, HP_intif_guild_leave) }, { HP_POP(intif->guild_memberinfoshort, HP_intif_guild_memberinfoshort) }, { HP_POP(intif->guild_break, HP_intif_guild_break) }, - { HP_POP(intif->guild_message, HP_intif_guild_message) }, { HP_POP(intif->guild_change_gm, HP_intif_guild_change_gm) }, { HP_POP(intif->guild_change_basicinfo, HP_intif_guild_change_basicinfo) }, { HP_POP(intif->guild_change_memberinfo, HP_intif_guild_change_memberinfo) }, @@ -1264,15 +1532,24 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->elemental_request, HP_intif_elemental_request) }, { HP_POP(intif->elemental_delete, HP_intif_elemental_delete) }, { HP_POP(intif->elemental_save, HP_intif_elemental_save) }, + { HP_POP(intif->rodex_requestinbox, HP_intif_rodex_requestinbox) }, + { HP_POP(intif->rodex_checkhasnew, HP_intif_rodex_checkhasnew) }, + { HP_POP(intif->rodex_updatemail, HP_intif_rodex_updatemail) }, + { HP_POP(intif->rodex_sendmail, HP_intif_rodex_sendmail) }, + { HP_POP(intif->rodex_checkname, HP_intif_rodex_checkname) }, + { HP_POP(intif->pGetZenyAck, HP_intif_pGetZenyAck) }, + { HP_POP(intif->pGetItemsAck, HP_intif_pGetItemsAck) }, + { HP_POP(intif->clan_kickoffline, HP_intif_clan_kickoffline) }, + { HP_POP(intif->clan_membercount, HP_intif_clan_membercount) }, { HP_POP(intif->request_accinfo, HP_intif_request_accinfo) }, { HP_POP(intif->CheckForCharServer, HP_intif_CheckForCharServer) }, - { HP_POP(intif->pWisMessage, HP_intif_pWisMessage) }, - { HP_POP(intif->pWisEnd, HP_intif_pWisEnd) }, - { HP_POP(intif->pWisToGM_sub, HP_intif_pWisToGM_sub) }, - { HP_POP(intif->pWisToGM, HP_intif_pWisToGM) }, + { HP_POP(intif->achievements_request, HP_intif_achievements_request) }, + { HP_POP(intif->achievements_save, HP_intif_achievements_save) }, { HP_POP(intif->pRegisters, HP_intif_pRegisters) }, + { HP_POP(intif->pAccountStorage, HP_intif_pAccountStorage) }, { HP_POP(intif->pChangeNameOk, HP_intif_pChangeNameOk) }, { HP_POP(intif->pMessageToFD, HP_intif_pMessageToFD) }, + { HP_POP(intif->pAccountStorageSaveAck, HP_intif_pAccountStorageSaveAck) }, { HP_POP(intif->pLoadGuildStorage, HP_intif_pLoadGuildStorage) }, { HP_POP(intif->pSaveGuildStorage, HP_intif_pSaveGuildStorage) }, { HP_POP(intif->pPartyCreated, HP_intif_pPartyCreated) }, @@ -1282,14 +1559,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->pPartyMemberWithdraw, HP_intif_pPartyMemberWithdraw) }, { HP_POP(intif->pPartyMove, HP_intif_pPartyMove) }, { HP_POP(intif->pPartyBroken, HP_intif_pPartyBroken) }, - { HP_POP(intif->pPartyMessage, HP_intif_pPartyMessage) }, { HP_POP(intif->pGuildCreated, HP_intif_pGuildCreated) }, { HP_POP(intif->pGuildInfo, HP_intif_pGuildInfo) }, { HP_POP(intif->pGuildMemberAdded, HP_intif_pGuildMemberAdded) }, { HP_POP(intif->pGuildMemberWithdraw, HP_intif_pGuildMemberWithdraw) }, { HP_POP(intif->pGuildMemberInfoShort, HP_intif_pGuildMemberInfoShort) }, { HP_POP(intif->pGuildBroken, HP_intif_pGuildBroken) }, - { HP_POP(intif->pGuildMessage, HP_intif_pGuildMessage) }, { HP_POP(intif->pGuildBasicInfoChanged, HP_intif_pGuildBasicInfoChanged) }, { HP_POP(intif->pGuildMemberInfoChanged, HP_intif_pGuildMemberInfoChanged) }, { HP_POP(intif->pGuildPosition, HP_intif_pGuildPosition) }, @@ -1328,7 +1603,13 @@ struct HookingPointData HookingPoints[] = { { HP_POP(intif->pRecvHomunculusData, HP_intif_pRecvHomunculusData) }, { HP_POP(intif->pSaveHomunculusOk, HP_intif_pSaveHomunculusOk) }, { HP_POP(intif->pDeleteHomunculusOk, HP_intif_pDeleteHomunculusOk) }, -/* ircbot */ + { HP_POP(intif->pRequestRodexOpenInbox, HP_intif_pRequestRodexOpenInbox) }, + { HP_POP(intif->pRodexHasNew, HP_intif_pRodexHasNew) }, + { HP_POP(intif->pRodexSendMail, HP_intif_pRodexSendMail) }, + { HP_POP(intif->pRodexCheckName, HP_intif_pRodexCheckName) }, + { HP_POP(intif->pRecvClanMemberAction, HP_intif_pRecvClanMemberAction) }, + { HP_POP(intif->pAchievementsLoad, HP_intif_pAchievementsLoad) }, +/* irc_bot_interface */ { HP_POP(ircbot->init, HP_ircbot_init) }, { HP_POP(ircbot->final, HP_ircbot_final) }, { HP_POP(ircbot->parse, HP_ircbot_parse) }, @@ -1338,14 +1619,17 @@ struct HookingPointData HookingPoints[] = { { HP_POP(ircbot->connect_timer, HP_ircbot_connect_timer) }, { HP_POP(ircbot->identify_timer, HP_ircbot_identify_timer) }, { HP_POP(ircbot->join_timer, HP_ircbot_join_timer) }, + { HP_POP(ircbot->queue_timer, HP_ircbot_queue_timer) }, + { HP_POP(ircbot->queue, HP_ircbot_queue) }, { HP_POP(ircbot->send, HP_ircbot_send) }, { HP_POP(ircbot->relay, HP_ircbot_relay) }, { HP_POP(ircbot->pong, HP_ircbot_pong) }, { HP_POP(ircbot->privmsg, HP_ircbot_privmsg) }, + { HP_POP(ircbot->privmsg_ctcp, HP_ircbot_privmsg_ctcp) }, { HP_POP(ircbot->userjoin, HP_ircbot_userjoin) }, { HP_POP(ircbot->userleave, HP_ircbot_userleave) }, { HP_POP(ircbot->usernick, HP_ircbot_usernick) }, -/* itemdb */ +/* itemdb_interface */ { HP_POP(itemdb->init, HP_itemdb_init) }, { HP_POP(itemdb->final, HP_itemdb_final) }, { HP_POP(itemdb->reload, HP_itemdb_reload) }, @@ -1353,6 +1637,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->read_groups, HP_itemdb_read_groups) }, { HP_POP(itemdb->read_chains, HP_itemdb_read_chains) }, { HP_POP(itemdb->read_packages, HP_itemdb_read_packages) }, + { HP_POP(itemdb->read_options, HP_itemdb_read_options) }, { HP_POP(itemdb->write_cached_packages, HP_itemdb_write_cached_packages) }, { HP_POP(itemdb->read_cached_packages, HP_itemdb_read_cached_packages) }, { HP_POP(itemdb->name2id, HP_itemdb_name2id) }, @@ -1361,6 +1646,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->load, HP_itemdb_load) }, { HP_POP(itemdb->search, HP_itemdb_search) }, { HP_POP(itemdb->exists, HP_itemdb_exists) }, + { HP_POP(itemdb->option_exists, HP_itemdb_option_exists) }, { HP_POP(itemdb->in_group, HP_itemdb_in_group) }, { HP_POP(itemdb->group_item, HP_itemdb_group_item) }, { HP_POP(itemdb->chain_item, HP_itemdb_chain_item) }, @@ -1389,10 +1675,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->isrestricted, HP_itemdb_isrestricted) }, { HP_POP(itemdb->isidentified, HP_itemdb_isidentified) }, { HP_POP(itemdb->isidentified2, HP_itemdb_isidentified2) }, - { HP_POP(itemdb->combo_split_atoi, HP_itemdb_combo_split_atoi) }, - { HP_POP(itemdb->read_combos, HP_itemdb_read_combos) }, + { HP_POP(itemdb->read_combodb_libconfig, HP_itemdb_read_combodb_libconfig) }, + { HP_POP(itemdb->read_combodb_libconfig_sub, HP_itemdb_read_combodb_libconfig_sub) }, { HP_POP(itemdb->gendercheck, HP_itemdb_gendercheck) }, { HP_POP(itemdb->validate_entry, HP_itemdb_validate_entry) }, + { HP_POP(itemdb->readdb_options_additional_fields, HP_itemdb_readdb_options_additional_fields) }, { HP_POP(itemdb->readdb_additional_fields, HP_itemdb_readdb_additional_fields) }, { HP_POP(itemdb->readdb_job_sub, HP_itemdb_readdb_job_sub) }, { HP_POP(itemdb->readdb_libconfig_sub, HP_itemdb_readdb_libconfig_sub) }, @@ -1401,11 +1688,19 @@ struct HookingPointData HookingPoints[] = { { HP_POP(itemdb->read, HP_itemdb_read) }, { HP_POP(itemdb->destroy_item_data, HP_itemdb_destroy_item_data) }, { HP_POP(itemdb->final_sub, HP_itemdb_final_sub) }, + { HP_POP(itemdb->options_final_sub, HP_itemdb_options_final_sub) }, { HP_POP(itemdb->clear, HP_itemdb_clear) }, { HP_POP(itemdb->id2combo, HP_itemdb_id2combo) }, { HP_POP(itemdb->is_item_usable, HP_itemdb_is_item_usable) }, { HP_POP(itemdb->lookup_const, HP_itemdb_lookup_const) }, -/* libconfig */ + { HP_POP(itemdb->lookup_const_mask, HP_itemdb_lookup_const_mask) }, + { HP_POP(itemdb->addname_sub, HP_itemdb_addname_sub) }, + { HP_POP(itemdb->read_libconfig_lapineddukddak, HP_itemdb_read_libconfig_lapineddukddak) }, + { HP_POP(itemdb->read_libconfig_lapineddukddak_sub, HP_itemdb_read_libconfig_lapineddukddak_sub) }, + { HP_POP(itemdb->read_libconfig_lapineddukddak_sub_sources, HP_itemdb_read_libconfig_lapineddukddak_sub_sources) }, +/* libconfig_interface */ + { HP_POP(libconfig->set_db_path, HP_libconfig_set_db_path) }, + { HP_POP(libconfig->format_db_path, HP_libconfig_format_db_path) }, { HP_POP(libconfig->read, HP_libconfig_read) }, { HP_POP(libconfig->write, HP_libconfig_write) }, { HP_POP(libconfig->set_options, HP_libconfig_set_options) }, @@ -1474,7 +1769,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(libconfig->setting_lookup_int16, HP_libconfig_setting_lookup_int16) }, { HP_POP(libconfig->setting_lookup_mutable_string, HP_libconfig_setting_lookup_mutable_string) }, { HP_POP(libconfig->lookup_mutable_string, HP_libconfig_lookup_mutable_string) }, -/* logs */ +/* log_interface */ { HP_POP(logs->pick_pc, HP_logs_pick_pc) }, { HP_POP(logs->pick_mob, HP_logs_pick_mob) }, { HP_POP(logs->zeny, HP_logs_zeny) }, @@ -1497,7 +1792,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(logs->picktype2char, HP_logs_picktype2char) }, { HP_POP(logs->chattype2char, HP_logs_chattype2char) }, { HP_POP(logs->should_log_item, HP_logs_should_log_item) }, -/* mail */ +/* mail_interface */ { HP_POP(mail->clear, HP_mail_clear) }, { HP_POP(mail->removeitem, HP_mail_removeitem) }, { HP_POP(mail->removezeny, HP_mail_removezeny) }, @@ -1507,27 +1802,14 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mail->openmail, HP_mail_openmail) }, { HP_POP(mail->deliveryfail, HP_mail_deliveryfail) }, { HP_POP(mail->invalid_operation, HP_mail_invalid_operation) }, -/* iMalloc */ - { HP_POP(iMalloc->init, HP_iMalloc_init) }, - { HP_POP(iMalloc->final, HP_iMalloc_final) }, - { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) }, - { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) }, - { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) }, - { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) }, - { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) }, - { HP_POP(iMalloc->astrndup, HP_iMalloc_astrndup) }, - { HP_POP(iMalloc->free, HP_iMalloc_free) }, - { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) }, - { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) }, - { HP_POP(iMalloc->usage, HP_iMalloc_usage) }, - { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) }, - { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) }, -/* map */ +/* map_interface */ { HP_POP(map->zone_init, HP_map_zone_init) }, { HP_POP(map->zone_remove, HP_map_zone_remove) }, + { HP_POP(map->zone_remove_all, HP_map_zone_remove_all) }, { HP_POP(map->zone_apply, HP_map_zone_apply) }, { HP_POP(map->zone_change, HP_map_zone_change) }, { HP_POP(map->zone_change2, HP_map_zone_change2) }, + { HP_POP(map->zone_reload, HP_map_zone_reload) }, { HP_POP(map->getcell, HP_map_getcell) }, { HP_POP(map->setgatcell, HP_map_setgatcell) }, { HP_POP(map->cellfromcache, HP_map_cellfromcache) }, @@ -1626,8 +1908,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(map->iwall_nextxy, HP_map_iwall_nextxy) }, { HP_POP(map->create_map_data_other_server, HP_map_create_map_data_other_server) }, { HP_POP(map->eraseallipport_sub, HP_map_eraseallipport_sub) }, - { HP_POP(map->init_mapcache, HP_map_init_mapcache) }, { HP_POP(map->readfromcache, HP_map_readfromcache) }, + { HP_POP(map->readfromcache_v1, HP_map_readfromcache_v1) }, { HP_POP(map->addmap, HP_map_addmap) }, { HP_POP(map->delmapid, HP_map_delmapid) }, { HP_POP(map->zone_db_clear, HP_map_zone_db_clear) }, @@ -1636,9 +1918,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(map->readgat, HP_map_readgat) }, { HP_POP(map->readallmaps, HP_map_readallmaps) }, { HP_POP(map->config_read, HP_map_config_read) }, - { HP_POP(map->config_read_sub, HP_map_config_read_sub) }, - { HP_POP(map->reloadnpc_sub, HP_map_reloadnpc_sub) }, + { HP_POP(map->read_npclist, HP_map_read_npclist) }, { HP_POP(map->inter_config_read, HP_map_inter_config_read) }, + { HP_POP(map->inter_config_read_database_names, HP_map_inter_config_read_database_names) }, + { HP_POP(map->inter_config_read_connection, HP_map_inter_config_read_connection) }, { HP_POP(map->sql_init, HP_map_sql_init) }, { HP_POP(map->sql_close, HP_map_sql_close) }, { HP_POP(map->zone_mf_cache, HP_map_zone_mf_cache) }, @@ -1656,7 +1939,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(map->remove_questinfo, HP_map_remove_questinfo) }, { HP_POP(map->merge_zone, HP_map_merge_zone) }, { HP_POP(map->zone_clear_single, HP_map_zone_clear_single) }, -/* mapindex */ +/* mapindex_interface */ + { HP_POP(mapindex->config_read_dbpath, HP_mapindex_config_read_dbpath) }, + { HP_POP(mapindex->config_read, HP_mapindex_config_read) }, { HP_POP(mapindex->init, HP_mapindex_init) }, { HP_POP(mapindex->final, HP_mapindex_final) }, { HP_POP(mapindex->addmap, HP_mapindex_addmap) }, @@ -1666,7 +1951,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapindex->name2id, HP_mapindex_name2id) }, { HP_POP(mapindex->id2name, HP_mapindex_id2name) }, { HP_POP(mapindex->check_default, HP_mapindex_check_default) }, -/* mapit */ +/* mapit_interface */ { HP_POP(mapit->alloc, HP_mapit_alloc) }, { HP_POP(mapit->free, HP_mapit_free) }, { HP_POP(mapit->first, HP_mapit_first) }, @@ -1674,7 +1959,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapit->next, HP_mapit_next) }, { HP_POP(mapit->prev, HP_mapit_prev) }, { HP_POP(mapit->exists, HP_mapit_exists) }, -/* mapreg */ +/* mapreg_interface */ { HP_POP(mapreg->init, HP_mapreg_init) }, { HP_POP(mapreg->final, HP_mapreg_final) }, { HP_POP(mapreg->readreg, HP_mapreg_readreg) }, @@ -1687,7 +1972,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mapreg->destroyreg, HP_mapreg_destroyreg) }, { HP_POP(mapreg->reload, HP_mapreg_reload) }, { HP_POP(mapreg->config_read, HP_mapreg_config_read) }, -/* mercenary */ +/* md5_interface */ + { HP_POP(md5->string, HP_md5_string) }, + { HP_POP(md5->binary, HP_md5_binary) }, + { HP_POP(md5->salt, HP_md5_salt) }, +/* mercenary_interface */ { HP_POP(mercenary->init, HP_mercenary_init) }, { HP_POP(mercenary->class, HP_mercenary_class) }, { HP_POP(mercenary->get_viewdata, HP_mercenary_get_viewdata) }, @@ -1713,10 +2002,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mercenary->contract_end_timer, HP_mercenary_contract_end_timer) }, { HP_POP(mercenary->read_db_sub, HP_mercenary_read_db_sub) }, { HP_POP(mercenary->read_skill_db_sub, HP_mercenary_read_skill_db_sub) }, -/* mob */ +/* mob_interface */ { HP_POP(mob->init, HP_mob_init) }, { HP_POP(mob->final, HP_mob_final) }, { HP_POP(mob->reload, HP_mob_reload) }, + { HP_POP(mob->reload_sub_mob, HP_mob_reload_sub_mob) }, { HP_POP(mob->db, HP_mob_db) }, { HP_POP(mob->chat, HP_mob_chat) }, { HP_POP(mob->makedummymobdb, HP_mob_makedummymobdb) }, @@ -1724,6 +2014,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->skill_id2skill_idx, HP_mob_skill_id2skill_idx) }, { HP_POP(mob->db_searchname, HP_mob_db_searchname) }, { HP_POP(mob->db_searchname_array_sub, HP_mob_db_searchname_array_sub) }, + { HP_POP(mob->mvptomb_spawn_delayed, HP_mob_mvptomb_spawn_delayed) }, + { HP_POP(mob->mvptomb_delayspawn, HP_mob_mvptomb_delayspawn) }, { HP_POP(mob->mvptomb_create, HP_mob_mvptomb_create) }, { HP_POP(mob->mvptomb_destroy, HP_mob_mvptomb_destroy) }, { HP_POP(mob->db_searchname_array, HP_mob_db_searchname_array) }, @@ -1751,6 +2043,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->ai_sub_hard_bg_ally, HP_mob_ai_sub_hard_bg_ally) }, { HP_POP(mob->ai_sub_hard_lootsearch, HP_mob_ai_sub_hard_lootsearch) }, { HP_POP(mob->warpchase_sub, HP_mob_warpchase_sub) }, + { HP_POP(mob->is_in_battle_state, HP_mob_is_in_battle_state) }, { HP_POP(mob->ai_sub_hard_slavemob, HP_mob_ai_sub_hard_slavemob) }, { HP_POP(mob->unlocktarget, HP_mob_unlocktarget) }, { HP_POP(mob->randomwalk, HP_mob_randomwalk) }, @@ -1761,6 +2054,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->ai_sub_lazy, HP_mob_ai_sub_lazy) }, { HP_POP(mob->ai_lazy, HP_mob_ai_lazy) }, { HP_POP(mob->ai_hard, HP_mob_ai_hard) }, + { HP_POP(mob->setdropitem_options, HP_mob_setdropitem_options) }, { HP_POP(mob->setdropitem, HP_mob_setdropitem) }, { HP_POP(mob->setlootitem, HP_mob_setlootitem) }, { HP_POP(mob->delay_item_drop, HP_mob_delay_item_drop) }, @@ -1794,6 +2088,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->clone_delete, HP_mob_clone_delete) }, { HP_POP(mob->drop_adjust, HP_mob_drop_adjust) }, { HP_POP(mob->item_dropratio_adjust, HP_mob_item_dropratio_adjust) }, + { HP_POP(mob->read_optdrops_option, HP_mob_read_optdrops_option) }, + { HP_POP(mob->read_optdrops_optslot, HP_mob_read_optdrops_optslot) }, + { HP_POP(mob->read_optdrops_group, HP_mob_read_optdrops_group) }, + { HP_POP(mob->read_optdrops_db, HP_mob_read_optdrops_db) }, { HP_POP(mob->readdb, HP_mob_readdb) }, { HP_POP(mob->lookup_const, HP_mob_lookup_const) }, { HP_POP(mob->get_const, HP_mob_get_const) }, @@ -1804,20 +2102,39 @@ struct HookingPointData HookingPoints[] = { { HP_POP(mob->read_db_drops_sub, HP_mob_read_db_drops_sub) }, { HP_POP(mob->read_db_mvpdrops_sub, HP_mob_read_db_mvpdrops_sub) }, { HP_POP(mob->read_db_mode_sub, HP_mob_read_db_mode_sub) }, + { HP_POP(mob->read_db_drops_option, HP_mob_read_db_drops_option) }, { HP_POP(mob->read_db_stats_sub, HP_mob_read_db_stats_sub) }, + { HP_POP(mob->read_db_viewdata_sub, HP_mob_read_db_viewdata_sub) }, { HP_POP(mob->name_constants, HP_mob_name_constants) }, - { HP_POP(mob->readdb_mobavail, HP_mob_readdb_mobavail) }, + { HP_POP(mob->mobavail_removal_notice, HP_mob_mobavail_removal_notice) }, { HP_POP(mob->read_randommonster, HP_mob_read_randommonster) }, { HP_POP(mob->parse_row_chatdb, HP_mob_parse_row_chatdb) }, { HP_POP(mob->readchatdb, HP_mob_readchatdb) }, - { HP_POP(mob->parse_row_mobskilldb, HP_mob_parse_row_mobskilldb) }, { HP_POP(mob->readskilldb, HP_mob_readskilldb) }, { HP_POP(mob->readdb_race2, HP_mob_readdb_race2) }, { HP_POP(mob->readdb_itemratio, HP_mob_readdb_itemratio) }, { HP_POP(mob->load, HP_mob_load) }, { HP_POP(mob->clear_spawninfo, HP_mob_clear_spawninfo) }, + { HP_POP(mob->get_item_drop_ratio, HP_mob_get_item_drop_ratio) }, + { HP_POP(mob->set_item_drop_ratio, HP_mob_set_item_drop_ratio) }, + { HP_POP(mob->final_ratio_sub, HP_mob_final_ratio_sub) }, { HP_POP(mob->destroy_mob_db, HP_mob_destroy_mob_db) }, -/* npc_chat */ + { HP_POP(mob->destroy_drop_groups, HP_mob_destroy_drop_groups) }, + { HP_POP(mob->skill_db_libconfig, HP_mob_skill_db_libconfig) }, + { HP_POP(mob->skill_db_libconfig_sub, HP_mob_skill_db_libconfig_sub) }, + { HP_POP(mob->skill_db_libconfig_sub_skill, HP_mob_skill_db_libconfig_sub_skill) }, +/* mutex_interface */ + { HP_POP(mutex->create, HP_mutex_create) }, + { HP_POP(mutex->destroy, HP_mutex_destroy) }, + { HP_POP(mutex->lock, HP_mutex_lock) }, + { HP_POP(mutex->trylock, HP_mutex_trylock) }, + { HP_POP(mutex->unlock, HP_mutex_unlock) }, + { HP_POP(mutex->cond_create, HP_mutex_cond_create) }, + { HP_POP(mutex->cond_destroy, HP_mutex_cond_destroy) }, + { HP_POP(mutex->cond_wait, HP_mutex_cond_wait) }, + { HP_POP(mutex->cond_signal, HP_mutex_cond_signal) }, + { HP_POP(mutex->cond_broadcast, HP_mutex_cond_broadcast) }, +/* npc_chat_interface */ { HP_POP(npc_chat->sub, HP_npc_chat_sub) }, { HP_POP(npc_chat->finalize, HP_npc_chat_finalize) }, { HP_POP(npc_chat->def_pattern, HP_npc_chat_def_pattern) }, @@ -1827,7 +2144,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc_chat->activate_pcreset, HP_npc_chat_activate_pcreset) }, { HP_POP(npc_chat->lookup_pcreset, HP_npc_chat_lookup_pcreset) }, { HP_POP(npc_chat->finalize_pcrematch_entry, HP_npc_chat_finalize_pcrematch_entry) }, -/* npc */ +/* npc_interface */ { HP_POP(npc->init, HP_npc_init) }, { HP_POP(npc->final, HP_npc_final) }, { HP_POP(npc->get_new_npc_id, HP_npc_get_new_npc_id) }, @@ -1881,6 +2198,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->unload_ev_label, HP_npc_unload_ev_label) }, { HP_POP(npc->unload_dup_sub, HP_npc_unload_dup_sub) }, { HP_POP(npc->unload_duplicates, HP_npc_unload_duplicates) }, + { HP_POP(npc->unload_mob, HP_npc_unload_mob) }, { HP_POP(npc->unload, HP_npc_unload) }, { HP_POP(npc->clearsrcfile, HP_npc_clearsrcfile) }, { HP_POP(npc->addsrcfile, HP_npc_addsrcfile) }, @@ -1931,16 +2249,35 @@ struct HookingPointData HookingPoints[] = { { HP_POP(npc->trader_pay, HP_npc_trader_pay) }, { HP_POP(npc->trader_update, HP_npc_trader_update) }, { HP_POP(npc->market_buylist, HP_npc_market_buylist) }, + { HP_POP(npc->barter_buylist, HP_npc_barter_buylist) }, + { HP_POP(npc->expanded_barter_buylist, HP_npc_expanded_barter_buylist) }, { HP_POP(npc->trader_open, HP_npc_trader_open) }, { HP_POP(npc->market_fromsql, HP_npc_market_fromsql) }, { HP_POP(npc->market_tosql, HP_npc_market_tosql) }, { HP_POP(npc->market_delfromsql, HP_npc_market_delfromsql) }, { HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) }, + { HP_POP(npc->barter_fromsql, HP_npc_barter_fromsql) }, + { HP_POP(npc->barter_tosql, HP_npc_barter_tosql) }, + { HP_POP(npc->barter_delfromsql, HP_npc_barter_delfromsql) }, + { HP_POP(npc->barter_delfromsql_sub, HP_npc_barter_delfromsql_sub) }, + { HP_POP(npc->expanded_barter_fromsql, HP_npc_expanded_barter_fromsql) }, + { HP_POP(npc->expanded_barter_tosql, HP_npc_expanded_barter_tosql) }, + { HP_POP(npc->expanded_barter_delfromsql, HP_npc_expanded_barter_delfromsql) }, + { HP_POP(npc->expanded_barter_delfromsql_sub, HP_npc_expanded_barter_delfromsql_sub) }, { HP_POP(npc->db_checkid, HP_npc_db_checkid) }, + { HP_POP(npc->refresh, HP_npc_refresh) }, + { HP_POP(npc->questinfo_clear, HP_npc_questinfo_clear) }, { HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) }, -/* nullpo */ +/* nullpo_interface */ + { HP_POP(nullpo->init, HP_nullpo_init) }, + { HP_POP(nullpo->final, HP_nullpo_final) }, { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) }, -/* party */ +/* packets_interface */ + { HP_POP(packets->init, HP_packets_init) }, + { HP_POP(packets->final, HP_packets_final) }, + { HP_POP(packets->addLens, HP_packets_addLens) }, + { HP_POP(packets->addLen, HP_packets_addLen) }, +/* party_interface */ { HP_POP(party->init, HP_party_init) }, { HP_POP(party->final, HP_party_final) }, { HP_POP(party->search, HP_party_search) }, @@ -1968,7 +2305,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(party->send_levelup, HP_party_send_levelup) }, { HP_POP(party->send_logout, HP_party_send_logout) }, { HP_POP(party->send_message, HP_party_send_message) }, - { HP_POP(party->recv_message, HP_party_recv_message) }, { HP_POP(party->skill_check, HP_party_skill_check) }, { HP_POP(party->send_xy_clear, HP_party_send_xy_clear) }, { HP_POP(party->exp_share, HP_party_exp_share) }, @@ -1990,7 +2326,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(party->check_state, HP_party_check_state) }, { HP_POP(party->create_booking_data, HP_party_create_booking_data) }, { HP_POP(party->db_final, HP_party_db_final) }, -/* path */ +/* path_interface */ { HP_POP(path->blownpos, HP_path_blownpos) }, { HP_POP(path->search, HP_path_search) }, { HP_POP(path->search_long, HP_path_search_long) }, @@ -1998,7 +2334,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(path->distance, HP_path_distance) }, { HP_POP(path->check_distance_client, HP_path_check_distance_client) }, { HP_POP(path->distance_client, HP_path_distance_client) }, -/* pcg */ +/* pc_groups_interface */ { HP_POP(pcg->init, HP_pcg_init) }, { HP_POP(pcg->final, HP_pcg_final) }, { HP_POP(pcg->reload, HP_pcg_reload) }, @@ -2010,7 +2346,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pcg->get_name, HP_pcg_get_name) }, { HP_POP(pcg->get_level, HP_pcg_get_level) }, { HP_POP(pcg->get_idx, HP_pcg_get_idx) }, -/* pc */ +/* pc_interface */ { HP_POP(pc->init, HP_pc_init) }, { HP_POP(pc->final, HP_pc_final) }, { HP_POP(pc->get_dummy_sd, HP_pc_get_dummy_sd) }, @@ -2029,12 +2365,15 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->reg_received, HP_pc_reg_received) }, { HP_POP(pc->isequip, HP_pc_isequip) }, { HP_POP(pc->equippoint, HP_pc_equippoint) }, + { HP_POP(pc->item_equippoint, HP_pc_item_equippoint) }, { HP_POP(pc->setinventorydata, HP_pc_setinventorydata) }, { HP_POP(pc->checkskill, HP_pc_checkskill) }, { HP_POP(pc->checkskill2, HP_pc_checkskill2) }, { HP_POP(pc->checkallowskill, HP_pc_checkallowskill) }, { HP_POP(pc->checkequip, HP_pc_checkequip) }, { HP_POP(pc->calc_skilltree, HP_pc_calc_skilltree) }, + { HP_POP(pc->calc_skilltree_clear, HP_pc_calc_skilltree_clear) }, + { HP_POP(pc->calc_skilltree_bonus, HP_pc_calc_skilltree_bonus) }, { HP_POP(pc->calc_skilltree_normalize_job, HP_pc_calc_skilltree_normalize_job) }, { HP_POP(pc->clean_skilltree, HP_pc_clean_skilltree) }, { HP_POP(pc->setpos, HP_pc_setpos) }, @@ -2083,6 +2422,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->maxbaselv, HP_pc_maxbaselv) }, { HP_POP(pc->maxjoblv, HP_pc_maxjoblv) }, { HP_POP(pc->checkbaselevelup, HP_pc_checkbaselevelup) }, + { HP_POP(pc->checkbaselevelup_sc, HP_pc_checkbaselevelup_sc) }, { HP_POP(pc->checkjoblevelup, HP_pc_checkjoblevelup) }, { HP_POP(pc->gainexp, HP_pc_gainexp) }, { HP_POP(pc->nextbaseexp, HP_pc_nextbaseexp) }, @@ -2099,6 +2439,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->resetlvl, HP_pc_resetlvl) }, { HP_POP(pc->resetstate, HP_pc_resetstate) }, { HP_POP(pc->resetskill, HP_pc_resetskill) }, + { HP_POP(pc->resetskill_job, HP_pc_resetskill_job) }, { HP_POP(pc->resetfeel, HP_pc_resetfeel) }, { HP_POP(pc->resethate, HP_pc_resethate) }, { HP_POP(pc->equipitem, HP_pc_equipitem) }, @@ -2107,6 +2448,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->unequipitem_pos, HP_pc_unequipitem_pos) }, { HP_POP(pc->checkitem, HP_pc_checkitem) }, { HP_POP(pc->useitem, HP_pc_useitem) }, + { HP_POP(pc->autocast_clear, HP_pc_autocast_clear) }, { HP_POP(pc->skillatk_bonus, HP_pc_skillatk_bonus) }, { HP_POP(pc->skillheal_bonus, HP_pc_skillheal_bonus) }, { HP_POP(pc->skillheal2_bonus, HP_pc_skillheal2_bonus) }, @@ -2117,6 +2459,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->itemheal, HP_pc_itemheal) }, { HP_POP(pc->percentheal, HP_pc_percentheal) }, { HP_POP(pc->jobchange, HP_pc_jobchange) }, + { HP_POP(pc->hide, HP_pc_hide) }, + { HP_POP(pc->unhide, HP_pc_unhide) }, { HP_POP(pc->setoption, HP_pc_setoption) }, { HP_POP(pc->setcart, HP_pc_setcart) }, { HP_POP(pc->setfalcon, HP_pc_setfalcon) }, @@ -2159,12 +2503,18 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->setinvincibletimer, HP_pc_setinvincibletimer) }, { HP_POP(pc->delinvincibletimer, HP_pc_delinvincibletimer) }, { HP_POP(pc->addspiritball, HP_pc_addspiritball) }, + { HP_POP(pc->addspiritball_sub, HP_pc_addspiritball_sub) }, { HP_POP(pc->delspiritball, HP_pc_delspiritball) }, + { HP_POP(pc->delspiritball_sub, HP_pc_delspiritball_sub) }, { HP_POP(pc->getmaxspiritball, HP_pc_getmaxspiritball) }, { HP_POP(pc->addfame, HP_pc_addfame) }, - { HP_POP(pc->famerank, HP_pc_famerank) }, + { HP_POP(pc->fame_rank, HP_pc_fame_rank) }, + { HP_POP(pc->famelist_type, HP_pc_famelist_type) }, { HP_POP(pc->set_hate_mob, HP_pc_set_hate_mob) }, { HP_POP(pc->readdb, HP_pc_readdb) }, + { HP_POP(pc->read_exp_db, HP_pc_read_exp_db) }, + { HP_POP(pc->read_exp_db_sub, HP_pc_read_exp_db_sub) }, + { HP_POP(pc->read_exp_db_sub_class, HP_pc_read_exp_db_sub_class) }, { HP_POP(pc->map_day_timer, HP_pc_map_day_timer) }, { HP_POP(pc->map_night_timer, HP_pc_map_night_timer) }, { HP_POP(pc->inventory_rentals, HP_pc_inventory_rentals) }, @@ -2203,6 +2553,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->autosave, HP_pc_autosave) }, { HP_POP(pc->follow_timer, HP_pc_follow_timer) }, { HP_POP(pc->read_skill_tree, HP_pc_read_skill_tree) }, + { HP_POP(pc->read_skill_job_skip, HP_pc_read_skill_job_skip) }, { HP_POP(pc->clear_skill_tree, HP_pc_clear_skill_tree) }, { HP_POP(pc->isUseitem, HP_pc_isUseitem) }, { HP_POP(pc->show_steal, HP_pc_show_steal) }, @@ -2219,6 +2570,10 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->expire_check, HP_pc_expire_check) }, { HP_POP(pc->db_checkid, HP_pc_db_checkid) }, { HP_POP(pc->validate_levels, HP_pc_validate_levels) }, + { HP_POP(pc->update_job_and_level, HP_pc_update_job_and_level) }, + { HP_POP(pc->clear_exp_groups, HP_pc_clear_exp_groups) }, + { HP_POP(pc->init_exp_groups, HP_pc_init_exp_groups) }, + { HP_POP(pc->job_is_dummy, HP_pc_job_is_dummy) }, { HP_POP(pc->autotrade_load, HP_pc_autotrade_load) }, { HP_POP(pc->autotrade_update, HP_pc_autotrade_update) }, { HP_POP(pc->autotrade_start, HP_pc_autotrade_start) }, @@ -2228,7 +2583,17 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pc->check_job_name, HP_pc_check_job_name) }, { HP_POP(pc->update_idle_time, HP_pc_update_idle_time) }, { HP_POP(pc->have_magnifier, HP_pc_have_magnifier) }, -/* libpcre */ + { HP_POP(pc->have_item_chain, HP_pc_have_item_chain) }, + { HP_POP(pc->process_chat_message, HP_pc_process_chat_message) }, + { HP_POP(pc->wis_message_to_gm, HP_pc_wis_message_to_gm) }, + { HP_POP(pc->wis_message_to_gm_sub, HP_pc_wis_message_to_gm_sub) }, + { HP_POP(pc->check_supernovice_call, HP_pc_check_supernovice_call) }, + { HP_POP(pc->check_basicskill, HP_pc_check_basicskill) }, + { HP_POP(pc->isDeathPenaltyJob, HP_pc_isDeathPenaltyJob) }, + { HP_POP(pc->has_second_costume, HP_pc_has_second_costume) }, + { HP_POP(pc->expandInventory, HP_pc_expandInventory) }, + { HP_POP(pc->auto_exp_insurance, HP_pc_auto_exp_insurance) }, +/* pcre_interface */ { HP_POP(libpcre->compile, HP_libpcre_compile) }, { HP_POP(libpcre->study, HP_libpcre_study) }, { HP_POP(libpcre->exec, HP_libpcre_exec) }, @@ -2237,10 +2602,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(libpcre->free_substring, HP_libpcre_free_substring) }, { HP_POP(libpcre->copy_named_substring, HP_libpcre_copy_named_substring) }, { HP_POP(libpcre->get_substring, HP_libpcre_get_substring) }, -/* pet */ +/* pet_interface */ { HP_POP(pet->init, HP_pet_init) }, { HP_POP(pet->final, HP_pet_final) }, { HP_POP(pet->hungry_val, HP_pet_hungry_val) }, + { HP_POP(pet->set_hunger, HP_pet_set_hunger) }, { HP_POP(pet->set_intimate, HP_pet_set_intimate) }, { HP_POP(pet->create_egg, HP_pet_create_egg) }, { HP_POP(pet->unlocktarget, HP_pet_unlocktarget) }, @@ -2276,7 +2642,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(pet->recovery_timer, HP_pet_recovery_timer) }, { HP_POP(pet->skill_support_timer, HP_pet_skill_support_timer) }, { HP_POP(pet->read_db, HP_pet_read_db) }, -/* quest */ + { HP_POP(pet->read_db_libconfig, HP_pet_read_db_libconfig) }, + { HP_POP(pet->read_db_sub, HP_pet_read_db_sub) }, + { HP_POP(pet->read_db_sub_intimacy, HP_pet_read_db_sub_intimacy) }, + { HP_POP(pet->read_db_clear, HP_pet_read_db_clear) }, + { HP_POP(pet->read_db_sub_evolution, HP_pet_read_db_sub_evolution) }, +/* quest_interface */ { HP_POP(quest->init, HP_quest_init) }, { HP_POP(quest->final, HP_quest_final) }, { HP_POP(quest->reload, HP_quest_reload) }, @@ -2292,7 +2663,65 @@ struct HookingPointData HookingPoints[] = { { HP_POP(quest->clear, HP_quest_clear) }, { HP_POP(quest->read_db, HP_quest_read_db) }, { HP_POP(quest->read_db_sub, HP_quest_read_db_sub) }, -/* script */ + { HP_POP(quest->questinfo_validate_icon, HP_quest_questinfo_validate_icon) }, + { HP_POP(quest->questinfo_refresh, HP_quest_questinfo_refresh) }, + { HP_POP(quest->questinfo_validate, HP_quest_questinfo_validate) }, + { HP_POP(quest->questinfo_validate_job, HP_quest_questinfo_validate_job) }, + { HP_POP(quest->questinfo_validate_sex, HP_quest_questinfo_validate_sex) }, + { HP_POP(quest->questinfo_validate_baselevel, HP_quest_questinfo_validate_baselevel) }, + { HP_POP(quest->questinfo_validate_joblevel, HP_quest_questinfo_validate_joblevel) }, + { HP_POP(quest->questinfo_validate_items, HP_quest_questinfo_validate_items) }, + { HP_POP(quest->questinfo_validate_homunculus_level, HP_quest_questinfo_validate_homunculus_level) }, + { HP_POP(quest->questinfo_validate_homunculus_type, HP_quest_questinfo_validate_homunculus_type) }, + { HP_POP(quest->questinfo_validate_quests, HP_quest_questinfo_validate_quests) }, + { HP_POP(quest->questinfo_validate_mercenary_class, HP_quest_questinfo_validate_mercenary_class) }, +/* refine_interface */ + { HP_POP(refine->init, HP_refine_init) }, + { HP_POP(refine->final, HP_refine_final) }, + { HP_POP(refine->get_refine_chance, HP_refine_get_refine_chance) }, + { HP_POP(refine->get_bonus, HP_refine_get_bonus) }, + { HP_POP(refine->get_randombonus_max, HP_refine_get_randombonus_max) }, + { HP_POP(refine->refinery_add_item, HP_refine_refinery_add_item) }, + { HP_POP(refine->refinery_refine_request, HP_refine_refinery_refine_request) }, +/* refine_interface_private */ + { HP_POP(refine->p->readdb_refine_libconfig_sub, HP_PRIV__refine_readdb_refine_libconfig_sub) }, + { HP_POP(refine->p->readdb_refine_libconfig, HP_PRIV__refine_readdb_refine_libconfig) }, + { HP_POP(refine->p->announce_behavior_string2enum, HP_PRIV__refine_announce_behavior_string2enum) }, + { HP_POP(refine->p->failure_behavior_string2enum, HP_PRIV__refine_failure_behavior_string2enum) }, + { HP_POP(refine->p->readdb_refinery_ui_settings_items, HP_PRIV__refine_readdb_refinery_ui_settings_items) }, + { HP_POP(refine->p->readdb_refinery_ui_settings_sub, HP_PRIV__refine_readdb_refinery_ui_settings_sub) }, + { HP_POP(refine->p->readdb_refinery_ui_settings, HP_PRIV__refine_readdb_refinery_ui_settings) }, + { HP_POP(refine->p->is_refinable, HP_PRIV__refine_is_refinable) }, +/* rnd_interface */ + { HP_POP(rnd->init, HP_rnd_init) }, + { HP_POP(rnd->final, HP_rnd_final) }, + { HP_POP(rnd->seed, HP_rnd_seed) }, + { HP_POP(rnd->random, HP_rnd_random) }, + { HP_POP(rnd->roll, HP_rnd_roll) }, + { HP_POP(rnd->value, HP_rnd_value) }, + { HP_POP(rnd->uniform, HP_rnd_uniform) }, + { HP_POP(rnd->uniform53, HP_rnd_uniform53) }, +/* rodex_interface */ + { HP_POP(rodex->init, HP_rodex_init) }, + { HP_POP(rodex->final, HP_rodex_final) }, + { HP_POP(rodex->isenabled, HP_rodex_isenabled) }, + { HP_POP(rodex->open, HP_rodex_open) }, + { HP_POP(rodex->next_page, HP_rodex_next_page) }, + { HP_POP(rodex->refresh, HP_rodex_refresh) }, + { HP_POP(rodex->add_item, HP_rodex_add_item) }, + { HP_POP(rodex->remove_item, HP_rodex_remove_item) }, + { HP_POP(rodex->check_player, HP_rodex_check_player) }, + { HP_POP(rodex->send_mail, HP_rodex_send_mail) }, + { HP_POP(rodex->send_mail_result, HP_rodex_send_mail_result) }, + { HP_POP(rodex->get_mail, HP_rodex_get_mail) }, + { HP_POP(rodex->read_mail, HP_rodex_read_mail) }, + { HP_POP(rodex->get_zeny, HP_rodex_get_zeny) }, + { HP_POP(rodex->get_items, HP_rodex_get_items) }, + { HP_POP(rodex->delete_mail, HP_rodex_delete_mail) }, + { HP_POP(rodex->clean, HP_rodex_clean) }, + { HP_POP(rodex->getZenyAck, HP_rodex_getZenyAck) }, + { HP_POP(rodex->getItemsAck, HP_rodex_getItemsAck) }, +/* script_interface */ { HP_POP(script->init, HP_script_init) }, { HP_POP(script->final, HP_script_final) }, { HP_POP(script->reload, HP_script_reload) }, @@ -2314,10 +2743,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->push_val, HP_script_push_val) }, { HP_POP(script->get_val, HP_script_get_val) }, { HP_POP(script->get_val_ref_str, HP_script_get_val_ref_str) }, + { HP_POP(script->get_val_pc_ref_str, HP_script_get_val_pc_ref_str) }, { HP_POP(script->get_val_scope_str, HP_script_get_val_scope_str) }, { HP_POP(script->get_val_npc_str, HP_script_get_val_npc_str) }, { HP_POP(script->get_val_instance_str, HP_script_get_val_instance_str) }, { HP_POP(script->get_val_ref_num, HP_script_get_val_ref_num) }, + { HP_POP(script->get_val_pc_ref_num, HP_script_get_val_pc_ref_num) }, { HP_POP(script->get_val_scope_num, HP_script_get_val_scope_num) }, { HP_POP(script->get_val_npc_num, HP_script_get_val_npc_num) }, { HP_POP(script->get_val_instance_num, HP_script_get_val_instance_num) }, @@ -2347,6 +2778,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->setarray_pc, HP_script_setarray_pc) }, { HP_POP(script->config_read, HP_script_config_read) }, { HP_POP(script->add_str, HP_script_add_str) }, + { HP_POP(script->add_variable, HP_script_add_variable) }, { HP_POP(script->get_str, HP_script_get_str) }, { HP_POP(script->search_str, HP_script_search_str) }, { HP_POP(script->setd_sub, HP_script_setd_sub) }, @@ -2381,6 +2813,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->parse_nextline, HP_script_parse_nextline) }, { HP_POP(script->parse_variable, HP_script_parse_variable) }, { HP_POP(script->parse_simpleexpr, HP_script_parse_simpleexpr) }, + { HP_POP(script->parse_simpleexpr_paren, HP_script_parse_simpleexpr_paren) }, + { HP_POP(script->parse_simpleexpr_number, HP_script_parse_simpleexpr_number) }, + { HP_POP(script->parse_simpleexpr_string, HP_script_parse_simpleexpr_string) }, + { HP_POP(script->parse_simpleexpr_name, HP_script_parse_simpleexpr_name) }, + { HP_POP(script->add_translatable_string, HP_script_add_translatable_string) }, { HP_POP(script->parse_expr, HP_script_parse_expr) }, { HP_POP(script->parse_line, HP_script_parse_line) }, { HP_POP(script->read_constdb, HP_script_read_constdb) }, @@ -2390,10 +2827,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->errorwarning_sub, HP_script_errorwarning_sub) }, { HP_POP(script->set_reg, HP_script_set_reg) }, { HP_POP(script->set_reg_ref_str, HP_script_set_reg_ref_str) }, + { HP_POP(script->set_reg_pc_ref_str, HP_script_set_reg_pc_ref_str) }, { HP_POP(script->set_reg_scope_str, HP_script_set_reg_scope_str) }, { HP_POP(script->set_reg_npc_str, HP_script_set_reg_npc_str) }, { HP_POP(script->set_reg_instance_str, HP_script_set_reg_instance_str) }, { HP_POP(script->set_reg_ref_num, HP_script_set_reg_ref_num) }, + { HP_POP(script->set_reg_pc_ref_num, HP_script_set_reg_pc_ref_num) }, { HP_POP(script->set_reg_scope_num, HP_script_set_reg_scope_num) }, { HP_POP(script->set_reg_npc_num, HP_script_set_reg_npc_num) }, { HP_POP(script->set_reg_instance_num, HP_script_set_reg_instance_num) }, @@ -2409,6 +2848,9 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->db_free_code_sub, HP_script_db_free_code_sub) }, { HP_POP(script->add_autobonus, HP_script_add_autobonus) }, { HP_POP(script->menu_countoptions, HP_script_menu_countoptions) }, + { HP_POP(script->buildin_recovery_sub, HP_script_buildin_recovery_sub) }, + { HP_POP(script->buildin_recovery_pc_sub, HP_script_buildin_recovery_pc_sub) }, + { HP_POP(script->buildin_recovery_bl_sub, HP_script_buildin_recovery_bl_sub) }, { HP_POP(script->buildin_areawarp_sub, HP_script_buildin_areawarp_sub) }, { HP_POP(script->buildin_areapercentheal_sub, HP_script_buildin_areapercentheal_sub) }, { HP_POP(script->buildin_delitem_delete, HP_script_buildin_delitem_delete) }, @@ -2433,6 +2875,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->buildin_mobuseskill_sub, HP_script_buildin_mobuseskill_sub) }, { HP_POP(script->cleanfloor_sub, HP_script_cleanfloor_sub) }, { HP_POP(script->run_func, HP_script_run_func) }, + { HP_POP(script->sprintf_helper, HP_script_sprintf_helper) }, { HP_POP(script->getfuncname, HP_script_getfuncname) }, { HP_POP(script->calc_hash_ci, HP_script_calc_hash_ci) }, { HP_POP(script->array_src, HP_script_array_src) }, @@ -2452,17 +2895,23 @@ struct HookingPointData HookingPoints[] = { { HP_POP(script->mapindexname2id, HP_script_mapindexname2id) }, { HP_POP(script->string_dup, HP_script_string_dup) }, { HP_POP(script->load_translations, HP_script_load_translations) }, + { HP_POP(script->load_translation_addstring, HP_script_load_translation_addstring) }, + { HP_POP(script->load_translation_file, HP_script_load_translation_file) }, { HP_POP(script->load_translation, HP_script_load_translation) }, { HP_POP(script->translation_db_destroyer, HP_script_translation_db_destroyer) }, { HP_POP(script->clear_translations, HP_script_clear_translations) }, { HP_POP(script->parse_cleanup_timer, HP_script_parse_cleanup_timer) }, { HP_POP(script->add_language, HP_script_add_language) }, - { HP_POP(script->get_translation_file_name, HP_script_get_translation_file_name) }, + { HP_POP(script->get_translation_dir_name, HP_script_get_translation_dir_name) }, { HP_POP(script->parser_clean_leftovers, HP_script_parser_clean_leftovers) }, { HP_POP(script->run_use_script, HP_script_run_use_script) }, { HP_POP(script->run_item_equip_script, HP_script_run_item_equip_script) }, { HP_POP(script->run_item_unequip_script, HP_script_run_item_unequip_script) }, -/* searchstore */ + { HP_POP(script->run_item_rental_end_script, HP_script_run_item_rental_end_script) }, + { HP_POP(script->run_item_rental_start_script, HP_script_run_item_rental_start_script) }, + { HP_POP(script->run_item_lapineddukddak_script, HP_script_run_item_lapineddukddak_script) }, + { HP_POP(script->sellitemcurrency_add, HP_script_sellitemcurrency_add) }, +/* searchstore_interface */ { HP_POP(searchstore->open, HP_searchstore_open) }, { HP_POP(searchstore->query, HP_searchstore_query) }, { HP_POP(searchstore->querynext, HP_searchstore_querynext) }, @@ -2473,12 +2922,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(searchstore->queryremote, HP_searchstore_queryremote) }, { HP_POP(searchstore->clearremote, HP_searchstore_clearremote) }, { HP_POP(searchstore->result, HP_searchstore_result) }, -/* showmsg */ +/* showmsg_interface */ { HP_POP(showmsg->init, HP_showmsg_init) }, { HP_POP(showmsg->final, HP_showmsg_final) }, { HP_POP(showmsg->clearScreen, HP_showmsg_clearScreen) }, { HP_POP(showmsg->showMessageV, HP_showmsg_showMessageV) }, -/* skill */ +/* skill_interface */ { HP_POP(skill->init, HP_skill_init) }, { HP_POP(skill->final, HP_skill_final) }, { HP_POP(skill->reload, HP_skill_reload) }, @@ -2496,8 +2945,12 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->get_hp, HP_skill_get_hp) }, { HP_POP(skill->get_mhp, HP_skill_get_mhp) }, { HP_POP(skill->get_sp, HP_skill_get_sp) }, + { HP_POP(skill->get_hp_rate, HP_skill_get_hp_rate) }, + { HP_POP(skill->get_sp_rate, HP_skill_get_sp_rate) }, { HP_POP(skill->get_state, HP_skill_get_state) }, { HP_POP(skill->get_spiritball, HP_skill_get_spiritball) }, + { HP_POP(skill->get_itemid, HP_skill_get_itemid) }, + { HP_POP(skill->get_itemqty, HP_skill_get_itemqty) }, { HP_POP(skill->get_zeny, HP_skill_get_zeny) }, { HP_POP(skill->get_num, HP_skill_get_num) }, { HP_POP(skill->get_cast, HP_skill_get_cast) }, @@ -2526,7 +2979,6 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->tree_get_max, HP_skill_tree_get_max) }, { HP_POP(skill->get_name, HP_skill_get_name) }, { HP_POP(skill->get_desc, HP_skill_get_desc) }, - { HP_POP(skill->chk, HP_skill_chk) }, { HP_POP(skill->get_casttype, HP_skill_get_casttype) }, { HP_POP(skill->get_casttype2, HP_skill_get_casttype2) }, { HP_POP(skill->is_combo, HP_skill_is_combo) }, @@ -2577,12 +3029,16 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->can_cloak, HP_skill_can_cloak) }, { HP_POP(skill->enchant_elemental_end, HP_skill_enchant_elemental_end) }, { HP_POP(skill->not_ok, HP_skill_not_ok) }, + { HP_POP(skill->not_ok_unknown, HP_skill_not_ok_unknown) }, { HP_POP(skill->not_ok_hom, HP_skill_not_ok_hom) }, + { HP_POP(skill->not_ok_hom_unknown, HP_skill_not_ok_hom_unknown) }, { HP_POP(skill->not_ok_mercenary, HP_skill_not_ok_mercenary) }, + { HP_POP(skill->validate_autocast_data, HP_skill_validate_autocast_data) }, { HP_POP(skill->chastle_mob_changetarget, HP_skill_chastle_mob_changetarget) }, { HP_POP(skill->can_produce_mix, HP_skill_can_produce_mix) }, { HP_POP(skill->produce_mix, HP_skill_produce_mix) }, { HP_POP(skill->arrow_create, HP_skill_arrow_create) }, + { HP_POP(skill->castend_type, HP_skill_castend_type) }, { HP_POP(skill->castend_nodamage_id, HP_skill_castend_nodamage_id) }, { HP_POP(skill->castend_damage_id, HP_skill_castend_damage_id) }, { HP_POP(skill->castend_pos2, HP_skill_castend_pos2) }, @@ -2602,6 +3058,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->onskillusage, HP_skill_onskillusage) }, { HP_POP(skill->cell_overlap, HP_skill_cell_overlap) }, { HP_POP(skill->timerskill, HP_skill_timerskill) }, + { HP_POP(skill->trap_do_splash, HP_skill_trap_do_splash) }, { HP_POP(skill->trap_splash, HP_skill_trap_splash) }, { HP_POP(skill->check_condition_mercenary, HP_skill_check_condition_mercenary) }, { HP_POP(skill->locate_element_field, HP_skill_locate_element_field) }, @@ -2625,6 +3082,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->sit_out, HP_skill_sit_out) }, { HP_POP(skill->unitsetmapcell, HP_skill_unitsetmapcell) }, { HP_POP(skill->unit_onplace_timer, HP_skill_unit_onplace_timer) }, + { HP_POP(skill->unit_onplace_timer_unknown, HP_skill_unit_onplace_timer_unknown) }, { HP_POP(skill->unit_effect, HP_skill_unit_effect) }, { HP_POP(skill->unit_timer_sub_onplace, HP_skill_unit_timer_sub_onplace) }, { HP_POP(skill->unit_move_sub, HP_skill_unit_move_sub) }, @@ -2635,17 +3093,33 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->unit_timer, HP_skill_unit_timer) }, { HP_POP(skill->unit_timer_sub, HP_skill_unit_timer_sub) }, { HP_POP(skill->init_unit_layout, HP_skill_init_unit_layout) }, - { HP_POP(skill->parse_row_skilldb, HP_skill_parse_row_skilldb) }, - { HP_POP(skill->parse_row_requiredb, HP_skill_parse_row_requiredb) }, - { HP_POP(skill->parse_row_castdb, HP_skill_parse_row_castdb) }, - { HP_POP(skill->parse_row_castnodexdb, HP_skill_parse_row_castnodexdb) }, - { HP_POP(skill->parse_row_unitdb, HP_skill_parse_row_unitdb) }, + { HP_POP(skill->init_unit_layout_unknown, HP_skill_init_unit_layout_unknown) }, + { HP_POP(skill->validate_hittype, HP_skill_validate_hittype) }, + { HP_POP(skill->validate_skilltype, HP_skill_validate_skilltype) }, + { HP_POP(skill->validate_attacktype, HP_skill_validate_attacktype) }, + { HP_POP(skill->validate_element, HP_skill_validate_element) }, + { HP_POP(skill->validate_skillinfo, HP_skill_validate_skillinfo) }, + { HP_POP(skill->validate_damagetype, HP_skill_validate_damagetype) }, + { HP_POP(skill->validate_castnodex, HP_skill_validate_castnodex) }, + { HP_POP(skill->validate_weapontype, HP_skill_validate_weapontype) }, + { HP_POP(skill->validate_ammotype, HP_skill_validate_ammotype) }, + { HP_POP(skill->validate_state, HP_skill_validate_state) }, + { HP_POP(skill->validate_item_requirements, HP_skill_validate_item_requirements) }, + { HP_POP(skill->validate_unit_target, HP_skill_validate_unit_target) }, + { HP_POP(skill->validate_unit_flag, HP_skill_validate_unit_flag) }, + { HP_POP(skill->validate_additional_fields, HP_skill_validate_additional_fields) }, + { HP_POP(skill->validate_skilldb, HP_skill_validate_skilldb) }, + { HP_POP(skill->validate_weapontype_sub, HP_skill_validate_weapontype_sub) }, + { HP_POP(skill->validate_ammotype_sub, HP_skill_validate_ammotype_sub) }, + { HP_POP(skill->validate_unit_flag_sub, HP_skill_validate_unit_flag_sub) }, + { HP_POP(skill->read_skilldb, HP_skill_read_skilldb) }, + { HP_POP(skill->config_set_level, HP_skill_config_set_level) }, + { HP_POP(skill->level_set_value, HP_skill_level_set_value) }, { HP_POP(skill->parse_row_producedb, HP_skill_parse_row_producedb) }, { HP_POP(skill->parse_row_createarrowdb, HP_skill_parse_row_createarrowdb) }, { HP_POP(skill->parse_row_abradb, HP_skill_parse_row_abradb) }, { HP_POP(skill->parse_row_spellbookdb, HP_skill_parse_row_spellbookdb) }, { HP_POP(skill->parse_row_magicmushroomdb, HP_skill_parse_row_magicmushroomdb) }, - { HP_POP(skill->parse_row_reproducedb, HP_skill_parse_row_reproducedb) }, { HP_POP(skill->parse_row_improvisedb, HP_skill_parse_row_improvisedb) }, { HP_POP(skill->parse_row_changematerialdb, HP_skill_parse_row_changematerialdb) }, { HP_POP(skill->usave_add, HP_skill_usave_add) }, @@ -2696,7 +3170,11 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->get_requirement_off_unknown, HP_skill_get_requirement_off_unknown) }, { HP_POP(skill->get_requirement_item_unknown, HP_skill_get_requirement_item_unknown) }, { HP_POP(skill->get_requirement_unknown, HP_skill_get_requirement_unknown) }, -/* sockt */ + { HP_POP(skill->splash_target, HP_skill_splash_target) }, + { HP_POP(skill->check_npc_chaospanic, HP_skill_check_npc_chaospanic) }, + { HP_POP(skill->count_wos, HP_skill_count_wos) }, + { HP_POP(skill->get_linked_song_dance_id, HP_skill_get_linked_song_dance_id) }, +/* socket_interface */ { HP_POP(sockt->init, HP_sockt_init) }, { HP_POP(sockt->final, HP_sockt_final) }, { HP_POP(sockt->perform, HP_sockt_perform) }, @@ -2706,12 +3184,15 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) }, { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) }, { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) }, + { HP_POP(sockt->wfifohead, HP_sockt_wfifohead) }, { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) }, { HP_POP(sockt->close, HP_sockt_close) }, + { HP_POP(sockt->validateWfifo, HP_sockt_validateWfifo) }, { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) }, { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) }, { HP_POP(sockt->flush, HP_sockt_flush) }, { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) }, + { HP_POP(sockt->connect_client, HP_sockt_connect_client) }, { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) }, { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) }, { HP_POP(sockt->host2ip, HP_sockt_host2ip) }, @@ -2725,7 +3206,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sockt->trusted_ip_check, HP_sockt_trusted_ip_check) }, { HP_POP(sockt->net_config_read_sub, HP_sockt_net_config_read_sub) }, { HP_POP(sockt->net_config_read, HP_sockt_net_config_read) }, -/* SQL */ +/* sql_interface */ { HP_POP(SQL->Connect, HP_SQL_Connect) }, { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) }, { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) }, @@ -2758,15 +3239,15 @@ struct HookingPointData HookingPoints[] = { { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) }, { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) }, { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) }, -/* status */ +/* status_interface */ { HP_POP(status->init, HP_status_init) }, { HP_POP(status->final, HP_status_final) }, - { HP_POP(status->get_refine_chance, HP_status_get_refine_chance) }, { HP_POP(status->skill2sc, HP_status_skill2sc) }, { HP_POP(status->sc2skill, HP_status_sc2skill) }, { HP_POP(status->sc2scb_flag, HP_status_sc2scb_flag) }, - { HP_POP(status->type2relevant_bl_types, HP_status_type2relevant_bl_types) }, + { HP_POP(status->get_sc_relevant_bl_types, HP_status_get_sc_relevant_bl_types) }, { HP_POP(status->get_sc_type, HP_status_get_sc_type) }, + { HP_POP(status->get_sc_icon, HP_status_get_sc_icon) }, { HP_POP(status->damage, HP_status_damage) }, { HP_POP(status->charge, HP_status_charge) }, { HP_POP(status->percent_change, HP_status_percent_change) }, @@ -2797,7 +3278,16 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->isimmune, HP_status_isimmune) }, { HP_POP(status->get_sc_def, HP_status_get_sc_def) }, { HP_POP(status->change_start, HP_status_change_start) }, + { HP_POP(status->change_start_sub, HP_status_change_start_sub) }, { HP_POP(status->change_end_, HP_status_change_end_) }, + { HP_POP(status->is_immune_to_status, HP_status_is_immune_to_status) }, + { HP_POP(status->is_boss_resist_sc, HP_status_is_boss_resist_sc) }, + { HP_POP(status->end_sc_before_start, HP_status_end_sc_before_start) }, + { HP_POP(status->change_start_stop_action, HP_status_change_start_stop_action) }, + { HP_POP(status->change_start_set_option, HP_status_change_start_set_option) }, + { HP_POP(status->get_val_flag, HP_status_get_val_flag) }, + { HP_POP(status->change_start_display, HP_status_change_start_display) }, + { HP_POP(status->change_start_unknown_sc, HP_status_change_start_unknown_sc) }, { HP_POP(status->kaahi_heal_timer, HP_status_kaahi_heal_timer) }, { HP_POP(status->change_timer, HP_status_change_timer) }, { HP_POP(status->change_timer_sub, HP_status_change_timer_sub) }, @@ -2808,6 +3298,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->calc_pet_, HP_status_calc_pet_) }, { HP_POP(status->calc_pc_, HP_status_calc_pc_) }, { HP_POP(status->calc_pc_additional, HP_status_calc_pc_additional) }, + { HP_POP(status->calc_pc_recover_hp, HP_status_calc_pc_recover_hp) }, { HP_POP(status->calc_homunculus_, HP_status_calc_homunculus_) }, { HP_POP(status->calc_mercenary_, HP_status_calc_mercenary_) }, { HP_POP(status->calc_elemental_, HP_status_calc_elemental_) }, @@ -2835,6 +3326,8 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->base_atk, HP_status_base_atk) }, { HP_POP(status->get_base_maxhp, HP_status_get_base_maxhp) }, { HP_POP(status->get_base_maxsp, HP_status_get_base_maxsp) }, + { HP_POP(status->get_restart_hp, HP_status_get_restart_hp) }, + { HP_POP(status->get_restart_sp, HP_status_get_restart_sp) }, { HP_POP(status->calc_npc_, HP_status_calc_npc_) }, { HP_POP(status->calc_str, HP_status_calc_str) }, { HP_POP(status->calc_agi, HP_status_calc_agi) }, @@ -2866,12 +3359,17 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->natural_heal_timer, HP_status_natural_heal_timer) }, { HP_POP(status->readdb_job2, HP_status_readdb_job2) }, { HP_POP(status->readdb_sizefix, HP_status_readdb_sizefix) }, - { HP_POP(status->readdb_refine_libconfig, HP_status_readdb_refine_libconfig) }, - { HP_POP(status->readdb_refine_libconfig_sub, HP_status_readdb_refine_libconfig_sub) }, - { HP_POP(status->readdb_scconfig, HP_status_readdb_scconfig) }, + { HP_POP(status->read_scdb_libconfig, HP_status_read_scdb_libconfig) }, + { HP_POP(status->read_scdb_libconfig_sub, HP_status_read_scdb_libconfig_sub) }, + { HP_POP(status->read_scdb_libconfig_sub_flag, HP_status_read_scdb_libconfig_sub_flag) }, + { HP_POP(status->read_scdb_libconfig_sub_flag_additional, HP_status_read_scdb_libconfig_sub_flag_additional) }, { HP_POP(status->read_job_db, HP_status_read_job_db) }, { HP_POP(status->read_job_db_sub, HP_status_read_job_db_sub) }, -/* storage */ + { HP_POP(status->set_sc, HP_status_set_sc) }, + { HP_POP(status->copy, HP_status_copy) }, + { HP_POP(status->base_matk_min, HP_status_base_matk_min) }, + { HP_POP(status->base_matk_max, HP_status_base_matk_max) }, +/* storage_interface */ { HP_POP(storage->reconnect, HP_storage_reconnect) }, { HP_POP(storage->delitem, HP_storage_delitem) }, { HP_POP(storage->open, HP_storage_open) }, @@ -2885,7 +3383,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(storage->comp_item, HP_storage_comp_item) }, { HP_POP(storage->sortitem, HP_storage_sortitem) }, { HP_POP(storage->reconnect_sub, HP_storage_reconnect_sub) }, -/* StrBuf */ +/* stringbuf_interface */ { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) }, { HP_POP(StrBuf->Init, HP_StrBuf_Init) }, { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) }, @@ -2896,7 +3394,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) }, { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) }, { HP_POP(StrBuf->Free, HP_StrBuf_Free) }, -/* strlib */ +/* strlib_interface */ { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) }, { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) }, { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) }, @@ -2912,7 +3410,17 @@ struct HookingPointData HookingPoints[] = { { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) }, { HP_POP(strlib->strline_, HP_strlib_strline_) }, { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) }, -/* sv */ +/* stylist_interface */ + { HP_POP(stylist->init, HP_stylist_init) }, + { HP_POP(stylist->final, HP_stylist_final) }, + { HP_POP(stylist->vector_init, HP_stylist_vector_init) }, + { HP_POP(stylist->vector_clear, HP_stylist_vector_clear) }, + { HP_POP(stylist->read_db_libconfig, HP_stylist_read_db_libconfig) }, + { HP_POP(stylist->read_db_libconfig_sub, HP_stylist_read_db_libconfig_sub) }, + { HP_POP(stylist->request_style_change, HP_stylist_request_style_change) }, + { HP_POP(stylist->validate_requirements, HP_stylist_validate_requirements) }, + { HP_POP(stylist->send_rodexitem, HP_stylist_send_rodexitem) }, +/* sv_interface */ { HP_POP(sv->parse_next, HP_sv_parse_next) }, { HP_POP(sv->parse, HP_sv_parse) }, { HP_POP(sv->split, HP_sv_split) }, @@ -2920,7 +3428,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sv->unescape_c, HP_sv_unescape_c) }, { HP_POP(sv->skip_escaped_c, HP_sv_skip_escaped_c) }, { HP_POP(sv->readdb, HP_sv_readdb) }, -/* sysinfo */ +/* sysinfo_interface */ { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) }, { HP_POP(sysinfo->platform, HP_sysinfo_platform) }, { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) }, @@ -2939,7 +3447,19 @@ struct HookingPointData HookingPoints[] = { { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) }, { HP_POP(sysinfo->init, HP_sysinfo_init) }, { HP_POP(sysinfo->final, HP_sysinfo_final) }, -/* timer */ +/* thread_interface */ + { HP_POP(thread->init, HP_thread_init) }, + { HP_POP(thread->final, HP_thread_final) }, + { HP_POP(thread->create, HP_thread_create) }, + { HP_POP(thread->create_opt, HP_thread_create_opt) }, + { HP_POP(thread->destroy, HP_thread_destroy) }, + { HP_POP(thread->self, HP_thread_self) }, + { HP_POP(thread->get_tid, HP_thread_get_tid) }, + { HP_POP(thread->wait, HP_thread_wait) }, + { HP_POP(thread->prio_set, HP_thread_prio_set) }, + { HP_POP(thread->prio_get, HP_thread_prio_get) }, + { HP_POP(thread->yield, HP_thread_yield) }, +/* timer_interface */ { HP_POP(timer->gettick, HP_timer_gettick) }, { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) }, { HP_POP(timer->add, HP_timer_add) }, @@ -2953,7 +3473,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(timer->perform, HP_timer_perform) }, { HP_POP(timer->init, HP_timer_init) }, { HP_POP(timer->final, HP_timer_final) }, -/* trade */ +/* trade_interface */ { HP_POP(trade->request, HP_trade_request) }, { HP_POP(trade->ack, HP_trade_ack) }, { HP_POP(trade->check_impossible, HP_trade_check_impossible) }, @@ -2963,29 +3483,32 @@ struct HookingPointData HookingPoints[] = { { HP_POP(trade->ok, HP_trade_ok) }, { HP_POP(trade->cancel, HP_trade_cancel) }, { HP_POP(trade->commit, HP_trade_commit) }, -/* unit */ +/* unit_interface */ { HP_POP(unit->init, HP_unit_init) }, { HP_POP(unit->final, HP_unit_final) }, { HP_POP(unit->bl2ud, HP_unit_bl2ud) }, + { HP_POP(unit->cbl2ud, HP_unit_cbl2ud) }, { HP_POP(unit->bl2ud2, HP_unit_bl2ud2) }, + { HP_POP(unit->init_ud, HP_unit_init_ud) }, { HP_POP(unit->attack_timer, HP_unit_attack_timer) }, - { HP_POP(unit->walktoxy_timer, HP_unit_walktoxy_timer) }, - { HP_POP(unit->walktoxy_sub, HP_unit_walktoxy_sub) }, - { HP_POP(unit->delay_walktoxy_timer, HP_unit_delay_walktoxy_timer) }, - { HP_POP(unit->walktoxy, HP_unit_walktoxy) }, - { HP_POP(unit->walktobl_sub, HP_unit_walktobl_sub) }, + { HP_POP(unit->walk_toxy_timer, HP_unit_walk_toxy_timer) }, + { HP_POP(unit->walk_toxy_sub, HP_unit_walk_toxy_sub) }, + { HP_POP(unit->delay_walk_toxy_timer, HP_unit_delay_walk_toxy_timer) }, + { HP_POP(unit->walk_toxy, HP_unit_walk_toxy) }, + { HP_POP(unit->walktobl_timer, HP_unit_walktobl_timer) }, { HP_POP(unit->walktobl, HP_unit_walktobl) }, { HP_POP(unit->run, HP_unit_run) }, { HP_POP(unit->run_hit, HP_unit_run_hit) }, { HP_POP(unit->escape, HP_unit_escape) }, { HP_POP(unit->movepos, HP_unit_movepos) }, - { HP_POP(unit->setdir, HP_unit_setdir) }, + { HP_POP(unit->set_dir, HP_unit_set_dir) }, { HP_POP(unit->getdir, HP_unit_getdir) }, { HP_POP(unit->blown, HP_unit_blown) }, { HP_POP(unit->warp, HP_unit_warp) }, + { HP_POP(unit->warpto_master, HP_unit_warpto_master) }, { HP_POP(unit->stop_walking, HP_unit_stop_walking) }, { HP_POP(unit->skilluse_id, HP_unit_skilluse_id) }, - { HP_POP(unit->step_timer, HP_unit_step_timer) }, + { HP_POP(unit->steptimer, HP_unit_steptimer) }, { HP_POP(unit->stop_stepaction, HP_unit_stop_stepaction) }, { HP_POP(unit->is_walking, HP_unit_is_walking) }, { HP_POP(unit->can_move, HP_unit_can_move) }, @@ -3012,7 +3535,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(unit->remove_map_pc, HP_unit_remove_map_pc) }, { HP_POP(unit->free_pc, HP_unit_free_pc) }, { HP_POP(unit->free, HP_unit_free) }, -/* vending */ +/* vending_interface */ { HP_POP(vending->init, HP_vending_init) }, { HP_POP(vending->final, HP_vending_final) }, { HP_POP(vending->close, HP_vending_close) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 71ced808b..599cbfdfd 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,17 +23,19 @@ * as it will get overwritten. */ -/* HCache */ +/* GENERATED FILE DO NOT EDIT */ + +/* HCache_interface */ void HP_HCache_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_HCache_init_pre ) { + if (HPMHooks.count.HP_HCache_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41,9 +43,9 @@ void HP_HCache_init(void) { { HPMHooks.source.HCache.init(); } - if( HPMHooks.count.HP_HCache_init_post ) { + if (HPMHooks.count.HP_HCache_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func; postHookFunc(); } @@ -53,14 +55,14 @@ void HP_HCache_init(void) { bool HP_HCache_check(const char *file) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_HCache_check_pre ) { - bool (*preHookFunc) (const char *file); + if (HPMHooks.count.HP_HCache_check_pre > 0) { + bool (*preHookFunc) (const char **file); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func; - retVal___ = preHookFunc(file); + retVal___ = preHookFunc(&file); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68,9 +70,9 @@ bool HP_HCache_check(const char *file) { { retVal___ = HPMHooks.source.HCache.check(file); } - if( HPMHooks.count.HP_HCache_check_post ) { + if (HPMHooks.count.HP_HCache_check_post > 0) { bool (*postHookFunc) (bool retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func; retVal___ = postHookFunc(retVal___, file); } @@ -80,14 +82,14 @@ bool HP_HCache_check(const char *file) { FILE* HP_HCache_open(const char *file, const char *opt) { int hIndex = 0; FILE* retVal___ = NULL; - if( HPMHooks.count.HP_HCache_open_pre ) { - FILE* (*preHookFunc) (const char *file, const char *opt); + if (HPMHooks.count.HP_HCache_open_pre > 0) { + FILE* (*preHookFunc) (const char **file, const char **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func; - retVal___ = preHookFunc(file, opt); + retVal___ = preHookFunc(&file, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -95,26 +97,1458 @@ FILE* HP_HCache_open(const char *file, const char *opt) { { retVal___ = HPMHooks.source.HCache.open(file, opt); } - if( HPMHooks.count.HP_HCache_open_post ) { + if (HPMHooks.count.HP_HCache_open_post > 0) { FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, file, opt); } } return retVal___; } -/* atcommand */ +/* achievement_interface */ +void HP_achievement_init(bool minimal) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_init_pre > 0) { + void (*preHookFunc) (bool *minimal); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_init_pre[hIndex].func; + preHookFunc(&minimal); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.init(minimal); + } + if (HPMHooks.count.HP_achievement_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_init_post[hIndex].func; + postHookFunc(minimal); + } + } + return; +} +void HP_achievement_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.final(); + } + if (HPMHooks.count.HP_achievement_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_achievement_db_finalize(union DBKey key, struct DBData *data, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_achievement_db_finalize_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_db_finalize_pre; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_achievement_db_finalize_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.achievement.db_finalize(key, data, args___copy); + va_end(args___copy); + } + if (HPMHooks.count.HP_achievement_db_finalize_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list args); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_db_finalize_post; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_achievement_db_finalize_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key, data, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +void HP_achievement_readdb(void) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_readdb_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.readdb(); + } + if (HPMHooks.count.HP_achievement_readdb_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_achievement_readdb_objectives_sub(const struct config_setting_t *conf, int index, struct achievement_data *entry) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_readdb_objectives_sub_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **conf, int *index, struct achievement_data **entry); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_objectives_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_objectives_sub_pre[hIndex].func; + retVal___ = preHookFunc(&conf, &index, &entry); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.readdb_objectives_sub(conf, index, entry); + } + if (HPMHooks.count.HP_achievement_readdb_objectives_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *conf, int index, struct achievement_data *entry); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_objectives_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_objectives_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, conf, index, entry); + } + } + return retVal___; +} +bool HP_achievement_readdb_objectives(const struct config_setting_t *conf, struct achievement_data *entry) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_readdb_objectives_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **conf, struct achievement_data **entry); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_objectives_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_objectives_pre[hIndex].func; + retVal___ = preHookFunc(&conf, &entry); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.readdb_objectives(conf, entry); + } + if (HPMHooks.count.HP_achievement_readdb_objectives_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *conf, struct achievement_data *entry); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_objectives_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_objectives_post[hIndex].func; + retVal___ = postHookFunc(retVal___, conf, entry); + } + } + return retVal___; +} +bool HP_achievement_readdb_validate_criteria_mobid(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_mobid_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_mobid_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_mobid_pre[hIndex].func; + retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_mobid(t, obj, type, entry_id, obj_idx); + } + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_mobid_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_mobid_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_mobid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx); + } + } + return retVal___; +} +bool HP_achievement_readdb_validate_criteria_jobid(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_jobid_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_jobid_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_jobid_pre[hIndex].func; + retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_jobid(t, obj, type, entry_id, obj_idx); + } + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_jobid_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_jobid_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_jobid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx); + } + } + return retVal___; +} +bool HP_achievement_readdb_validate_criteria_itemid(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_itemid_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_itemid_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_itemid_pre[hIndex].func; + retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_itemid(t, obj, type, entry_id, obj_idx); + } + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_itemid_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_itemid_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_itemid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx); + } + } + return retVal___; +} +bool HP_achievement_readdb_validate_criteria_statustype(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_statustype_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_statustype_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_statustype_pre[hIndex].func; + retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_statustype(t, obj, type, entry_id, obj_idx); + } + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_statustype_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_statustype_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_statustype_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx); + } + } + return retVal___; +} +bool HP_achievement_readdb_validate_criteria_itemtype(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_itemtype_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_itemtype_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_itemtype_pre[hIndex].func; + retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_itemtype(t, obj, type, entry_id, obj_idx); + } + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_itemtype_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_itemtype_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_itemtype_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx); + } + } + return retVal___; +} +bool HP_achievement_readdb_validate_criteria_weaponlv(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_weaponlv_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_weaponlv_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_weaponlv_pre[hIndex].func; + retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_weaponlv(t, obj, type, entry_id, obj_idx); + } + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_weaponlv_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_weaponlv_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_weaponlv_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx); + } + } + return retVal___; +} +bool HP_achievement_readdb_validate_criteria_achievement(const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_achievement_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **t, struct achievement_objective **obj, enum achievement_types *type, int *entry_id, int *obj_idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_achievement_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_achievement_pre[hIndex].func; + retVal___ = preHookFunc(&t, &obj, &type, &entry_id, &obj_idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.readdb_validate_criteria_achievement(t, obj, type, entry_id, obj_idx); + } + if (HPMHooks.count.HP_achievement_readdb_validate_criteria_achievement_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, struct achievement_objective *obj, enum achievement_types type, int entry_id, int obj_idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_criteria_achievement_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_criteria_achievement_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, obj, type, entry_id, obj_idx); + } + } + return retVal___; +} +bool HP_achievement_readdb_rewards(const struct config_setting_t *conf, struct achievement_data *entry, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_readdb_rewards_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **conf, struct achievement_data **entry, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_rewards_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_rewards_pre[hIndex].func; + retVal___ = preHookFunc(&conf, &entry, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.readdb_rewards(conf, entry, source); + } + if (HPMHooks.count.HP_achievement_readdb_rewards_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *conf, struct achievement_data *entry, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_rewards_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_rewards_post[hIndex].func; + retVal___ = postHookFunc(retVal___, conf, entry, source); + } + } + return retVal___; +} +void HP_achievement_readdb_validate_reward_items(const struct config_setting_t *t, struct achievement_data *entry) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_readdb_validate_reward_items_pre > 0) { + void (*preHookFunc) (const struct config_setting_t **t, struct achievement_data **entry); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_items_pre[hIndex].func; + preHookFunc(&t, &entry); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.readdb_validate_reward_items(t, entry); + } + if (HPMHooks.count.HP_achievement_readdb_validate_reward_items_post > 0) { + void (*postHookFunc) (const struct config_setting_t *t, struct achievement_data *entry); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_items_post[hIndex].func; + postHookFunc(t, entry); + } + } + return; +} +bool HP_achievement_readdb_validate_reward_item_sub(const struct config_setting_t *t, int element, struct achievement_data *entry) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_readdb_validate_reward_item_sub_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **t, int *element, struct achievement_data **entry); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_item_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_item_sub_pre[hIndex].func; + retVal___ = preHookFunc(&t, &element, &entry); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.readdb_validate_reward_item_sub(t, element, entry); + } + if (HPMHooks.count.HP_achievement_readdb_validate_reward_item_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *t, int element, struct achievement_data *entry); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_item_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_item_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, element, entry); + } + } + return retVal___; +} +void HP_achievement_readdb_validate_reward_bonus(const struct config_setting_t *t, struct achievement_data *entry, const char *source) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_readdb_validate_reward_bonus_pre > 0) { + void (*preHookFunc) (const struct config_setting_t **t, struct achievement_data **entry, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_bonus_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_bonus_pre[hIndex].func; + preHookFunc(&t, &entry, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.readdb_validate_reward_bonus(t, entry, source); + } + if (HPMHooks.count.HP_achievement_readdb_validate_reward_bonus_post > 0) { + void (*postHookFunc) (const struct config_setting_t *t, struct achievement_data *entry, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_bonus_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_bonus_post[hIndex].func; + postHookFunc(t, entry, source); + } + } + return; +} +void HP_achievement_readdb_validate_reward_titleid(const struct config_setting_t *t, struct achievement_data *entry) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_readdb_validate_reward_titleid_pre > 0) { + void (*preHookFunc) (const struct config_setting_t **t, struct achievement_data **entry); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_titleid_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_titleid_pre[hIndex].func; + preHookFunc(&t, &entry); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.readdb_validate_reward_titleid(t, entry); + } + if (HPMHooks.count.HP_achievement_readdb_validate_reward_titleid_post > 0) { + void (*postHookFunc) (const struct config_setting_t *t, struct achievement_data *entry); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_validate_reward_titleid_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_validate_reward_titleid_post[hIndex].func; + postHookFunc(t, entry); + } + } + return; +} +void HP_achievement_readdb_additional_fields(const struct config_setting_t *conf, struct achievement_data *entry, const char *source) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_readdb_additional_fields_pre > 0) { + void (*preHookFunc) (const struct config_setting_t **conf, struct achievement_data **entry, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_additional_fields_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_additional_fields_pre[hIndex].func; + preHookFunc(&conf, &entry, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.readdb_additional_fields(conf, entry, source); + } + if (HPMHooks.count.HP_achievement_readdb_additional_fields_post > 0) { + void (*postHookFunc) (const struct config_setting_t *conf, struct achievement_data *entry, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_additional_fields_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_additional_fields_post[hIndex].func; + postHookFunc(conf, entry, source); + } + } + return; +} +void HP_achievement_readdb_ranks(void) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_readdb_ranks_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_ranks_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_readdb_ranks_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.readdb_ranks(); + } + if (HPMHooks.count.HP_achievement_readdb_ranks_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_readdb_ranks_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_readdb_ranks_post[hIndex].func; + postHookFunc(); + } + } + return; +} +const struct achievement_data* HP_achievement_get(int aid) { + int hIndex = 0; + const struct achievement_data* retVal___ = NULL; + if (HPMHooks.count.HP_achievement_get_pre > 0) { + const struct achievement_data* (*preHookFunc) (int *aid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_get_pre[hIndex].func; + retVal___ = preHookFunc(&aid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.get(aid); + } + if (HPMHooks.count.HP_achievement_get_post > 0) { + const struct achievement_data* (*postHookFunc) (const struct achievement_data* retVal___, int aid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_get_post[hIndex].func; + retVal___ = postHookFunc(retVal___, aid); + } + } + return retVal___; +} +struct achievement* HP_achievement_ensure(struct map_session_data *sd, const struct achievement_data *ad) { + int hIndex = 0; + struct achievement* retVal___ = NULL; + if (HPMHooks.count.HP_achievement_ensure_pre > 0) { + struct achievement* (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_ensure_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_ensure_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &ad); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.ensure(sd, ad); + } + if (HPMHooks.count.HP_achievement_ensure_post > 0) { + struct achievement* (*postHookFunc) (struct achievement* retVal___, struct map_session_data *sd, const struct achievement_data *ad); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_ensure_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_ensure_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ad); + } + } + return retVal___; +} +void HP_achievement_calculate_totals(const struct map_session_data *sd, int *points, int *completed, int *rank, int *curr_rank_points) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_calculate_totals_pre > 0) { + void (*preHookFunc) (const struct map_session_data **sd, int **points, int **completed, int **rank, int **curr_rank_points); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_calculate_totals_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_calculate_totals_pre[hIndex].func; + preHookFunc(&sd, &points, &completed, &rank, &curr_rank_points); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.calculate_totals(sd, points, completed, rank, curr_rank_points); + } + if (HPMHooks.count.HP_achievement_calculate_totals_post > 0) { + void (*postHookFunc) (const struct map_session_data *sd, int *points, int *completed, int *rank, int *curr_rank_points); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_calculate_totals_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_calculate_totals_post[hIndex].func; + postHookFunc(sd, points, completed, rank, curr_rank_points); + } + } + return; +} +bool HP_achievement_check_complete(struct map_session_data *sd, const struct achievement_data *ad) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_check_complete_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_complete_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_check_complete_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &ad); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.check_complete(sd, ad); + } + if (HPMHooks.count.HP_achievement_check_complete_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct achievement_data *ad); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_complete_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_check_complete_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ad); + } + } + return retVal___; +} +void HP_achievement_progress_add(struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_progress_add_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad, unsigned int *obj_idx, int *progress); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_progress_add_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_progress_add_pre[hIndex].func; + preHookFunc(&sd, &ad, &obj_idx, &progress); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.progress_add(sd, ad, obj_idx, progress); + } + if (HPMHooks.count.HP_achievement_progress_add_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_progress_add_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_progress_add_post[hIndex].func; + postHookFunc(sd, ad, obj_idx, progress); + } + } + return; +} +void HP_achievement_progress_set(struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_progress_set_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad, unsigned int *obj_idx, int *progress); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_progress_set_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_progress_set_pre[hIndex].func; + preHookFunc(&sd, &ad, &obj_idx, &progress); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.progress_set(sd, ad, obj_idx, progress); + } + if (HPMHooks.count.HP_achievement_progress_set_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const struct achievement_data *ad, unsigned int obj_idx, int progress); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_progress_set_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_progress_set_post[hIndex].func; + postHookFunc(sd, ad, obj_idx, progress); + } + } + return; +} +bool HP_achievement_check_criteria(const struct achievement_objective *objective, const struct achievement_objective *criteria) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_check_criteria_pre > 0) { + bool (*preHookFunc) (const struct achievement_objective **objective, const struct achievement_objective **criteria); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_criteria_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_check_criteria_pre[hIndex].func; + retVal___ = preHookFunc(&objective, &criteria); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.check_criteria(objective, criteria); + } + if (HPMHooks.count.HP_achievement_check_criteria_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct achievement_objective *objective, const struct achievement_objective *criteria); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_criteria_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_check_criteria_post[hIndex].func; + retVal___ = postHookFunc(retVal___, objective, criteria); + } + } + return retVal___; +} +bool HP_achievement_validate(struct map_session_data *sd, int aid, unsigned int obj_idx, int progress, bool additive) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_validate_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *aid, unsigned int *obj_idx, int *progress, bool *additive); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &aid, &obj_idx, &progress, &additive); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.validate(sd, aid, obj_idx, progress, additive); + } + if (HPMHooks.count.HP_achievement_validate_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int aid, unsigned int obj_idx, int progress, bool additive); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, aid, obj_idx, progress, additive); + } + } + return retVal___; +} +int HP_achievement_validate_type(struct map_session_data *sd, enum achievement_types type, const struct achievement_objective *criteria, bool additive) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_achievement_validate_type_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, enum achievement_types *type, const struct achievement_objective **criteria, bool *additive); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_type_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_type_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &type, &criteria, &additive); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.validate_type(sd, type, criteria, additive); + } + if (HPMHooks.count.HP_achievement_validate_type_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum achievement_types type, const struct achievement_objective *criteria, bool additive); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_type_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, type, criteria, additive); + } + } + return retVal___; +} +void HP_achievement_validate_mob_kill(struct map_session_data *sd, int mob_id) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_mob_kill_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *mob_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_mob_kill_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_mob_kill_pre[hIndex].func; + preHookFunc(&sd, &mob_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_mob_kill(sd, mob_id); + } + if (HPMHooks.count.HP_achievement_validate_mob_kill_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int mob_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_mob_kill_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_mob_kill_post[hIndex].func; + postHookFunc(sd, mob_id); + } + } + return; +} +void HP_achievement_validate_mob_damage(struct map_session_data *sd, unsigned int damage, bool received) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_mob_damage_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned int *damage, bool *received); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_mob_damage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_mob_damage_pre[hIndex].func; + preHookFunc(&sd, &damage, &received); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_mob_damage(sd, damage, received); + } + if (HPMHooks.count.HP_achievement_validate_mob_damage_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int damage, bool received); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_mob_damage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_mob_damage_post[hIndex].func; + postHookFunc(sd, damage, received); + } + } + return; +} +void HP_achievement_validate_pc_kill(struct map_session_data *sd, struct map_session_data *dstsd) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_pc_kill_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **dstsd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_pc_kill_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_pc_kill_pre[hIndex].func; + preHookFunc(&sd, &dstsd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_pc_kill(sd, dstsd); + } + if (HPMHooks.count.HP_achievement_validate_pc_kill_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_pc_kill_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_pc_kill_post[hIndex].func; + postHookFunc(sd, dstsd); + } + } + return; +} +void HP_achievement_validate_pc_damage(struct map_session_data *sd, struct map_session_data *dstsd, unsigned int damage) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_pc_damage_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **dstsd, unsigned int *damage); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_pc_damage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_pc_damage_pre[hIndex].func; + preHookFunc(&sd, &dstsd, &damage); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_pc_damage(sd, dstsd, damage); + } + if (HPMHooks.count.HP_achievement_validate_pc_damage_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd, unsigned int damage); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_pc_damage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_pc_damage_post[hIndex].func; + postHookFunc(sd, dstsd, damage); + } + } + return; +} +void HP_achievement_validate_jobchange(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_jobchange_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_jobchange_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_jobchange_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_jobchange(sd); + } + if (HPMHooks.count.HP_achievement_validate_jobchange_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_jobchange_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_jobchange_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_achievement_validate_stats(struct map_session_data *sd, enum status_point_types stat_type, int progress) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_stats_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum status_point_types *stat_type, int *progress); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_stats_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_stats_pre[hIndex].func; + preHookFunc(&sd, &stat_type, &progress); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_stats(sd, stat_type, progress); + } + if (HPMHooks.count.HP_achievement_validate_stats_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum status_point_types stat_type, int progress); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_stats_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_stats_post[hIndex].func; + postHookFunc(sd, stat_type, progress); + } + } + return; +} +void HP_achievement_validate_chatroom_create(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_chatroom_create_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_chatroom_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_chatroom_create_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_chatroom_create(sd); + } + if (HPMHooks.count.HP_achievement_validate_chatroom_create_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_chatroom_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_chatroom_create_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_achievement_validate_chatroom_members(struct map_session_data *sd, int progress) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_chatroom_members_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *progress); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_chatroom_members_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_chatroom_members_pre[hIndex].func; + preHookFunc(&sd, &progress); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_chatroom_members(sd, progress); + } + if (HPMHooks.count.HP_achievement_validate_chatroom_members_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int progress); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_chatroom_members_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_chatroom_members_post[hIndex].func; + postHookFunc(sd, progress); + } + } + return; +} +void HP_achievement_validate_friend_add(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_friend_add_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_friend_add_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_friend_add_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_friend_add(sd); + } + if (HPMHooks.count.HP_achievement_validate_friend_add_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_friend_add_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_friend_add_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_achievement_validate_party_create(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_party_create_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_party_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_party_create_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_party_create(sd); + } + if (HPMHooks.count.HP_achievement_validate_party_create_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_party_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_party_create_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_achievement_validate_marry(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_marry_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_marry_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_marry_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_marry(sd); + } + if (HPMHooks.count.HP_achievement_validate_marry_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_marry_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_marry_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_achievement_validate_adopt(struct map_session_data *sd, bool parent) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_adopt_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *parent); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_adopt_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_adopt_pre[hIndex].func; + preHookFunc(&sd, &parent); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_adopt(sd, parent); + } + if (HPMHooks.count.HP_achievement_validate_adopt_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, bool parent); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_adopt_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_adopt_post[hIndex].func; + postHookFunc(sd, parent); + } + } + return; +} +void HP_achievement_validate_zeny(struct map_session_data *sd, int amount) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_zeny_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *amount); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_zeny_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_zeny_pre[hIndex].func; + preHookFunc(&sd, &amount); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_zeny(sd, amount); + } + if (HPMHooks.count.HP_achievement_validate_zeny_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int amount); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_zeny_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_zeny_post[hIndex].func; + postHookFunc(sd, amount); + } + } + return; +} +void HP_achievement_validate_refine(struct map_session_data *sd, unsigned int idx, bool success) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_refine_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned int *idx, bool *success); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_refine_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_refine_pre[hIndex].func; + preHookFunc(&sd, &idx, &success); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_refine(sd, idx, success); + } + if (HPMHooks.count.HP_achievement_validate_refine_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int idx, bool success); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_refine_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_refine_post[hIndex].func; + postHookFunc(sd, idx, success); + } + } + return; +} +void HP_achievement_validate_item_get(struct map_session_data *sd, int nameid, int amount) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_item_get_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *nameid, int *amount); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_item_get_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_item_get_pre[hIndex].func; + preHookFunc(&sd, &nameid, &amount); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_item_get(sd, nameid, amount); + } + if (HPMHooks.count.HP_achievement_validate_item_get_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int nameid, int amount); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_item_get_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_item_get_post[hIndex].func; + postHookFunc(sd, nameid, amount); + } + } + return; +} +void HP_achievement_validate_item_sell(struct map_session_data *sd, int nameid, int amount) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_item_sell_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *nameid, int *amount); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_item_sell_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_item_sell_pre[hIndex].func; + preHookFunc(&sd, &nameid, &amount); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_item_sell(sd, nameid, amount); + } + if (HPMHooks.count.HP_achievement_validate_item_sell_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int nameid, int amount); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_item_sell_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_item_sell_post[hIndex].func; + postHookFunc(sd, nameid, amount); + } + } + return; +} +void HP_achievement_validate_achieve(struct map_session_data *sd, int achid) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_achieve_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *achid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_achieve_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_achieve_pre[hIndex].func; + preHookFunc(&sd, &achid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_achieve(sd, achid); + } + if (HPMHooks.count.HP_achievement_validate_achieve_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int achid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_achieve_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_achieve_post[hIndex].func; + postHookFunc(sd, achid); + } + } + return; +} +void HP_achievement_validate_taming(struct map_session_data *sd, int class) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_taming_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *class); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_taming_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_taming_pre[hIndex].func; + preHookFunc(&sd, &class); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_taming(sd, class); + } + if (HPMHooks.count.HP_achievement_validate_taming_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int class); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_taming_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_taming_post[hIndex].func; + postHookFunc(sd, class); + } + } + return; +} +void HP_achievement_validate_achievement_rank(struct map_session_data *sd, int rank) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_validate_achievement_rank_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *rank); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_achievement_rank_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_validate_achievement_rank_pre[hIndex].func; + preHookFunc(&sd, &rank); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.validate_achievement_rank(sd, rank); + } + if (HPMHooks.count.HP_achievement_validate_achievement_rank_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int rank); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_validate_achievement_rank_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_validate_achievement_rank_post[hIndex].func; + postHookFunc(sd, rank); + } + } + return; +} +bool HP_achievement_type_requires_criteria(enum achievement_types type) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_type_requires_criteria_pre > 0) { + bool (*preHookFunc) (enum achievement_types *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_type_requires_criteria_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_type_requires_criteria_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.type_requires_criteria(type); + } + if (HPMHooks.count.HP_achievement_type_requires_criteria_post > 0) { + bool (*postHookFunc) (bool retVal___, enum achievement_types type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_type_requires_criteria_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_type_requires_criteria_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type); + } + } + return retVal___; +} +void HP_achievement_init_titles(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_init_titles_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_init_titles_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_init_titles_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.init_titles(sd); + } + if (HPMHooks.count.HP_achievement_init_titles_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_init_titles_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_init_titles_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +bool HP_achievement_check_title(struct map_session_data *sd, int title_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_check_title_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *title_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_title_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_check_title_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &title_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.check_title(sd, title_id); + } + if (HPMHooks.count.HP_achievement_check_title_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int title_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_check_title_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_check_title_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, title_id); + } + } + return retVal___; +} +bool HP_achievement_get_rewards(struct map_session_data *sd, const struct achievement_data *ad) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_achievement_get_rewards_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_get_rewards_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &ad); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.achievement.get_rewards(sd, ad); + } + if (HPMHooks.count.HP_achievement_get_rewards_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct achievement_data *ad); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_get_rewards_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ad); + } + } + return retVal___; +} +void HP_achievement_get_rewards_buffs(struct map_session_data *sd, const struct achievement_data *ad) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_get_rewards_buffs_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_buffs_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_get_rewards_buffs_pre[hIndex].func; + preHookFunc(&sd, &ad); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.get_rewards_buffs(sd, ad); + } + if (HPMHooks.count.HP_achievement_get_rewards_buffs_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const struct achievement_data *ad); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_buffs_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_get_rewards_buffs_post[hIndex].func; + postHookFunc(sd, ad); + } + } + return; +} +void HP_achievement_get_rewards_items(struct map_session_data *sd, const struct achievement_data *ad) { + int hIndex = 0; + if (HPMHooks.count.HP_achievement_get_rewards_items_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const struct achievement_data **ad); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_achievement_get_rewards_items_pre[hIndex].func; + preHookFunc(&sd, &ad); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.achievement.get_rewards_items(sd, ad); + } + if (HPMHooks.count.HP_achievement_get_rewards_items_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const struct achievement_data *ad); + for (hIndex = 0; hIndex < HPMHooks.count.HP_achievement_get_rewards_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_achievement_get_rewards_items_post[hIndex].func; + postHookFunc(sd, ad); + } + } + return; +} +/* atcommand_interface */ void HP_atcommand_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_init_pre ) { + if (HPMHooks.count.HP_atcommand_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -122,25 +1556,25 @@ void HP_atcommand_init(bool minimal) { { HPMHooks.source.atcommand.init(minimal); } - if( HPMHooks.count.HP_atcommand_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_post; hIndex++ ) { + if (HPMHooks.count.HP_atcommand_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_atcommand_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_final_pre ) { + if (HPMHooks.count.HP_atcommand_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -148,9 +1582,9 @@ void HP_atcommand_final(void) { { HPMHooks.source.atcommand.final(); } - if( HPMHooks.count.HP_atcommand_final_post ) { + if (HPMHooks.count.HP_atcommand_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_final_post[hIndex].func; postHookFunc(); } @@ -160,14 +1594,14 @@ void HP_atcommand_final(void) { bool HP_atcommand_exec(const int fd, struct map_session_data *sd, const char *message, bool player_invoked) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_exec_pre ) { - bool (*preHookFunc) (const int *fd, struct map_session_data *sd, const char *message, bool *player_invoked); + if (HPMHooks.count.HP_atcommand_exec_pre > 0) { + bool (*preHookFunc) (const int *fd, struct map_session_data **sd, const char **message, bool *player_invoked); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exec_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exec_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_exec_pre[hIndex].func; - retVal___ = preHookFunc(&fd, sd, message, &player_invoked); + retVal___ = preHookFunc(&fd, &sd, &message, &player_invoked); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -175,11 +1609,11 @@ bool HP_atcommand_exec(const int fd, struct map_session_data *sd, const char *me { retVal___ = HPMHooks.source.atcommand.exec(fd, sd, message, player_invoked); } - if( HPMHooks.count.HP_atcommand_exec_post ) { - bool (*postHookFunc) (bool retVal___, const int *fd, struct map_session_data *sd, const char *message, bool *player_invoked); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exec_post; hIndex++ ) { + if (HPMHooks.count.HP_atcommand_exec_post > 0) { + bool (*postHookFunc) (bool retVal___, const int fd, struct map_session_data *sd, const char *message, bool player_invoked); + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exec_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_exec_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, sd, message, &player_invoked); + retVal___ = postHookFunc(retVal___, fd, sd, message, player_invoked); } } return retVal___; @@ -187,14 +1621,14 @@ bool HP_atcommand_exec(const int fd, struct map_session_data *sd, const char *me bool HP_atcommand_create(char *name, AtCommandFunc func) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_create_pre ) { - bool (*preHookFunc) (char *name, AtCommandFunc *func); + if (HPMHooks.count.HP_atcommand_create_pre > 0) { + bool (*preHookFunc) (char **name, AtCommandFunc *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_create_pre[hIndex].func; - retVal___ = preHookFunc(name, &func); + retVal___ = preHookFunc(&name, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -202,11 +1636,11 @@ bool HP_atcommand_create(char *name, AtCommandFunc func) { { 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++ ) { + if (HPMHooks.count.HP_atcommand_create_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, name, func); } } return retVal___; @@ -214,14 +1648,14 @@ bool HP_atcommand_create(char *name, AtCommandFunc func) { bool HP_atcommand_can_use(struct map_session_data *sd, const char *command) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_can_use_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const char *command); + if (HPMHooks.count.HP_atcommand_can_use_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const char **command); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &command); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -229,9 +1663,9 @@ bool HP_atcommand_can_use(struct map_session_data *sd, const char *command) { { retVal___ = HPMHooks.source.atcommand.can_use(sd, command); } - if( HPMHooks.count.HP_atcommand_can_use_post ) { + if (HPMHooks.count.HP_atcommand_can_use_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *command); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use_post; hIndex++ ) { + 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); } @@ -241,14 +1675,14 @@ bool HP_atcommand_can_use(struct map_session_data *sd, const char *command) { bool HP_atcommand_can_use2(struct map_session_data *sd, const char *command, AtCommandType type) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_can_use2_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const char *command, AtCommandType *type); + if (HPMHooks.count.HP_atcommand_can_use2_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const char **command, AtCommandType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_can_use2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &command, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -256,25 +1690,25 @@ bool HP_atcommand_can_use2(struct map_session_data *sd, const char *command, AtC { 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++ ) { + if (HPMHooks.count.HP_atcommand_can_use2_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, command, type); } } return retVal___; } void HP_atcommand_load_groups(GroupSettings **groups, struct config_setting_t **commands_, size_t sz) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_load_groups_pre ) { - void (*preHookFunc) (GroupSettings **groups, struct config_setting_t **commands_, size_t *sz); + if (HPMHooks.count.HP_atcommand_load_groups_pre > 0) { + void (*preHookFunc) (GroupSettings ***groups, struct config_setting_t ***commands_, size_t *sz); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_load_groups_pre; hIndex++ ) { + 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); + preHookFunc(&groups, &commands_, &sz); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -282,11 +1716,11 @@ void HP_atcommand_load_groups(GroupSettings **groups, struct config_setting_t ** { HPMHooks.source.atcommand.load_groups(groups, commands_, sz); } - if( HPMHooks.count.HP_atcommand_load_groups_post ) { - void (*postHookFunc) (GroupSettings **groups, struct config_setting_t **commands_, size_t *sz); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_load_groups_post; hIndex++ ) { + if (HPMHooks.count.HP_atcommand_load_groups_post > 0) { + void (*postHookFunc) (GroupSettings **groups, struct 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); + postHookFunc(groups, commands_, sz); } } return; @@ -294,14 +1728,14 @@ void HP_atcommand_load_groups(GroupSettings **groups, struct config_setting_t ** 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); + if (HPMHooks.count.HP_atcommand_exists_pre > 0) { + AtCommandInfo* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_exists_pre[hIndex].func; - retVal___ = preHookFunc(name); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -309,9 +1743,9 @@ AtCommandInfo* HP_atcommand_exists(const char *name) { { retVal___ = HPMHooks.source.atcommand.exists(name); } - if( HPMHooks.count.HP_atcommand_exists_post ) { + if (HPMHooks.count.HP_atcommand_exists_post > 0) { AtCommandInfo* (*postHookFunc) (AtCommandInfo* retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_exists_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_exists_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -321,14 +1755,14 @@ AtCommandInfo* HP_atcommand_exists(const char *name) { bool HP_atcommand_msg_read(const char *cfg_name, bool allow_override) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_msg_read_pre ) { - bool (*preHookFunc) (const char *cfg_name, bool *allow_override); + if (HPMHooks.count.HP_atcommand_msg_read_pre > 0) { + bool (*preHookFunc) (const char **cfg_name, bool *allow_override); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_msg_read_pre[hIndex].func; - retVal___ = preHookFunc(cfg_name, &allow_override); + retVal___ = preHookFunc(&cfg_name, &allow_override); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -336,25 +1770,25 @@ bool HP_atcommand_msg_read(const char *cfg_name, bool allow_override) { { retVal___ = HPMHooks.source.atcommand.msg_read(cfg_name, allow_override); } - if( HPMHooks.count.HP_atcommand_msg_read_post ) { - bool (*postHookFunc) (bool retVal___, const char *cfg_name, bool *allow_override); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_read_post; hIndex++ ) { + if (HPMHooks.count.HP_atcommand_msg_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *cfg_name, bool allow_override); + 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___, cfg_name, &allow_override); + retVal___ = postHookFunc(retVal___, cfg_name, allow_override); } } return retVal___; } void HP_atcommand_final_msg(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_final_msg_pre ) { + if (HPMHooks.count.HP_atcommand_final_msg_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_msg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -362,9 +1796,9 @@ void HP_atcommand_final_msg(void) { { HPMHooks.source.atcommand.final_msg(); } - if( HPMHooks.count.HP_atcommand_final_msg_post ) { + if (HPMHooks.count.HP_atcommand_final_msg_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_msg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_final_msg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_final_msg_post[hIndex].func; postHookFunc(); } @@ -374,14 +1808,14 @@ void HP_atcommand_final_msg(void) { 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); + if (HPMHooks.count.HP_atcommand_get_bind_byname_pre > 0) { + struct atcmd_binding_data* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_bind_byname_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -389,9 +1823,9 @@ struct atcmd_binding_data* HP_atcommand_get_bind_byname(const char *name) { { retVal___ = HPMHooks.source.atcommand.get_bind_byname(name); } - if( HPMHooks.count.HP_atcommand_get_bind_byname_post ) { + if (HPMHooks.count.HP_atcommand_get_bind_byname_post > 0) { 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++ ) { + 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); } @@ -401,14 +1835,14 @@ struct atcmd_binding_data* HP_atcommand_get_bind_byname(const char *name) { 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); + if (HPMHooks.count.HP_atcommand_get_info_byname_pre > 0) { + AtCommandInfo* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_info_byname_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -416,9 +1850,9 @@ AtCommandInfo* HP_atcommand_get_info_byname(const char *name) { { retVal___ = HPMHooks.source.atcommand.get_info_byname(name); } - if( HPMHooks.count.HP_atcommand_get_info_byname_post ) { + if (HPMHooks.count.HP_atcommand_get_info_byname_post > 0) { AtCommandInfo* (*postHookFunc) (AtCommandInfo* retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_info_byname_post; hIndex++ ) { + 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); } @@ -428,14 +1862,14 @@ AtCommandInfo* HP_atcommand_get_info_byname(const char *name) { 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); + if (HPMHooks.count.HP_atcommand_check_alias_pre > 0) { + const char* (*preHookFunc) (const char **aliasname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_check_alias_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&aliasname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -443,9 +1877,9 @@ const char* HP_atcommand_check_alias(const char *aliasname) { { retVal___ = HPMHooks.source.atcommand.check_alias(aliasname); } - if( HPMHooks.count.HP_atcommand_check_alias_post ) { + if (HPMHooks.count.HP_atcommand_check_alias_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *aliasname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_check_alias_post; hIndex++ ) { + 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); } @@ -454,14 +1888,14 @@ const char* HP_atcommand_check_alias(const char *aliasname) { } 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); + if (HPMHooks.count.HP_atcommand_get_suggestions_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **name, bool *is_atcmd_cmd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_suggestions_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &name, &is_atcmd_cmd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -469,25 +1903,25 @@ void HP_atcommand_get_suggestions(struct map_session_data *sd, const char *name, { 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++ ) { + if (HPMHooks.count.HP_atcommand_get_suggestions_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_atcommand_config_read_pre > 0) { + void (*preHookFunc) (const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_config_read_pre; hIndex++ ) { + 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); + preHookFunc(&config_filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -495,9 +1929,9 @@ void HP_atcommand_config_read(const char *config_filename) { { HPMHooks.source.atcommand.config_read(config_filename); } - if( HPMHooks.count.HP_atcommand_config_read_post ) { + if (HPMHooks.count.HP_atcommand_config_read_post > 0) { void (*postHookFunc) (const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_config_read_post; hIndex++ ) { + 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); } @@ -507,16 +1941,16 @@ void HP_atcommand_config_read(const char *config_filename) { int HP_atcommand_stopattack(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_stopattack_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_atcommand_stopattack_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_stopattack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -526,9 +1960,9 @@ int HP_atcommand_stopattack(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.stopattack(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_stopattack_post ) { + if (HPMHooks.count.HP_atcommand_stopattack_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_stopattack_post; hIndex++ ) { + 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); @@ -540,16 +1974,16 @@ int HP_atcommand_stopattack(struct block_list *bl, va_list ap) { int HP_atcommand_pvpoff_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_pvpoff_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_atcommand_pvpoff_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpoff_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -559,9 +1993,9 @@ int HP_atcommand_pvpoff_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.pvpoff_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_pvpoff_sub_post ) { + if (HPMHooks.count.HP_atcommand_pvpoff_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpoff_sub_post; hIndex++ ) { + 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); @@ -573,16 +2007,16 @@ int HP_atcommand_pvpoff_sub(struct block_list *bl, va_list ap) { int HP_atcommand_pvpon_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_pvpon_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_atcommand_pvpon_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpon_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -592,9 +2026,9 @@ int HP_atcommand_pvpon_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.pvpon_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_pvpon_sub_post ) { + if (HPMHooks.count.HP_atcommand_pvpon_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_pvpon_sub_post; hIndex++ ) { + 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); @@ -606,16 +2040,16 @@ int HP_atcommand_pvpon_sub(struct block_list *bl, va_list ap) { int HP_atcommand_atkillmonster_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_atkillmonster_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_atcommand_atkillmonster_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_atkillmonster_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -625,9 +2059,9 @@ int HP_atcommand_atkillmonster_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.atkillmonster_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_atkillmonster_sub_post ) { + if (HPMHooks.count.HP_atcommand_atkillmonster_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_atkillmonster_sub_post; hIndex++ ) { + 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); @@ -638,14 +2072,14 @@ int HP_atcommand_atkillmonster_sub(struct block_list *bl, va_list ap) { } 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); + if (HPMHooks.count.HP_atcommand_raise_sub_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_raise_sub_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -653,9 +2087,9 @@ void HP_atcommand_raise_sub(struct map_session_data *sd) { { HPMHooks.source.atcommand.raise_sub(sd); } - if( HPMHooks.count.HP_atcommand_raise_sub_post ) { + if (HPMHooks.count.HP_atcommand_raise_sub_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_raise_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_raise_sub_post[hIndex].func; postHookFunc(sd); } @@ -664,14 +2098,14 @@ void HP_atcommand_raise_sub(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_atcommand_get_jail_time_pre > 0) { + void (*preHookFunc) (int *jailtime, int **year, int **month, int **day, int **hour, int **minute); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_get_jail_time_pre; hIndex++ ) { + 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); + preHookFunc(&jailtime, &year, &month, &day, &hour, &minute); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -679,11 +2113,11 @@ void HP_atcommand_get_jail_time(int jailtime, int *year, int *month, int *day, i { 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++ ) { + if (HPMHooks.count.HP_atcommand_get_jail_time_post > 0) { + 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); + postHookFunc(jailtime, year, month, day, hour, minute); } } return; @@ -691,16 +2125,16 @@ void HP_atcommand_get_jail_time(int jailtime, int *year, int *month, int *day, i int HP_atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_cleanfloor_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_atcommand_cleanfloor_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cleanfloor_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -710,9 +2144,9 @@ int HP_atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.cleanfloor_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_cleanfloor_sub_post ) { + if (HPMHooks.count.HP_atcommand_cleanfloor_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cleanfloor_sub_post; hIndex++ ) { + 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); @@ -724,16 +2158,16 @@ int HP_atcommand_cleanfloor_sub(struct block_list *bl, va_list ap) { int HP_atcommand_mutearea_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_mutearea_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_atcommand_mutearea_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_mutearea_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -743,9 +2177,9 @@ int HP_atcommand_mutearea_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.atcommand.mutearea_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_atcommand_mutearea_sub_post ) { + if (HPMHooks.count.HP_atcommand_mutearea_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_mutearea_sub_post; hIndex++ ) { + 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); @@ -756,14 +2190,14 @@ int HP_atcommand_mutearea_sub(struct block_list *bl, va_list ap) { } void HP_atcommand_getring(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_getring_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_atcommand_getring_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_getring_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_getring_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_getring_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -771,9 +2205,9 @@ void HP_atcommand_getring(struct map_session_data *sd) { { HPMHooks.source.atcommand.getring(sd); } - if( HPMHooks.count.HP_atcommand_getring_post ) { + if (HPMHooks.count.HP_atcommand_getring_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_getring_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_getring_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_getring_post[hIndex].func; postHookFunc(sd); } @@ -782,14 +2216,14 @@ void HP_atcommand_getring(struct map_session_data *sd) { } void HP_atcommand_channel_help(int fd, const char *command, bool can_create) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_channel_help_pre ) { - void (*preHookFunc) (int *fd, const char *command, bool *can_create); + if (HPMHooks.count.HP_atcommand_channel_help_pre > 0) { + void (*preHookFunc) (int *fd, const char **command, bool *can_create); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_channel_help_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_channel_help_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_channel_help_pre[hIndex].func; - preHookFunc(&fd, command, &can_create); + preHookFunc(&fd, &command, &can_create); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -797,25 +2231,25 @@ void HP_atcommand_channel_help(int fd, const char *command, bool can_create) { { HPMHooks.source.atcommand.channel_help(fd, command, can_create); } - if( HPMHooks.count.HP_atcommand_channel_help_post ) { - void (*postHookFunc) (int *fd, const char *command, bool *can_create); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_channel_help_post; hIndex++ ) { + if (HPMHooks.count.HP_atcommand_channel_help_post > 0) { + void (*postHookFunc) (int fd, const char *command, bool can_create); + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_channel_help_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_channel_help_post[hIndex].func; - postHookFunc(&fd, command, &can_create); + postHookFunc(fd, command, can_create); } } return; } 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); + if (HPMHooks.count.HP_atcommand_commands_sub_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const int *fd, AtCommandType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_commands_sub_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &fd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -823,25 +2257,25 @@ void HP_atcommand_commands_sub(struct map_session_data *sd, const int fd, AtComm { 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++ ) { + if (HPMHooks.count.HP_atcommand_commands_sub_post > 0) { + 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); + postHookFunc(sd, fd, type); } } return; } void HP_atcommand_cmd_db_clear(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_cmd_db_clear_pre ) { + if (HPMHooks.count.HP_atcommand_cmd_db_clear_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -849,9 +2283,9 @@ void HP_atcommand_cmd_db_clear(void) { { HPMHooks.source.atcommand.cmd_db_clear(); } - if( HPMHooks.count.HP_atcommand_cmd_db_clear_post ) { + if (HPMHooks.count.HP_atcommand_cmd_db_clear_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_post; hIndex++ ) { + 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(); } @@ -861,16 +2295,16 @@ void HP_atcommand_cmd_db_clear(void) { int HP_atcommand_cmd_db_clear_sub(union DBKey key, struct DBData *data, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list args); + if (HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -880,12 +2314,12 @@ int HP_atcommand_cmd_db_clear_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_cmd_db_clear_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_atcommand_cmd_db_clear_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, args___copy); va_end(args___copy); } } @@ -893,14 +2327,14 @@ int HP_atcommand_cmd_db_clear_sub(union DBKey key, struct DBData *data, va_list } void HP_atcommand_doload(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_doload_pre ) { + if (HPMHooks.count.HP_atcommand_doload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_doload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -908,9 +2342,9 @@ void HP_atcommand_doload(void) { { HPMHooks.source.atcommand.doload(); } - if( HPMHooks.count.HP_atcommand_doload_post ) { + if (HPMHooks.count.HP_atcommand_doload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_doload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_doload_post[hIndex].func; postHookFunc(); } @@ -919,14 +2353,14 @@ void HP_atcommand_doload(void) { } void HP_atcommand_base_commands(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_base_commands_pre ) { + if (HPMHooks.count.HP_atcommand_base_commands_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_base_commands_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -934,9 +2368,9 @@ void HP_atcommand_base_commands(void) { { HPMHooks.source.atcommand.base_commands(); } - if( HPMHooks.count.HP_atcommand_base_commands_post ) { + if (HPMHooks.count.HP_atcommand_base_commands_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_base_commands_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_base_commands_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_base_commands_post[hIndex].func; postHookFunc(); } @@ -946,14 +2380,14 @@ void HP_atcommand_base_commands(void) { bool HP_atcommand_add(char *name, AtCommandFunc func, bool replace) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_atcommand_add_pre ) { - bool (*preHookFunc) (char *name, AtCommandFunc *func, bool *replace); + if (HPMHooks.count.HP_atcommand_add_pre > 0) { + bool (*preHookFunc) (char **name, AtCommandFunc *func, bool *replace); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_add_pre[hIndex].func; - retVal___ = preHookFunc(name, &func, &replace); + retVal___ = preHookFunc(&name, &func, &replace); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -961,11 +2395,11 @@ bool HP_atcommand_add(char *name, AtCommandFunc func, bool replace) { { retVal___ = HPMHooks.source.atcommand.add(name, func, replace); } - if( HPMHooks.count.HP_atcommand_add_post ) { - bool (*postHookFunc) (bool retVal___, char *name, AtCommandFunc *func, bool *replace); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_post; hIndex++ ) { + if (HPMHooks.count.HP_atcommand_add_post > 0) { + bool (*postHookFunc) (bool retVal___, char *name, AtCommandFunc func, bool replace); + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name, &func, &replace); + retVal___ = postHookFunc(retVal___, name, func, replace); } } return retVal___; @@ -973,14 +2407,14 @@ bool HP_atcommand_add(char *name, AtCommandFunc func, bool replace) { const char* HP_atcommand_msg(int msg_number) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_atcommand_msg_pre ) { + if (HPMHooks.count.HP_atcommand_msg_pre > 0) { const char* (*preHookFunc) (int *msg_number); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_msg_pre[hIndex].func; retVal___ = preHookFunc(&msg_number); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -988,25 +2422,25 @@ const char* HP_atcommand_msg(int msg_number) { { retVal___ = HPMHooks.source.atcommand.msg(msg_number); } - if( HPMHooks.count.HP_atcommand_msg_post ) { - const char* (*postHookFunc) (const char* retVal___, int *msg_number); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_post; hIndex++ ) { + if (HPMHooks.count.HP_atcommand_msg_post > 0) { + const char* (*postHookFunc) (const char* retVal___, int msg_number); + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_msg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &msg_number); + retVal___ = postHookFunc(retVal___, msg_number); } } return retVal___; } void HP_atcommand_expand_message_table(void) { int hIndex = 0; - if( HPMHooks.count.HP_atcommand_expand_message_table_pre ) { + if (HPMHooks.count.HP_atcommand_expand_message_table_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_expand_message_table_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_expand_message_table_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_expand_message_table_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1014,9 +2448,9 @@ void HP_atcommand_expand_message_table(void) { { HPMHooks.source.atcommand.expand_message_table(); } - if( HPMHooks.count.HP_atcommand_expand_message_table_post ) { + if (HPMHooks.count.HP_atcommand_expand_message_table_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_expand_message_table_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_expand_message_table_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_expand_message_table_post[hIndex].func; postHookFunc(); } @@ -1026,14 +2460,14 @@ void HP_atcommand_expand_message_table(void) { const char* HP_atcommand_msgfd(int fd, int msg_number) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_atcommand_msgfd_pre ) { + if (HPMHooks.count.HP_atcommand_msgfd_pre > 0) { const char* (*preHookFunc) (int *fd, int *msg_number); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgfd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgfd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_msgfd_pre[hIndex].func; retVal___ = preHookFunc(&fd, &msg_number); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1041,11 +2475,11 @@ const char* HP_atcommand_msgfd(int fd, int msg_number) { { retVal___ = HPMHooks.source.atcommand.msgfd(fd, msg_number); } - if( HPMHooks.count.HP_atcommand_msgfd_post ) { - const char* (*postHookFunc) (const char* retVal___, int *fd, int *msg_number); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgfd_post; hIndex++ ) { + if (HPMHooks.count.HP_atcommand_msgfd_post > 0) { + const char* (*postHookFunc) (const char* retVal___, int fd, int msg_number); + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgfd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_msgfd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &msg_number); + retVal___ = postHookFunc(retVal___, fd, msg_number); } } return retVal___; @@ -1053,14 +2487,14 @@ const char* HP_atcommand_msgfd(int fd, int msg_number) { const char* HP_atcommand_msgsd(struct map_session_data *sd, int msg_number) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_atcommand_msgsd_pre ) { - const char* (*preHookFunc) (struct map_session_data *sd, int *msg_number); + if (HPMHooks.count.HP_atcommand_msgsd_pre > 0) { + const char* (*preHookFunc) (struct map_session_data **sd, int *msg_number); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgsd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgsd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_atcommand_msgsd_pre[hIndex].func; - retVal___ = preHookFunc(sd, &msg_number); + retVal___ = preHookFunc(&sd, &msg_number); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1068,26 +2502,26 @@ const char* HP_atcommand_msgsd(struct map_session_data *sd, int msg_number) { { retVal___ = HPMHooks.source.atcommand.msgsd(sd, msg_number); } - if( HPMHooks.count.HP_atcommand_msgsd_post ) { - const char* (*postHookFunc) (const char* retVal___, struct map_session_data *sd, int *msg_number); - for(hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgsd_post; hIndex++ ) { + if (HPMHooks.count.HP_atcommand_msgsd_post > 0) { + const char* (*postHookFunc) (const char* retVal___, struct map_session_data *sd, int msg_number); + for (hIndex = 0; hIndex < HPMHooks.count.HP_atcommand_msgsd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_atcommand_msgsd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &msg_number); + retVal___ = postHookFunc(retVal___, sd, msg_number); } } return retVal___; } -/* battle */ +/* battle_interface */ void HP_battle_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_battle_init_pre ) { + if (HPMHooks.count.HP_battle_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1095,25 +2529,25 @@ void HP_battle_init(bool minimal) { { HPMHooks.source.battle.init(minimal); } - if( HPMHooks.count.HP_battle_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_post; hIndex++ ) { + if (HPMHooks.count.HP_battle_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_battle_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_battle_final_pre ) { + if (HPMHooks.count.HP_battle_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1121,9 +2555,9 @@ void HP_battle_final(void) { { HPMHooks.source.battle.final(); } - if( HPMHooks.count.HP_battle_final_post ) { + if (HPMHooks.count.HP_battle_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_final_post[hIndex].func; postHookFunc(); } @@ -1132,16 +2566,15 @@ void HP_battle_final(void) { } 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); + struct Damage retVal___ = { 0 }; + if (HPMHooks.count.HP_battle_calc_attack_pre > 0) { + struct Damage (*preHookFunc) (int *attack_type, struct block_list **bl, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_attack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&attack_type, &bl, &target, &skill_id, &skill_lv, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1149,11 +2582,11 @@ struct Damage HP_battle_calc_attack(int attack_type, struct block_list *bl, stru { 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++ ) { + if (HPMHooks.count.HP_battle_calc_attack_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, attack_type, bl, target, skill_id, skill_lv, count); } } return retVal___; @@ -1161,14 +2594,14 @@ struct Damage HP_battle_calc_attack(int attack_type, struct block_list *bl, stru 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_calc_damage_pre > 0) { + int64 (*preHookFunc) (struct block_list **src, struct block_list **bl, struct Damage **d, int64 *damage, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_damage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &d, &damage, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1176,11 +2609,38 @@ int64 HP_battle_calc_damage(struct block_list *src, struct block_list *bl, struc { 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++ ) { + if (HPMHooks.count.HP_battle_calc_damage_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, bl, d, damage, skill_id, skill_lv); + } + } + return retVal___; +} +int64 HP_battle_calc_pc_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___ = 0; + if (HPMHooks.count.HP_battle_calc_pc_damage_pre > 0) { + int64 (*preHookFunc) (struct block_list **src, struct block_list **bl, struct Damage **d, int64 *damage, uint16 *skill_id, uint16 *skill_lv); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_pc_damage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_battle_calc_pc_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_pc_damage(src, bl, d, damage, skill_id, skill_lv); + } + if (HPMHooks.count.HP_battle_calc_pc_damage_post > 0) { + 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_pc_damage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_battle_calc_pc_damage_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, d, damage, skill_id, skill_lv); } } return retVal___; @@ -1188,14 +2648,14 @@ int64 HP_battle_calc_damage(struct block_list *src, struct block_list *bl, struc 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_calc_gvg_damage_pre > 0) { + int64 (*preHookFunc) (struct block_list **src, struct block_list **bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_gvg_damage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &damage, &div_, &skill_id, &skill_lv, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1203,11 +2663,11 @@ int64 HP_battle_calc_gvg_damage(struct block_list *src, struct block_list *bl, i { 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++ ) { + if (HPMHooks.count.HP_battle_calc_gvg_damage_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, bl, damage, div_, skill_id, skill_lv, flag); } } return retVal___; @@ -1215,14 +2675,14 @@ int64 HP_battle_calc_gvg_damage(struct block_list *src, struct block_list *bl, i 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_calc_bg_damage_pre > 0) { + int64 (*preHookFunc) (struct block_list **src, struct block_list **bl, int64 *damage, int *div_, uint16 *skill_id, uint16 *skill_lv, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_bg_damage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &damage, &div_, &skill_id, &skill_lv, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1230,11 +2690,11 @@ int64 HP_battle_calc_bg_damage(struct block_list *src, struct block_list *bl, in { 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++ ) { + if (HPMHooks.count.HP_battle_calc_bg_damage_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, bl, damage, div_, skill_id, skill_lv, flag); } } return retVal___; @@ -1242,14 +2702,14 @@ int64 HP_battle_calc_bg_damage(struct block_list *src, struct block_list *bl, in enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list *target, int64 tick, int flag) { int hIndex = 0; enum damage_lv retVal___ = ATK_NONE; - if( HPMHooks.count.HP_battle_weapon_attack_pre ) { - enum damage_lv (*preHookFunc) (struct block_list *bl, struct block_list *target, int64 *tick, int *flag); + if (HPMHooks.count.HP_battle_weapon_attack_pre > 0) { + enum damage_lv (*preHookFunc) (struct block_list **bl, struct block_list **target, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_weapon_attack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &target, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1257,27 +2717,53 @@ enum damage_lv HP_battle_weapon_attack(struct block_list *bl, struct block_list { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_weapon_attack_post; hIndex++ ) { + if (HPMHooks.count.HP_battle_weapon_attack_post > 0) { + enum damage_lv (*postHookFunc) (enum damage_lv retVal___, struct block_list *bl, struct block_list *target, int64 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); + retVal___ = postHookFunc(retVal___, bl, target, tick, flag); + } + } + return retVal___; +} +bool HP_battle_check_arrows(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_battle_check_arrows_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_arrows_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_battle_check_arrows_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.check_arrows(sd); + } + if (HPMHooks.count.HP_battle_check_arrows_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_arrows_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_battle_check_arrows_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } 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); + struct Damage retVal___ = { 0 }; + if (HPMHooks.count.HP_battle_calc_weapon_attack_pre > 0) { + struct Damage (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *wflag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_attack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &skill_id, &skill_lv, &wflag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1285,11 +2771,11 @@ struct Damage HP_battle_calc_weapon_attack(struct block_list *src, struct block_ { 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++ ) { + if (HPMHooks.count.HP_battle_calc_weapon_attack_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target, skill_id, skill_lv, wflag); } } return retVal___; @@ -1297,14 +2783,14 @@ struct Damage HP_battle_calc_weapon_attack(struct block_list *src, struct block_ int HP_battle_delay_damage(int64 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___ = 0; - if( HPMHooks.count.HP_battle_delay_damage_pre ) { - int (*preHookFunc) (int64 *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); + if (HPMHooks.count.HP_battle_delay_damage_pre > 0) { + int (*preHookFunc) (int64 *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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&tick, &amotion, &src, &target, &attack_type, &skill_id, &skill_lv, &damage, &dmg_lv, &ddelay, &additional_effects); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1312,25 +2798,25 @@ int HP_battle_delay_damage(int64 tick, int amotion, struct block_list *src, stru { 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___, int64 *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++ ) { + if (HPMHooks.count.HP_battle_delay_damage_post > 0) { + int (*postHookFunc) (int retVal___, int64 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); + 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); + if (HPMHooks.count.HP_battle_drain_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct block_list **tbl, int64 *rdamage, int64 *ldamage, int *race, int *boss); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_drain_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &tbl, &rdamage, &ldamage, &race, &boss); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1338,25 +2824,25 @@ void HP_battle_drain(struct map_session_data *sd, struct block_list *tbl, int64 { 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++ ) { + if (HPMHooks.count.HP_battle_drain_post > 0) { + 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); + postHookFunc(sd, tbl, rdamage, ldamage, race, boss); } } return; } void HP_battle_reflect_damage(struct block_list *target, struct block_list *src, struct Damage *wd, uint16 skill_id) { int hIndex = 0; - if( HPMHooks.count.HP_battle_reflect_damage_pre ) { - void (*preHookFunc) (struct block_list *target, struct block_list *src, struct Damage *wd, uint16 *skill_id); + if (HPMHooks.count.HP_battle_reflect_damage_pre > 0) { + void (*preHookFunc) (struct block_list **target, struct block_list **src, struct Damage **wd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_damage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_damage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_reflect_damage_pre[hIndex].func; - preHookFunc(target, src, wd, &skill_id); + preHookFunc(&target, &src, &wd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1364,11 +2850,37 @@ void HP_battle_reflect_damage(struct block_list *target, struct block_list *src, { HPMHooks.source.battle.reflect_damage(target, src, wd, skill_id); } - if( HPMHooks.count.HP_battle_reflect_damage_post ) { - void (*postHookFunc) (struct block_list *target, struct block_list *src, struct Damage *wd, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_damage_post; hIndex++ ) { + if (HPMHooks.count.HP_battle_reflect_damage_post > 0) { + void (*postHookFunc) (struct block_list *target, struct block_list *src, struct Damage *wd, uint16 skill_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_damage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_reflect_damage_post[hIndex].func; - postHookFunc(target, src, wd, &skill_id); + postHookFunc(target, src, wd, skill_id); + } + } + return; +} +void HP_battle_reflect_trap(struct block_list *target, struct block_list *src, struct Damage *md, uint16 skill_id) { + int hIndex = 0; + if (HPMHooks.count.HP_battle_reflect_trap_pre > 0) { + void (*preHookFunc) (struct block_list **target, struct block_list **src, struct Damage **md, uint16 *skill_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_trap_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_battle_reflect_trap_pre[hIndex].func; + preHookFunc(&target, &src, &md, &skill_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.battle.reflect_trap(target, src, md, skill_id); + } + if (HPMHooks.count.HP_battle_reflect_trap_post > 0) { + void (*postHookFunc) (struct block_list *target, struct block_list *src, struct Damage *md, uint16 skill_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_reflect_trap_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_battle_reflect_trap_post[hIndex].func; + postHookFunc(target, src, md, skill_id); } } return; @@ -1376,14 +2888,14 @@ void HP_battle_reflect_damage(struct block_list *target, struct block_list *src, int HP_battle_attr_ratio(int atk_elem, int def_type, int def_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_attr_ratio_pre ) { + if (HPMHooks.count.HP_battle_attr_ratio_pre > 0) { int (*preHookFunc) (int *atk_elem, int *def_type, int *def_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_ratio_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1391,11 +2903,11 @@ int HP_battle_attr_ratio(int atk_elem, int def_type, int def_lv) { { 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++ ) { + if (HPMHooks.count.HP_battle_attr_ratio_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, atk_elem, def_type, def_lv); } } return retVal___; @@ -1403,14 +2915,14 @@ int HP_battle_attr_ratio(int atk_elem, int def_type, int def_lv) { 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_attr_fix_pre > 0) { + int64 (*preHookFunc) (struct block_list **src, struct block_list **target, int64 *damage, int *atk_elem, int *def_type, int *def_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_attr_fix_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &damage, &atk_elem, &def_type, &def_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1418,11 +2930,11 @@ int64 HP_battle_attr_fix(struct block_list *src, struct block_list *target, int6 { 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++ ) { + if (HPMHooks.count.HP_battle_attr_fix_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target, damage, atk_elem, def_type, def_lv); } } return retVal___; @@ -1430,14 +2942,14 @@ int64 HP_battle_attr_fix(struct block_list *src, struct block_list *target, int6 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_calc_cardfix_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&attack_type, &src, &target, &nk, &s_ele, &s_ele_, &damage, &left, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1445,11 +2957,11 @@ int64 HP_battle_calc_cardfix(int attack_type, struct block_list *src, struct blo { 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++ ) { + if (HPMHooks.count.HP_battle_calc_cardfix_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, attack_type, src, target, nk, s_ele, s_ele_, damage, left, flag); } } return retVal___; @@ -1457,14 +2969,14 @@ int64 HP_battle_calc_cardfix(int attack_type, struct block_list *src, struct blo int64 HP_battle_calc_cardfix2(struct block_list *src, struct block_list *bl, int64 damage, int s_ele, int nk, int flag) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_battle_calc_cardfix2_pre ) { - int64 (*preHookFunc) (struct block_list *src, struct block_list *bl, int64 *damage, int *s_ele, int *nk, int *flag); + if (HPMHooks.count.HP_battle_calc_cardfix2_pre > 0) { + int64 (*preHookFunc) (struct block_list **src, struct block_list **bl, int64 *damage, int *s_ele, int *nk, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_cardfix2_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &damage, &s_ele, &nk, &flag); + retVal___ = preHookFunc(&src, &bl, &damage, &s_ele, &nk, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1472,11 +2984,11 @@ int64 HP_battle_calc_cardfix2(struct block_list *src, struct block_list *bl, int { retVal___ = HPMHooks.source.battle.calc_cardfix2(src, bl, damage, s_ele, nk, flag); } - if( HPMHooks.count.HP_battle_calc_cardfix2_post ) { - int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 *damage, int *s_ele, int *nk, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix2_post; hIndex++ ) { + if (HPMHooks.count.HP_battle_calc_cardfix2_post > 0) { + int64 (*postHookFunc) (int64 retVal___, struct block_list *src, struct block_list *bl, int64 damage, int s_ele, int nk, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_cardfix2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_cardfix2_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, bl, &damage, &s_ele, &nk, &flag); + retVal___ = postHookFunc(retVal___, src, bl, damage, s_ele, nk, flag); } } return retVal___; @@ -1484,14 +2996,14 @@ int64 HP_battle_calc_cardfix2(struct block_list *src, struct block_list *bl, int 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_calc_elefix_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_elefix_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &skill_id, &skill_lv, &damage, &nk, &n_ele, &s_ele, &s_ele_, &left, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1499,11 +3011,11 @@ int64 HP_battle_calc_elefix(struct block_list *src, struct block_list *target, u { 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++ ) { + if (HPMHooks.count.HP_battle_calc_elefix_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target, skill_id, skill_lv, damage, nk, n_ele, s_ele, s_ele_, left, flag); } } return retVal___; @@ -1511,14 +3023,14 @@ int64 HP_battle_calc_elefix(struct block_list *src, struct block_list *target, u 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_calc_masteryfix_pre > 0) { + int64 (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *div, bool *left, bool *weapon); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &skill_id, &skill_lv, &damage, &div, &left, &weapon); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1526,11 +3038,11 @@ int64 HP_battle_calc_masteryfix(struct block_list *src, struct block_list *targe { 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++ ) { + if (HPMHooks.count.HP_battle_calc_masteryfix_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target, skill_id, skill_lv, damage, div, left, weapon); } } return retVal___; @@ -1538,14 +3050,14 @@ int64 HP_battle_calc_masteryfix(struct block_list *src, struct block_list *targe int HP_battle_calc_chorusbonus(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_calc_chorusbonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_battle_calc_chorusbonus_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_chorusbonus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_chorusbonus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_chorusbonus_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1553,9 +3065,9 @@ int HP_battle_calc_chorusbonus(struct map_session_data *sd) { { retVal___ = HPMHooks.source.battle.calc_chorusbonus(sd); } - if( HPMHooks.count.HP_battle_calc_chorusbonus_post ) { + if (HPMHooks.count.HP_battle_calc_chorusbonus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_chorusbonus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_chorusbonus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_chorusbonus_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -1565,14 +3077,14 @@ int HP_battle_calc_chorusbonus(struct map_session_data *sd) { 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_calc_skillratio_pre > 0) { + int (*preHookFunc) (int *attack_type, struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&attack_type, &src, &target, &skill_id, &skill_lv, &skillratio, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1580,11 +3092,11 @@ int HP_battle_calc_skillratio(int attack_type, struct block_list *src, struct bl { 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++ ) { + if (HPMHooks.count.HP_battle_calc_skillratio_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, attack_type, src, target, skill_id, skill_lv, skillratio, flag); } } return retVal___; @@ -1592,14 +3104,14 @@ int HP_battle_calc_skillratio(int attack_type, struct block_list *src, struct bl int64 HP_battle_calc_sizefix(struct map_session_data *sd, int64 damage, int type, int size, bool ignore) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_battle_calc_sizefix_pre ) { - int64 (*preHookFunc) (struct map_session_data *sd, int64 *damage, int *type, int *size, bool *ignore); + if (HPMHooks.count.HP_battle_calc_sizefix_pre > 0) { + int64 (*preHookFunc) (struct map_session_data **sd, int64 *damage, int *type, int *size, bool *ignore); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_sizefix_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &damage, &type, &size, &ignore); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1607,11 +3119,11 @@ int64 HP_battle_calc_sizefix(struct map_session_data *sd, int64 damage, int type { 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++ ) { + if (HPMHooks.count.HP_battle_calc_sizefix_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, damage, type, size, ignore); } } return retVal___; @@ -1619,14 +3131,14 @@ int64 HP_battle_calc_sizefix(struct map_session_data *sd, int64 damage, int type 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_calc_weapon_damage_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_weapon_damage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &watk, &nk, &n_ele, &s_ele, &s_ele_, &size, &type, &flag, &flag2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1634,11 +3146,11 @@ int64 HP_battle_calc_weapon_damage(struct block_list *src, struct block_list *bl { 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++ ) { + if (HPMHooks.count.HP_battle_calc_weapon_damage_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, watk, nk, n_ele, s_ele, s_ele_, size, type, flag, flag2); } } return retVal___; @@ -1646,14 +3158,14 @@ int64 HP_battle_calc_weapon_damage(struct block_list *src, struct block_list *bl 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_calc_defense_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_defense_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&attack_type, &src, &target, &skill_id, &skill_lv, &damage, &flag, &pdef); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1661,11 +3173,11 @@ int64 HP_battle_calc_defense(int attack_type, struct block_list *src, struct blo { 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++ ) { + if (HPMHooks.count.HP_battle_calc_defense_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, attack_type, src, target, skill_id, skill_lv, damage, flag, pdef); } } return retVal___; @@ -1673,14 +3185,14 @@ int64 HP_battle_calc_defense(int attack_type, struct block_list *src, struct blo 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); + if (HPMHooks.count.HP_battle_get_master_pre > 0) { + struct block_list* (*preHookFunc) (struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_master_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1688,9 +3200,9 @@ struct block_list* HP_battle_get_master(struct block_list *src) { { retVal___ = HPMHooks.source.battle.get_master(src); } - if( HPMHooks.count.HP_battle_get_master_post ) { + if (HPMHooks.count.HP_battle_get_master_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_master_post; hIndex++ ) { + 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); } @@ -1700,14 +3212,14 @@ struct block_list* HP_battle_get_master(struct block_list *src) { 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); + if (HPMHooks.count.HP_battle_get_targeted_pre > 0) { + struct block_list* (*preHookFunc) (struct block_list **target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1715,9 +3227,9 @@ struct block_list* HP_battle_get_targeted(struct block_list *target) { { retVal___ = HPMHooks.source.battle.get_targeted(target); } - if( HPMHooks.count.HP_battle_get_targeted_post ) { + if (HPMHooks.count.HP_battle_get_targeted_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_post; hIndex++ ) { + 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); } @@ -1727,14 +3239,14 @@ struct block_list* HP_battle_get_targeted(struct block_list *target) { 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); + if (HPMHooks.count.HP_battle_get_enemy_pre > 0) { + struct block_list* (*preHookFunc) (struct block_list **target, int *type, int *range); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&target, &type, &range); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1742,11 +3254,11 @@ struct block_list* HP_battle_get_enemy(struct block_list *target, int type, int { 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++ ) { + if (HPMHooks.count.HP_battle_get_enemy_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, target, type, range); } } return retVal___; @@ -1754,14 +3266,14 @@ struct block_list* HP_battle_get_enemy(struct block_list *target, int type, int int HP_battle_get_target(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_get_target_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_battle_get_target_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_target_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1769,9 +3281,9 @@ int HP_battle_get_target(struct block_list *bl) { { retVal___ = HPMHooks.source.battle.get_target(bl); } - if( HPMHooks.count.HP_battle_get_target_post ) { + if (HPMHooks.count.HP_battle_get_target_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_target_post; hIndex++ ) { + 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); } @@ -1781,14 +3293,14 @@ int HP_battle_get_target(struct block_list *bl) { int HP_battle_get_current_skill(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_get_current_skill_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_battle_get_current_skill_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_current_skill_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1796,9 +3308,9 @@ int HP_battle_get_current_skill(struct block_list *bl) { { retVal___ = HPMHooks.source.battle.get_current_skill(bl); } - if( HPMHooks.count.HP_battle_get_current_skill_post ) { + if (HPMHooks.count.HP_battle_get_current_skill_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_current_skill_post; hIndex++ ) { + 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); } @@ -1808,14 +3320,14 @@ int HP_battle_get_current_skill(struct block_list *bl) { bool HP_battle_check_undead(int race, int element) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_battle_check_undead_pre ) { + if (HPMHooks.count.HP_battle_check_undead_pre > 0) { bool (*preHookFunc) (int *race, int *element); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_undead_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1823,11 +3335,11 @@ bool HP_battle_check_undead(int race, int element) { { retVal___ = HPMHooks.source.battle.check_undead(race, element); } - if( HPMHooks.count.HP_battle_check_undead_post ) { - bool (*postHookFunc) (bool retVal___, int *race, int *element); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_undead_post; hIndex++ ) { + if (HPMHooks.count.HP_battle_check_undead_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, race, element); } } return retVal___; @@ -1835,14 +3347,14 @@ bool HP_battle_check_undead(int race, int element) { int HP_battle_check_target(struct block_list *src, struct block_list *target, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_check_target_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target, int *flag); + if (HPMHooks.count.HP_battle_check_target_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **target, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_target_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1850,11 +3362,11 @@ int HP_battle_check_target(struct block_list *src, struct block_list *target, in { 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++ ) { + if (HPMHooks.count.HP_battle_check_target_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target, flag); } } return retVal___; @@ -1862,14 +3374,14 @@ int HP_battle_check_target(struct block_list *src, struct block_list *target, in bool HP_battle_check_range(struct block_list *src, struct block_list *bl, int range) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_battle_check_range_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *bl, int *range); + if (HPMHooks.count.HP_battle_check_range_pre > 0) { + bool (*preHookFunc) (struct block_list **src, struct block_list **bl, int *range); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_check_range_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &range); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1877,25 +3389,25 @@ bool HP_battle_check_range(struct block_list *src, struct block_list *bl, int ra { 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++ ) { + if (HPMHooks.count.HP_battle_check_range_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_battle_consume_ammo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_consume_ammo_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &skill_id, &lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -1903,11 +3415,11 @@ void HP_battle_consume_ammo(struct map_session_data *sd, int skill_id, int lv) { { 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++ ) { + if (HPMHooks.count.HP_battle_consume_ammo_post > 0) { + 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); + postHookFunc(sd, skill_id, lv); } } return; @@ -1915,16 +3427,16 @@ void HP_battle_consume_ammo(struct map_session_data *sd, int skill_id, int lv) { int HP_battle_get_targeted_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_get_targeted_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_battle_get_targeted_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1934,9 +3446,9 @@ int HP_battle_get_targeted_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.battle.get_targeted_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_battle_get_targeted_sub_post ) { + if (HPMHooks.count.HP_battle_get_targeted_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_targeted_sub_post; hIndex++ ) { + 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); @@ -1948,16 +3460,16 @@ int HP_battle_get_targeted_sub(struct block_list *bl, va_list ap) { int HP_battle_get_enemy_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_get_enemy_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_battle_get_enemy_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -1967,9 +3479,9 @@ int HP_battle_get_enemy_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.battle.get_enemy_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_battle_get_enemy_sub_post ) { + if (HPMHooks.count.HP_battle_get_enemy_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_sub_post; hIndex++ ) { + 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); @@ -1981,16 +3493,16 @@ int HP_battle_get_enemy_sub(struct block_list *bl, va_list ap) { int HP_battle_get_enemy_area_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_get_enemy_area_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_battle_get_enemy_area_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2000,9 +3512,9 @@ int HP_battle_get_enemy_area_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_battle_get_enemy_area_sub_post > 0) { 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++ ) { + 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); @@ -2014,14 +3526,14 @@ int HP_battle_get_enemy_area_sub(struct block_list *bl, va_list ap) { int HP_battle_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_delay_damage_sub_pre ) { + if (HPMHooks.count.HP_battle_delay_damage_sub_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2029,11 +3541,11 @@ int HP_battle_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_delay_damage_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_battle_delay_damage_sub_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -2041,14 +3553,14 @@ int HP_battle_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) { int HP_battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_blewcount_bonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if (HPMHooks.count.HP_battle_blewcount_bonus_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_blewcount_bonus_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2056,11 +3568,11 @@ int HP_battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_battle_blewcount_bonus_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id); } } return retVal___; @@ -2068,14 +3580,14 @@ int HP_battle_blewcount_bonus(struct map_session_data *sd, uint16 skill_id) { int HP_battle_range_type(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_range_type_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_battle_range_type_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_range_type_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2083,11 +3595,11 @@ int HP_battle_range_type(struct block_list *src, struct block_list *target, uint { 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++ ) { + if (HPMHooks.count.HP_battle_range_type_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target, skill_id, skill_lv); } } return retVal___; @@ -2095,14 +3607,14 @@ int HP_battle_range_type(struct block_list *src, struct block_list *target, uint 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_calc_base_damage_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &nk, &n_ele, &s_ele, &s_ele_, &type, &flag, &flag2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2110,11 +3622,11 @@ int64 HP_battle_calc_base_damage(struct block_list *src, struct block_list *bl, { 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++ ) { + if (HPMHooks.count.HP_battle_calc_base_damage_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, nk, n_ele, s_ele, s_ele_, type, flag, flag2); } } return retVal___; @@ -2122,14 +3634,14 @@ int64 HP_battle_calc_base_damage(struct block_list *src, struct block_list *bl, 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___ = 0; - 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); + if (HPMHooks.count.HP_battle_calc_base_damage2_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_base_damage2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&st, &wa, &sc, &t_size, &sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2137,27 +3649,26 @@ int64 HP_battle_calc_base_damage2(struct status_data *st, struct weapon_atk *wa, { 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++ ) { + if (HPMHooks.count.HP_battle_calc_base_damage2_post > 0) { + 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); + 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); + struct Damage retVal___ = { 0 }; + if (HPMHooks.count.HP_battle_calc_misc_attack_pre > 0) { + struct Damage (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *mflag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &skill_id, &skill_lv, &mflag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2165,27 +3676,26 @@ struct Damage HP_battle_calc_misc_attack(struct block_list *src, struct block_li { 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++ ) { + if (HPMHooks.count.HP_battle_calc_misc_attack_post > 0) { + 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); + 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); + struct Damage retVal___ = { 0 }; + if (HPMHooks.count.HP_battle_calc_magic_attack_pre > 0) { + struct Damage (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int *mflag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_magic_attack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &skill_id, &skill_lv, &mflag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2193,11 +3703,11 @@ struct Damage HP_battle_calc_magic_attack(struct block_list *src, struct block_l { 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++ ) { + if (HPMHooks.count.HP_battle_calc_magic_attack_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target, skill_id, skill_lv, mflag); } } return retVal___; @@ -2205,14 +3715,14 @@ struct Damage HP_battle_calc_magic_attack(struct block_list *src, struct block_l int HP_battle_adjust_skill_damage(int m, unsigned short skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_adjust_skill_damage_pre ) { + if (HPMHooks.count.HP_battle_adjust_skill_damage_pre > 0) { int (*preHookFunc) (int *m, unsigned short *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_adjust_skill_damage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2220,11 +3730,11 @@ int HP_battle_adjust_skill_damage(int m, unsigned short skill_id) { { 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++ ) { + if (HPMHooks.count.HP_battle_adjust_skill_damage_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, m, skill_id); } } return retVal___; @@ -2232,14 +3742,14 @@ int HP_battle_adjust_skill_damage(int m, unsigned short skill_id) { int64 HP_battle_add_mastery(struct map_session_data *sd, struct block_list *target, int64 dmg, int type) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_battle_add_mastery_pre ) { - int64 (*preHookFunc) (struct map_session_data *sd, struct block_list *target, int64 *dmg, int *type); + if (HPMHooks.count.HP_battle_add_mastery_pre > 0) { + int64 (*preHookFunc) (struct map_session_data **sd, struct block_list **target, int64 *dmg, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_add_mastery_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &target, &dmg, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2247,11 +3757,11 @@ int64 HP_battle_add_mastery(struct map_session_data *sd, struct block_list *targ { 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++ ) { + if (HPMHooks.count.HP_battle_add_mastery_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, target, dmg, type); } } return retVal___; @@ -2259,14 +3769,14 @@ int64 HP_battle_add_mastery(struct map_session_data *sd, struct block_list *targ int HP_battle_calc_drain(int64 damage, int rate, int per) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_calc_drain_pre ) { + if (HPMHooks.count.HP_battle_calc_drain_pre > 0) { int (*preHookFunc) (int64 *damage, int *rate, int *per); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_drain_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2274,52 +3784,52 @@ int HP_battle_calc_drain(int64 damage, int rate, int per) { { 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++ ) { + if (HPMHooks.count.HP_battle_calc_drain_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, damage, rate, per); } } return retVal___; } -int HP_battle_config_read(const char *cfgName) { +bool HP_battle_config_read(const char *filename, bool imported) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_battle_config_read_pre ) { - int (*preHookFunc) (const char *cfgName); + bool retVal___ = false; + if (HPMHooks.count.HP_battle_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_read_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.battle.config_read(cfgName); + retVal___ = HPMHooks.source.battle.config_read(filename, imported); } - 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++ ) { + if (HPMHooks.count.HP_battle_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); + 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); + retVal___ = postHookFunc(retVal___, filename, imported); } } return retVal___; } void HP_battle_config_set_defaults(void) { int hIndex = 0; - if( HPMHooks.count.HP_battle_config_set_defaults_pre ) { + if (HPMHooks.count.HP_battle_config_set_defaults_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_defaults_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2327,38 +3837,65 @@ void HP_battle_config_set_defaults(void) { { HPMHooks.source.battle.config_set_defaults(); } - if( HPMHooks.count.HP_battle_config_set_defaults_post ) { + if (HPMHooks.count.HP_battle_config_set_defaults_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_defaults_post; hIndex++ ) { + 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) { +bool HP_battle_config_set_value_sub(int index, int value) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_battle_config_set_value_pre ) { - int (*preHookFunc) (const char *w1, const char *w2); + bool retVal___ = false; + if (HPMHooks.count.HP_battle_config_set_value_sub_pre > 0) { + bool (*preHookFunc) (int *index, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_battle_config_set_value_sub_pre[hIndex].func; + retVal___ = preHookFunc(&index, &value); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.battle.config_set_value_sub(index, value); + } + if (HPMHooks.count.HP_battle_config_set_value_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, int index, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_set_value_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_battle_config_set_value_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, index, value); + } + } + return retVal___; +} +bool HP_battle_config_set_value(const char *param, const char *value) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_battle_config_set_value_pre > 0) { + bool (*preHookFunc) (const char **param, const char **value); + *HPMforce_return = false; + 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); + retVal___ = preHookFunc(¶m, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.battle.config_set_value(w1, w2); + retVal___ = HPMHooks.source.battle.config_set_value(param, value); } - 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++ ) { + if (HPMHooks.count.HP_battle_config_set_value_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *param, const char *value); + 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); + retVal___ = postHookFunc(retVal___, param, value); } } return retVal___; @@ -2366,14 +3903,14 @@ int HP_battle_config_set_value(const char *w1, const char *w2) { bool HP_battle_config_get_value(const char *w1, int *value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_battle_config_get_value_pre ) { - bool (*preHookFunc) (const char *w1, int *value); + if (HPMHooks.count.HP_battle_config_get_value_pre > 0) { + bool (*preHookFunc) (const char **w1, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_get_value_pre; hIndex++ ) { + 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, value); + retVal___ = preHookFunc(&w1, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2381,9 +3918,9 @@ bool HP_battle_config_get_value(const char *w1, int *value) { { retVal___ = HPMHooks.source.battle.config_get_value(w1, value); } - if( HPMHooks.count.HP_battle_config_get_value_post ) { + if (HPMHooks.count.HP_battle_config_get_value_post > 0) { bool (*postHookFunc) (bool retVal___, const char *w1, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_get_value_post; hIndex++ ) { + 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, value); } @@ -2392,14 +3929,14 @@ bool HP_battle_config_get_value(const char *w1, int *value) { } void HP_battle_config_adjust(void) { int hIndex = 0; - if( HPMHooks.count.HP_battle_config_adjust_pre ) { + if (HPMHooks.count.HP_battle_config_adjust_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_adjust_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2407,9 +3944,9 @@ void HP_battle_config_adjust(void) { { HPMHooks.source.battle.config_adjust(); } - if( HPMHooks.count.HP_battle_config_adjust_post ) { + if (HPMHooks.count.HP_battle_config_adjust_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_adjust_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_adjust_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_config_adjust_post[hIndex].func; postHookFunc(); } @@ -2419,14 +3956,14 @@ void HP_battle_config_adjust(void) { 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); + if (HPMHooks.count.HP_battle_get_enemy_area_pre > 0) { + struct block_list* (*preHookFunc) (struct block_list **src, int *x, int *y, int *range, int *type, int *ignore_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_get_enemy_area_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &x, &y, &range, &type, &ignore_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2434,11 +3971,11 @@ struct block_list* HP_battle_get_enemy_area(struct block_list *src, int x, int y { 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++ ) { + if (HPMHooks.count.HP_battle_get_enemy_area_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, x, y, range, type, ignore_id); } } return retVal___; @@ -2446,16 +3983,16 @@ struct block_list* HP_battle_get_enemy_area(struct block_list *src, int x, int y int HP_battle_damage_area(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_battle_damage_area_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_battle_damage_area_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_damage_area_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2465,9 +4002,9 @@ int HP_battle_damage_area(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.battle.damage_area(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_battle_damage_area_post ) { + if (HPMHooks.count.HP_battle_damage_area_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_damage_area_post; hIndex++ ) { + 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); @@ -2478,14 +4015,14 @@ int HP_battle_damage_area(struct block_list *bl, va_list ap) { } void HP_battle_calc_masteryfix_unknown(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; - if( HPMHooks.count.HP_battle_calc_masteryfix_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int64 *damage, int *div, bool *left, bool *weapon); + if (HPMHooks.count.HP_battle_calc_masteryfix_unknown_pre > 0) { + void (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int64 **damage, int **div, bool **left, bool **weapon); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_masteryfix_unknown_pre[hIndex].func; - preHookFunc(src, target, skill_id, skill_lv, damage, div, left, weapon); + preHookFunc(&src, &target, &skill_id, &skill_lv, &damage, &div, &left, &weapon); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2493,9 +4030,9 @@ void HP_battle_calc_masteryfix_unknown(struct block_list *src, struct block_list { HPMHooks.source.battle.calc_masteryfix_unknown(src, target, skill_id, skill_lv, damage, div, left, weapon); } - if( HPMHooks.count.HP_battle_calc_masteryfix_unknown_post ) { + if (HPMHooks.count.HP_battle_calc_masteryfix_unknown_post > 0) { void (*postHookFunc) (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_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_masteryfix_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_masteryfix_unknown_post[hIndex].func; postHookFunc(src, target, skill_id, skill_lv, damage, div, left, weapon); } @@ -2504,14 +4041,14 @@ void HP_battle_calc_masteryfix_unknown(struct block_list *src, struct block_list } void HP_battle_calc_skillratio_magic_unknown(int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag) { int hIndex = 0; - if( HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag); + if (HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_pre > 0) { + void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int **skillratio, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_skillratio_magic_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, target, skill_id, skill_lv, skillratio, flag); + preHookFunc(&attack_type, &src, &target, &skill_id, &skill_lv, &skillratio, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2519,9 +4056,9 @@ void HP_battle_calc_skillratio_magic_unknown(int *attack_type, struct block_list { HPMHooks.source.battle.calc_skillratio_magic_unknown(attack_type, src, target, skill_id, skill_lv, skillratio, flag); } - if( HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_post ) { + if (HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_post > 0) { void (*postHookFunc) (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_magic_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_magic_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_skillratio_magic_unknown_post[hIndex].func; postHookFunc(attack_type, src, target, skill_id, skill_lv, skillratio, flag); } @@ -2530,14 +4067,14 @@ void HP_battle_calc_skillratio_magic_unknown(int *attack_type, struct block_list } void HP_battle_calc_skillratio_weapon_unknown(int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag) { int hIndex = 0; - if( HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *skillratio, int *flag); + if (HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_pre > 0) { + void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int **skillratio, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_skillratio_weapon_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, target, skill_id, skill_lv, skillratio, flag); + preHookFunc(&attack_type, &src, &target, &skill_id, &skill_lv, &skillratio, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2545,9 +4082,9 @@ void HP_battle_calc_skillratio_weapon_unknown(int *attack_type, struct block_lis { HPMHooks.source.battle.calc_skillratio_weapon_unknown(attack_type, src, target, skill_id, skill_lv, skillratio, flag); } - if( HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_post ) { + if (HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_post > 0) { void (*postHookFunc) (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_weapon_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_skillratio_weapon_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_skillratio_weapon_unknown_post[hIndex].func; postHookFunc(attack_type, src, target, skill_id, skill_lv, skillratio, flag); } @@ -2556,14 +4093,14 @@ void HP_battle_calc_skillratio_weapon_unknown(int *attack_type, struct block_lis } void HP_battle_calc_misc_attack_unknown(struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag, struct Damage *md) { int hIndex = 0; - if( HPMHooks.count.HP_battle_calc_misc_attack_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag, struct Damage *md); + if (HPMHooks.count.HP_battle_calc_misc_attack_unknown_pre > 0) { + void (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 **skill_id, uint16 **skill_lv, int **mflag, struct Damage **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_battle_calc_misc_attack_unknown_pre[hIndex].func; - preHookFunc(src, target, skill_id, skill_lv, mflag, md); + preHookFunc(&src, &target, &skill_id, &skill_lv, &mflag, &md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2571,26 +4108,26 @@ void HP_battle_calc_misc_attack_unknown(struct block_list *src, struct block_lis { HPMHooks.source.battle.calc_misc_attack_unknown(src, target, skill_id, skill_lv, mflag, md); } - if( HPMHooks.count.HP_battle_calc_misc_attack_unknown_post ) { + if (HPMHooks.count.HP_battle_calc_misc_attack_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag, struct Damage *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_battle_calc_misc_attack_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_battle_calc_misc_attack_unknown_post[hIndex].func; postHookFunc(src, target, skill_id, skill_lv, mflag, md); } } return; } -/* bg */ +/* battleground_interface */ void HP_bg_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_bg_init_pre ) { + if (HPMHooks.count.HP_bg_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2598,25 +4135,25 @@ void HP_bg_init(bool minimal) { { HPMHooks.source.bg.init(minimal); } - if( HPMHooks.count.HP_bg_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_bg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_bg_final_pre ) { + if (HPMHooks.count.HP_bg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2624,9 +4161,9 @@ void HP_bg_final(void) { { HPMHooks.source.bg.final(); } - if( HPMHooks.count.HP_bg_final_post ) { + if (HPMHooks.count.HP_bg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_final_post[hIndex].func; postHookFunc(); } @@ -2636,14 +4173,14 @@ void HP_bg_final(void) { struct bg_arena* HP_bg_name2arena(const char *name) { int hIndex = 0; struct bg_arena* retVal___ = NULL; - if( HPMHooks.count.HP_bg_name2arena_pre ) { - struct bg_arena* (*preHookFunc) (const char *name); + if (HPMHooks.count.HP_bg_name2arena_pre > 0) { + struct bg_arena* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_name2arena_pre[hIndex].func; - retVal___ = preHookFunc(name); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2651,9 +4188,9 @@ struct bg_arena* HP_bg_name2arena(const char *name) { { retVal___ = HPMHooks.source.bg.name2arena(name); } - if( HPMHooks.count.HP_bg_name2arena_post ) { + if (HPMHooks.count.HP_bg_name2arena_post > 0) { struct bg_arena* (*postHookFunc) (struct bg_arena* retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_name2arena_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_name2arena_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -2662,14 +4199,14 @@ struct bg_arena* HP_bg_name2arena(const char *name) { } 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); + if (HPMHooks.count.HP_bg_queue_add_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct bg_arena **arena, enum bg_queue_types *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_add_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &arena, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2677,11 +4214,11 @@ void HP_bg_queue_add(struct map_session_data *sd, struct bg_arena *arena, enum b { 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++ ) { + if (HPMHooks.count.HP_bg_queue_add_post > 0) { + 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); + postHookFunc(sd, arena, type); } } return; @@ -2689,14 +4226,14 @@ void HP_bg_queue_add(struct map_session_data *sd, struct bg_arena *arena, enum b 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___ = BGQA_SUCCESS; - 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); + if (HPMHooks.count.HP_bg_can_queue_pre > 0) { + enum BATTLEGROUNDS_QUEUE_ACK (*preHookFunc) (struct map_session_data **sd, struct bg_arena **arena, enum bg_queue_types *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_can_queue_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &arena, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2704,11 +4241,11 @@ enum BATTLEGROUNDS_QUEUE_ACK HP_bg_can_queue(struct map_session_data *sd, struct { 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++ ) { + if (HPMHooks.count.HP_bg_can_queue_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, arena, type); } } return retVal___; @@ -2716,14 +4253,14 @@ enum BATTLEGROUNDS_QUEUE_ACK HP_bg_can_queue(struct map_session_data *sd, struct int HP_bg_id2pos(int queue_id, int account_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_id2pos_pre ) { + if (HPMHooks.count.HP_bg_id2pos_pre > 0) { int (*preHookFunc) (int *queue_id, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_id2pos_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2731,25 +4268,25 @@ int HP_bg_id2pos(int queue_id, int account_id) { { 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++ ) { + if (HPMHooks.count.HP_bg_id2pos_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_bg_queue_pc_cleanup_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pc_cleanup_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2757,9 +4294,9 @@ void HP_bg_queue_pc_cleanup(struct map_session_data *sd) { { HPMHooks.source.bg.queue_pc_cleanup(sd); } - if( HPMHooks.count.HP_bg_queue_pc_cleanup_post ) { + if (HPMHooks.count.HP_bg_queue_pc_cleanup_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pc_cleanup_post; hIndex++ ) { + 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); } @@ -2768,14 +4305,14 @@ void HP_bg_queue_pc_cleanup(struct map_session_data *sd) { } void HP_bg_begin(struct bg_arena *arena) { int hIndex = 0; - if( HPMHooks.count.HP_bg_begin_pre ) { - void (*preHookFunc) (struct bg_arena *arena); + if (HPMHooks.count.HP_bg_begin_pre > 0) { + void (*preHookFunc) (struct bg_arena **arena); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_begin_pre[hIndex].func; - preHookFunc(arena); + preHookFunc(&arena); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2783,9 +4320,9 @@ void HP_bg_begin(struct bg_arena *arena) { { HPMHooks.source.bg.begin(arena); } - if( HPMHooks.count.HP_bg_begin_post ) { + if (HPMHooks.count.HP_bg_begin_post > 0) { void (*postHookFunc) (struct bg_arena *arena); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_begin_post[hIndex].func; postHookFunc(arena); } @@ -2795,14 +4332,14 @@ void HP_bg_begin(struct bg_arena *arena) { int HP_bg_begin_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_begin_timer_pre ) { + if (HPMHooks.count.HP_bg_begin_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2810,25 +4347,25 @@ int HP_bg_begin_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.bg.begin_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_bg_begin_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_begin_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_begin_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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); + if (HPMHooks.count.HP_bg_queue_pregame_pre > 0) { + void (*preHookFunc) (struct bg_arena **arena); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_queue_pregame_pre[hIndex].func; - preHookFunc(arena); + preHookFunc(&arena); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2836,9 +4373,9 @@ void HP_bg_queue_pregame(struct bg_arena *arena) { { HPMHooks.source.bg.queue_pregame(arena); } - if( HPMHooks.count.HP_bg_queue_pregame_post ) { + if (HPMHooks.count.HP_bg_queue_pregame_post > 0) { void (*postHookFunc) (struct bg_arena *arena); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_pregame_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_queue_pregame_post[hIndex].func; postHookFunc(arena); } @@ -2848,14 +4385,14 @@ void HP_bg_queue_pregame(struct bg_arena *arena) { int HP_bg_fillup_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_fillup_timer_pre ) { + if (HPMHooks.count.HP_bg_fillup_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_fillup_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2863,25 +4400,25 @@ int HP_bg_fillup_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.bg.fillup_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_bg_fillup_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_fillup_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_fillup_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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); + if (HPMHooks.count.HP_bg_queue_ready_ack_pre > 0) { + void (*preHookFunc) (struct bg_arena **arena, struct map_session_data **sd, bool *response); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_ready_ack_pre; hIndex++ ) { + 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); + preHookFunc(&arena, &sd, &response); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2889,25 +4426,25 @@ void HP_bg_queue_ready_ack(struct bg_arena *arena, struct map_session_data *sd, { 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++ ) { + if (HPMHooks.count.HP_bg_queue_ready_ack_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_bg_match_over_pre > 0) { + void (*preHookFunc) (struct bg_arena **arena, bool *canceled); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_match_over_pre; hIndex++ ) { + 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); + preHookFunc(&arena, &canceled); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2915,25 +4452,25 @@ void HP_bg_match_over(struct bg_arena *arena, bool canceled) { { 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++ ) { + if (HPMHooks.count.HP_bg_match_over_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_bg_queue_check_pre > 0) { + void (*preHookFunc) (struct bg_arena **arena); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_queue_check_pre[hIndex].func; - preHookFunc(arena); + preHookFunc(&arena); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -2941,9 +4478,9 @@ void HP_bg_queue_check(struct bg_arena *arena) { { HPMHooks.source.bg.queue_check(arena); } - if( HPMHooks.count.HP_bg_queue_check_post ) { + if (HPMHooks.count.HP_bg_queue_check_post > 0) { void (*postHookFunc) (struct bg_arena *arena); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_queue_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_queue_check_post[hIndex].func; postHookFunc(arena); } @@ -2953,14 +4490,14 @@ void HP_bg_queue_check(struct bg_arena *arena) { 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 ) { + if (HPMHooks.count.HP_bg_team_search_pre > 0) { struct battleground_data* (*preHookFunc) (int *bg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2968,11 +4505,11 @@ struct battleground_data* HP_bg_team_search(int bg_id) { { 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++ ) { + if (HPMHooks.count.HP_bg_team_search_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bg_id); } } return retVal___; @@ -2980,14 +4517,14 @@ struct battleground_data* HP_bg_team_search(int bg_id) { 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); + if (HPMHooks.count.HP_bg_getavailablesd_pre > 0) { + struct map_session_data* (*preHookFunc) (struct battleground_data **bgd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_getavailablesd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_getavailablesd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_getavailablesd_pre[hIndex].func; - retVal___ = preHookFunc(bgd); + retVal___ = preHookFunc(&bgd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -2995,9 +4532,9 @@ struct map_session_data* HP_bg_getavailablesd(struct battleground_data *bgd) { { retVal___ = HPMHooks.source.bg.getavailablesd(bgd); } - if( HPMHooks.count.HP_bg_getavailablesd_post ) { + if (HPMHooks.count.HP_bg_getavailablesd_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_getavailablesd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_getavailablesd_post[hIndex].func; retVal___ = postHookFunc(retVal___, bgd); } @@ -3007,14 +4544,14 @@ struct map_session_data* HP_bg_getavailablesd(struct battleground_data *bgd) { bool HP_bg_team_delete(int bg_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_bg_team_delete_pre ) { + if (HPMHooks.count.HP_bg_team_delete_pre > 0) { bool (*preHookFunc) (int *bg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3022,11 +4559,11 @@ bool HP_bg_team_delete(int bg_id) { { retVal___ = HPMHooks.source.bg.team_delete(bg_id); } - if( HPMHooks.count.HP_bg_team_delete_post ) { - bool (*postHookFunc) (bool retVal___, int *bg_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_team_delete_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, bg_id); } } return retVal___; @@ -3034,14 +4571,14 @@ bool HP_bg_team_delete(int bg_id) { bool HP_bg_team_warp(int bg_id, unsigned short map_index, short x, short y) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_bg_team_warp_pre ) { + if (HPMHooks.count.HP_bg_team_warp_pre > 0) { bool (*preHookFunc) (int *bg_id, unsigned short *map_index, short *x, short *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_warp_pre; hIndex++ ) { + 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, &map_index, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3049,25 +4586,25 @@ bool HP_bg_team_warp(int bg_id, unsigned short map_index, short x, short y) { { retVal___ = HPMHooks.source.bg.team_warp(bg_id, map_index, x, y); } - if( HPMHooks.count.HP_bg_team_warp_post ) { - bool (*postHookFunc) (bool retVal___, int *bg_id, unsigned short *map_index, short *x, short *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_warp_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_team_warp_post > 0) { + bool (*postHookFunc) (bool retVal___, int bg_id, unsigned short map_index, 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, &map_index, &x, &y); + retVal___ = postHookFunc(retVal___, bg_id, map_index, x, y); } } return retVal___; } void HP_bg_send_dot_remove(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_bg_send_dot_remove_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_bg_send_dot_remove_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_send_dot_remove_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3075,9 +4612,9 @@ void HP_bg_send_dot_remove(struct map_session_data *sd) { { HPMHooks.source.bg.send_dot_remove(sd); } - if( HPMHooks.count.HP_bg_send_dot_remove_post ) { + if (HPMHooks.count.HP_bg_send_dot_remove_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_dot_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_send_dot_remove_post[hIndex].func; postHookFunc(sd); } @@ -3087,14 +4624,14 @@ void HP_bg_send_dot_remove(struct map_session_data *sd) { bool HP_bg_team_join(int bg_id, struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_bg_team_join_pre ) { - bool (*preHookFunc) (int *bg_id, struct map_session_data *sd); + if (HPMHooks.count.HP_bg_team_join_pre > 0) { + bool (*preHookFunc) (int *bg_id, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_join_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bg_id, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3102,11 +4639,11 @@ bool HP_bg_team_join(int bg_id, struct map_session_data *sd) { { retVal___ = HPMHooks.source.bg.team_join(bg_id, sd); } - if( HPMHooks.count.HP_bg_team_join_post ) { - bool (*postHookFunc) (bool retVal___, int *bg_id, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_join_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_team_join_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, bg_id, sd); } } return retVal___; @@ -3114,14 +4651,14 @@ bool HP_bg_team_join(int bg_id, struct map_session_data *sd) { int HP_bg_team_leave(struct map_session_data *sd, enum bg_team_leave_type flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_team_leave_pre ) { - int (*preHookFunc) (struct map_session_data *sd, enum bg_team_leave_type *flag); + if (HPMHooks.count.HP_bg_team_leave_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, enum bg_team_leave_type *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_leave_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3129,11 +4666,11 @@ int HP_bg_team_leave(struct map_session_data *sd, enum bg_team_leave_type flag) { 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, enum bg_team_leave_type *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_leave_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_team_leave_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum bg_team_leave_type 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); + retVal___ = postHookFunc(retVal___, sd, flag); } } return retVal___; @@ -3141,14 +4678,14 @@ int HP_bg_team_leave(struct map_session_data *sd, enum bg_team_leave_type flag) bool HP_bg_member_respawn(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_bg_member_respawn_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_bg_member_respawn_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_member_respawn_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3156,9 +4693,9 @@ bool HP_bg_member_respawn(struct map_session_data *sd) { { retVal___ = HPMHooks.source.bg.member_respawn(sd); } - if( HPMHooks.count.HP_bg_member_respawn_post ) { + if (HPMHooks.count.HP_bg_member_respawn_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_member_respawn_post; hIndex++ ) { + 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); } @@ -3168,14 +4705,14 @@ bool HP_bg_member_respawn(struct map_session_data *sd) { int HP_bg_create(unsigned short map_index, short rx, short ry, const char *ev, const char *dev) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_create_pre ) { - int (*preHookFunc) (unsigned short *map_index, short *rx, short *ry, const char *ev, const char *dev); + if (HPMHooks.count.HP_bg_create_pre > 0) { + int (*preHookFunc) (unsigned short *map_index, short *rx, short *ry, const char **ev, const char **dev); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_create_pre[hIndex].func; - retVal___ = preHookFunc(&map_index, &rx, &ry, ev, dev); + retVal___ = preHookFunc(&map_index, &rx, &ry, &ev, &dev); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3183,11 +4720,11 @@ int HP_bg_create(unsigned short map_index, short rx, short ry, const char *ev, c { retVal___ = HPMHooks.source.bg.create(map_index, rx, ry, ev, dev); } - if( HPMHooks.count.HP_bg_create_post ) { - int (*postHookFunc) (int retVal___, unsigned short *map_index, short *rx, short *ry, const char *ev, const char *dev); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_create_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_create_post > 0) { + int (*postHookFunc) (int retVal___, unsigned short map_index, 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___, &map_index, &rx, &ry, ev, dev); + retVal___ = postHookFunc(retVal___, map_index, rx, ry, ev, dev); } } return retVal___; @@ -3195,14 +4732,14 @@ int HP_bg_create(unsigned short map_index, short rx, short ry, const char *ev, c int HP_bg_team_get_id(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_team_get_id_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_bg_team_get_id_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_get_id_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3210,38 +4747,38 @@ int HP_bg_team_get_id(struct block_list *bl) { { retVal___ = HPMHooks.source.bg.team_get_id(bl); } - if( HPMHooks.count.HP_bg_team_get_id_post ) { + if (HPMHooks.count.HP_bg_team_get_id_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_get_id_post; hIndex++ ) { + 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___; } -bool HP_bg_send_message(struct map_session_data *sd, const char *mes, int len) { +bool HP_bg_send_message(struct map_session_data *sd, const char *mes) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_bg_send_message_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len); + if (HPMHooks.count.HP_bg_send_message_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_message_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.bg.send_message(sd, mes, len); + retVal___ = HPMHooks.source.bg.send_message(sd, mes); } - if( HPMHooks.count.HP_bg_send_message_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *mes, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_message_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_send_message_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *mes); + 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); + retVal___ = postHookFunc(retVal___, sd, mes); } } return retVal___; @@ -3249,16 +4786,16 @@ bool HP_bg_send_message(struct map_session_data *sd, const char *mes, int len) { int HP_bg_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_send_xy_timer_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_bg_send_xy_timer_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3268,12 +4805,12 @@ int HP_bg_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_send_xy_timer_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -3282,14 +4819,14 @@ int HP_bg_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list ap) { int HP_bg_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_send_xy_timer_pre ) { + if (HPMHooks.count.HP_bg_send_xy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3297,11 +4834,11 @@ int HP_bg_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_send_xy_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_send_xy_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -3309,14 +4846,14 @@ int HP_bg_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_afk_timer_pre ) { + if (HPMHooks.count.HP_bg_afk_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_afk_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_afk_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_afk_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3324,11 +4861,11 @@ int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.bg.afk_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_bg_afk_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_afk_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_afk_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_afk_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_afk_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -3336,16 +4873,16 @@ int HP_bg_afk_timer(int tid, int64 tick, int id, intptr_t data) { int HP_bg_team_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_bg_team_db_final_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_bg_team_db_final_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_bg_team_db_final_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3355,12 +4892,12 @@ int HP_bg_team_db_final(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.bg.team_db_final(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_bg_team_db_final_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_post; hIndex++ ) { + if (HPMHooks.count.HP_bg_team_db_final_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_team_db_final_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_bg_team_db_final_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -3369,14 +4906,14 @@ int HP_bg_team_db_final(union DBKey key, struct DBData *data, va_list ap) { enum bg_queue_types HP_bg_str2teamtype(const char *str) { int hIndex = 0; enum bg_queue_types retVal___ = BGQT_INVALID; - if( HPMHooks.count.HP_bg_str2teamtype_pre ) { - enum bg_queue_types (*preHookFunc) (const char *str); + if (HPMHooks.count.HP_bg_str2teamtype_pre > 0) { + enum bg_queue_types (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_bg_str2teamtype_pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3384,9 +4921,9 @@ enum bg_queue_types HP_bg_str2teamtype(const char *str) { { retVal___ = HPMHooks.source.bg.str2teamtype(str); } - if( HPMHooks.count.HP_bg_str2teamtype_post ) { + if (HPMHooks.count.HP_bg_str2teamtype_post > 0) { enum bg_queue_types (*postHookFunc) (enum bg_queue_types retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_bg_str2teamtype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_bg_str2teamtype_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -3395,14 +4932,14 @@ enum bg_queue_types HP_bg_str2teamtype(const char *str) { } void HP_bg_config_read(void) { int hIndex = 0; - if( HPMHooks.count.HP_bg_config_read_pre ) { + if (HPMHooks.count.HP_bg_config_read_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_config_read_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3410,27 +4947,27 @@ void HP_bg_config_read(void) { { HPMHooks.source.bg.config_read(); } - if( HPMHooks.count.HP_bg_config_read_post ) { + if (HPMHooks.count.HP_bg_config_read_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_bg_config_read_post; hIndex++ ) { + 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 */ +/* buyingstore_interface */ bool HP_buyingstore_setup(struct map_session_data *sd, unsigned char slots) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_buyingstore_setup_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, unsigned char *slots); + if (HPMHooks.count.HP_buyingstore_setup_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, unsigned char *slots); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_setup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_setup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_buyingstore_setup_pre[hIndex].func; - retVal___ = preHookFunc(sd, &slots); + retVal___ = preHookFunc(&sd, &slots); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3438,25 +4975,25 @@ bool HP_buyingstore_setup(struct map_session_data *sd, unsigned char slots) { { 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++ ) { + if (HPMHooks.count.HP_buyingstore_setup_post > 0) { + 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); + 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) { +void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub *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); + if (HPMHooks.count.HP_buyingstore_create_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *zenylimit, unsigned char *result, const char **storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub **itemlist, unsigned int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_create_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &zenylimit, &result, &storename, &itemlist, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3464,25 +5001,25 @@ void HP_buyingstore_create(struct map_session_data *sd, int zenylimit, unsigned { 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++ ) { + if (HPMHooks.count.HP_buyingstore_create_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int zenylimit, unsigned char result, const char *storename, const struct PACKET_CZ_REQ_OPEN_BUYING_STORE_sub *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); + 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); + if (HPMHooks.count.HP_buyingstore_close_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_buyingstore_close_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3490,9 +5027,9 @@ void HP_buyingstore_close(struct map_session_data *sd) { { HPMHooks.source.buyingstore.close(sd); } - if( HPMHooks.count.HP_buyingstore_close_post ) { + if (HPMHooks.count.HP_buyingstore_close_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_buyingstore_close_post[hIndex].func; postHookFunc(sd); } @@ -3501,14 +5038,14 @@ void HP_buyingstore_close(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_buyingstore_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_buyingstore_open_pre[hIndex].func; - preHookFunc(sd, &account_id); + preHookFunc(&sd, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3516,25 +5053,25 @@ void HP_buyingstore_open(struct map_session_data *sd, int account_id) { { 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++ ) { + if (HPMHooks.count.HP_buyingstore_open_post > 0) { + 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); + 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) { +void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned int buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub *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); + if (HPMHooks.count.HP_buyingstore_trade_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *account_id, unsigned int *buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub **itemlist, unsigned int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_trade_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &account_id, &buyer_id, &itemlist, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3542,26 +5079,26 @@ void HP_buyingstore_trade(struct map_session_data *sd, int account_id, unsigned { 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++ ) { + if (HPMHooks.count.HP_buyingstore_trade_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int account_id, unsigned int buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub *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); + postHookFunc(sd, account_id, buyer_id, itemlist, count); } } return; } -bool HP_buyingstore_search(struct map_session_data *sd, unsigned short nameid) { +bool HP_buyingstore_search(struct map_session_data *sd, int nameid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_buyingstore_search_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid); + if (HPMHooks.count.HP_buyingstore_search_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_search_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_search_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_buyingstore_search_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + retVal___ = preHookFunc(&sd, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3569,11 +5106,11 @@ bool HP_buyingstore_search(struct map_session_data *sd, unsigned short nameid) { { 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++ ) { + if (HPMHooks.count.HP_buyingstore_search_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int 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); + retVal___ = postHookFunc(retVal___, sd, nameid); } } return retVal___; @@ -3581,14 +5118,14 @@ bool HP_buyingstore_search(struct map_session_data *sd, unsigned short nameid) { bool HP_buyingstore_searchall(struct map_session_data *sd, const struct s_search_store_search *s) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_buyingstore_searchall_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const struct s_search_store_search *s); + if (HPMHooks.count.HP_buyingstore_searchall_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const struct s_search_store_search **s); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_searchall_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_searchall_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_buyingstore_searchall_pre[hIndex].func; - retVal___ = preHookFunc(sd, s); + retVal___ = preHookFunc(&sd, &s); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3596,9 +5133,9 @@ bool HP_buyingstore_searchall(struct map_session_data *sd, const struct s_search { retVal___ = HPMHooks.source.buyingstore.searchall(sd, s); } - if( HPMHooks.count.HP_buyingstore_searchall_post ) { + if (HPMHooks.count.HP_buyingstore_searchall_post > 0) { 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++ ) { + 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); } @@ -3608,14 +5145,14 @@ bool HP_buyingstore_searchall(struct map_session_data *sd, const struct s_search unsigned int HP_buyingstore_getuid(void) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_buyingstore_getuid_pre ) { + if (HPMHooks.count.HP_buyingstore_getuid_pre > 0) { unsigned int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_getuid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3623,27 +5160,27 @@ unsigned int HP_buyingstore_getuid(void) { { retVal___ = HPMHooks.source.buyingstore.getuid(); } - if( HPMHooks.count.HP_buyingstore_getuid_post ) { + if (HPMHooks.count.HP_buyingstore_getuid_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_buyingstore_getuid_post; hIndex++ ) { + 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___; } -/* channel */ +/* channel_interface */ int HP_channel_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_channel_init_pre ) { + if (HPMHooks.count.HP_channel_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3651,25 +5188,25 @@ int HP_channel_init(bool minimal) { { retVal___ = HPMHooks.source.channel.init(minimal); } - if( HPMHooks.count.HP_channel_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_init_post; hIndex++ ) { + if (HPMHooks.count.HP_channel_init_post > 0) { + int (*postHookFunc) (int retVal___, bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + retVal___ = postHookFunc(retVal___, minimal); } } return retVal___; } void HP_channel_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_channel_final_pre ) { + if (HPMHooks.count.HP_channel_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3677,9 +5214,9 @@ void HP_channel_final(void) { { HPMHooks.source.channel.final(); } - if( HPMHooks.count.HP_channel_final_post ) { + if (HPMHooks.count.HP_channel_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_final_post[hIndex].func; postHookFunc(); } @@ -3689,14 +5226,14 @@ void HP_channel_final(void) { struct channel_data* HP_channel_search(const char *name, struct map_session_data *sd) { int hIndex = 0; struct channel_data* retVal___ = NULL; - if( HPMHooks.count.HP_channel_search_pre ) { - struct channel_data* (*preHookFunc) (const char *name, struct map_session_data *sd); + if (HPMHooks.count.HP_channel_search_pre > 0) { + struct channel_data* (*preHookFunc) (const char **name, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_search_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_search_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_search_pre[hIndex].func; - retVal___ = preHookFunc(name, sd); + retVal___ = preHookFunc(&name, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3704,9 +5241,9 @@ struct channel_data* HP_channel_search(const char *name, struct map_session_data { retVal___ = HPMHooks.source.channel.search(name, sd); } - if( HPMHooks.count.HP_channel_search_post ) { + if (HPMHooks.count.HP_channel_search_post > 0) { struct channel_data* (*postHookFunc) (struct channel_data* retVal___, const char *name, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_search_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_search_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_search_post[hIndex].func; retVal___ = postHookFunc(retVal___, name, sd); } @@ -3716,14 +5253,14 @@ struct channel_data* HP_channel_search(const char *name, struct map_session_data struct channel_data* HP_channel_create(enum channel_types type, const char *name, unsigned char color) { int hIndex = 0; struct channel_data* retVal___ = NULL; - if( HPMHooks.count.HP_channel_create_pre ) { - struct channel_data* (*preHookFunc) (enum channel_types *type, const char *name, unsigned char *color); + if (HPMHooks.count.HP_channel_create_pre > 0) { + struct channel_data* (*preHookFunc) (enum channel_types *type, const char **name, unsigned char *color); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_create_pre[hIndex].func; - retVal___ = preHookFunc(&type, name, &color); + retVal___ = preHookFunc(&type, &name, &color); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3731,25 +5268,25 @@ struct channel_data* HP_channel_create(enum channel_types type, const char *name { retVal___ = HPMHooks.source.channel.create(type, name, color); } - if( HPMHooks.count.HP_channel_create_post ) { - struct channel_data* (*postHookFunc) (struct channel_data* retVal___, enum channel_types *type, const char *name, unsigned char *color); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_create_post; hIndex++ ) { + if (HPMHooks.count.HP_channel_create_post > 0) { + struct channel_data* (*postHookFunc) (struct channel_data* retVal___, enum channel_types type, const char *name, unsigned char color); + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_create_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type, name, &color); + retVal___ = postHookFunc(retVal___, type, name, color); } } return retVal___; } void HP_channel_delete(struct channel_data *chan) { int hIndex = 0; - if( HPMHooks.count.HP_channel_delete_pre ) { - void (*preHookFunc) (struct channel_data *chan); + if (HPMHooks.count.HP_channel_delete_pre > 0) { + void (*preHookFunc) (struct channel_data **chan); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_delete_pre[hIndex].func; - preHookFunc(chan); + preHookFunc(&chan); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3757,9 +5294,9 @@ void HP_channel_delete(struct channel_data *chan) { { HPMHooks.source.channel.delete(chan); } - if( HPMHooks.count.HP_channel_delete_post ) { + if (HPMHooks.count.HP_channel_delete_post > 0) { void (*postHookFunc) (struct channel_data *chan); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_delete_post[hIndex].func; postHookFunc(chan); } @@ -3768,14 +5305,14 @@ void HP_channel_delete(struct channel_data *chan) { } void HP_channel_set_password(struct channel_data *chan, const char *password) { int hIndex = 0; - if( HPMHooks.count.HP_channel_set_password_pre ) { - void (*preHookFunc) (struct channel_data *chan, const char *password); + if (HPMHooks.count.HP_channel_set_password_pre > 0) { + void (*preHookFunc) (struct channel_data **chan, const char **password); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_password_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_password_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_set_password_pre[hIndex].func; - preHookFunc(chan, password); + preHookFunc(&chan, &password); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3783,9 +5320,9 @@ void HP_channel_set_password(struct channel_data *chan, const char *password) { { HPMHooks.source.channel.set_password(chan, password); } - if( HPMHooks.count.HP_channel_set_password_post ) { + if (HPMHooks.count.HP_channel_set_password_post > 0) { void (*postHookFunc) (struct channel_data *chan, const char *password); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_password_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_password_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_set_password_post[hIndex].func; postHookFunc(chan, password); } @@ -3795,14 +5332,14 @@ void HP_channel_set_password(struct channel_data *chan, const char *password) { enum channel_operation_status HP_channel_ban(struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd) { int hIndex = 0; enum channel_operation_status retVal___ = HCS_STATUS_FAIL; - if( HPMHooks.count.HP_channel_ban_pre ) { - enum channel_operation_status (*preHookFunc) (struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd); + if (HPMHooks.count.HP_channel_ban_pre > 0) { + enum channel_operation_status (*preHookFunc) (struct channel_data **chan, const struct map_session_data **ssd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_ban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_ban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_ban_pre[hIndex].func; - retVal___ = preHookFunc(chan, ssd, tsd); + retVal___ = preHookFunc(&chan, &ssd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3810,9 +5347,9 @@ enum channel_operation_status HP_channel_ban(struct channel_data *chan, const st { retVal___ = HPMHooks.source.channel.ban(chan, ssd, tsd); } - if( HPMHooks.count.HP_channel_ban_post ) { + if (HPMHooks.count.HP_channel_ban_post > 0) { enum channel_operation_status (*postHookFunc) (enum channel_operation_status retVal___, struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_ban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_ban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_ban_post[hIndex].func; retVal___ = postHookFunc(retVal___, chan, ssd, tsd); } @@ -3822,14 +5359,14 @@ enum channel_operation_status HP_channel_ban(struct channel_data *chan, const st enum channel_operation_status HP_channel_unban(struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd) { int hIndex = 0; enum channel_operation_status retVal___ = HCS_STATUS_FAIL; - if( HPMHooks.count.HP_channel_unban_pre ) { - enum channel_operation_status (*preHookFunc) (struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd); + if (HPMHooks.count.HP_channel_unban_pre > 0) { + enum channel_operation_status (*preHookFunc) (struct channel_data **chan, const struct map_session_data **ssd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_unban_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_unban_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_unban_pre[hIndex].func; - retVal___ = preHookFunc(chan, ssd, tsd); + retVal___ = preHookFunc(&chan, &ssd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3837,9 +5374,9 @@ enum channel_operation_status HP_channel_unban(struct channel_data *chan, const { retVal___ = HPMHooks.source.channel.unban(chan, ssd, tsd); } - if( HPMHooks.count.HP_channel_unban_post ) { + if (HPMHooks.count.HP_channel_unban_post > 0) { enum channel_operation_status (*postHookFunc) (enum channel_operation_status retVal___, struct channel_data *chan, const struct map_session_data *ssd, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_unban_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_unban_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_unban_post[hIndex].func; retVal___ = postHookFunc(retVal___, chan, ssd, tsd); } @@ -3848,14 +5385,14 @@ enum channel_operation_status HP_channel_unban(struct channel_data *chan, const } void HP_channel_set_options(struct channel_data *chan, unsigned int options) { int hIndex = 0; - if( HPMHooks.count.HP_channel_set_options_pre ) { - void (*preHookFunc) (struct channel_data *chan, unsigned int *options); + if (HPMHooks.count.HP_channel_set_options_pre > 0) { + void (*preHookFunc) (struct channel_data **chan, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_set_options_pre[hIndex].func; - preHookFunc(chan, &options); + preHookFunc(&chan, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3863,25 +5400,25 @@ void HP_channel_set_options(struct channel_data *chan, unsigned int options) { { HPMHooks.source.channel.set_options(chan, options); } - if( HPMHooks.count.HP_channel_set_options_post ) { - void (*postHookFunc) (struct channel_data *chan, unsigned int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_options_post; hIndex++ ) { + if (HPMHooks.count.HP_channel_set_options_post > 0) { + void (*postHookFunc) (struct channel_data *chan, unsigned int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_set_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_set_options_post[hIndex].func; - postHookFunc(chan, &options); + postHookFunc(chan, options); } } return; } void HP_channel_send(struct channel_data *chan, struct map_session_data *sd, const char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_channel_send_pre ) { - void (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd, const char *msg); + if (HPMHooks.count.HP_channel_send_pre > 0) { + void (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd, const char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_send_pre[hIndex].func; - preHookFunc(chan, sd, msg); + preHookFunc(&chan, &sd, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3889,9 +5426,9 @@ void HP_channel_send(struct channel_data *chan, struct map_session_data *sd, con { HPMHooks.source.channel.send(chan, sd, msg); } - if( HPMHooks.count.HP_channel_send_post ) { + if (HPMHooks.count.HP_channel_send_post > 0) { void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd, const char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_send_post[hIndex].func; postHookFunc(chan, sd, msg); } @@ -3900,14 +5437,14 @@ void HP_channel_send(struct channel_data *chan, struct map_session_data *sd, con } void HP_channel_join_sub(struct channel_data *chan, struct map_session_data *sd, bool stealth) { int hIndex = 0; - if( HPMHooks.count.HP_channel_join_sub_pre ) { - void (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd, bool *stealth); + if (HPMHooks.count.HP_channel_join_sub_pre > 0) { + void (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd, bool *stealth); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_join_sub_pre[hIndex].func; - preHookFunc(chan, sd, &stealth); + preHookFunc(&chan, &sd, &stealth); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3915,11 +5452,11 @@ void HP_channel_join_sub(struct channel_data *chan, struct map_session_data *sd, { HPMHooks.source.channel.join_sub(chan, sd, stealth); } - if( HPMHooks.count.HP_channel_join_sub_post ) { - void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd, bool *stealth); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_channel_join_sub_post > 0) { + void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd, bool stealth); + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_join_sub_post[hIndex].func; - postHookFunc(chan, sd, &stealth); + postHookFunc(chan, sd, stealth); } } return; @@ -3927,14 +5464,14 @@ void HP_channel_join_sub(struct channel_data *chan, struct map_session_data *sd, enum channel_operation_status HP_channel_join(struct channel_data *chan, struct map_session_data *sd, const char *password, bool silent) { int hIndex = 0; enum channel_operation_status retVal___ = HCS_STATUS_FAIL; - if( HPMHooks.count.HP_channel_join_pre ) { - enum channel_operation_status (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd, const char *password, bool *silent); + if (HPMHooks.count.HP_channel_join_pre > 0) { + enum channel_operation_status (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd, const char **password, bool *silent); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_join_pre[hIndex].func; - retVal___ = preHookFunc(chan, sd, password, &silent); + retVal___ = preHookFunc(&chan, &sd, &password, &silent); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -3942,25 +5479,25 @@ enum channel_operation_status HP_channel_join(struct channel_data *chan, struct { retVal___ = HPMHooks.source.channel.join(chan, sd, password, silent); } - if( HPMHooks.count.HP_channel_join_post ) { - enum channel_operation_status (*postHookFunc) (enum channel_operation_status retVal___, struct channel_data *chan, struct map_session_data *sd, const char *password, bool *silent); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_post; hIndex++ ) { + if (HPMHooks.count.HP_channel_join_post > 0) { + enum channel_operation_status (*postHookFunc) (enum channel_operation_status retVal___, struct channel_data *chan, struct map_session_data *sd, const char *password, bool silent); + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_join_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_join_post[hIndex].func; - retVal___ = postHookFunc(retVal___, chan, sd, password, &silent); + retVal___ = postHookFunc(retVal___, chan, sd, password, silent); } } return retVal___; } void HP_channel_leave(struct channel_data *chan, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_leave_pre ) { - void (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd); + if (HPMHooks.count.HP_channel_leave_pre > 0) { + void (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_leave_pre[hIndex].func; - preHookFunc(chan, sd); + preHookFunc(&chan, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3968,9 +5505,9 @@ void HP_channel_leave(struct channel_data *chan, struct map_session_data *sd) { { HPMHooks.source.channel.leave(chan, sd); } - if( HPMHooks.count.HP_channel_leave_post ) { + if (HPMHooks.count.HP_channel_leave_post > 0) { void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_leave_post[hIndex].func; postHookFunc(chan, sd); } @@ -3979,14 +5516,14 @@ void HP_channel_leave(struct channel_data *chan, struct map_session_data *sd) { } void HP_channel_leave_sub(struct channel_data *chan, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_leave_sub_pre ) { - void (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd); + if (HPMHooks.count.HP_channel_leave_sub_pre > 0) { + void (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_leave_sub_pre[hIndex].func; - preHookFunc(chan, sd); + preHookFunc(&chan, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -3994,9 +5531,9 @@ void HP_channel_leave_sub(struct channel_data *chan, struct map_session_data *sd { HPMHooks.source.channel.leave_sub(chan, sd); } - if( HPMHooks.count.HP_channel_leave_sub_post ) { + if (HPMHooks.count.HP_channel_leave_sub_post > 0) { void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_leave_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_leave_sub_post[hIndex].func; postHookFunc(chan, sd); } @@ -4005,14 +5542,14 @@ void HP_channel_leave_sub(struct channel_data *chan, struct map_session_data *sd } void HP_channel_quit(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_quit_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_channel_quit_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_quit_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4020,9 +5557,9 @@ void HP_channel_quit(struct map_session_data *sd) { { HPMHooks.source.channel.quit(sd); } - if( HPMHooks.count.HP_channel_quit_post ) { + if (HPMHooks.count.HP_channel_quit_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_quit_post[hIndex].func; postHookFunc(sd); } @@ -4031,14 +5568,14 @@ void HP_channel_quit(struct map_session_data *sd) { } void HP_channel_map_join(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_map_join_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_channel_map_join_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_map_join_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_map_join_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_map_join_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4046,9 +5583,9 @@ void HP_channel_map_join(struct map_session_data *sd) { { HPMHooks.source.channel.map_join(sd); } - if( HPMHooks.count.HP_channel_map_join_post ) { + if (HPMHooks.count.HP_channel_map_join_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_map_join_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_map_join_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_map_join_post[hIndex].func; postHookFunc(sd); } @@ -4057,14 +5594,14 @@ void HP_channel_map_join(struct map_session_data *sd) { } void HP_channel_guild_join_alliance(const struct guild *g_source, const struct guild *g_ally) { int hIndex = 0; - if( HPMHooks.count.HP_channel_guild_join_alliance_pre ) { - void (*preHookFunc) (const struct guild *g_source, const struct guild *g_ally); + if (HPMHooks.count.HP_channel_guild_join_alliance_pre > 0) { + void (*preHookFunc) (const struct guild **g_source, const struct guild **g_ally); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_join_alliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_join_alliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_guild_join_alliance_pre[hIndex].func; - preHookFunc(g_source, g_ally); + preHookFunc(&g_source, &g_ally); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4072,9 +5609,9 @@ void HP_channel_guild_join_alliance(const struct guild *g_source, const struct g { HPMHooks.source.channel.guild_join_alliance(g_source, g_ally); } - if( HPMHooks.count.HP_channel_guild_join_alliance_post ) { + if (HPMHooks.count.HP_channel_guild_join_alliance_post > 0) { void (*postHookFunc) (const struct guild *g_source, const struct guild *g_ally); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_join_alliance_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_join_alliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_guild_join_alliance_post[hIndex].func; postHookFunc(g_source, g_ally); } @@ -4083,14 +5620,14 @@ void HP_channel_guild_join_alliance(const struct guild *g_source, const struct g } void HP_channel_guild_leave_alliance(const struct guild *g_source, const struct guild *g_ally) { int hIndex = 0; - if( HPMHooks.count.HP_channel_guild_leave_alliance_pre ) { - void (*preHookFunc) (const struct guild *g_source, const struct guild *g_ally); + if (HPMHooks.count.HP_channel_guild_leave_alliance_pre > 0) { + void (*preHookFunc) (const struct guild **g_source, const struct guild **g_ally); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_leave_alliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_leave_alliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_guild_leave_alliance_pre[hIndex].func; - preHookFunc(g_source, g_ally); + preHookFunc(&g_source, &g_ally); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4098,9 +5635,9 @@ void HP_channel_guild_leave_alliance(const struct guild *g_source, const struct { HPMHooks.source.channel.guild_leave_alliance(g_source, g_ally); } - if( HPMHooks.count.HP_channel_guild_leave_alliance_post ) { + if (HPMHooks.count.HP_channel_guild_leave_alliance_post > 0) { void (*postHookFunc) (const struct guild *g_source, const struct guild *g_ally); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_leave_alliance_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_guild_leave_alliance_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_guild_leave_alliance_post[hIndex].func; postHookFunc(g_source, g_ally); } @@ -4109,14 +5646,14 @@ void HP_channel_guild_leave_alliance(const struct guild *g_source, const struct } void HP_channel_quit_guild(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_quit_guild_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_channel_quit_guild_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_guild_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_guild_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_quit_guild_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4124,9 +5661,9 @@ void HP_channel_quit_guild(struct map_session_data *sd) { { HPMHooks.source.channel.quit_guild(sd); } - if( HPMHooks.count.HP_channel_quit_guild_post ) { + if (HPMHooks.count.HP_channel_quit_guild_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_guild_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_quit_guild_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_quit_guild_post[hIndex].func; postHookFunc(sd); } @@ -4135,14 +5672,14 @@ void HP_channel_quit_guild(struct map_session_data *sd) { } void HP_channel_irc_join(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_channel_irc_join_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_channel_irc_join_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_irc_join_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_irc_join_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_irc_join_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4150,9 +5687,9 @@ void HP_channel_irc_join(struct map_session_data *sd) { { HPMHooks.source.channel.irc_join(sd); } - if( HPMHooks.count.HP_channel_irc_join_post ) { + if (HPMHooks.count.HP_channel_irc_join_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_irc_join_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_irc_join_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_irc_join_post[hIndex].func; postHookFunc(sd); } @@ -4161,14 +5698,14 @@ void HP_channel_irc_join(struct map_session_data *sd) { } void HP_channel_config_read(void) { int hIndex = 0; - if( HPMHooks.count.HP_channel_config_read_pre ) { + if (HPMHooks.count.HP_channel_config_read_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_channel_config_read_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4176,27 +5713,27 @@ void HP_channel_config_read(void) { { HPMHooks.source.channel.config_read(); } - if( HPMHooks.count.HP_channel_config_read_post ) { + if (HPMHooks.count.HP_channel_config_read_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_channel_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_channel_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_channel_config_read_post[hIndex].func; postHookFunc(); } } return; } -/* chat */ +/* chat_interface */ bool HP_chat_create_pc_chat(struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_create_pc_chat_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub); + if (HPMHooks.count.HP_chat_create_pc_chat_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const char **title, const char **pass, int *limit, bool *pub); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pc_chat_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &title, &pass, &limit, &pub); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4204,11 +5741,11 @@ bool HP_chat_create_pc_chat(struct map_session_data *sd, const char *title, cons { retVal___ = HPMHooks.source.chat.create_pc_chat(sd, title, pass, limit, pub); } - if( HPMHooks.count.HP_chat_create_pc_chat_post ) { - bool (*postHookFunc) (bool 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++ ) { + if (HPMHooks.count.HP_chat_create_pc_chat_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, sd, title, pass, limit, pub); } } return retVal___; @@ -4216,14 +5753,14 @@ bool HP_chat_create_pc_chat(struct map_session_data *sd, const char *title, cons bool HP_chat_join(struct map_session_data *sd, int chatid, const char *pass) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_join_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *chatid, const char *pass); + if (HPMHooks.count.HP_chat_join_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *chatid, const char **pass); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_join_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &chatid, &pass); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4231,11 +5768,11 @@ bool HP_chat_join(struct map_session_data *sd, int chatid, const char *pass) { { retVal___ = HPMHooks.source.chat.join(sd, chatid, pass); } - if( HPMHooks.count.HP_chat_join_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *chatid, const char *pass); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_join_post; hIndex++ ) { + if (HPMHooks.count.HP_chat_join_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, sd, chatid, pass); } } return retVal___; @@ -4243,14 +5780,14 @@ bool HP_chat_join(struct map_session_data *sd, int chatid, const char *pass) { int HP_chat_leave(struct map_session_data *sd, bool kicked) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chat_leave_pre ) { - int (*preHookFunc) (struct map_session_data *sd, bool *kicked); + if (HPMHooks.count.HP_chat_leave_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, bool *kicked); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_leave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chat_leave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chat_leave_pre[hIndex].func; - retVal___ = preHookFunc(sd, &kicked); + retVal___ = preHookFunc(&sd, &kicked); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4258,11 +5795,11 @@ int HP_chat_leave(struct map_session_data *sd, bool kicked) { { 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++ ) { + if (HPMHooks.count.HP_chat_leave_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, kicked); } } return retVal___; @@ -4270,14 +5807,14 @@ int HP_chat_leave(struct map_session_data *sd, bool kicked) { bool HP_chat_change_owner(struct map_session_data *sd, const char *nextownername) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_change_owner_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const char *nextownername); + if (HPMHooks.count.HP_chat_change_owner_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const char **nextownername); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_owner_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &nextownername); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4285,9 +5822,9 @@ bool HP_chat_change_owner(struct map_session_data *sd, const char *nextownername { retVal___ = HPMHooks.source.chat.change_owner(sd, nextownername); } - if( HPMHooks.count.HP_chat_change_owner_post ) { + if (HPMHooks.count.HP_chat_change_owner_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *nextownername); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_owner_post; hIndex++ ) { + 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); } @@ -4297,14 +5834,14 @@ bool HP_chat_change_owner(struct map_session_data *sd, const char *nextownername bool HP_chat_change_status(struct map_session_data *sd, const char *title, const char *pass, int limit, bool pub) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_change_status_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const char *title, const char *pass, int *limit, bool *pub); + if (HPMHooks.count.HP_chat_change_status_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const char **title, const char **pass, int *limit, bool *pub); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_change_status_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &title, &pass, &limit, &pub); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4312,11 +5849,11 @@ bool HP_chat_change_status(struct map_session_data *sd, const char *title, const { retVal___ = HPMHooks.source.chat.change_status(sd, title, pass, limit, pub); } - if( HPMHooks.count.HP_chat_change_status_post ) { - bool (*postHookFunc) (bool 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++ ) { + if (HPMHooks.count.HP_chat_change_status_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, sd, title, pass, limit, pub); } } return retVal___; @@ -4324,14 +5861,14 @@ bool HP_chat_change_status(struct map_session_data *sd, const char *title, const bool HP_chat_kick(struct map_session_data *sd, const char *kickusername) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_kick_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const char *kickusername); + if (HPMHooks.count.HP_chat_kick_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const char **kickusername); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_kick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chat_kick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chat_kick_pre[hIndex].func; - retVal___ = preHookFunc(sd, kickusername); + retVal___ = preHookFunc(&sd, &kickusername); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4339,38 +5876,38 @@ bool HP_chat_kick(struct map_session_data *sd, const char *kickusername) { { retVal___ = HPMHooks.source.chat.kick(sd, kickusername); } - if( HPMHooks.count.HP_chat_kick_post ) { + if (HPMHooks.count.HP_chat_kick_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *kickusername); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_kick_post; hIndex++ ) { + 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___; } -bool 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) { +bool HP_chat_create_npc_chat(struct npc_data *nd, const char *title, int limit, bool pub, int trigger, const char *ev, int zeny, int min_level, int max_level) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_create_npc_chat_pre ) { - bool (*preHookFunc) (struct npc_data *nd, const char *title, int *limit, bool *pub, int *trigger, const char *ev, int *zeny, int *minLvl, int *maxLvl); + if (HPMHooks.count.HP_chat_create_npc_chat_pre > 0) { + bool (*preHookFunc) (struct npc_data **nd, const char **title, int *limit, bool *pub, int *trigger, const char **ev, int *zeny, int *min_level, int *max_level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_npc_chat_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nd, &title, &limit, &pub, &trigger, &ev, &zeny, &min_level, &max_level); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.chat.create_npc_chat(nd, title, limit, pub, trigger, ev, zeny, minLvl, maxLvl); + retVal___ = HPMHooks.source.chat.create_npc_chat(nd, title, limit, pub, trigger, ev, zeny, min_level, max_level); } - if( HPMHooks.count.HP_chat_create_npc_chat_post ) { - bool (*postHookFunc) (bool 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++ ) { + if (HPMHooks.count.HP_chat_create_npc_chat_post > 0) { + bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const char *title, int limit, bool pub, int trigger, const char *ev, int zeny, int min_level, int max_level); + 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); + retVal___ = postHookFunc(retVal___, nd, title, limit, pub, trigger, ev, zeny, min_level, max_level); } } return retVal___; @@ -4378,14 +5915,14 @@ bool HP_chat_create_npc_chat(struct npc_data *nd, const char *title, int limit, bool HP_chat_delete_npc_chat(struct npc_data *nd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_delete_npc_chat_pre ) { - bool (*preHookFunc) (struct npc_data *nd); + if (HPMHooks.count.HP_chat_delete_npc_chat_pre > 0) { + bool (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_delete_npc_chat_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4393,9 +5930,9 @@ bool HP_chat_delete_npc_chat(struct npc_data *nd) { { retVal___ = HPMHooks.source.chat.delete_npc_chat(nd); } - if( HPMHooks.count.HP_chat_delete_npc_chat_post ) { + if (HPMHooks.count.HP_chat_delete_npc_chat_post > 0) { bool (*postHookFunc) (bool retVal___, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_delete_npc_chat_post; hIndex++ ) { + 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); } @@ -4405,14 +5942,14 @@ bool HP_chat_delete_npc_chat(struct npc_data *nd) { bool HP_chat_enable_event(struct chat_data *cd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_enable_event_pre ) { - bool (*preHookFunc) (struct chat_data *cd); + if (HPMHooks.count.HP_chat_enable_event_pre > 0) { + bool (*preHookFunc) (struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_enable_event_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4420,9 +5957,9 @@ bool HP_chat_enable_event(struct chat_data *cd) { { retVal___ = HPMHooks.source.chat.enable_event(cd); } - if( HPMHooks.count.HP_chat_enable_event_post ) { + if (HPMHooks.count.HP_chat_enable_event_post > 0) { bool (*postHookFunc) (bool retVal___, struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_enable_event_post; hIndex++ ) { + 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); } @@ -4432,14 +5969,14 @@ bool HP_chat_enable_event(struct chat_data *cd) { bool HP_chat_disable_event(struct chat_data *cd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_disable_event_pre ) { - bool (*preHookFunc) (struct chat_data *cd); + if (HPMHooks.count.HP_chat_disable_event_pre > 0) { + bool (*preHookFunc) (struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_disable_event_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4447,9 +5984,9 @@ bool HP_chat_disable_event(struct chat_data *cd) { { retVal___ = HPMHooks.source.chat.disable_event(cd); } - if( HPMHooks.count.HP_chat_disable_event_post ) { + if (HPMHooks.count.HP_chat_disable_event_post > 0) { bool (*postHookFunc) (bool retVal___, struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_disable_event_post; hIndex++ ) { + 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); } @@ -4459,14 +5996,14 @@ bool HP_chat_disable_event(struct chat_data *cd) { bool HP_chat_npc_kick_all(struct chat_data *cd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_npc_kick_all_pre ) { - bool (*preHookFunc) (struct chat_data *cd); + if (HPMHooks.count.HP_chat_npc_kick_all_pre > 0) { + bool (*preHookFunc) (struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_npc_kick_all_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4474,9 +6011,9 @@ bool HP_chat_npc_kick_all(struct chat_data *cd) { { retVal___ = HPMHooks.source.chat.npc_kick_all(cd); } - if( HPMHooks.count.HP_chat_npc_kick_all_post ) { + if (HPMHooks.count.HP_chat_npc_kick_all_post > 0) { bool (*postHookFunc) (bool retVal___, struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_npc_kick_all_post; hIndex++ ) { + 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); } @@ -4486,14 +6023,14 @@ bool HP_chat_npc_kick_all(struct chat_data *cd) { bool HP_chat_trigger_event(struct chat_data *cd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chat_trigger_event_pre ) { - bool (*preHookFunc) (struct chat_data *cd); + if (HPMHooks.count.HP_chat_trigger_event_pre > 0) { + bool (*preHookFunc) (struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_trigger_event_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4501,53 +6038,53 @@ bool HP_chat_trigger_event(struct chat_data *cd) { { retVal___ = HPMHooks.source.chat.trigger_event(cd); } - if( HPMHooks.count.HP_chat_trigger_event_post ) { + if (HPMHooks.count.HP_chat_trigger_event_post > 0) { bool (*postHookFunc) (bool retVal___, struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_trigger_event_post; hIndex++ ) { + 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) { +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 min_level, int max_level) { 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); + if (HPMHooks.count.HP_chat_create_pre > 0) { + 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 *min_level, int *max_level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chat_create_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &title, &pass, &limit, &pub, &trigger, &ev, &zeny, &min_level, &max_level); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.chat.create(bl, title, pass, limit, pub, trigger, ev, zeny, minLvl, maxLvl); + retVal___ = HPMHooks.source.chat.create(bl, title, pass, limit, pub, trigger, ev, zeny, min_level, max_level); } - 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++ ) { + if (HPMHooks.count.HP_chat_create_post > 0) { + 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 min_level, int max_level); + 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); + retVal___ = postHookFunc(retVal___, bl, title, pass, limit, pub, trigger, ev, zeny, min_level, max_level); } } return retVal___; } -/* chrif */ +/* chrif_interface */ void HP_chrif_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_init_pre ) { + if (HPMHooks.count.HP_chrif_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4555,25 +6092,25 @@ void HP_chrif_init(bool minimal) { { HPMHooks.source.chrif.init(minimal); } - if( HPMHooks.count.HP_chrif_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_chrif_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_final_pre ) { + if (HPMHooks.count.HP_chrif_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4581,9 +6118,9 @@ void HP_chrif_final(void) { { HPMHooks.source.chrif.final(); } - if( HPMHooks.count.HP_chrif_final_post ) { + if (HPMHooks.count.HP_chrif_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_final_post[hIndex].func; postHookFunc(); } @@ -4592,14 +6129,14 @@ void HP_chrif_final(void) { } void HP_chrif_setuserid(char *id) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_setuserid_pre ) { - void (*preHookFunc) (char *id); + if (HPMHooks.count.HP_chrif_setuserid_pre > 0) { + void (*preHookFunc) (char **id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_setuserid_pre[hIndex].func; - preHookFunc(id); + preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4607,9 +6144,9 @@ void HP_chrif_setuserid(char *id) { { HPMHooks.source.chrif.setuserid(id); } - if( HPMHooks.count.HP_chrif_setuserid_post ) { + if (HPMHooks.count.HP_chrif_setuserid_post > 0) { void (*postHookFunc) (char *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setuserid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_setuserid_post[hIndex].func; postHookFunc(id); } @@ -4618,14 +6155,14 @@ void HP_chrif_setuserid(char *id) { } void HP_chrif_setpasswd(char *pwd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_setpasswd_pre ) { - void (*preHookFunc) (char *pwd); + if (HPMHooks.count.HP_chrif_setpasswd_pre > 0) { + void (*preHookFunc) (char **pwd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_setpasswd_pre[hIndex].func; - preHookFunc(pwd); + preHookFunc(&pwd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4633,9 +6170,9 @@ void HP_chrif_setpasswd(char *pwd) { { HPMHooks.source.chrif.setpasswd(pwd); } - if( HPMHooks.count.HP_chrif_setpasswd_post ) { + if (HPMHooks.count.HP_chrif_setpasswd_post > 0) { void (*postHookFunc) (char *pwd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setpasswd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_setpasswd_post[hIndex].func; postHookFunc(pwd); } @@ -4644,14 +6181,14 @@ void HP_chrif_setpasswd(char *pwd) { } void HP_chrif_checkdefaultlogin(void) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_checkdefaultlogin_pre ) { + if (HPMHooks.count.HP_chrif_checkdefaultlogin_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_checkdefaultlogin_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4659,9 +6196,9 @@ void HP_chrif_checkdefaultlogin(void) { { HPMHooks.source.chrif.checkdefaultlogin(); } - if( HPMHooks.count.HP_chrif_checkdefaultlogin_post ) { + if (HPMHooks.count.HP_chrif_checkdefaultlogin_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_checkdefaultlogin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_checkdefaultlogin_post[hIndex].func; postHookFunc(); } @@ -4671,14 +6208,14 @@ void HP_chrif_checkdefaultlogin(void) { bool HP_chrif_setip(const char *ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_setip_pre ) { - bool (*preHookFunc) (const char *ip); + if (HPMHooks.count.HP_chrif_setip_pre > 0) { + bool (*preHookFunc) (const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_setip_pre[hIndex].func; - retVal___ = preHookFunc(ip); + retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4686,9 +6223,9 @@ bool HP_chrif_setip(const char *ip) { { retVal___ = HPMHooks.source.chrif.setip(ip); } - if( HPMHooks.count.HP_chrif_setip_post ) { + if (HPMHooks.count.HP_chrif_setip_post > 0) { bool (*postHookFunc) (bool retVal___, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_setip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -4697,14 +6234,14 @@ bool HP_chrif_setip(const char *ip) { } void HP_chrif_setport(uint16 port) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_setport_pre ) { + if (HPMHooks.count.HP_chrif_setport_pre > 0) { void (*preHookFunc) (uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_setport_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4712,11 +6249,11 @@ void HP_chrif_setport(uint16 port) { { 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++ ) { + if (HPMHooks.count.HP_chrif_setport_post > 0) { + 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); + postHookFunc(port); } } return; @@ -4724,14 +6261,14 @@ void HP_chrif_setport(uint16 port) { int HP_chrif_isconnected(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_isconnected_pre ) { + if (HPMHooks.count.HP_chrif_isconnected_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_isconnected_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4739,9 +6276,9 @@ int HP_chrif_isconnected(void) { { retVal___ = HPMHooks.source.chrif.isconnected(); } - if( HPMHooks.count.HP_chrif_isconnected_post ) { + if (HPMHooks.count.HP_chrif_isconnected_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_isconnected_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_isconnected_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_isconnected_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -4750,14 +6287,14 @@ int HP_chrif_isconnected(void) { } void HP_chrif_check_shutdown(void) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_check_shutdown_pre ) { + if (HPMHooks.count.HP_chrif_check_shutdown_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_shutdown_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4765,9 +6302,9 @@ void HP_chrif_check_shutdown(void) { { HPMHooks.source.chrif.check_shutdown(); } - if( HPMHooks.count.HP_chrif_check_shutdown_post ) { + if (HPMHooks.count.HP_chrif_check_shutdown_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_shutdown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_shutdown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_check_shutdown_post[hIndex].func; postHookFunc(); } @@ -4777,14 +6314,14 @@ void HP_chrif_check_shutdown(void) { struct auth_node* HP_chrif_search(int account_id) { int hIndex = 0; struct auth_node* retVal___ = NULL; - if( HPMHooks.count.HP_chrif_search_pre ) { + if (HPMHooks.count.HP_chrif_search_pre > 0) { struct auth_node* (*preHookFunc) (int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4792,11 +6329,11 @@ struct auth_node* HP_chrif_search(int account_id) { { 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++ ) { + if (HPMHooks.count.HP_chrif_search_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id); } } return retVal___; @@ -4804,14 +6341,14 @@ struct auth_node* HP_chrif_search(int account_id) { 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 ) { + if (HPMHooks.count.HP_chrif_auth_check_pre > 0) { struct auth_node* (*preHookFunc) (int *account_id, int *char_id, enum sd_state *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4819,11 +6356,11 @@ struct auth_node* HP_chrif_auth_check(int account_id, int char_id, enum sd_state { 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++ ) { + if (HPMHooks.count.HP_chrif_auth_check_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, char_id, state); } } return retVal___; @@ -4831,14 +6368,14 @@ struct auth_node* HP_chrif_auth_check(int account_id, int char_id, enum sd_state bool HP_chrif_auth_delete(int account_id, int char_id, enum sd_state state) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_auth_delete_pre ) { + if (HPMHooks.count.HP_chrif_auth_delete_pre > 0) { bool (*preHookFunc) (int *account_id, int *char_id, enum sd_state *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4846,11 +6383,11 @@ bool HP_chrif_auth_delete(int account_id, int char_id, enum sd_state state) { { 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++ ) { + if (HPMHooks.count.HP_chrif_auth_delete_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, char_id, state); } } return retVal___; @@ -4858,14 +6395,14 @@ bool HP_chrif_auth_delete(int account_id, int char_id, enum sd_state state) { bool HP_chrif_auth_finished(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_auth_finished_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_chrif_auth_finished_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_finished_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4873,9 +6410,9 @@ bool HP_chrif_auth_finished(struct map_session_data *sd) { { retVal___ = HPMHooks.source.chrif.auth_finished(sd); } - if( HPMHooks.count.HP_chrif_auth_finished_post ) { + if (HPMHooks.count.HP_chrif_auth_finished_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_finished_post; hIndex++ ) { + 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); } @@ -4884,14 +6421,14 @@ bool HP_chrif_auth_finished(struct map_session_data *sd) { } void HP_chrif_authreq(struct map_session_data *sd, bool hstandalone) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_authreq_pre ) { - void (*preHookFunc) (struct map_session_data *sd, bool *hstandalone); + if (HPMHooks.count.HP_chrif_authreq_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *hstandalone); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_authreq_pre[hIndex].func; - preHookFunc(sd, &hstandalone); + preHookFunc(&sd, &hstandalone); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4899,25 +6436,25 @@ void HP_chrif_authreq(struct map_session_data *sd, bool hstandalone) { { HPMHooks.source.chrif.authreq(sd, hstandalone); } - if( HPMHooks.count.HP_chrif_authreq_post ) { - void (*postHookFunc) (struct map_session_data *sd, bool *hstandalone); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_authreq_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, bool hstandalone); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authreq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_authreq_post[hIndex].func; - postHookFunc(sd, &hstandalone); + postHookFunc(sd, hstandalone); } } return; } void HP_chrif_authok(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_authok_pre ) { + if (HPMHooks.count.HP_chrif_authok_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -4925,11 +6462,11 @@ void HP_chrif_authok(int fd) { { 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++ ) { + if (HPMHooks.count.HP_chrif_authok_post > 0) { + 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); + postHookFunc(fd); } } return; @@ -4937,14 +6474,14 @@ void HP_chrif_authok(int fd) { bool HP_chrif_scdata_request(int account_id, int char_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_scdata_request_pre ) { + if (HPMHooks.count.HP_chrif_scdata_request_pre > 0) { bool (*preHookFunc) (int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_scdata_request_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4952,11 +6489,11 @@ bool HP_chrif_scdata_request(int account_id, int char_id) { { retVal___ = HPMHooks.source.chrif.scdata_request(account_id, char_id); } - if( HPMHooks.count.HP_chrif_scdata_request_post ) { - bool (*postHookFunc) (bool retVal___, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_scdata_request_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_scdata_request_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, account_id, char_id); } } return retVal___; @@ -4964,14 +6501,14 @@ bool HP_chrif_scdata_request(int account_id, int char_id) { bool HP_chrif_save(struct map_session_data *sd, int flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_save_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *flag); + if (HPMHooks.count.HP_chrif_save_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_save_pre[hIndex].func; - retVal___ = preHookFunc(sd, &flag); + retVal___ = preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -4979,11 +6516,11 @@ bool HP_chrif_save(struct map_session_data *sd, int flag) { { retVal___ = HPMHooks.source.chrif.save(sd, flag); } - if( HPMHooks.count.HP_chrif_save_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_save_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, sd, flag); } } return retVal___; @@ -4991,14 +6528,14 @@ bool HP_chrif_save(struct map_session_data *sd, int flag) { bool HP_chrif_charselectreq(struct map_session_data *sd, uint32 s_ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_charselectreq_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, uint32 *s_ip); + if (HPMHooks.count.HP_chrif_charselectreq_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, uint32 *s_ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_charselectreq_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &s_ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5006,11 +6543,11 @@ bool HP_chrif_charselectreq(struct map_session_data *sd, uint32 s_ip) { { retVal___ = HPMHooks.source.chrif.charselectreq(sd, s_ip); } - if( HPMHooks.count.HP_chrif_charselectreq_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, uint32 *s_ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_charselectreq_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_charselectreq_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, sd, s_ip); } } return retVal___; @@ -5018,14 +6555,14 @@ bool HP_chrif_charselectreq(struct map_session_data *sd, uint32 s_ip) { bool HP_chrif_changemapserver(struct map_session_data *sd, uint32 ip, uint16 port) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_changemapserver_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, uint32 *ip, uint16 *port); + if (HPMHooks.count.HP_chrif_changemapserver_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserver_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5033,11 +6570,11 @@ bool HP_chrif_changemapserver(struct map_session_data *sd, uint32 ip, uint16 por { retVal___ = HPMHooks.source.chrif.changemapserver(sd, ip, port); } - if( HPMHooks.count.HP_chrif_changemapserver_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, uint32 *ip, uint16 *port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserver_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_changemapserver_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, sd, ip, port); } } return retVal___; @@ -5045,14 +6582,14 @@ bool HP_chrif_changemapserver(struct map_session_data *sd, uint32 ip, uint16 por bool HP_chrif_searchcharid(int char_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_searchcharid_pre ) { + if (HPMHooks.count.HP_chrif_searchcharid_pre > 0) { bool (*preHookFunc) (int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_searchcharid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5060,11 +6597,11 @@ bool HP_chrif_searchcharid(int char_id) { { retVal___ = HPMHooks.source.chrif.searchcharid(char_id); } - if( HPMHooks.count.HP_chrif_searchcharid_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_searchcharid_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_searchcharid_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, char_id); } } return retVal___; @@ -5072,14 +6609,14 @@ bool HP_chrif_searchcharid(int char_id) { bool HP_chrif_changeemail(int id, const char *actual_email, const char *new_email) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_changeemail_pre ) { - bool (*preHookFunc) (int *id, const char *actual_email, const char *new_email); + if (HPMHooks.count.HP_chrif_changeemail_pre > 0) { + bool (*preHookFunc) (int *id, const char **actual_email, const char **new_email); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changeemail_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&id, &actual_email, &new_email); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5087,11 +6624,11 @@ bool HP_chrif_changeemail(int id, const char *actual_email, const char *new_emai { retVal___ = HPMHooks.source.chrif.changeemail(id, actual_email, new_email); } - if( HPMHooks.count.HP_chrif_changeemail_post ) { - bool (*postHookFunc) (bool retVal___, int *id, const char *actual_email, const char *new_email); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changeemail_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_changeemail_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, id, actual_email, new_email); } } return retVal___; @@ -5099,14 +6636,14 @@ bool HP_chrif_changeemail(int id, const char *actual_email, const char *new_emai bool 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; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_char_ask_name_pre ) { - bool (*preHookFunc) (int *acc, const char *character_name, unsigned short *operation_type, int *year, int *month, int *day, int *hour, int *minute, int *second); + if (HPMHooks.count.HP_chrif_char_ask_name_pre > 0) { + bool (*preHookFunc) (int *acc, const char **character_name, unsigned short *operation_type, int *year, int *month, int *day, int *hour, int *minute, int *second); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&acc, &character_name, &operation_type, &year, &month, &day, &hour, &minute, &second); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5114,11 +6651,11 @@ bool HP_chrif_char_ask_name(int acc, const char *character_name, unsigned short { 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 ) { - bool (*postHookFunc) (bool 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++ ) { + if (HPMHooks.count.HP_chrif_char_ask_name_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, acc, character_name, operation_type, year, month, day, hour, minute, second); } } return retVal___; @@ -5126,14 +6663,14 @@ bool HP_chrif_char_ask_name(int acc, const char *character_name, unsigned short int HP_chrif_updatefamelist(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_updatefamelist_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_chrif_updatefamelist_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_updatefamelist_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5141,9 +6678,9 @@ int HP_chrif_updatefamelist(struct map_session_data *sd) { { retVal___ = HPMHooks.source.chrif.updatefamelist(sd); } - if( HPMHooks.count.HP_chrif_updatefamelist_post ) { + if (HPMHooks.count.HP_chrif_updatefamelist_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_updatefamelist_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -5153,14 +6690,14 @@ int HP_chrif_updatefamelist(struct map_session_data *sd) { bool HP_chrif_buildfamelist(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_buildfamelist_pre ) { + if (HPMHooks.count.HP_chrif_buildfamelist_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_buildfamelist_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5168,9 +6705,9 @@ bool HP_chrif_buildfamelist(void) { { retVal___ = HPMHooks.source.chrif.buildfamelist(); } - if( HPMHooks.count.HP_chrif_buildfamelist_post ) { + if (HPMHooks.count.HP_chrif_buildfamelist_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_buildfamelist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_buildfamelist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_buildfamelist_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5180,14 +6717,14 @@ bool HP_chrif_buildfamelist(void) { bool HP_chrif_save_scdata(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_save_scdata_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_chrif_save_scdata_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5195,9 +6732,9 @@ bool HP_chrif_save_scdata(struct map_session_data *sd) { { retVal___ = HPMHooks.source.chrif.save_scdata(sd); } - if( HPMHooks.count.HP_chrif_save_scdata_post ) { + if (HPMHooks.count.HP_chrif_save_scdata_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_post; hIndex++ ) { + 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); } @@ -5207,14 +6744,14 @@ bool HP_chrif_save_scdata(struct map_session_data *sd) { bool HP_chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_ragsrvinfo_pre ) { + if (HPMHooks.count.HP_chrif_ragsrvinfo_pre > 0) { bool (*preHookFunc) (int *base_rate, int *job_rate, int *drop_rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_ragsrvinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5222,11 +6759,11 @@ bool HP_chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) { { retVal___ = HPMHooks.source.chrif.ragsrvinfo(base_rate, job_rate, drop_rate); } - if( HPMHooks.count.HP_chrif_ragsrvinfo_post ) { - bool (*postHookFunc) (bool retVal___, int *base_rate, int *job_rate, int *drop_rate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_ragsrvinfo_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_ragsrvinfo_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, base_rate, job_rate, drop_rate); } } return retVal___; @@ -5234,14 +6771,14 @@ bool HP_chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) { bool HP_chrif_char_offline_nsd(int account_id, int char_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_char_offline_nsd_pre ) { + if (HPMHooks.count.HP_chrif_char_offline_nsd_pre > 0) { bool (*preHookFunc) (int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_nsd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5249,11 +6786,11 @@ bool HP_chrif_char_offline_nsd(int account_id, int char_id) { { retVal___ = HPMHooks.source.chrif.char_offline_nsd(account_id, char_id); } - if( HPMHooks.count.HP_chrif_char_offline_nsd_post ) { - bool (*postHookFunc) (bool retVal___, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_offline_nsd_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_char_offline_nsd_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, account_id, char_id); } } return retVal___; @@ -5261,14 +6798,14 @@ bool HP_chrif_char_offline_nsd(int account_id, int char_id) { bool HP_chrif_char_reset_offline(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_char_reset_offline_pre ) { + if (HPMHooks.count.HP_chrif_char_reset_offline_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_reset_offline_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5276,9 +6813,9 @@ bool HP_chrif_char_reset_offline(void) { { retVal___ = HPMHooks.source.chrif.char_reset_offline(); } - if( HPMHooks.count.HP_chrif_char_reset_offline_post ) { + if (HPMHooks.count.HP_chrif_char_reset_offline_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_reset_offline_post; hIndex++ ) { + 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___); } @@ -5288,14 +6825,14 @@ bool HP_chrif_char_reset_offline(void) { bool HP_chrif_send_users_tochar(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_send_users_tochar_pre ) { + if (HPMHooks.count.HP_chrif_send_users_tochar_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_users_tochar_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5303,9 +6840,9 @@ bool HP_chrif_send_users_tochar(void) { { retVal___ = HPMHooks.source.chrif.send_users_tochar(); } - if( HPMHooks.count.HP_chrif_send_users_tochar_post ) { + if (HPMHooks.count.HP_chrif_send_users_tochar_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_users_tochar_post; hIndex++ ) { + 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___); } @@ -5315,14 +6852,14 @@ bool HP_chrif_send_users_tochar(void) { bool HP_chrif_char_online(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_char_online_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_chrif_char_online_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_online_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5330,9 +6867,9 @@ bool HP_chrif_char_online(struct map_session_data *sd) { { retVal___ = HPMHooks.source.chrif.char_online(sd); } - if( HPMHooks.count.HP_chrif_char_online_post ) { + if (HPMHooks.count.HP_chrif_char_online_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_online_post; hIndex++ ) { + 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); } @@ -5342,14 +6879,14 @@ bool HP_chrif_char_online(struct map_session_data *sd) { bool HP_chrif_changesex(struct map_session_data *sd, bool change_account) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_changesex_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, bool *change_account); + if (HPMHooks.count.HP_chrif_changesex_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, bool *change_account); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_changesex_pre[hIndex].func; - retVal___ = preHookFunc(sd, &change_account); + retVal___ = preHookFunc(&sd, &change_account); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5357,11 +6894,11 @@ bool HP_chrif_changesex(struct map_session_data *sd, bool change_account) { { retVal___ = HPMHooks.source.chrif.changesex(sd, change_account); } - if( HPMHooks.count.HP_chrif_changesex_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, bool *change_account); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_changesex_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, bool change_account); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changesex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_changesex_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &change_account); + retVal___ = postHookFunc(retVal___, sd, change_account); } } return retVal___; @@ -5369,14 +6906,14 @@ bool HP_chrif_changesex(struct map_session_data *sd, bool change_account) { bool HP_chrif_divorce(int partner_id1, int partner_id2) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_divorce_pre ) { + if (HPMHooks.count.HP_chrif_divorce_pre > 0) { bool (*preHookFunc) (int *partner_id1, int *partner_id2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorce_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5384,11 +6921,11 @@ bool HP_chrif_divorce(int partner_id1, int partner_id2) { { retVal___ = HPMHooks.source.chrif.divorce(partner_id1, partner_id2); } - if( HPMHooks.count.HP_chrif_divorce_post ) { - bool (*postHookFunc) (bool retVal___, int *partner_id1, int *partner_id2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorce_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_divorce_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, partner_id1, partner_id2); } } return retVal___; @@ -5396,14 +6933,14 @@ bool HP_chrif_divorce(int partner_id1, int partner_id2) { bool HP_chrif_removefriend(int char_id, int friend_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_removefriend_pre ) { + if (HPMHooks.count.HP_chrif_removefriend_pre > 0) { bool (*preHookFunc) (int *char_id, int *friend_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removefriend_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5411,52 +6948,26 @@ bool HP_chrif_removefriend(int char_id, int friend_id) { { retVal___ = HPMHooks.source.chrif.removefriend(char_id, friend_id); } - if( HPMHooks.count.HP_chrif_removefriend_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, int *friend_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removefriend_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_removefriend_post > 0) { + bool (*postHookFunc) (bool 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); + 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); - *HPMforce_return = false; - 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; -} bool HP_chrif_flush(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_flush_pre ) { + if (HPMHooks.count.HP_chrif_flush_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_flush_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5464,9 +6975,9 @@ bool HP_chrif_flush(void) { { retVal___ = HPMHooks.source.chrif.flush(); } - if( HPMHooks.count.HP_chrif_flush_post ) { + if (HPMHooks.count.HP_chrif_flush_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_flush_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_flush_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -5475,14 +6986,14 @@ bool HP_chrif_flush(void) { } void HP_chrif_skillid2idx(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_skillid2idx_pre ) { + if (HPMHooks.count.HP_chrif_skillid2idx_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_skillid2idx_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5490,11 +7001,11 @@ void HP_chrif_skillid2idx(int fd) { { 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++ ) { + if (HPMHooks.count.HP_chrif_skillid2idx_post > 0) { + 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); + postHookFunc(fd); } } return; @@ -5502,14 +7013,14 @@ void HP_chrif_skillid2idx(int fd) { bool HP_chrif_sd_to_auth(struct map_session_data *sd, enum sd_state state) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_sd_to_auth_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, enum sd_state *state); + if (HPMHooks.count.HP_chrif_sd_to_auth_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, enum sd_state *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sd_to_auth_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &state); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5517,11 +7028,11 @@ bool HP_chrif_sd_to_auth(struct map_session_data *sd, enum sd_state state) { { retVal___ = HPMHooks.source.chrif.sd_to_auth(sd, state); } - if( HPMHooks.count.HP_chrif_sd_to_auth_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum sd_state *state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sd_to_auth_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_sd_to_auth_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *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); + retVal___ = postHookFunc(retVal___, sd, state); } } return retVal___; @@ -5529,14 +7040,14 @@ bool HP_chrif_sd_to_auth(struct map_session_data *sd, enum sd_state state) { int HP_chrif_check_connect_char_server(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_check_connect_char_server_pre ) { + if (HPMHooks.count.HP_chrif_check_connect_char_server_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_connect_char_server_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5544,11 +7055,11 @@ int HP_chrif_check_connect_char_server(int tid, int64 tick, int id, intptr_t dat { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_check_connect_char_server_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_check_connect_char_server_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -5556,14 +7067,14 @@ int HP_chrif_check_connect_char_server(int tid, int64 tick, int id, intptr_t dat bool HP_chrif_auth_logout(struct map_session_data *sd, enum sd_state state) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_auth_logout_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, enum sd_state *state); + if (HPMHooks.count.HP_chrif_auth_logout_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, enum sd_state *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_logout_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &state); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5571,25 +7082,25 @@ bool HP_chrif_auth_logout(struct map_session_data *sd, enum sd_state state) { { retVal___ = HPMHooks.source.chrif.auth_logout(sd, state); } - if( HPMHooks.count.HP_chrif_auth_logout_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum sd_state *state); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_logout_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_auth_logout_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *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); + 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 ) { + if (HPMHooks.count.HP_chrif_save_ack_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5597,11 +7108,11 @@ void HP_chrif_save_ack(int fd) { { 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++ ) { + if (HPMHooks.count.HP_chrif_save_ack_post > 0) { + 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); + postHookFunc(fd); } } return; @@ -5609,16 +7120,16 @@ void HP_chrif_save_ack(int fd) { int HP_chrif_reconnect(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_reconnect_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_chrif_reconnect_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_reconnect_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5628,12 +7139,12 @@ int HP_chrif_reconnect(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_reconnect_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_reconnect_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -5642,16 +7153,16 @@ int HP_chrif_reconnect(union DBKey key, struct DBData *data, va_list ap) { int HP_chrif_auth_db_cleanup_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5661,12 +7172,12 @@ int HP_chrif_auth_db_cleanup_sub(union DBKey key, struct DBData *data, va_list a 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_auth_db_cleanup_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -5675,14 +7186,14 @@ int HP_chrif_auth_db_cleanup_sub(union DBKey key, struct DBData *data, va_list a bool HP_chrif_char_ask_name_answer(int acc, const char *player_name, uint16 type, uint16 answer) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_char_ask_name_answer_pre ) { - bool (*preHookFunc) (int *acc, const char *player_name, uint16 *type, uint16 *answer); + if (HPMHooks.count.HP_chrif_char_ask_name_answer_pre > 0) { + bool (*preHookFunc) (int *acc, const char **player_name, uint16 *type, uint16 *answer); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_answer_pre; hIndex++ ) { + 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; - retVal___ = preHookFunc(&acc, player_name, &type, &answer); + retVal___ = preHookFunc(&acc, &player_name, &type, &answer); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5690,11 +7201,11 @@ bool HP_chrif_char_ask_name_answer(int acc, const char *player_name, uint16 type { retVal___ = HPMHooks.source.chrif.char_ask_name_answer(acc, player_name, type, answer); } - if( HPMHooks.count.HP_chrif_char_ask_name_answer_post ) { - bool (*postHookFunc) (bool retVal___, int *acc, const char *player_name, uint16 *type, uint16 *answer); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_char_ask_name_answer_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_char_ask_name_answer_post > 0) { + bool (*postHookFunc) (bool retVal___, 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; - retVal___ = postHookFunc(retVal___, &acc, player_name, &type, &answer); + retVal___ = postHookFunc(retVal___, acc, player_name, type, answer); } } return retVal___; @@ -5702,16 +7213,16 @@ bool HP_chrif_char_ask_name_answer(int acc, const char *player_name, uint16 type int HP_chrif_auth_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_auth_db_final_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_chrif_auth_db_final_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_final_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5721,12 +7232,12 @@ int HP_chrif_auth_db_final(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_final_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_auth_db_final_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -5735,14 +7246,14 @@ int HP_chrif_auth_db_final(union DBKey key, struct DBData *data, va_list ap) { int HP_chrif_send_usercount_tochar(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_send_usercount_tochar_pre ) { + if (HPMHooks.count.HP_chrif_send_usercount_tochar_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_usercount_tochar_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5750,11 +7261,11 @@ int HP_chrif_send_usercount_tochar(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_send_usercount_tochar_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_send_usercount_tochar_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -5762,14 +7273,14 @@ int HP_chrif_send_usercount_tochar(int tid, int64 tick, int id, intptr_t data) { int HP_chrif_auth_db_cleanup(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_auth_db_cleanup_pre ) { + if (HPMHooks.count.HP_chrif_auth_db_cleanup_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5777,25 +7288,25 @@ int HP_chrif_auth_db_cleanup(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_auth_db_cleanup_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_auth_db_cleanup_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } void HP_chrif_connect(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_connect_pre ) { + if (HPMHooks.count.HP_chrif_connect_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_connect_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5803,25 +7314,25 @@ void HP_chrif_connect(int fd) { { HPMHooks.source.chrif.connect(fd); } - if( HPMHooks.count.HP_chrif_connect_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_connect_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_connect_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chrif_connectack(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_connectack_pre ) { + if (HPMHooks.count.HP_chrif_connectack_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_connectack_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5829,25 +7340,25 @@ void HP_chrif_connectack(int fd) { { HPMHooks.source.chrif.connectack(fd); } - if( HPMHooks.count.HP_chrif_connectack_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_connectack_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_connectack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_connectack_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chrif_sendmap(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_sendmap_pre ) { + if (HPMHooks.count.HP_chrif_sendmap_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_sendmap_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5855,25 +7366,25 @@ void HP_chrif_sendmap(int fd) { { HPMHooks.source.chrif.sendmap(fd); } - if( HPMHooks.count.HP_chrif_sendmap_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_sendmap_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_sendmap_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chrif_sendmapack(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_sendmapack_pre ) { + if (HPMHooks.count.HP_chrif_sendmapack_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_sendmapack_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5881,25 +7392,25 @@ void HP_chrif_sendmapack(int fd) { { HPMHooks.source.chrif.sendmapack(fd); } - if( HPMHooks.count.HP_chrif_sendmapack_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_sendmapack_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_sendmapack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_sendmapack_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chrif_recvmap(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_recvmap_pre ) { + if (HPMHooks.count.HP_chrif_recvmap_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_recvmap_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5907,11 +7418,11 @@ void HP_chrif_recvmap(int fd) { { HPMHooks.source.chrif.recvmap(fd); } - if( HPMHooks.count.HP_chrif_recvmap_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_recvmap_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvmap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_recvmap_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -5919,14 +7430,14 @@ void HP_chrif_recvmap(int fd) { bool 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; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_changemapserverack_pre ) { + if (HPMHooks.count.HP_chrif_changemapserverack_pre > 0) { bool (*preHookFunc) (int *account_id, int *login_id1, int *login_id2, int *char_id, short *map_index, short *x, short *y, uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changemapserverack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5934,25 +7445,25 @@ bool HP_chrif_changemapserverack(int account_id, int login_id1, int login_id2, i { 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 ) { - bool (*postHookFunc) (bool 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++ ) { + if (HPMHooks.count.HP_chrif_changemapserverack_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, account_id, login_id1, login_id2, char_id, map_index, x, y, ip, port); } } return retVal___; } void HP_chrif_changedsex(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_changedsex_pre ) { + if (HPMHooks.count.HP_chrif_changedsex_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_changedsex_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -5960,11 +7471,11 @@ void HP_chrif_changedsex(int fd) { { HPMHooks.source.chrif.changedsex(fd); } - if( HPMHooks.count.HP_chrif_changedsex_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_changedsex_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_changedsex_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_changedsex_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -5972,14 +7483,14 @@ void HP_chrif_changedsex(int fd) { bool HP_chrif_divorceack(int char_id, int partner_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_divorceack_pre ) { + if (HPMHooks.count.HP_chrif_divorceack_pre > 0) { bool (*preHookFunc) (int *char_id, int *partner_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorceack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -5987,25 +7498,25 @@ bool HP_chrif_divorceack(int char_id, int partner_id) { { retVal___ = HPMHooks.source.chrif.divorceack(char_id, partner_id); } - if( HPMHooks.count.HP_chrif_divorceack_post ) { - bool (*postHookFunc) (bool retVal___, int *char_id, int *partner_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_divorceack_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_divorceack_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, char_id, partner_id); } } return retVal___; } void HP_chrif_idbanned(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_idbanned_pre ) { + if (HPMHooks.count.HP_chrif_idbanned_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_idbanned_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6013,25 +7524,25 @@ void HP_chrif_idbanned(int fd) { { HPMHooks.source.chrif.idbanned(fd); } - if( HPMHooks.count.HP_chrif_idbanned_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_idbanned_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_idbanned_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_idbanned_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_chrif_recvfamelist(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_recvfamelist_pre ) { + if (HPMHooks.count.HP_chrif_recvfamelist_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_recvfamelist_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6039,11 +7550,11 @@ void HP_chrif_recvfamelist(int fd) { { HPMHooks.source.chrif.recvfamelist(fd); } - if( HPMHooks.count.HP_chrif_recvfamelist_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_recvfamelist_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_recvfamelist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_recvfamelist_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -6051,14 +7562,14 @@ void HP_chrif_recvfamelist(int fd) { bool HP_chrif_load_scdata(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_chrif_load_scdata_pre ) { + if (HPMHooks.count.HP_chrif_load_scdata_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_load_scdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6066,25 +7577,25 @@ bool HP_chrif_load_scdata(int fd) { { retVal___ = HPMHooks.source.chrif.load_scdata(fd); } - if( HPMHooks.count.HP_chrif_load_scdata_post ) { - bool (*postHookFunc) (bool retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_load_scdata_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_load_scdata_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } void HP_chrif_update_ip(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_update_ip_pre ) { + if (HPMHooks.count.HP_chrif_update_ip_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_update_ip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6092,11 +7603,11 @@ void HP_chrif_update_ip(int fd) { { 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++ ) { + if (HPMHooks.count.HP_chrif_update_ip_post > 0) { + 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); + postHookFunc(fd); } } return; @@ -6104,14 +7615,14 @@ void HP_chrif_update_ip(int fd) { int HP_chrif_disconnectplayer(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_disconnectplayer_pre ) { + if (HPMHooks.count.HP_chrif_disconnectplayer_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_disconnectplayer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6119,25 +7630,25 @@ int HP_chrif_disconnectplayer(int fd) { { 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++ ) { + if (HPMHooks.count.HP_chrif_disconnectplayer_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } void HP_chrif_removemap(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_removemap_pre ) { + if (HPMHooks.count.HP_chrif_removemap_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_removemap_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6145,11 +7656,11 @@ void HP_chrif_removemap(int fd) { { HPMHooks.source.chrif.removemap(fd); } - if( HPMHooks.count.HP_chrif_removemap_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_removemap_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_removemap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_removemap_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -6157,14 +7668,14 @@ void HP_chrif_removemap(int fd) { int HP_chrif_updatefamelist_ack(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_updatefamelist_ack_pre ) { + if (HPMHooks.count.HP_chrif_updatefamelist_ack_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_updatefamelist_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6172,25 +7683,25 @@ int HP_chrif_updatefamelist_ack(int fd) { { 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++ ) { + if (HPMHooks.count.HP_chrif_updatefamelist_ack_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } void HP_chrif_keepalive(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_keepalive_pre ) { + if (HPMHooks.count.HP_chrif_keepalive_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6198,25 +7709,25 @@ void HP_chrif_keepalive(int fd) { { 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++ ) { + if (HPMHooks.count.HP_chrif_keepalive_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_chrif_keepalive_ack(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_keepalive_ack_pre ) { + if (HPMHooks.count.HP_chrif_keepalive_ack_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_keepalive_ack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6224,25 +7735,25 @@ void HP_chrif_keepalive_ack(int fd) { { 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++ ) { + if (HPMHooks.count.HP_chrif_keepalive_ack_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_chrif_deadopt(int father_id, int mother_id, int child_id) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_deadopt_pre ) { + if (HPMHooks.count.HP_chrif_deadopt_pre > 0) { void (*preHookFunc) (int *father_id, int *mother_id, int *child_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_deadopt_pre[hIndex].func; preHookFunc(&father_id, &mother_id, &child_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6250,25 +7761,25 @@ void HP_chrif_deadopt(int father_id, int mother_id, int child_id) { { HPMHooks.source.chrif.deadopt(father_id, mother_id, child_id); } - if( HPMHooks.count.HP_chrif_deadopt_post ) { - void (*postHookFunc) (int *father_id, int *mother_id, int *child_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_deadopt_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_deadopt_post > 0) { + void (*postHookFunc) (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; - postHookFunc(&father_id, &mother_id, &child_id); + postHookFunc(father_id, mother_id, child_id); } } return; } void HP_chrif_authfail(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_authfail_pre ) { + if (HPMHooks.count.HP_chrif_authfail_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_authfail_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6276,25 +7787,25 @@ void HP_chrif_authfail(int fd) { { 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++ ) { + if (HPMHooks.count.HP_chrif_authfail_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_chrif_on_ready(void) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_on_ready_pre ) { + if (HPMHooks.count.HP_chrif_on_ready_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_ready_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6302,9 +7813,9 @@ void HP_chrif_on_ready(void) { { HPMHooks.source.chrif.on_ready(); } - if( HPMHooks.count.HP_chrif_on_ready_post ) { + if (HPMHooks.count.HP_chrif_on_ready_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_ready_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_ready_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_on_ready_post[hIndex].func; postHookFunc(); } @@ -6313,14 +7824,14 @@ void HP_chrif_on_ready(void) { } void HP_chrif_on_disconnect(void) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_on_disconnect_pre ) { + if (HPMHooks.count.HP_chrif_on_disconnect_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_disconnect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6328,9 +7839,9 @@ void HP_chrif_on_disconnect(void) { { HPMHooks.source.chrif.on_disconnect(); } - if( HPMHooks.count.HP_chrif_on_disconnect_post ) { + if (HPMHooks.count.HP_chrif_on_disconnect_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_disconnect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_on_disconnect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_on_disconnect_post[hIndex].func; postHookFunc(); } @@ -6340,14 +7851,14 @@ void HP_chrif_on_disconnect(void) { int HP_chrif_parse(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_chrif_parse_pre ) { + if (HPMHooks.count.HP_chrif_parse_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_parse_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6355,25 +7866,25 @@ int HP_chrif_parse(int fd) { { 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++ ) { + if (HPMHooks.count.HP_chrif_parse_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } void HP_chrif_save_scdata_single(int account_id, int char_id, short type, struct status_change_entry *sce) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_save_scdata_single_pre ) { - void (*preHookFunc) (int *account_id, int *char_id, short *type, struct status_change_entry *sce); + if (HPMHooks.count.HP_chrif_save_scdata_single_pre > 0) { + void (*preHookFunc) (int *account_id, int *char_id, short *type, struct status_change_entry **sce); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_single_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_single_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_save_scdata_single_pre[hIndex].func; - preHookFunc(&account_id, &char_id, &type, sce); + preHookFunc(&account_id, &char_id, &type, &sce); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6381,25 +7892,25 @@ void HP_chrif_save_scdata_single(int account_id, int char_id, short type, struct { HPMHooks.source.chrif.save_scdata_single(account_id, char_id, type, sce); } - if( HPMHooks.count.HP_chrif_save_scdata_single_post ) { - void (*postHookFunc) (int *account_id, int *char_id, short *type, struct status_change_entry *sce); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_single_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_save_scdata_single_post > 0) { + void (*postHookFunc) (int account_id, int char_id, short type, struct status_change_entry *sce); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_save_scdata_single_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_save_scdata_single_post[hIndex].func; - postHookFunc(&account_id, &char_id, &type, sce); + postHookFunc(account_id, char_id, type, sce); } } return; } void HP_chrif_del_scdata_single(int account_id, int char_id, short type) { int hIndex = 0; - if( HPMHooks.count.HP_chrif_del_scdata_single_pre ) { + if (HPMHooks.count.HP_chrif_del_scdata_single_pre > 0) { void (*preHookFunc) (int *account_id, int *char_id, short *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_del_scdata_single_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_del_scdata_single_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chrif_del_scdata_single_pre[hIndex].func; preHookFunc(&account_id, &char_id, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6407,27 +7918,750 @@ void HP_chrif_del_scdata_single(int account_id, int char_id, short type) { { HPMHooks.source.chrif.del_scdata_single(account_id, char_id, type); } - if( HPMHooks.count.HP_chrif_del_scdata_single_post ) { - void (*postHookFunc) (int *account_id, int *char_id, short *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_chrif_del_scdata_single_post; hIndex++ ) { + if (HPMHooks.count.HP_chrif_del_scdata_single_post > 0) { + void (*postHookFunc) (int account_id, int char_id, short type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_chrif_del_scdata_single_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chrif_del_scdata_single_post[hIndex].func; - postHookFunc(&account_id, &char_id, &type); + postHookFunc(account_id, char_id, type); + } + } + return; +} +/* clan_interface */ +void HP_clan_init(bool minimal) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_init_pre > 0) { + void (*preHookFunc) (bool *minimal); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_init_pre[hIndex].func; + preHookFunc(&minimal); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.init(minimal); + } + if (HPMHooks.count.HP_clan_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_init_post[hIndex].func; + postHookFunc(minimal); } } return; } -/* clif */ +void HP_clan_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.final(); + } + if (HPMHooks.count.HP_clan_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_clan_config_read(bool reload) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clan_config_read_pre > 0) { + bool (*preHookFunc) (bool *reload); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_config_read_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_config_read_pre[hIndex].func; + retVal___ = preHookFunc(&reload); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.config_read(reload); + } + if (HPMHooks.count.HP_clan_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, bool reload); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_config_read_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___, reload); + } + } + return retVal___; +} +void HP_clan_config_read_additional_settings(struct config_setting_t *settings, const char *source) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_config_read_additional_settings_pre > 0) { + void (*preHookFunc) (struct config_setting_t **settings, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_config_read_additional_settings_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_config_read_additional_settings_pre[hIndex].func; + preHookFunc(&settings, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.config_read_additional_settings(settings, source); + } + if (HPMHooks.count.HP_clan_config_read_additional_settings_post > 0) { + void (*postHookFunc) (struct config_setting_t *settings, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_config_read_additional_settings_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_config_read_additional_settings_post[hIndex].func; + postHookFunc(settings, source); + } + } + return; +} +void HP_clan_read_db(struct config_setting_t *settings, const char *source, bool reload) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_read_db_pre > 0) { + void (*preHookFunc) (struct config_setting_t **settings, const char **source, bool *reload); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_read_db_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_read_db_pre[hIndex].func; + preHookFunc(&settings, &source, &reload); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.read_db(settings, source, reload); + } + if (HPMHooks.count.HP_clan_read_db_post > 0) { + void (*postHookFunc) (struct config_setting_t *settings, const char *source, bool reload); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_read_db_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_read_db_post[hIndex].func; + postHookFunc(settings, source, reload); + } + } + return; +} +int HP_clan_read_db_sub(struct config_setting_t *settings, const char *source, bool reload) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_clan_read_db_sub_pre > 0) { + int (*preHookFunc) (struct config_setting_t **settings, const char **source, bool *reload); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_read_db_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_read_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(&settings, &source, &reload); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.read_db_sub(settings, source, reload); + } + if (HPMHooks.count.HP_clan_read_db_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *settings, const char *source, bool reload); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_read_db_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_read_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, settings, source, reload); + } + } + return retVal___; +} +void HP_clan_read_db_additional_fields(struct clan *entry, struct config_setting_t *t, int n, const char *source) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_read_db_additional_fields_pre > 0) { + void (*preHookFunc) (struct clan **entry, struct config_setting_t **t, int *n, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_read_db_additional_fields_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_read_db_additional_fields_pre[hIndex].func; + preHookFunc(&entry, &t, &n, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.read_db_additional_fields(entry, t, n, source); + } + if (HPMHooks.count.HP_clan_read_db_additional_fields_post > 0) { + void (*postHookFunc) (struct clan *entry, struct config_setting_t *t, int n, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_read_db_additional_fields_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_read_db_additional_fields_post[hIndex].func; + postHookFunc(entry, t, n, source); + } + } + return; +} +void HP_clan_read_buffs(struct clan *c, struct config_setting_t *buff, const char *source) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_read_buffs_pre > 0) { + void (*preHookFunc) (struct clan **c, struct config_setting_t **buff, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_read_buffs_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_read_buffs_pre[hIndex].func; + preHookFunc(&c, &buff, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.read_buffs(c, buff, source); + } + if (HPMHooks.count.HP_clan_read_buffs_post > 0) { + void (*postHookFunc) (struct clan *c, struct config_setting_t *buff, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_read_buffs_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_read_buffs_post[hIndex].func; + postHookFunc(c, buff, source); + } + } + return; +} +struct clan* HP_clan_search(int clan_id) { + int hIndex = 0; + struct clan* retVal___ = NULL; + if (HPMHooks.count.HP_clan_search_pre > 0) { + struct clan* (*preHookFunc) (int *clan_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_search_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_search_pre[hIndex].func; + retVal___ = preHookFunc(&clan_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.search(clan_id); + } + if (HPMHooks.count.HP_clan_search_post > 0) { + struct clan* (*postHookFunc) (struct clan* retVal___, int clan_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_search_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_search_post[hIndex].func; + retVal___ = postHookFunc(retVal___, clan_id); + } + } + return retVal___; +} +struct clan* HP_clan_searchname(const char *name) { + int hIndex = 0; + struct clan* retVal___ = NULL; + if (HPMHooks.count.HP_clan_searchname_pre > 0) { + struct clan* (*preHookFunc) (const char **name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_searchname_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_searchname_pre[hIndex].func; + retVal___ = preHookFunc(&name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.searchname(name); + } + if (HPMHooks.count.HP_clan_searchname_post > 0) { + struct clan* (*postHookFunc) (struct clan* retVal___, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_searchname_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_searchname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, name); + } + } + return retVal___; +} +struct map_session_data* HP_clan_getonlinesd(struct clan *c) { + int hIndex = 0; + struct map_session_data* retVal___ = NULL; + if (HPMHooks.count.HP_clan_getonlinesd_pre > 0) { + struct map_session_data* (*preHookFunc) (struct clan **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_getonlinesd_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_getonlinesd_pre[hIndex].func; + retVal___ = preHookFunc(&c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.getonlinesd(c); + } + if (HPMHooks.count.HP_clan_getonlinesd_post > 0) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct clan *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_getonlinesd_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_getonlinesd_post[hIndex].func; + retVal___ = postHookFunc(retVal___, c); + } + } + return retVal___; +} +int HP_clan_getindex(const struct clan *c, int char_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_clan_getindex_pre > 0) { + int (*preHookFunc) (const struct clan **c, int *char_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_getindex_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_getindex_pre[hIndex].func; + retVal___ = preHookFunc(&c, &char_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.getindex(c, char_id); + } + if (HPMHooks.count.HP_clan_getindex_post > 0) { + int (*postHookFunc) (int retVal___, const struct clan *c, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_getindex_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_getindex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, c, char_id); + } + } + return retVal___; +} +bool HP_clan_join(struct map_session_data *sd, int clan_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clan_join_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *clan_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_join_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_join_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &clan_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.join(sd, clan_id); + } + if (HPMHooks.count.HP_clan_join_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int clan_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_join_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_join_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, clan_id); + } + } + return retVal___; +} +void HP_clan_member_online(struct map_session_data *sd, bool first) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_member_online_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *first); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_member_online_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_member_online_pre[hIndex].func; + preHookFunc(&sd, &first); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.member_online(sd, first); + } + if (HPMHooks.count.HP_clan_member_online_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, bool first); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_member_online_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_member_online_post[hIndex].func; + postHookFunc(sd, first); + } + } + return; +} +bool HP_clan_leave(struct map_session_data *sd, bool first) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clan_leave_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, bool *first); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_leave_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_leave_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &first); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.leave(sd, first); + } + if (HPMHooks.count.HP_clan_leave_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, bool first); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_leave_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_leave_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, first); + } + } + return retVal___; +} +bool HP_clan_send_message(struct map_session_data *sd, const char *mes) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clan_send_message_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const char **mes); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_send_message_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_send_message_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &mes); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.send_message(sd, mes); + } + if (HPMHooks.count.HP_clan_send_message_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *mes); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_send_message_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_send_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, mes); + } + } + return retVal___; +} +void HP_clan_recv_message(struct clan *c, const char *mes, int len) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_recv_message_pre > 0) { + void (*preHookFunc) (struct clan **c, const char **mes, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_recv_message_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_recv_message_pre[hIndex].func; + preHookFunc(&c, &mes, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.recv_message(c, mes, len); + } + if (HPMHooks.count.HP_clan_recv_message_post > 0) { + void (*postHookFunc) (struct clan *c, const char *mes, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_recv_message_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_recv_message_post[hIndex].func; + postHookFunc(c, mes, len); + } + } + return; +} +void HP_clan_member_offline(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_member_offline_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_member_offline_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_member_offline_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.member_offline(sd); + } + if (HPMHooks.count.HP_clan_member_offline_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_member_offline_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_member_offline_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clan_set_constants(void) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_set_constants_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_set_constants_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_set_constants_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.set_constants(); + } + if (HPMHooks.count.HP_clan_set_constants_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_set_constants_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_set_constants_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_clan_get_id(const struct block_list *bl) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_clan_get_id_pre > 0) { + int (*preHookFunc) (const struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_get_id_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_get_id_pre[hIndex].func; + retVal___ = preHookFunc(&bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.get_id(bl); + } + if (HPMHooks.count.HP_clan_get_id_post > 0) { + int (*postHookFunc) (int retVal___, const struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_get_id_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_get_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +void HP_clan_buff_start(struct map_session_data *sd, struct clan *c) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_buff_start_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct clan **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_buff_start_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_buff_start_pre[hIndex].func; + preHookFunc(&sd, &c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.buff_start(sd, c); + } + if (HPMHooks.count.HP_clan_buff_start_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct clan *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_buff_start_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_buff_start_post[hIndex].func; + postHookFunc(sd, c); + } + } + return; +} +void HP_clan_buff_end(struct map_session_data *sd, struct clan *c) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_buff_end_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct clan **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_buff_end_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_buff_end_pre[hIndex].func; + preHookFunc(&sd, &c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.buff_end(sd, c); + } + if (HPMHooks.count.HP_clan_buff_end_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct clan *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_buff_end_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_buff_end_post[hIndex].func; + postHookFunc(sd, c); + } + } + return; +} +void HP_clan_reload(void) { + int hIndex = 0; + if (HPMHooks.count.HP_clan_reload_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_reload_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_reload_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clan.reload(); + } + if (HPMHooks.count.HP_clan_reload_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_reload_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_reload_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_clan_rejoin(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_clan_rejoin_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_rejoin_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_clan_rejoin_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.clan.rejoin(sd, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_clan_rejoin_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_rejoin_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_clan_rejoin_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_clan_inactivity_kick(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_clan_inactivity_kick_pre > 0) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_inactivity_kick_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_inactivity_kick_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.inactivity_kick(tid, tick, id, data); + } + if (HPMHooks.count.HP_clan_inactivity_kick_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_inactivity_kick_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_inactivity_kick_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); + } + } + return retVal___; +} +int HP_clan_request_kickoffline(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_clan_request_kickoffline_pre > 0) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_request_kickoffline_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_request_kickoffline_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.request_kickoffline(tid, tick, id, data); + } + if (HPMHooks.count.HP_clan_request_kickoffline_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_request_kickoffline_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_request_kickoffline_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); + } + } + return retVal___; +} +int HP_clan_request_membercount(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_clan_request_membercount_pre > 0) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_request_membercount_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clan_request_membercount_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clan.request_membercount(tid, tick, id, data); + } + if (HPMHooks.count.HP_clan_request_membercount_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clan_request_membercount_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clan_request_membercount_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); + } + } + return retVal___; +} +/* clif_interface */ int HP_clif_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_init_pre ) { + if (HPMHooks.count.HP_clif_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6435,25 +8669,25 @@ int HP_clif_init(bool minimal) { { retVal___ = HPMHooks.source.clif.init(minimal); } - if( HPMHooks.count.HP_clif_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_init_post > 0) { + int (*postHookFunc) (int retVal___, bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + retVal___ = postHookFunc(retVal___, minimal); } } return retVal___; } void HP_clif_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_clif_final_pre ) { + if (HPMHooks.count.HP_clif_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6461,9 +8695,9 @@ void HP_clif_final(void) { { HPMHooks.source.clif.final(); } - if( HPMHooks.count.HP_clif_final_post ) { + if (HPMHooks.count.HP_clif_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_final_post[hIndex].func; postHookFunc(); } @@ -6473,14 +8707,14 @@ void HP_clif_final(void) { bool HP_clif_setip(const char *ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_setip_pre ) { - bool (*preHookFunc) (const char *ip); + if (HPMHooks.count.HP_clif_setip_pre > 0) { + bool (*preHookFunc) (const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_setip_pre[hIndex].func; - retVal___ = preHookFunc(ip); + retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6488,9 +8722,9 @@ bool HP_clif_setip(const char *ip) { { retVal___ = HPMHooks.source.clif.setip(ip); } - if( HPMHooks.count.HP_clif_setip_post ) { + if (HPMHooks.count.HP_clif_setip_post > 0) { bool (*postHookFunc) (bool retVal___, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_setip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_setip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -6500,14 +8734,14 @@ bool HP_clif_setip(const char *ip) { bool HP_clif_setbindip(const char *ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_setbindip_pre ) { - bool (*preHookFunc) (const char *ip); + if (HPMHooks.count.HP_clif_setbindip_pre > 0) { + bool (*preHookFunc) (const char **ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_setbindip_pre[hIndex].func; - retVal___ = preHookFunc(ip); + retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6515,9 +8749,9 @@ bool HP_clif_setbindip(const char *ip) { { retVal___ = HPMHooks.source.clif.setbindip(ip); } - if( HPMHooks.count.HP_clif_setbindip_post ) { + if (HPMHooks.count.HP_clif_setbindip_post > 0) { bool (*postHookFunc) (bool retVal___, const char *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_setbindip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_setbindip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip); } @@ -6526,14 +8760,14 @@ bool HP_clif_setbindip(const char *ip) { } void HP_clif_setport(uint16 port) { int hIndex = 0; - if( HPMHooks.count.HP_clif_setport_pre ) { + if (HPMHooks.count.HP_clif_setport_pre > 0) { void (*preHookFunc) (uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_setport_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6541,11 +8775,11 @@ void HP_clif_setport(uint16 port) { { 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++ ) { + if (HPMHooks.count.HP_clif_setport_post > 0) { + 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); + postHookFunc(port); } } return; @@ -6553,14 +8787,14 @@ void HP_clif_setport(uint16 port) { uint32 HP_clif_refresh_ip(void) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_clif_refresh_ip_pre ) { + if (HPMHooks.count.HP_clif_refresh_ip_pre > 0) { uint32 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_ip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6568,9 +8802,9 @@ uint32 HP_clif_refresh_ip(void) { { retVal___ = HPMHooks.source.clif.refresh_ip(); } - if( HPMHooks.count.HP_clif_refresh_ip_post ) { + if (HPMHooks.count.HP_clif_refresh_ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_ip_post; hIndex++ ) { + 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___); } @@ -6580,14 +8814,14 @@ uint32 HP_clif_refresh_ip(void) { bool HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_target type) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_send_pre ) { - bool (*preHookFunc) (const void *buf, int *len, struct block_list *bl, enum send_target *type); + if (HPMHooks.count.HP_clif_send_pre > 0) { + bool (*preHookFunc) (const void **buf, int *len, struct block_list **bl, enum send_target *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&buf, &len, &bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6595,11 +8829,11 @@ bool HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_tar { retVal___ = HPMHooks.source.clif.send(buf, len, bl, type); } - if( HPMHooks.count.HP_clif_send_post ) { - bool (*postHookFunc) (bool 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++ ) { + if (HPMHooks.count.HP_clif_send_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, buf, len, bl, type); } } return retVal___; @@ -6607,16 +8841,16 @@ bool HP_clif_send(const void *buf, int len, struct block_list *bl, enum send_tar int HP_clif_send_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_send_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_clif_send_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6626,9 +8860,9 @@ int HP_clif_send_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.clif.send_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_send_sub_post ) { + if (HPMHooks.count.HP_clif_send_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_sub_post; hIndex++ ) { + 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); @@ -6640,14 +8874,14 @@ int HP_clif_send_sub(struct block_list *bl, va_list ap) { int HP_clif_send_actual(int fd, void *buf, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_send_actual_pre ) { - int (*preHookFunc) (int *fd, void *buf, int *len); + if (HPMHooks.count.HP_clif_send_actual_pre > 0) { + int (*preHookFunc) (int *fd, void **buf, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_actual_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_actual_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_send_actual_pre[hIndex].func; - retVal___ = preHookFunc(&fd, buf, &len); + retVal___ = preHookFunc(&fd, &buf, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6655,11 +8889,11 @@ int HP_clif_send_actual(int fd, void *buf, int len) { { retVal___ = HPMHooks.source.clif.send_actual(fd, buf, len); } - if( HPMHooks.count.HP_clif_send_actual_post ) { - int (*postHookFunc) (int retVal___, int *fd, void *buf, int *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_actual_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_send_actual_post > 0) { + int (*postHookFunc) (int retVal___, int fd, void *buf, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_actual_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_send_actual_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, buf, &len); + retVal___ = postHookFunc(retVal___, fd, buf, len); } } return retVal___; @@ -6667,14 +8901,14 @@ int HP_clif_send_actual(int fd, void *buf, int len) { int HP_clif_parse(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_parse_pre ) { + if (HPMHooks.count.HP_clif_parse_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6682,11 +8916,11 @@ int HP_clif_parse(int fd) { { 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++ ) { + if (HPMHooks.count.HP_clif_parse_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -6694,14 +8928,14 @@ int HP_clif_parse(int fd) { const struct s_packet_db* HP_clif_packet(int packet_id) { int hIndex = 0; const struct s_packet_db* retVal___ = NULL; - if( HPMHooks.count.HP_clif_packet_pre ) { + if (HPMHooks.count.HP_clif_packet_pre > 0) { const struct s_packet_db* (*preHookFunc) (int *packet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_packet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_packet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_packet_pre[hIndex].func; retVal___ = preHookFunc(&packet_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6709,11 +8943,11 @@ const struct s_packet_db* HP_clif_packet(int packet_id) { { retVal___ = HPMHooks.source.clif.packet(packet_id); } - if( HPMHooks.count.HP_clif_packet_post ) { - const struct s_packet_db* (*postHookFunc) (const struct s_packet_db* retVal___, int *packet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_packet_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_packet_post > 0) { + const struct s_packet_db* (*postHookFunc) (const struct s_packet_db* retVal___, int packet_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_packet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_packet_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &packet_id); + retVal___ = postHookFunc(retVal___, packet_id); } } return retVal___; @@ -6721,14 +8955,14 @@ const struct s_packet_db* HP_clif_packet(int packet_id) { unsigned short HP_clif_parse_cmd(int fd, struct map_session_data *sd) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_clif_parse_cmd_pre ) { - unsigned short (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_parse_cmd_pre > 0) { + unsigned short (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_cmd_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6736,11 +8970,11 @@ unsigned short HP_clif_parse_cmd(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_parse_cmd_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, fd, sd); } } return retVal___; @@ -6748,14 +8982,14 @@ unsigned short HP_clif_parse_cmd(int fd, struct map_session_data *sd) { unsigned short HP_clif_decrypt_cmd(int cmd, struct map_session_data *sd) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_clif_decrypt_cmd_pre ) { - unsigned short (*preHookFunc) (int *cmd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_decrypt_cmd_pre > 0) { + unsigned short (*preHookFunc) (int *cmd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_decrypt_cmd_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&cmd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -6763,25 +8997,25 @@ unsigned short HP_clif_decrypt_cmd(int cmd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_decrypt_cmd_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_authok_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_authok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_authok_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6789,25 +9023,51 @@ void HP_clif_authok(struct map_session_data *sd) { { HPMHooks.source.clif.authok(sd); } - if( HPMHooks.count.HP_clif_authok_post ) { + if (HPMHooks.count.HP_clif_authok_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authok_post; hIndex++ ) { + 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_auth_error(int fd, int errorCode) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_auth_error_pre > 0) { + void (*preHookFunc) (int *fd, int *errorCode); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_auth_error_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_auth_error_pre[hIndex].func; + preHookFunc(&fd, &errorCode); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.auth_error(fd, errorCode); + } + if (HPMHooks.count.HP_clif_auth_error_post > 0) { + void (*postHookFunc) (int fd, int errorCode); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_auth_error_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_auth_error_post[hIndex].func; + postHookFunc(fd, errorCode); + } + } + return; +} void HP_clif_authrefuse(int fd, uint8 error_code) { int hIndex = 0; - if( HPMHooks.count.HP_clif_authrefuse_pre ) { + if (HPMHooks.count.HP_clif_authrefuse_pre > 0) { void (*preHookFunc) (int *fd, uint8 *error_code); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authrefuse_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6815,25 +9075,25 @@ void HP_clif_authrefuse(int fd, uint8 error_code) { { 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++ ) { + if (HPMHooks.count.HP_clif_authrefuse_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_authfail_fd_pre > 0) { void (*preHookFunc) (int *fd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_authfail_fd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6841,25 +9101,25 @@ void HP_clif_authfail_fd(int fd, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_authfail_fd_post > 0) { + 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); + postHookFunc(fd, type); } } return; } void HP_clif_charselectok(int id, uint8 ok) { int hIndex = 0; - if( HPMHooks.count.HP_clif_charselectok_pre ) { + if (HPMHooks.count.HP_clif_charselectok_pre > 0) { void (*preHookFunc) (int *id, uint8 *ok); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charselectok_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6867,25 +9127,25 @@ void HP_clif_charselectok(int id, uint8 ok) { { 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++ ) { + if (HPMHooks.count.HP_clif_charselectok_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_dropflooritem_pre > 0) { + void (*preHookFunc) (struct flooritem_data **fitem); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_dropflooritem_pre[hIndex].func; - preHookFunc(fitem); + preHookFunc(&fitem); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6893,9 +9153,9 @@ void HP_clif_dropflooritem(struct flooritem_data *fitem) { { HPMHooks.source.clif.dropflooritem(fitem); } - if( HPMHooks.count.HP_clif_dropflooritem_post ) { + if (HPMHooks.count.HP_clif_dropflooritem_post > 0) { void (*postHookFunc) (struct flooritem_data *fitem); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropflooritem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_dropflooritem_post[hIndex].func; postHookFunc(fitem); } @@ -6904,14 +9164,14 @@ void HP_clif_dropflooritem(struct flooritem_data *fitem) { } 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); + if (HPMHooks.count.HP_clif_clearflooritem_pre > 0) { + void (*preHookFunc) (struct flooritem_data **fitem, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearflooritem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearflooritem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_clearflooritem_pre[hIndex].func; - preHookFunc(fitem, &fd); + preHookFunc(&fitem, &fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6919,25 +9179,25 @@ void HP_clif_clearflooritem(struct flooritem_data *fitem, int fd) { { 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++ ) { + if (HPMHooks.count.HP_clif_clearflooritem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_additem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n, int *amount, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_additem_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &n, &amount, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6945,25 +9205,25 @@ void HP_clif_additem(struct map_session_data *sd, int n, int amount, int fail) { { 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++ ) { + if (HPMHooks.count.HP_clif_additem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_dropitem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_dropitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_dropitem_pre[hIndex].func; - preHookFunc(sd, &n, &amount); + preHookFunc(&sd, &n, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6971,25 +9231,25 @@ void HP_clif_dropitem(struct map_session_data *sd, int n, int amount) { { 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++ ) { + if (HPMHooks.count.HP_clif_dropitem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_delitem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n, int *amount, short *reason); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delitem_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &n, &amount, &reason); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -6997,25 +9257,25 @@ void HP_clif_delitem(struct map_session_data *sd, int n, int amount, short reaso { 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++ ) { + if (HPMHooks.count.HP_clif_delitem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_takeitem_pre > 0) { + void (*preHookFunc) (struct block_list **src, struct block_list **dst); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_takeitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_takeitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_takeitem_pre[hIndex].func; - preHookFunc(src, dst); + preHookFunc(&src, &dst); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7023,25 +9283,51 @@ void HP_clif_takeitem(struct block_list *src, struct block_list *dst) { { HPMHooks.source.clif.takeitem(src, dst); } - if( HPMHooks.count.HP_clif_takeitem_post ) { + if (HPMHooks.count.HP_clif_takeitem_post > 0) { void (*postHookFunc) (struct block_list *src, struct block_list *dst); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_takeitem_post; hIndex++ ) { + 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_item_movefailed(struct map_session_data *sd, int n) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_item_movefailed_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_movefailed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_item_movefailed_pre[hIndex].func; + preHookFunc(&sd, &n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_movefailed(sd, n); + } + if (HPMHooks.count.HP_clif_item_movefailed_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_movefailed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_item_movefailed_post[hIndex].func; + postHookFunc(sd, n); + } + } + return; +} void HP_clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int eqp_pos) { int hIndex = 0; - if( HPMHooks.count.HP_clif_item_equip_pre ) { - void (*preHookFunc) (short *idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int *eqp_pos); + if (HPMHooks.count.HP_clif_item_equip_pre > 0) { + void (*preHookFunc) (short *idx, struct EQUIPITEM_INFO **p, struct item **i, struct item_data **id, int *eqp_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_equip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_equip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_item_equip_pre[hIndex].func; - preHookFunc(&idx, p, i, id, &eqp_pos); + preHookFunc(&idx, &p, &i, &id, &eqp_pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7049,25 +9335,25 @@ void HP_clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *i, str { HPMHooks.source.clif.item_equip(idx, p, i, id, eqp_pos); } - if( HPMHooks.count.HP_clif_item_equip_post ) { - void (*postHookFunc) (short *idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int *eqp_pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_equip_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_item_equip_post > 0) { + void (*postHookFunc) (short idx, struct EQUIPITEM_INFO *p, struct item *i, struct item_data *id, int eqp_pos); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_equip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_item_equip_post[hIndex].func; - postHookFunc(&idx, p, i, id, &eqp_pos); + postHookFunc(idx, p, i, id, eqp_pos); } } return; } void HP_clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_item_normal_pre ) { - void (*preHookFunc) (short *idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id); + if (HPMHooks.count.HP_clif_item_normal_pre > 0) { + void (*preHookFunc) (short *idx, struct NORMALITEM_INFO **p, struct item **i, struct item_data **id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_normal_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_normal_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_item_normal_pre[hIndex].func; - preHookFunc(&idx, p, i, id); + preHookFunc(&idx, &p, &i, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7075,25 +9361,25 @@ void HP_clif_item_normal(short idx, struct NORMALITEM_INFO *p, struct item *i, s { HPMHooks.source.clif.item_normal(idx, p, i, id); } - if( HPMHooks.count.HP_clif_item_normal_post ) { - void (*postHookFunc) (short *idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_normal_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_item_normal_post > 0) { + void (*postHookFunc) (short idx, struct NORMALITEM_INFO *p, struct item *i, struct item_data *id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_normal_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_item_normal_post[hIndex].func; - postHookFunc(&idx, p, i, id); + postHookFunc(idx, p, i, id); } } 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); + if (HPMHooks.count.HP_clif_arrowequip_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrowequip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrowequip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_arrowequip_pre[hIndex].func; - preHookFunc(sd, &val); + preHookFunc(&sd, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7101,25 +9387,25 @@ void HP_clif_arrowequip(struct map_session_data *sd, int val) { { 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++ ) { + if (HPMHooks.count.HP_clif_arrowequip_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_arrow_fail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_fail_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7127,25 +9413,25 @@ void HP_clif_arrow_fail(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_arrow_fail_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_use_card_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_use_card_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7153,25 +9439,25 @@ void HP_clif_use_card(struct map_session_data *sd, int idx) { { 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++ ) { + if (HPMHooks.count.HP_clif_use_card_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_cart_additem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n, int *amount, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &n, &amount, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7179,25 +9465,25 @@ void HP_clif_cart_additem(struct map_session_data *sd, int n, int amount, int fa { 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++ ) { + if (HPMHooks.count.HP_clif_cart_additem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_cart_delitem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_delitem_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &n, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7205,25 +9491,25 @@ void HP_clif_cart_delitem(struct map_session_data *sd, int n, int amount) { { 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++ ) { + if (HPMHooks.count.HP_clif_cart_delitem_post > 0) { + 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); + postHookFunc(sd, n, amount); } } return; } void HP_clif_equipitemack(struct map_session_data *sd, int n, int pos, enum e_EQUIP_ITEM_ACK result) { int hIndex = 0; - if( HPMHooks.count.HP_clif_equipitemack_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, enum e_EQUIP_ITEM_ACK *result); + if (HPMHooks.count.HP_clif_equipitemack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n, int *pos, enum e_EQUIP_ITEM_ACK *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_equipitemack_pre[hIndex].func; - preHookFunc(sd, &n, &pos, &result); + preHookFunc(&sd, &n, &pos, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7231,25 +9517,25 @@ void HP_clif_equipitemack(struct map_session_data *sd, int n, int pos, enum e_EQ { HPMHooks.source.clif.equipitemack(sd, n, pos, result); } - if( HPMHooks.count.HP_clif_equipitemack_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos, enum e_EQUIP_ITEM_ACK *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_equipitemack_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int n, int pos, enum e_EQUIP_ITEM_ACK result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipitemack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_equipitemack_post[hIndex].func; - postHookFunc(sd, &n, &pos, &result); + postHookFunc(sd, n, pos, result); } } return; } void HP_clif_unequipitemack(struct map_session_data *sd, int n, int pos, enum e_UNEQUIP_ITEM_ACK result) { int hIndex = 0; - if( HPMHooks.count.HP_clif_unequipitemack_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos, enum e_UNEQUIP_ITEM_ACK *result); + if (HPMHooks.count.HP_clif_unequipitemack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n, int *pos, enum e_UNEQUIP_ITEM_ACK *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_unequipitemack_pre[hIndex].func; - preHookFunc(sd, &n, &pos, &result); + preHookFunc(&sd, &n, &pos, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7257,25 +9543,25 @@ void HP_clif_unequipitemack(struct map_session_data *sd, int n, int pos, enum e_ { HPMHooks.source.clif.unequipitemack(sd, n, pos, result); } - if( HPMHooks.count.HP_clif_unequipitemack_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos, enum e_UNEQUIP_ITEM_ACK *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_unequipitemack_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int n, int pos, enum e_UNEQUIP_ITEM_ACK result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unequipitemack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_unequipitemack_post[hIndex].func; - postHookFunc(sd, &n, &pos, &result); + postHookFunc(sd, n, pos, result); } } 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); + if (HPMHooks.count.HP_clif_useitemack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *index, int *amount, bool *ok); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_useitemack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &index, &amount, &ok); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7283,25 +9569,25 @@ void HP_clif_useitemack(struct map_session_data *sd, int index, int amount, bool { 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++ ) { + if (HPMHooks.count.HP_clif_useitemack_post > 0) { + 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); + postHookFunc(sd, index, amount, ok); } } return; } -void HP_clif_addcards(unsigned char *buf, struct item *item) { +void HP_clif_addcards(struct EQUIPSLOTINFO *buf, struct item *item) { int hIndex = 0; - if( HPMHooks.count.HP_clif_addcards_pre ) { - void (*preHookFunc) (unsigned char *buf, struct item *item); + if (HPMHooks.count.HP_clif_addcards_pre > 0) { + void (*preHookFunc) (struct EQUIPSLOTINFO **buf, struct item **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addcards_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_addcards_pre[hIndex].func; - preHookFunc(buf, item); + preHookFunc(&buf, &item); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7309,51 +9595,25 @@ void HP_clif_addcards(unsigned char *buf, struct item *item) { { 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++ ) { + if (HPMHooks.count.HP_clif_addcards_post > 0) { + void (*postHookFunc) (struct EQUIPSLOTINFO *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); - *HPMforce_return = false; - 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); + if (HPMHooks.count.HP_clif_item_sub_pre > 0) { + void (*preHookFunc) (unsigned char **buf, int *n, struct item **i, struct item_data **id, int *equip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_sub_pre; hIndex++ ) { + 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); + preHookFunc(&buf, &n, &i, &id, &equip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7361,25 +9621,25 @@ void HP_clif_item_sub(unsigned char *buf, int n, struct item *i, struct item_dat { 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++ ) { + if (HPMHooks.count.HP_clif_item_sub_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_getareachar_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct flooritem_data **fitem); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_item_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &fitem); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7387,9 +9647,9 @@ void HP_clif_getareachar_item(struct map_session_data *sd, struct flooritem_data { HPMHooks.source.clif.getareachar_item(sd, fitem); } - if( HPMHooks.count.HP_clif_getareachar_item_post ) { + if (HPMHooks.count.HP_clif_getareachar_item_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_item_post; hIndex++ ) { + 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); } @@ -7398,14 +9658,14 @@ void HP_clif_getareachar_item(struct map_session_data *sd, struct flooritem_data } 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); + if (HPMHooks.count.HP_clif_cart_additem_ack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cart_additem_ack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7413,25 +9673,25 @@ void HP_clif_cart_additem_ack(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_cart_additem_ack_post > 0) { + 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); + postHookFunc(sd, flag); } } return; } void HP_clif_cashshop_load(void) { int hIndex = 0; - if( HPMHooks.count.HP_clif_cashshop_load_pre ) { + if (HPMHooks.count.HP_clif_cashshop_load_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_load_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7439,25 +9699,51 @@ void HP_clif_cashshop_load(void) { { HPMHooks.source.clif.cashshop_load(); } - if( HPMHooks.count.HP_clif_cashshop_load_post ) { + if (HPMHooks.count.HP_clif_cashshop_load_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_load_post; hIndex++ ) { + 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) { +void HP_clif_cashShopSchedule(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cashShopSchedule_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopSchedule_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cashShopSchedule_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cashShopSchedule(fd, sd); + } + if (HPMHooks.count.HP_clif_cashShopSchedule_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopSchedule_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cashShopSchedule_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_package_announce(struct map_session_data *sd, int nameid, int 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); + if (HPMHooks.count.HP_clif_package_announce_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *nameid, int *containerid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_package_announce_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &nameid, &containerid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7465,25 +9751,25 @@ void HP_clif_package_announce(struct map_session_data *sd, unsigned short nameid { 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++ ) { + if (HPMHooks.count.HP_clif_package_announce_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int nameid, int 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); + postHookFunc(sd, nameid, containerid); } } return; } -void HP_clif_item_drop_announce(struct map_session_data *sd, unsigned short nameid, char *monsterName) { +void HP_clif_item_drop_announce(struct map_session_data *sd, int nameid, char *monsterName) { int hIndex = 0; - if( HPMHooks.count.HP_clif_item_drop_announce_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid, char *monsterName); + if (HPMHooks.count.HP_clif_item_drop_announce_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *nameid, char **monsterName); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_drop_announce_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_drop_announce_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_item_drop_announce_pre[hIndex].func; - preHookFunc(sd, &nameid, monsterName); + preHookFunc(&sd, &nameid, &monsterName); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7491,25 +9777,25 @@ void HP_clif_item_drop_announce(struct map_session_data *sd, unsigned short name { HPMHooks.source.clif.item_drop_announce(sd, nameid, monsterName); } - if( HPMHooks.count.HP_clif_item_drop_announce_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned short *nameid, char *monsterName); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_drop_announce_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_item_drop_announce_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int nameid, char *monsterName); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_drop_announce_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_item_drop_announce_post[hIndex].func; - postHookFunc(sd, &nameid, monsterName); + postHookFunc(sd, nameid, monsterName); } } return; } -void HP_clif_clearunit_single(int id, clr_type type, int fd) { +void HP_clif_clearunit_single(int id, enum 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); + if (HPMHooks.count.HP_clif_clearunit_single_pre > 0) { + void (*preHookFunc) (int *id, enum clr_type *type, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7517,25 +9803,25 @@ void HP_clif_clearunit_single(int id, clr_type type, int fd) { { 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++ ) { + if (HPMHooks.count.HP_clif_clearunit_single_post > 0) { + void (*postHookFunc) (int id, enum 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); + postHookFunc(id, type, fd); } } return; } -void HP_clif_clearunit_area(struct block_list *bl, clr_type type) { +void HP_clif_clearunit_area(struct block_list *bl, enum clr_type type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_clearunit_area_pre ) { - void (*preHookFunc) (struct block_list *bl, clr_type *type); + if (HPMHooks.count.HP_clif_clearunit_area_pre > 0) { + void (*preHookFunc) (struct block_list **bl, enum clr_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_area_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7543,25 +9829,25 @@ void HP_clif_clearunit_area(struct block_list *bl, clr_type type) { { 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++ ) { + if (HPMHooks.count.HP_clif_clearunit_area_post > 0) { + void (*postHookFunc) (struct block_list *bl, enum 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); + postHookFunc(bl, type); } } return; } -void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick) { +void HP_clif_clearunit_delayed(struct block_list *bl, enum clr_type type, int64 tick) { int hIndex = 0; - if( HPMHooks.count.HP_clif_clearunit_delayed_pre ) { - void (*preHookFunc) (struct block_list *bl, clr_type *type, int64 *tick); + if (HPMHooks.count.HP_clif_clearunit_delayed_pre > 0) { + void (*preHookFunc) (struct block_list **bl, enum clr_type *type, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &type, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7569,25 +9855,25 @@ void HP_clif_clearunit_delayed(struct block_list *bl, clr_type type, int64 tick) { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_clearunit_delayed_post > 0) { + void (*postHookFunc) (struct block_list *bl, enum clr_type type, int64 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); + 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); + if (HPMHooks.count.HP_clif_walkok_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_walkok_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7595,9 +9881,9 @@ void HP_clif_walkok(struct map_session_data *sd) { { HPMHooks.source.clif.walkok(sd); } - if( HPMHooks.count.HP_clif_walkok_post ) { + if (HPMHooks.count.HP_clif_walkok_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_walkok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_walkok_post[hIndex].func; postHookFunc(sd); } @@ -7606,14 +9892,14 @@ void HP_clif_walkok(struct map_session_data *sd) { } void HP_clif_move(struct unit_data *ud) { int hIndex = 0; - if( HPMHooks.count.HP_clif_move_pre ) { - void (*preHookFunc) (struct unit_data *ud); + if (HPMHooks.count.HP_clif_move_pre > 0) { + void (*preHookFunc) (struct unit_data **ud); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_move_pre[hIndex].func; - preHookFunc(ud); + preHookFunc(&ud); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7621,9 +9907,9 @@ void HP_clif_move(struct unit_data *ud) { { HPMHooks.source.clif.move(ud); } - if( HPMHooks.count.HP_clif_move_post ) { + if (HPMHooks.count.HP_clif_move_post > 0) { void (*postHookFunc) (struct unit_data *ud); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_move_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_move_post[hIndex].func; postHookFunc(ud); } @@ -7632,14 +9918,14 @@ void HP_clif_move(struct unit_data *ud) { } 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); + if (HPMHooks.count.HP_clif_move2_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct view_data **vd, struct unit_data **ud); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_move2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_move2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_move2_pre[hIndex].func; - preHookFunc(bl, vd, ud); + preHookFunc(&bl, &vd, &ud); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7647,9 +9933,9 @@ void HP_clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data { HPMHooks.source.clif.move2(bl, vd, ud); } - if( HPMHooks.count.HP_clif_move2_post ) { + if (HPMHooks.count.HP_clif_move2_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_move2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_move2_post[hIndex].func; postHookFunc(bl, vd, ud); } @@ -7658,14 +9944,14 @@ void HP_clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data } void HP_clif_blown(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_blown_pre ) { - void (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_clif_blown_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_blown_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7673,9 +9959,9 @@ void HP_clif_blown(struct block_list *bl) { { HPMHooks.source.clif.blown(bl); } - if( HPMHooks.count.HP_clif_blown_post ) { + if (HPMHooks.count.HP_clif_blown_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_blown_post[hIndex].func; postHookFunc(bl); } @@ -7684,14 +9970,14 @@ void HP_clif_blown(struct block_list *bl) { } 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); + if (HPMHooks.count.HP_clif_slide_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *x, int *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_slide_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_slide_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_slide_pre[hIndex].func; - preHookFunc(bl, &x, &y); + preHookFunc(&bl, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7699,25 +9985,25 @@ void HP_clif_slide(struct block_list *bl, int x, int y) { { 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++ ) { + if (HPMHooks.count.HP_clif_slide_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_fixpos_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_fixpos_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7725,9 +10011,9 @@ void HP_clif_fixpos(struct block_list *bl) { { HPMHooks.source.clif.fixpos(bl); } - if( HPMHooks.count.HP_clif_fixpos_post ) { + if (HPMHooks.count.HP_clif_fixpos_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_fixpos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_fixpos_post[hIndex].func; postHookFunc(bl); } @@ -7736,14 +10022,14 @@ void HP_clif_fixpos(struct block_list *bl) { } 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); + if (HPMHooks.count.HP_clif_changelook_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changelook_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changelook_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_changelook_pre[hIndex].func; - preHookFunc(bl, &type, &val); + preHookFunc(&bl, &type, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7751,25 +10037,25 @@ void HP_clif_changelook(struct block_list *bl, int type, int val) { { 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++ ) { + if (HPMHooks.count.HP_clif_changelook_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_changetraplook_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changetraplook_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changetraplook_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_changetraplook_pre[hIndex].func; - preHookFunc(bl, &val); + preHookFunc(&bl, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7777,25 +10063,25 @@ void HP_clif_changetraplook(struct block_list *bl, int val) { { 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++ ) { + if (HPMHooks.count.HP_clif_changetraplook_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_refreshlook_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *id, int *type, int *val, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refreshlook_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &id, &type, &val, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7803,25 +10089,25 @@ void HP_clif_refreshlook(struct block_list *bl, int id, int type, int val, enum { 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++ ) { + if (HPMHooks.count.HP_clif_refreshlook_post > 0) { + 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); + postHookFunc(bl, id, type, val, target); } } return; } void HP_clif_sendlook(struct block_list *bl, int id, int type, int val, int val2, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_sendlook_pre ) { - void (*preHookFunc) (struct block_list *bl, int *id, int *type, int *val, int *val2, enum send_target *target); + if (HPMHooks.count.HP_clif_sendlook_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *id, int *type, int *val, int *val2, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendlook_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendlook_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_sendlook_pre[hIndex].func; - preHookFunc(bl, &id, &type, &val, &val2, &target); + preHookFunc(&bl, &id, &type, &val, &val2, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7829,51 +10115,51 @@ void HP_clif_sendlook(struct block_list *bl, int id, int type, int val, int val2 { HPMHooks.source.clif.sendlook(bl, id, type, val, val2, target); } - if( HPMHooks.count.HP_clif_sendlook_post ) { - void (*postHookFunc) (struct block_list *bl, int *id, int *type, int *val, int *val2, enum send_target *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendlook_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_sendlook_post > 0) { + void (*postHookFunc) (struct block_list *bl, int id, int type, int val, int val2, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendlook_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_sendlook_post[hIndex].func; - postHookFunc(bl, &id, &type, &val, &val2, &target); + postHookFunc(bl, id, type, val, val2, target); } } return; } -void HP_clif_class_change(struct block_list *bl, int class_, int type) { +void HP_clif_class_change(struct block_list *bl, int class_, int type, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_class_change_pre ) { - void (*preHookFunc) (struct block_list *bl, int *class_, int *type); + if (HPMHooks.count.HP_clif_class_change_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *class_, int *type, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_class_change_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &class_, &type, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.class_change(bl, class_, type); + HPMHooks.source.clif.class_change(bl, class_, type, sd); } - 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++ ) { + if (HPMHooks.count.HP_clif_class_change_post > 0) { + void (*postHookFunc) (struct block_list *bl, int class_, int type, struct map_session_data *sd); + 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); + postHookFunc(bl, class_, type, sd); } } 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); + if (HPMHooks.count.HP_clif_skill_delunit_pre > 0) { + void (*preHookFunc) (struct skill_unit **su); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_skill_delunit_pre[hIndex].func; - preHookFunc(su); + preHookFunc(&su); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7881,9 +10167,9 @@ void HP_clif_skill_delunit(struct skill_unit *su) { { HPMHooks.source.clif.skill_delunit(su); } - if( HPMHooks.count.HP_clif_skill_delunit_post ) { + if (HPMHooks.count.HP_clif_skill_delunit_post > 0) { void (*postHookFunc) (struct skill_unit *su); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_delunit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_skill_delunit_post[hIndex].func; postHookFunc(su); } @@ -7892,14 +10178,14 @@ void HP_clif_skill_delunit(struct skill_unit *su) { } 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); + if (HPMHooks.count.HP_clif_skillunit_update_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_skillunit_update_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7907,9 +10193,9 @@ void HP_clif_skillunit_update(struct block_list *bl) { { HPMHooks.source.clif.skillunit_update(bl); } - if( HPMHooks.count.HP_clif_skillunit_update_post ) { + if (HPMHooks.count.HP_clif_skillunit_update_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillunit_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_skillunit_update_post[hIndex].func; postHookFunc(bl); } @@ -7919,14 +10205,14 @@ void HP_clif_skillunit_update(struct block_list *bl) { int HP_clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_clearunit_delayed_sub_pre ) { + if (HPMHooks.count.HP_clif_clearunit_delayed_sub_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -7934,25 +10220,25 @@ int HP_clif_clearunit_delayed_sub(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearunit_delayed_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_clearunit_delayed_sub_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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); + if (HPMHooks.count.HP_clif_set_unit_idle_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct map_session_data **tsd, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &tsd, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7960,25 +10246,25 @@ void HP_clif_set_unit_idle(struct block_list *bl, struct map_session_data *tsd, { 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++ ) { + if (HPMHooks.count.HP_clif_set_unit_idle_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_spawn_unit_pre > 0) { + void (*preHookFunc) (struct block_list **bl, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -7986,25 +10272,25 @@ void HP_clif_spawn_unit(struct block_list *bl, enum send_target target) { { 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++ ) { + if (HPMHooks.count.HP_clif_spawn_unit_post > 0) { + 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); + postHookFunc(bl, target); } } return; } void HP_clif_spawn_unit2(struct block_list *bl, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_spawn_unit2_pre ) { - void (*preHookFunc) (struct block_list *bl, enum send_target *target); + if (HPMHooks.count.HP_clif_spawn_unit2_pre > 0) { + void (*preHookFunc) (struct block_list **bl, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_spawn_unit2_pre[hIndex].func; - preHookFunc(bl, &target); + preHookFunc(&bl, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8012,25 +10298,25 @@ void HP_clif_spawn_unit2(struct block_list *bl, enum send_target target) { { HPMHooks.source.clif.spawn_unit2(bl, target); } - if( HPMHooks.count.HP_clif_spawn_unit2_post ) { - void (*postHookFunc) (struct block_list *bl, enum send_target *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit2_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_spawn_unit2_post > 0) { + void (*postHookFunc) (struct block_list *bl, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_unit2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_spawn_unit2_post[hIndex].func; - postHookFunc(bl, &target); + postHookFunc(bl, target); } } return; } void HP_clif_set_unit_idle2(struct block_list *bl, struct map_session_data *tsd, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_set_unit_idle2_pre ) { - void (*preHookFunc) (struct block_list *bl, struct map_session_data *tsd, enum send_target *target); + if (HPMHooks.count.HP_clif_set_unit_idle2_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct map_session_data **tsd, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_idle2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_set_unit_idle2_pre[hIndex].func; - preHookFunc(bl, tsd, &target); + preHookFunc(&bl, &tsd, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8038,25 +10324,25 @@ void HP_clif_set_unit_idle2(struct block_list *bl, struct map_session_data *tsd, { HPMHooks.source.clif.set_unit_idle2(bl, tsd, target); } - if( HPMHooks.count.HP_clif_set_unit_idle2_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_idle2_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_set_unit_idle2_post > 0) { + 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_idle2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_set_unit_idle2_post[hIndex].func; - postHookFunc(bl, tsd, &target); + postHookFunc(bl, tsd, 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); + if (HPMHooks.count.HP_clif_set_unit_walking_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct map_session_data **tsd, struct unit_data **ud, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_set_unit_walking_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &tsd, &ud, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8064,11 +10350,11 @@ void HP_clif_set_unit_walking(struct block_list *bl, struct map_session_data *ts { 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++ ) { + if (HPMHooks.count.HP_clif_set_unit_walking_post > 0) { + 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); + postHookFunc(bl, tsd, ud, target); } } return; @@ -8076,14 +10362,14 @@ void HP_clif_set_unit_walking(struct block_list *bl, struct map_session_data *ts int HP_clif_calc_walkdelay(struct block_list *bl, int delay, int type, int damage, int div_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_calc_walkdelay_pre ) { - int (*preHookFunc) (struct block_list *bl, int *delay, int *type, int *damage, int *div_); + if (HPMHooks.count.HP_clif_calc_walkdelay_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *delay, int *type, int *damage, int *div_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_calc_walkdelay_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&bl, &delay, &type, &damage, &div_); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8091,25 +10377,25 @@ int HP_clif_calc_walkdelay(struct block_list *bl, int delay, int type, int damag { 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++ ) { + if (HPMHooks.count.HP_clif_calc_walkdelay_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, bl, delay, type, damage, div_); } } return retVal___; } void HP_clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_getareachar_skillunit_pre ) { - void (*preHookFunc) (struct block_list *bl, struct skill_unit *su, enum send_target *target); + if (HPMHooks.count.HP_clif_getareachar_skillunit_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct skill_unit **su, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_getareachar_skillunit_pre[hIndex].func; - preHookFunc(bl, su, &target); + preHookFunc(&bl, &su, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8117,25 +10403,25 @@ void HP_clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *su, { HPMHooks.source.clif.getareachar_skillunit(bl, su, target); } - if( HPMHooks.count.HP_clif_getareachar_skillunit_post ) { - void (*postHookFunc) (struct block_list *bl, struct skill_unit *su, enum send_target *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_getareachar_skillunit_post > 0) { + void (*postHookFunc) (struct block_list *bl, struct skill_unit *su, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_skillunit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_getareachar_skillunit_post[hIndex].func; - postHookFunc(bl, su, &target); + postHookFunc(bl, su, target); } } 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); + if (HPMHooks.count.HP_clif_getareachar_unit_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_unit_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8143,9 +10429,9 @@ void HP_clif_getareachar_unit(struct map_session_data *sd, struct block_list *bl { HPMHooks.source.clif.getareachar_unit(sd, bl); } - if( HPMHooks.count.HP_clif_getareachar_unit_post ) { + if (HPMHooks.count.HP_clif_getareachar_unit_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_unit_post; hIndex++ ) { + 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); } @@ -8154,14 +10440,14 @@ void HP_clif_getareachar_unit(struct map_session_data *sd, struct block_list *bl } 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); + if (HPMHooks.count.HP_clif_clearchar_skillunit_pre > 0) { + void (*preHookFunc) (struct skill_unit **su, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchar_skillunit_pre; hIndex++ ) { + 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); + preHookFunc(&su, &fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8169,11 +10455,11 @@ void HP_clif_clearchar_skillunit(struct skill_unit *su, int fd) { { 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++ ) { + if (HPMHooks.count.HP_clif_clearchar_skillunit_post > 0) { + 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); + postHookFunc(su, fd); } } return; @@ -8181,16 +10467,16 @@ void HP_clif_clearchar_skillunit(struct skill_unit *su, int fd) { int HP_clif_getareachar(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_getareachar_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_clif_getareachar_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8200,9 +10486,9 @@ int HP_clif_getareachar(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.clif.getareachar(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_getareachar_post ) { + if (HPMHooks.count.HP_clif_getareachar_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_post; hIndex++ ) { + 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); @@ -8213,14 +10499,14 @@ int HP_clif_getareachar(struct block_list *bl, va_list ap) { } void HP_clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_graffiti_entry_pre ) { - void (*preHookFunc) (struct block_list *bl, struct skill_unit *su, enum send_target *target); + if (HPMHooks.count.HP_clif_graffiti_entry_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct skill_unit **su, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_graffiti_entry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_graffiti_entry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_graffiti_entry_pre[hIndex].func; - preHookFunc(bl, su, &target); + preHookFunc(&bl, &su, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8228,11 +10514,11 @@ void HP_clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum s { HPMHooks.source.clif.graffiti_entry(bl, su, target); } - if( HPMHooks.count.HP_clif_graffiti_entry_post ) { - void (*postHookFunc) (struct block_list *bl, struct skill_unit *su, enum send_target *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_graffiti_entry_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_graffiti_entry_post > 0) { + void (*postHookFunc) (struct block_list *bl, struct skill_unit *su, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_graffiti_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_graffiti_entry_post[hIndex].func; - postHookFunc(bl, su, &target); + postHookFunc(bl, su, target); } } return; @@ -8240,14 +10526,14 @@ void HP_clif_graffiti_entry(struct block_list *bl, struct skill_unit *su, enum s bool HP_clif_spawn(struct block_list *bl) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_spawn_pre ) { - bool (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_clif_spawn_pre > 0) { + bool (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_spawn_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8255,9 +10541,9 @@ bool HP_clif_spawn(struct block_list *bl) { { retVal___ = HPMHooks.source.clif.spawn(bl); } - if( HPMHooks.count.HP_clif_spawn_post ) { + if (HPMHooks.count.HP_clif_spawn_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spawn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_spawn_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -8266,14 +10552,14 @@ bool HP_clif_spawn(struct block_list *bl) { } 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); + if (HPMHooks.count.HP_clif_changemap_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *m, int *x, int *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &m, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8281,25 +10567,51 @@ void HP_clif_changemap(struct map_session_data *sd, short m, int x, int y) { { 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++ ) { + if (HPMHooks.count.HP_clif_changemap_post > 0) { + 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); + postHookFunc(sd, m, x, y); + } + } + return; +} +void HP_clif_changemap_airship(struct map_session_data *sd, short m, int x, int y) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_changemap_airship_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *m, int *x, int *y); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_airship_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_changemap_airship_pre[hIndex].func; + preHookFunc(&sd, &m, &x, &y); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changemap_airship(sd, m, x, y); + } + if (HPMHooks.count.HP_clif_changemap_airship_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, short m, int x, int y); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemap_airship_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_changemap_airship_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 ) { + if (HPMHooks.count.HP_clif_changemapcell_pre > 0) { void (*preHookFunc) (int *fd, int16 *m, int *x, int *y, int *type, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapcell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8307,25 +10619,25 @@ void HP_clif_changemapcell(int fd, int16 m, int x, int y, int type, enum send_ta { 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++ ) { + if (HPMHooks.count.HP_clif_changemapcell_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_map_property_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum map_property *property); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &property); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8333,25 +10645,25 @@ void HP_clif_map_property(struct map_session_data *sd, enum map_property propert { 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++ ) { + if (HPMHooks.count.HP_clif_map_property_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pvpset_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *pvprank, int *pvpnum, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pvpset_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &pvprank, &pvpnum, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8359,25 +10671,25 @@ void HP_clif_pvpset(struct map_session_data *sd, int pvprank, int pvpnum, int ty { 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++ ) { + if (HPMHooks.count.HP_clif_pvpset_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_map_property_mapall_pre > 0) { void (*preHookFunc) (int *mapid, enum map_property *property); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_property_mapall_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8385,25 +10697,25 @@ void HP_clif_map_property_mapall(int mapid, enum map_property property) { { 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++ ) { + if (HPMHooks.count.HP_clif_map_property_mapall_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_bossmapinfo_pre > 0) { + void (*preHookFunc) (int *fd, struct mob_data **md, short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bossmapinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bossmapinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_bossmapinfo_pre[hIndex].func; - preHookFunc(&fd, md, &flag); + preHookFunc(&fd, &md, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8411,25 +10723,25 @@ void HP_clif_bossmapinfo(int fd, struct mob_data *md, short flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_bossmapinfo_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_map_type_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum map_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_map_type_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8437,25 +10749,25 @@ void HP_clif_map_type(struct map_session_data *sd, enum map_type type) { { 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++ ) { + if (HPMHooks.count.HP_clif_map_type_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_maptypeproperty2_pre > 0) { + void (*preHookFunc) (struct block_list **bl, enum send_target *t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_maptypeproperty2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_maptypeproperty2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_maptypeproperty2_pre[hIndex].func; - preHookFunc(bl, &t); + preHookFunc(&bl, &t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8463,51 +10775,77 @@ void HP_clif_maptypeproperty2(struct block_list *bl, enum send_target t) { { 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++ ) { + if (HPMHooks.count.HP_clif_maptypeproperty2_post > 0) { + 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); + 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) { +void HP_clif_changemapserver(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port, char *dnsHost) { 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); + if (HPMHooks.count.HP_clif_changemapserver_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port, char **dnsHost); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &map_index, &x, &y, &ip, &port, &dnsHost); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.changemapserver(sd, map_index, x, y, ip, port); + HPMHooks.source.clif.changemapserver(sd, map_index, x, y, ip, port, dnsHost); } - 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++ ) { + if (HPMHooks.count.HP_clif_changemapserver_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port, char *dnsHost); + 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); + postHookFunc(sd, map_index, x, y, ip, port, dnsHost); + } + } + return; +} +void HP_clif_changemapserver_airship(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_airship_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, uint32 *ip, uint16 *port); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changemapserver_airship_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_changemapserver_airship_pre[hIndex].func; + preHookFunc(&sd, &map_index, &x, &y, &ip, &port); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changemapserver_airship(sd, map_index, x, y, ip, port); + } + if (HPMHooks.count.HP_clif_changemapserver_airship_post > 0) { + 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_airship_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_changemapserver_airship_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); + if (HPMHooks.count.HP_clif_npcbuysell_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcbuysell_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcbuysell_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_npcbuysell_pre[hIndex].func; - preHookFunc(sd, &id); + preHookFunc(&sd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8515,25 +10853,25 @@ void HP_clif_npcbuysell(struct map_session_data *sd, int id) { { 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++ ) { + if (HPMHooks.count.HP_clif_npcbuysell_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_buylist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_buylist_pre[hIndex].func; - preHookFunc(sd, nd); + preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8541,9 +10879,9 @@ void HP_clif_buylist(struct map_session_data *sd, struct npc_data *nd) { { HPMHooks.source.clif.buylist(sd, nd); } - if( HPMHooks.count.HP_clif_buylist_post ) { + if (HPMHooks.count.HP_clif_buylist_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buylist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_buylist_post[hIndex].func; postHookFunc(sd, nd); } @@ -8552,14 +10890,14 @@ void HP_clif_buylist(struct map_session_data *sd, struct npc_data *nd) { } 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); + if (HPMHooks.count.HP_clif_selllist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_selllist_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8567,9 +10905,9 @@ void HP_clif_selllist(struct map_session_data *sd) { { HPMHooks.source.clif.selllist(sd); } - if( HPMHooks.count.HP_clif_selllist_post ) { + if (HPMHooks.count.HP_clif_selllist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_selllist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_selllist_post[hIndex].func; postHookFunc(sd); } @@ -8578,14 +10916,14 @@ void HP_clif_selllist(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_cashshop_show_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_show_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8593,9 +10931,9 @@ void HP_clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) { { HPMHooks.source.clif.cashshop_show(sd, nd); } - if( HPMHooks.count.HP_clif_cashshop_show_post ) { + if (HPMHooks.count.HP_clif_cashshop_show_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_show_post; hIndex++ ) { + 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); } @@ -8604,14 +10942,14 @@ void HP_clif_cashshop_show(struct map_session_data *sd, struct npc_data *nd) { } 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); + if (HPMHooks.count.HP_clif_npc_buy_result_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_buy_result_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8619,25 +10957,25 @@ void HP_clif_npc_buy_result(struct map_session_data *sd, unsigned char result) { { 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++ ) { + if (HPMHooks.count.HP_clif_npc_buy_result_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_npc_sell_result_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_sell_result_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8645,25 +10983,25 @@ void HP_clif_npc_sell_result(struct map_session_data *sd, unsigned char result) { 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++ ) { + if (HPMHooks.count.HP_clif_npc_sell_result_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_cashshop_ack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *error); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashshop_ack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &error); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8671,25 +11009,25 @@ void HP_clif_cashshop_ack(struct map_session_data *sd, int error) { { 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++ ) { + if (HPMHooks.count.HP_clif_cashshop_ack_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_scriptmes_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *npcid, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmes_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmes_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_scriptmes_pre[hIndex].func; - preHookFunc(sd, &npcid, mes); + preHookFunc(&sd, &npcid, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8697,25 +11035,25 @@ void HP_clif_scriptmes(struct map_session_data *sd, int npcid, const char *mes) { 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++ ) { + if (HPMHooks.count.HP_clif_scriptmes_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_scriptnext_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptnext_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptnext_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_scriptnext_pre[hIndex].func; - preHookFunc(sd, &npcid); + preHookFunc(&sd, &npcid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8723,25 +11061,25 @@ void HP_clif_scriptnext(struct map_session_data *sd, int npcid) { { 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++ ) { + if (HPMHooks.count.HP_clif_scriptnext_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_scriptclose_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclose_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclose_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_scriptclose_pre[hIndex].func; - preHookFunc(sd, &npcid); + preHookFunc(&sd, &npcid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8749,25 +11087,25 @@ void HP_clif_scriptclose(struct map_session_data *sd, int npcid) { { 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++ ) { + if (HPMHooks.count.HP_clif_scriptclose_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_scriptmenu_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *npcid, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmenu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptmenu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_scriptmenu_pre[hIndex].func; - preHookFunc(sd, &npcid, mes); + preHookFunc(&sd, &npcid, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8775,25 +11113,25 @@ void HP_clif_scriptmenu(struct map_session_data *sd, int npcid, const char *mes) { 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++ ) { + if (HPMHooks.count.HP_clif_scriptmenu_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_scriptinput_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinput_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinput_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_scriptinput_pre[hIndex].func; - preHookFunc(sd, &npcid); + preHookFunc(&sd, &npcid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8801,25 +11139,25 @@ void HP_clif_scriptinput(struct map_session_data *sd, int npcid) { { 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++ ) { + if (HPMHooks.count.HP_clif_scriptinput_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_scriptinputstr_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinputstr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptinputstr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_scriptinputstr_pre[hIndex].func; - preHookFunc(sd, &npcid); + preHookFunc(&sd, &npcid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8827,25 +11165,25 @@ void HP_clif_scriptinputstr(struct map_session_data *sd, int npcid) { { 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++ ) { + if (HPMHooks.count.HP_clif_scriptinputstr_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_cutin_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **image, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cutin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cutin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_cutin_pre[hIndex].func; - preHookFunc(sd, image, &type); + preHookFunc(&sd, &image, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8853,25 +11191,25 @@ void HP_clif_cutin(struct map_session_data *sd, const char *image, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_cutin_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_sendfakenpc_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendfakenpc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendfakenpc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_sendfakenpc_pre[hIndex].func; - preHookFunc(sd, &npcid); + preHookFunc(&sd, &npcid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8879,25 +11217,25 @@ void HP_clif_sendfakenpc(struct map_session_data *sd, int npcid) { { 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++ ) { + if (HPMHooks.count.HP_clif_sendfakenpc_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_scriptclear_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *npcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_scriptclear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_scriptclear_pre[hIndex].func; - preHookFunc(sd, &npcid); + preHookFunc(&sd, &npcid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8905,25 +11243,25 @@ void HP_clif_scriptclear(struct map_session_data *sd, int npcid) { { 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++ ) { + if (HPMHooks.count.HP_clif_scriptclear_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_viewpoint_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *npc_id, int *type, int *x, int *y, int *id, int *color); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewpoint_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &npc_id, &type, &x, &y, &id, &color); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8931,26 +11269,26 @@ void HP_clif_viewpoint(struct map_session_data *sd, int npc_id, int type, int x, { 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++ ) { + if (HPMHooks.count.HP_clif_viewpoint_post > 0) { + 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); + postHookFunc(sd, npc_id, type, x, y, id, color); } } return; } -int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2) { +int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, enum battle_dmg_type type, int64 damage2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_damage_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *dst, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2); + if (HPMHooks.count.HP_clif_damage_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *damage, short *div, enum battle_dmg_type *type, int64 *damage2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_damage_pre[hIndex].func; - retVal___ = preHookFunc(src, dst, &sdelay, &ddelay, &damage, &div, &type, &damage2); + retVal___ = preHookFunc(&src, &dst, &sdelay, &ddelay, &damage, &div, &type, &damage2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -8958,25 +11296,25 @@ int HP_clif_damage(struct block_list *src, struct block_list *dst, int sdelay, i { retVal___ = HPMHooks.source.clif.damage(src, dst, 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, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_damage_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_damage_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 damage, short div, enum battle_dmg_type 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, &sdelay, &ddelay, &damage, &div, &type, &damage2); + retVal___ = postHookFunc(retVal___, src, dst, 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); + if (HPMHooks.count.HP_clif_sitting_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_sitting_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -8984,9 +11322,9 @@ void HP_clif_sitting(struct block_list *bl) { { HPMHooks.source.clif.sitting(bl); } - if( HPMHooks.count.HP_clif_sitting_post ) { + if (HPMHooks.count.HP_clif_sitting_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sitting_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_sitting_post[hIndex].func; postHookFunc(bl); } @@ -8995,14 +11333,14 @@ void HP_clif_sitting(struct block_list *bl) { } void HP_clif_standing(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_standing_pre ) { - void (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_clif_standing_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_standing_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9010,9 +11348,9 @@ void HP_clif_standing(struct block_list *bl) { { HPMHooks.source.clif.standing(bl); } - if( HPMHooks.count.HP_clif_standing_post ) { + if (HPMHooks.count.HP_clif_standing_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_standing_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_standing_post[hIndex].func; postHookFunc(bl); } @@ -9021,14 +11359,14 @@ void HP_clif_standing(struct block_list *bl) { } 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); + if (HPMHooks.count.HP_clif_arrow_create_list_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_create_list_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9036,9 +11374,9 @@ void HP_clif_arrow_create_list(struct map_session_data *sd) { { HPMHooks.source.clif.arrow_create_list(sd); } - if( HPMHooks.count.HP_clif_arrow_create_list_post ) { + if (HPMHooks.count.HP_clif_arrow_create_list_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_arrow_create_list_post; hIndex++ ) { + 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); } @@ -9047,14 +11385,14 @@ void HP_clif_arrow_create_list(struct map_session_data *sd) { } void HP_clif_refresh_storagewindow(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_refresh_storagewindow_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_refresh_storagewindow_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_refresh_storagewindow_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9062,9 +11400,9 @@ void HP_clif_refresh_storagewindow(struct map_session_data *sd) { { HPMHooks.source.clif.refresh_storagewindow(sd); } - if( HPMHooks.count.HP_clif_refresh_storagewindow_post ) { + if (HPMHooks.count.HP_clif_refresh_storagewindow_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_storagewindow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_refresh_storagewindow_post[hIndex].func; postHookFunc(sd); } @@ -9073,14 +11411,14 @@ void HP_clif_refresh_storagewindow(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_refresh_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_refresh_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9088,9 +11426,9 @@ void HP_clif_refresh(struct map_session_data *sd) { { HPMHooks.source.clif.refresh(sd); } - if( HPMHooks.count.HP_clif_refresh_post ) { + if (HPMHooks.count.HP_clif_refresh_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_refresh_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_refresh_post[hIndex].func; postHookFunc(sd); } @@ -9099,14 +11437,14 @@ void HP_clif_refresh(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_fame_blacksmith_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_blacksmith_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &points); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9114,25 +11452,25 @@ void HP_clif_fame_blacksmith(struct map_session_data *sd, int points) { { 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++ ) { + if (HPMHooks.count.HP_clif_fame_blacksmith_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_fame_alchemist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_alchemist_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &points); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9140,25 +11478,25 @@ void HP_clif_fame_alchemist(struct map_session_data *sd, int points) { { 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++ ) { + if (HPMHooks.count.HP_clif_fame_alchemist_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_fame_taekwon_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_fame_taekwon_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &points); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9166,25 +11504,25 @@ void HP_clif_fame_taekwon(struct map_session_data *sd, int points) { { 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++ ) { + if (HPMHooks.count.HP_clif_fame_taekwon_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_ranklist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum fame_list_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_ranklist_pre[hIndex].func; - preHookFunc(sd, &type); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9192,25 +11530,77 @@ void HP_clif_ranklist(struct map_session_data *sd, enum fame_list_type type) { { 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++ ) { + if (HPMHooks.count.HP_clif_ranklist_post > 0) { + 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); + postHookFunc(sd, type); + } + } + return; +} +void HP_clif_ranklist_sub(struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_ranklist_sub_pre > 0) { + void (*preHookFunc) (struct PACKET_ZC_ACK_RANKING_sub **ranks, enum fame_list_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_ranklist_sub_pre[hIndex].func; + preHookFunc(&ranks, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ranklist_sub(ranks, type); + } + if (HPMHooks.count.HP_clif_ranklist_sub_post > 0) { + void (*postHookFunc) (struct PACKET_ZC_ACK_RANKING_sub *ranks, enum fame_list_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_ranklist_sub_post[hIndex].func; + postHookFunc(ranks, type); + } + } + return; +} +void HP_clif_ranklist_sub2(uint32 *chars, uint32 *points, enum fame_list_type type) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_ranklist_sub2_pre > 0) { + void (*preHookFunc) (uint32 **chars, uint32 **points, enum fame_list_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_ranklist_sub2_pre[hIndex].func; + preHookFunc(&chars, &points, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ranklist_sub2(chars, points, type); + } + if (HPMHooks.count.HP_clif_ranklist_sub2_post > 0) { + void (*postHookFunc) (uint32 *chars, uint32 *points, enum fame_list_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranklist_sub2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_ranklist_sub2_post[hIndex].func; + postHookFunc(chars, points, 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); + if (HPMHooks.count.HP_clif_update_rankingpoint_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum fame_list_type *type, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_update_rankingpoint_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type, &points); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9218,25 +11608,25 @@ void HP_clif_update_rankingpoint(struct map_session_data *sd, enum fame_list_typ { 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++ ) { + if (HPMHooks.count.HP_clif_update_rankingpoint_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pRanklist_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRanklist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRanklist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRanklist_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9244,36 +11634,62 @@ void HP_clif_pRanklist(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pRanklist_post > 0) { + 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); + postHookFunc(fd, sd); } } return; } -void HP_clif_hotkeys(struct map_session_data *sd) { +void HP_clif_hotkeys(struct map_session_data *sd, int tab) { int hIndex = 0; - if( HPMHooks.count.HP_clif_hotkeys_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_hotkeys_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *tab); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_hotkeys_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd, &tab); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.hotkeys(sd); + HPMHooks.source.clif.hotkeys(sd, tab); } - 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++ ) { + if (HPMHooks.count.HP_clif_hotkeys_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int tab); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeys_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_hotkeys_post[hIndex].func; + postHookFunc(sd, tab); + } + } + return; +} +void HP_clif_hotkeysAll(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_hotkeysAll_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeysAll_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_hotkeysAll_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.hotkeysAll(sd); + } + if (HPMHooks.count.HP_clif_hotkeysAll_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hotkeysAll_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_hotkeysAll_post[hIndex].func; postHookFunc(sd); } } @@ -9282,16 +11698,16 @@ void HP_clif_hotkeys(struct map_session_data *sd) { int HP_clif_insight(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_insight_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_clif_insight_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insight_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9301,9 +11717,9 @@ int HP_clif_insight(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.clif.insight(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_insight_post ) { + if (HPMHooks.count.HP_clif_insight_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insight_post; hIndex++ ) { + 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); @@ -9315,16 +11731,16 @@ int HP_clif_insight(struct block_list *bl, va_list ap) { int HP_clif_outsight(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_outsight_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_clif_outsight_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_outsight_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -9334,9 +11750,9 @@ int HP_clif_outsight(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.clif.outsight(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_outsight_post ) { + if (HPMHooks.count.HP_clif_outsight_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_outsight_post; hIndex++ ) { + 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); @@ -9347,14 +11763,14 @@ int HP_clif_outsight(struct block_list *bl, va_list ap) { } void HP_clif_skillcastcancel(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skillcastcancel_pre ) { - void (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_clif_skillcastcancel_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcastcancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcastcancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_skillcastcancel_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9362,51 +11778,51 @@ void HP_clif_skillcastcancel(struct block_list *bl) { { HPMHooks.source.clif.skillcastcancel(bl); } - if( HPMHooks.count.HP_clif_skillcastcancel_post ) { + if (HPMHooks.count.HP_clif_skillcastcancel_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillcastcancel_post; hIndex++ ) { + 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) { +void HP_clif_skill_fail(struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype, int32 item_id) { 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); + if (HPMHooks.count.HP_clif_skill_fail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, enum useskill_fail_cause *cause, int *btype, int32 *item_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_fail_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &skill_id, &cause, &btype, &item_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.skill_fail(sd, skill_id, cause, btype); + HPMHooks.source.clif.skill_fail(sd, skill_id, cause, btype, item_id); } - 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++ ) { + if (HPMHooks.count.HP_clif_skill_fail_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id, enum useskill_fail_cause cause, int btype, int32 item_id); + 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); + postHookFunc(sd, skill_id, cause, btype, item_id); } } return; } void HP_clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsigned int duration) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skill_cooldown_pre ) { - void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, unsigned int *duration); + if (HPMHooks.count.HP_clif_skill_cooldown_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, unsigned int *duration); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_cooldown_pre; hIndex++ ) { + 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, &duration); + preHookFunc(&sd, &skill_id, &duration); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9414,25 +11830,25 @@ void HP_clif_skill_cooldown(struct map_session_data *sd, uint16 skill_id, unsign { HPMHooks.source.clif.skill_cooldown(sd, skill_id, duration); } - if( HPMHooks.count.HP_clif_skill_cooldown_post ) { - void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, unsigned int *duration); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_cooldown_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_skill_cooldown_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id, unsigned int duration); + 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, &duration); + postHookFunc(sd, skill_id, duration); } } 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); + if (HPMHooks.count.HP_clif_skill_memomessage_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_memomessage_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9440,25 +11856,25 @@ void HP_clif_skill_memomessage(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_skill_memomessage_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_skill_mapinfomessage_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_mapinfomessage_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9466,25 +11882,25 @@ void HP_clif_skill_mapinfomessage(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_skill_mapinfomessage_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_skill_produce_mix_list_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *trigger); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_produce_mix_list_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &skill_id, &trigger); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9492,25 +11908,25 @@ void HP_clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id, i { 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++ ) { + if (HPMHooks.count.HP_clif_skill_produce_mix_list_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_cooking_list_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *trigger, uint16 *skill_id, int *qty, int *list_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooking_list_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &trigger, &skill_id, &qty, &list_type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9518,25 +11934,25 @@ void HP_clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill { 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++ ) { + if (HPMHooks.count.HP_clif_cooking_list_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_autospell_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autospell_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_autospell_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_autospell_pre[hIndex].func; - preHookFunc(sd, &skill_lv); + preHookFunc(&sd, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9544,25 +11960,25 @@ void HP_clif_autospell(struct map_session_data *sd, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_clif_autospell_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_combo_delay_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *wait); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_combo_delay_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &wait); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9570,51 +11986,77 @@ void HP_clif_combo_delay(struct block_list *bl, int wait) { { 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++ ) { + if (HPMHooks.count.HP_clif_combo_delay_post > 0) { + 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); + 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) { +void HP_clif_status_change(struct block_list *bl, int relevant_bl, int type, int flag, int total_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); + if (HPMHooks.count.HP_clif_status_change_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *relevant_bl, int *type, int *flag, int *total_tick, int *val1, int *val2, int *val3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &relevant_bl, &type, &flag, &total_tick, &val1, &val2, &val3); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.status_change(bl, type, flag, tick, val1, val2, val3); + HPMHooks.source.clif.status_change(bl, relevant_bl, type, flag, total_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++ ) { + if (HPMHooks.count.HP_clif_status_change_post > 0) { + void (*postHookFunc) (struct block_list *bl, int relevant_bl, int type, int flag, int total_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); + postHookFunc(bl, relevant_bl, type, flag, total_tick, val1, val2, val3); + } + } + return; +} +void HP_clif_status_change_sub(struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_status_change_sub_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *type, int *relevant_bl, int *flag, int *tick, int *total_tick, int *val1, int *val2, int *val3); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_status_change_sub_pre[hIndex].func; + preHookFunc(&bl, &type, &relevant_bl, &flag, &tick, &total_tick, &val1, &val2, &val3); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.status_change_sub(bl, type, relevant_bl, flag, tick, total_tick, val1, val2, val3); + } + if (HPMHooks.count.HP_clif_status_change_sub_post > 0) { + void (*postHookFunc) (struct block_list *bl, int type, int relevant_bl, int flag, int tick, int total_tick, int val1, int val2, int val3); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_status_change_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_status_change_sub_post[hIndex].func; + postHookFunc(bl, type, relevant_bl, flag, tick, total_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); + if (HPMHooks.count.HP_clif_insert_card_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *idx_equip, int *idx_card, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_insert_card_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &idx_equip, &idx_card, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9622,103 +12064,337 @@ void HP_clif_insert_card(struct map_session_data *sd, int idx_equip, int idx_car { 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++ ) { + if (HPMHooks.count.HP_clif_insert_card_post > 0) { + 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); + 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 > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + 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 > 0) { + 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_inventorylist(struct map_session_data *sd) { +void HP_clif_inventoryItems(struct map_session_data *sd, enum inventory_type type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_inventorylist_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_inventoryItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventorylist_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_inventorylist_pre[hIndex].func; - preHookFunc(sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryItems_pre[hIndex].func; + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.inventorylist(sd); + HPMHooks.source.clif.inventoryItems(sd, type); + } + if (HPMHooks.count.HP_clif_inventoryItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryItems_post[hIndex].func; + postHookFunc(sd, type); + } } - if( HPMHooks.count.HP_clif_inventorylist_post ) { + return; +} +void HP_clif_equipList(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_equipList_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + 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 > 0) { 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; + 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_equiplist(struct map_session_data *sd) { +void HP_clif_equipItems(struct map_session_data *sd, enum inventory_type type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_equiplist_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_equipItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiplist_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_equiplist_pre[hIndex].func; - preHookFunc(sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_equipItems_pre[hIndex].func; + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.equiplist(sd); + HPMHooks.source.clif.equipItems(sd, type); } - if( HPMHooks.count.HP_clif_equiplist_post ) { + if (HPMHooks.count.HP_clif_equipItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equipItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_equipItems_post[hIndex].func; + postHookFunc(sd, type); + } + } + return; +} +void HP_clif_cartList(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cartList_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + 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 > 0) { 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; + 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_cartlist(struct map_session_data *sd) { +void HP_clif_cartItems(struct map_session_data *sd, enum inventory_type type) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cartItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cartItems_pre[hIndex].func; + preHookFunc(&sd, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cartItems(sd, type); + } + if (HPMHooks.count.HP_clif_cartItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cartItems_post[hIndex].func; + postHookFunc(sd, type); + } + } + return; +} +void HP_clif_inventoryExpansionInfo(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_cartlist_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_inventoryExpansionInfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cartlist_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_cartlist_pre[hIndex].func; - preHookFunc(sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpansionInfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryExpansionInfo_pre[hIndex].func; + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.cartlist(sd); + HPMHooks.source.clif.inventoryExpansionInfo(sd); } - if( HPMHooks.count.HP_clif_cartlist_post ) { + if (HPMHooks.count.HP_clif_inventoryExpansionInfo_post > 0) { 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; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpansionInfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryExpansionInfo_post[hIndex].func; postHookFunc(sd); } } return; } +void HP_clif_inventoryExpandAck(struct map_session_data *sd, enum expand_inventory result, int itemId) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryExpandAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum expand_inventory *result, int *itemId); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryExpandAck_pre[hIndex].func; + preHookFunc(&sd, &result, &itemId); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryExpandAck(sd, result, itemId); + } + if (HPMHooks.count.HP_clif_inventoryExpandAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum expand_inventory result, int itemId); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryExpandAck_post[hIndex].func; + postHookFunc(sd, result, itemId); + } + } + return; +} +void HP_clif_inventoryExpandResult(struct map_session_data *sd, enum expand_inventory_result result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryExpandResult_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum expand_inventory_result *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandResult_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryExpandResult_pre[hIndex].func; + preHookFunc(&sd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryExpandResult(sd, result); + } + if (HPMHooks.count.HP_clif_inventoryExpandResult_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum expand_inventory_result result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryExpandResult_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryExpandResult_post[hIndex].func; + postHookFunc(sd, result); + } + } + return; +} +void HP_clif_pInventoryExpansion(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pInventoryExpansion_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansion_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pInventoryExpansion_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pInventoryExpansion(fd, sd); + } + if (HPMHooks.count.HP_clif_pInventoryExpansion_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansion_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pInventoryExpansion_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pInventoryExpansionConfirmed(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionConfirmed_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pInventoryExpansionConfirmed(fd, sd); + } + if (HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionConfirmed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionConfirmed_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pInventoryExpansionRejected(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pInventoryExpansionRejected_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionRejected_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionRejected_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pInventoryExpansionRejected(fd, sd); + } + if (HPMHooks.count.HP_clif_pInventoryExpansionRejected_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInventoryExpansionRejected_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pInventoryExpansionRejected_post[hIndex].func; + postHookFunc(fd, 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); + if (HPMHooks.count.HP_clif_favorite_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned short *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_favorite_item_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9726,25 +12402,25 @@ void HP_clif_favorite_item(struct map_session_data *sd, unsigned short index) { { 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++ ) { + if (HPMHooks.count.HP_clif_favorite_item_post > 0) { + 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); + postHookFunc(sd, index); } } return; } void HP_clif_clearcart(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_clearcart_pre ) { + if (HPMHooks.count.HP_clif_clearcart_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearcart_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9752,25 +12428,25 @@ void HP_clif_clearcart(int fd) { { 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++ ) { + if (HPMHooks.count.HP_clif_clearcart_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_item_identify_list_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identify_list_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9778,9 +12454,9 @@ void HP_clif_item_identify_list(struct map_session_data *sd) { { HPMHooks.source.clif.item_identify_list(sd); } - if( HPMHooks.count.HP_clif_item_identify_list_post ) { + if (HPMHooks.count.HP_clif_item_identify_list_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identify_list_post; hIndex++ ) { + 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); } @@ -9789,14 +12465,14 @@ void HP_clif_item_identify_list(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_item_identified_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *idx, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_identified_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &idx, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9804,25 +12480,25 @@ void HP_clif_item_identified(struct map_session_data *sd, int idx, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_item_identified_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_item_repair_list_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **dstsd, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repair_list_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &dstsd, &lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9830,25 +12506,25 @@ void HP_clif_item_repair_list(struct map_session_data *sd, struct map_session_da { 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++ ) { + if (HPMHooks.count.HP_clif_item_repair_list_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_item_repaireffect_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *idx, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_repaireffect_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &idx, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9856,25 +12532,25 @@ void HP_clif_item_repaireffect(struct map_session_data *sd, int idx, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_item_repaireffect_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_item_damaged_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned short *position); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_damaged_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &position); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9882,25 +12558,25 @@ void HP_clif_item_damaged(struct map_session_data *sd, unsigned short position) { 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++ ) { + if (HPMHooks.count.HP_clif_item_damaged_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_item_refine_list_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_refine_list_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9908,9 +12584,9 @@ void HP_clif_item_refine_list(struct map_session_data *sd) { { HPMHooks.source.clif.item_refine_list(sd); } - if( HPMHooks.count.HP_clif_item_refine_list_post ) { + if (HPMHooks.count.HP_clif_item_refine_list_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_refine_list_post; hIndex++ ) { + 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); } @@ -9919,14 +12595,14 @@ void HP_clif_item_refine_list(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_item_skill_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_skill_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9934,25 +12610,25 @@ void HP_clif_item_skill(struct map_session_data *sd, uint16 skill_id, uint16 ski { 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++ ) { + if (HPMHooks.count.HP_clif_item_skill_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_mvp_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_item_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9960,25 +12636,25 @@ void HP_clif_mvp_item(struct map_session_data *sd, int nameid) { { 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++ ) { + if (HPMHooks.count.HP_clif_mvp_item_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_mvp_exp_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned int *exp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_exp_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &exp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -9986,25 +12662,25 @@ void HP_clif_mvp_exp(struct map_session_data *sd, unsigned int exp) { { 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++ ) { + if (HPMHooks.count.HP_clif_mvp_exp_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_mvp_noitem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_mvp_noitem_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10012,9 +12688,9 @@ void HP_clif_mvp_noitem(struct map_session_data *sd) { { HPMHooks.source.clif.mvp_noitem(sd); } - if( HPMHooks.count.HP_clif_mvp_noitem_post ) { + if (HPMHooks.count.HP_clif_mvp_noitem_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_noitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_mvp_noitem_post[hIndex].func; postHookFunc(sd); } @@ -10023,14 +12699,14 @@ void HP_clif_mvp_noitem(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_changed_dir_pre > 0) { + void (*preHookFunc) (struct block_list **bl, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changed_dir_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10038,51 +12714,415 @@ void HP_clif_changed_dir(struct block_list *bl, enum send_target target) { { 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++ ) { + if (HPMHooks.count.HP_clif_changed_dir_post > 0) { + 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); + postHookFunc(bl, target); + } + } + return; +} +void HP_clif_blname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_blname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_blname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.blname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_blname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_blname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_pcname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pcname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pcname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pcname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_pcname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pcname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_homname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_homname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_homname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.homname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_homname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_homname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mername_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mername_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mername_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mername_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mername_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mername_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mername_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mername_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_petname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_petname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_petname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.petname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_petname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_petname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_npcname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_npcname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_npcname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.npcname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_npcname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npcname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_npcname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_guardian_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_guardian_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_guardian_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_guardian_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_guardian_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_guardian_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_guardian_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_guardian_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_additional_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_additional_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_additional_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_additional_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_additional_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_additional_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_additional_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_additional_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_mobname_normal_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mobname_normal_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_normal_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mobname_normal_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mobname_normal_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_mobname_normal_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mobname_normal_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mobname_normal_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_chatname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_chatname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_chatname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chatname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_chatname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_chatname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_elemname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_elemname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_elemname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.elemname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_elemname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_elemname_ack_post[hIndex].func; + postHookFunc(fd, bl); } } return; } -void HP_clif_charnameack(int fd, struct block_list *bl) { +void HP_clif_skillname_ack(int fd, struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_charnameack_pre ) { - void (*preHookFunc) (int *fd, struct block_list *bl); + if (HPMHooks.count.HP_clif_skillname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_charnameack_pre[hIndex].func; - preHookFunc(&fd, bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_skillname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.charnameack(fd, bl); + HPMHooks.source.clif.skillname_ack(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); + if (HPMHooks.count.HP_clif_skillname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_skillname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_itemname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_itemname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_itemname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_itemname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.itemname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_itemname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_itemname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_itemname_ack_post[hIndex].func; + postHookFunc(fd, bl); + } + } + return; +} +void HP_clif_unknownname_ack(int fd, struct block_list *bl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_unknownname_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unknownname_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_unknownname_ack_pre[hIndex].func; + preHookFunc(&fd, &bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.unknownname_ack(fd, bl); + } + if (HPMHooks.count.HP_clif_unknownname_ack_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_unknownname_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_unknownname_ack_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); + if (HPMHooks.count.HP_clif_monster_hp_bar_pre > 0) { + void (*preHookFunc) (struct mob_data **md, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_monster_hp_bar_pre; hIndex++ ) { + 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); + preHookFunc(&md, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10090,9 +13130,9 @@ void HP_clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd) { { HPMHooks.source.clif.monster_hp_bar(md, sd); } - if( HPMHooks.count.HP_clif_monster_hp_bar_post ) { + if (HPMHooks.count.HP_clif_monster_hp_bar_post > 0) { void (*postHookFunc) (struct mob_data *md, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_monster_hp_bar_post; hIndex++ ) { + 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); } @@ -10102,14 +13142,14 @@ void HP_clif_monster_hp_bar(struct mob_data *md, struct map_session_data *sd) { int HP_clif_hpmeter(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_hpmeter_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_hpmeter_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_hpmeter_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10117,9 +13157,9 @@ int HP_clif_hpmeter(struct map_session_data *sd) { { retVal___ = HPMHooks.source.clif.hpmeter(sd); } - if( HPMHooks.count.HP_clif_hpmeter_post ) { + if (HPMHooks.count.HP_clif_hpmeter_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_hpmeter_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -10128,14 +13168,14 @@ int HP_clif_hpmeter(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_clif_hpmeter_single_pre > 0) { void (*preHookFunc) (int *fd, int *id, unsigned int *hp, unsigned int *maxhp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_single_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10143,11 +13183,11 @@ void HP_clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp) { 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++ ) { + if (HPMHooks.count.HP_clif_hpmeter_single_post > 0) { + 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); + postHookFunc(fd, id, hp, maxhp); } } return; @@ -10155,16 +13195,16 @@ void HP_clif_hpmeter_single(int fd, int id, unsigned int hp, unsigned int maxhp) int HP_clif_hpmeter_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_hpmeter_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_clif_hpmeter_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10174,9 +13214,9 @@ int HP_clif_hpmeter_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.clif.hpmeter_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_hpmeter_sub_post ) { + if (HPMHooks.count.HP_clif_hpmeter_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hpmeter_sub_post; hIndex++ ) { + 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); @@ -10187,14 +13227,14 @@ int HP_clif_hpmeter_sub(struct block_list *bl, va_list ap) { } void HP_clif_upgrademessage(int fd, int result, int item_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_upgrademessage_pre ) { + if (HPMHooks.count.HP_clif_upgrademessage_pre > 0) { void (*preHookFunc) (int *fd, int *result, int *item_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_upgrademessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10202,25 +13242,25 @@ void HP_clif_upgrademessage(int fd, int result, int item_id) { { 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++ ) { + if (HPMHooks.count.HP_clif_upgrademessage_post > 0) { + 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); + postHookFunc(fd, result, item_id); } } return; } -void HP_clif_get_weapon_view(struct map_session_data *sd, unsigned short *rhand, unsigned short *lhand) { +void HP_clif_get_weapon_view(struct map_session_data *sd, int *rhand, int *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); + if (HPMHooks.count.HP_clif_get_weapon_view_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int **rhand, int **lhand); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_weapon_view_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &rhand, &lhand); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10228,9 +13268,9 @@ void HP_clif_get_weapon_view(struct map_session_data *sd, unsigned short *rhand, { 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++ ) { + if (HPMHooks.count.HP_clif_get_weapon_view_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int *rhand, int *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); } @@ -10239,14 +13279,14 @@ void HP_clif_get_weapon_view(struct map_session_data *sd, unsigned short *rhand, } 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); + if (HPMHooks.count.HP_clif_gospel_info_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_gospel_info_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10254,25 +13294,25 @@ void HP_clif_gospel_info(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_gospel_info_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_feel_req_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_req_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10280,25 +13320,25 @@ void HP_clif_feel_req(int fd, struct map_session_data *sd, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_clif_feel_req_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_starskill_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **mapname, int *monster_id, unsigned char *star, unsigned char *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_starskill_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &mapname, &monster_id, &star, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10306,25 +13346,25 @@ void HP_clif_starskill(struct map_session_data *sd, const char *mapname, int mon { 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++ ) { + if (HPMHooks.count.HP_clif_starskill_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_feel_info_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned char *feel_level, unsigned char *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_info_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &feel_level, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10332,25 +13372,25 @@ void HP_clif_feel_info(struct map_session_data *sd, unsigned char feel_level, un { 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++ ) { + if (HPMHooks.count.HP_clif_feel_info_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_hate_info_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned char *hate_level, int *class_, unsigned char *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hate_info_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &hate_level, &class_, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10358,25 +13398,25 @@ void HP_clif_hate_info(struct map_session_data *sd, unsigned char hate_level, in { 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++ ) { + if (HPMHooks.count.HP_clif_hate_info_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_mission_info_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *mob_id, unsigned char *progress); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mission_info_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &mob_id, &progress); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10384,25 +13424,25 @@ void HP_clif_mission_info(struct map_session_data *sd, int mob_id, unsigned char { 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++ ) { + if (HPMHooks.count.HP_clif_mission_info_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_feel_hate_reset_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_hate_reset_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10410,9 +13450,9 @@ void HP_clif_feel_hate_reset(struct map_session_data *sd) { { HPMHooks.source.clif.feel_hate_reset(sd); } - if( HPMHooks.count.HP_clif_feel_hate_reset_post ) { + if (HPMHooks.count.HP_clif_feel_hate_reset_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_feel_hate_reset_post; hIndex++ ) { + 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); } @@ -10421,14 +13461,14 @@ void HP_clif_feel_hate_reset(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_partytickack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partytickack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_partytickack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_partytickack_pre[hIndex].func; - preHookFunc(sd, &flag); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10436,51 +13476,51 @@ void HP_clif_partytickack(struct map_session_data *sd, bool flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_partytickack_post > 0) { + 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); + postHookFunc(sd, flag); } } return; } -void HP_clif_equiptickack(struct map_session_data *sd, int flag) { +void HP_clif_zc_config(struct map_session_data *sd, enum CZ_CONFIG type, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_equiptickack_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *flag); + if (HPMHooks.count.HP_clif_zc_config_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum CZ_CONFIG *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiptickack_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_equiptickack_pre[hIndex].func; - preHookFunc(sd, &flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_config_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_zc_config_pre[hIndex].func; + preHookFunc(&sd, &type, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.equiptickack(sd, flag); + HPMHooks.source.clif.zc_config(sd, type, 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); + if (HPMHooks.count.HP_clif_zc_config_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum CZ_CONFIG type, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_config_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_zc_config_post[hIndex].func; + postHookFunc(sd, type, 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); + if (HPMHooks.count.HP_clif_viewequip_ack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_ack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10488,9 +13528,9 @@ void HP_clif_viewequip_ack(struct map_session_data *sd, struct map_session_data { HPMHooks.source.clif.viewequip_ack(sd, tsd); } - if( HPMHooks.count.HP_clif_viewequip_ack_post ) { + if (HPMHooks.count.HP_clif_viewequip_ack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_viewequip_ack_post; hIndex++ ) { + 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); } @@ -10499,14 +13539,14 @@ void HP_clif_viewequip_ack(struct map_session_data *sd, struct map_session_data } 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); + if (HPMHooks.count.HP_clif_equpcheckbox_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equpcheckbox_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equpcheckbox_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_equpcheckbox_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10514,25 +13554,25 @@ void HP_clif_equpcheckbox(struct map_session_data *sd) { { HPMHooks.source.clif.equpcheckbox(sd); } - if( HPMHooks.count.HP_clif_equpcheckbox_post ) { + if (HPMHooks.count.HP_clif_equpcheckbox_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_equpcheckbox_post; hIndex++ ) { + 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) { +void HP_clif_displayexp(struct map_session_data *sd, uint64 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); + if (HPMHooks.count.HP_clif_displayexp_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint64 *exp, char *type, bool *is_quest); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_displayexp_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &exp, &type, &is_quest); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10540,25 +13580,25 @@ void HP_clif_displayexp(struct map_session_data *sd, unsigned int exp, char type { 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++ ) { + if (HPMHooks.count.HP_clif_displayexp_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint64 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); + 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); + if (HPMHooks.count.HP_clif_font_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_font_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10566,9 +13606,9 @@ void HP_clif_font(struct map_session_data *sd) { { HPMHooks.source.clif.font(sd); } - if( HPMHooks.count.HP_clif_font_post ) { + if (HPMHooks.count.HP_clif_font_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_font_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_font_post[hIndex].func; postHookFunc(sd); } @@ -10577,14 +13617,14 @@ void HP_clif_font(struct map_session_data *sd) { } void HP_clif_progressbar(struct map_session_data *sd, unsigned int color, unsigned int second) { int hIndex = 0; - if( HPMHooks.count.HP_clif_progressbar_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned int *color, unsigned int *second); + if (HPMHooks.count.HP_clif_progressbar_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned int *color, unsigned int *second); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_progressbar_pre[hIndex].func; - preHookFunc(sd, &color, &second); + preHookFunc(&sd, &color, &second); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10592,25 +13632,25 @@ void HP_clif_progressbar(struct map_session_data *sd, unsigned int color, unsign { HPMHooks.source.clif.progressbar(sd, color, second); } - if( HPMHooks.count.HP_clif_progressbar_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned int *color, unsigned int *second); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_progressbar_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int 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); + 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); + if (HPMHooks.count.HP_clif_progressbar_abort_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_abort_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_abort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_progressbar_abort_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10618,25 +13658,51 @@ void HP_clif_progressbar_abort(struct map_session_data *sd) { { HPMHooks.source.clif.progressbar_abort(sd); } - if( HPMHooks.count.HP_clif_progressbar_abort_post ) { + if (HPMHooks.count.HP_clif_progressbar_abort_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_abort_post; hIndex++ ) { + 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_progressbar_unit(struct block_list *bl, uint32 color, uint32 time) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_progressbar_unit_pre > 0) { + void (*preHookFunc) (struct block_list **bl, uint32 *color, uint32 *time); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_unit_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_progressbar_unit_pre[hIndex].func; + preHookFunc(&bl, &color, &time); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.progressbar_unit(bl, color, time); + } + if (HPMHooks.count.HP_clif_progressbar_unit_post > 0) { + void (*postHookFunc) (struct block_list *bl, uint32 color, uint32 time); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_progressbar_unit_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_progressbar_unit_post[hIndex].func; + postHookFunc(bl, color, time); + } + } + 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); + if (HPMHooks.count.HP_clif_showdigit_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned char *type, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showdigit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_showdigit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_showdigit_pre[hIndex].func; - preHookFunc(sd, &type, &value); + preHookFunc(&sd, &type, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10644,11 +13710,11 @@ void HP_clif_showdigit(struct map_session_data *sd, unsigned char type, int valu { 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++ ) { + if (HPMHooks.count.HP_clif_showdigit_post > 0) { + 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); + postHookFunc(sd, type, value); } } return; @@ -10656,14 +13722,14 @@ void HP_clif_showdigit(struct map_session_data *sd, unsigned char type, int valu int HP_clif_elementalconverter_list(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_elementalconverter_list_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_elementalconverter_list_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elementalconverter_list_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10671,9 +13737,9 @@ int HP_clif_elementalconverter_list(struct map_session_data *sd) { { retVal___ = HPMHooks.source.clif.elementalconverter_list(sd); } - if( HPMHooks.count.HP_clif_elementalconverter_list_post ) { + if (HPMHooks.count.HP_clif_elementalconverter_list_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elementalconverter_list_post; hIndex++ ) { + 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); } @@ -10683,14 +13749,14 @@ int HP_clif_elementalconverter_list(struct map_session_data *sd) { int HP_clif_spellbook_list(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_spellbook_list_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_spellbook_list_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spellbook_list_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10698,9 +13764,9 @@ int HP_clif_spellbook_list(struct map_session_data *sd) { { retVal___ = HPMHooks.source.clif.spellbook_list(sd); } - if( HPMHooks.count.HP_clif_spellbook_list_post ) { + if (HPMHooks.count.HP_clif_spellbook_list_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spellbook_list_post; hIndex++ ) { + 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); } @@ -10710,14 +13776,14 @@ int HP_clif_spellbook_list(struct map_session_data *sd) { int HP_clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short x, short y) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_magicdecoy_list_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv, short *x, short *y); + if (HPMHooks.count.HP_clif_magicdecoy_list_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_lv, short *x, short *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_magicdecoy_list_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_lv, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10725,11 +13791,11 @@ int HP_clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short { 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++ ) { + if (HPMHooks.count.HP_clif_magicdecoy_list_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_lv, x, y); } } return retVal___; @@ -10737,14 +13803,14 @@ int HP_clif_magicdecoy_list(struct map_session_data *sd, uint16 skill_lv, short int HP_clif_poison_list(struct map_session_data *sd, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_poison_list_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv); + if (HPMHooks.count.HP_clif_poison_list_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_poison_list_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10752,11 +13818,11 @@ int HP_clif_poison_list(struct map_session_data *sd, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_clif_poison_list_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_lv); } } return retVal___; @@ -10764,14 +13830,14 @@ int HP_clif_poison_list(struct map_session_data *sd, uint16 skill_lv) { int HP_clif_autoshadowspell_list(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_autoshadowspell_list_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_autoshadowspell_list_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autoshadowspell_list_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10779,9 +13845,9 @@ int HP_clif_autoshadowspell_list(struct map_session_data *sd) { { retVal___ = HPMHooks.source.clif.autoshadowspell_list(sd); } - if( HPMHooks.count.HP_clif_autoshadowspell_list_post ) { + if (HPMHooks.count.HP_clif_autoshadowspell_list_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_autoshadowspell_list_post; hIndex++ ) { + 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); } @@ -10791,14 +13857,14 @@ int HP_clif_autoshadowspell_list(struct map_session_data *sd) { int HP_clif_skill_itemlistwindow(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_skill_itemlistwindow_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_clif_skill_itemlistwindow_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_itemlistwindow_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -10806,25 +13872,25 @@ int HP_clif_skill_itemlistwindow(struct map_session_data *sd, uint16 skill_id, u { 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++ ) { + if (HPMHooks.count.HP_clif_skill_itemlistwindow_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_sc_load_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *tid, enum send_target *target, int *type, int *val1, int *val2, int *val3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_load_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &tid, &target, &type, &val1, &val2, &val3); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10832,25 +13898,51 @@ void HP_clif_sc_load(struct block_list *bl, int tid, enum send_target target, in { 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++ ) { + if (HPMHooks.count.HP_clif_sc_load_post > 0) { + 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); + postHookFunc(bl, tid, target, type, val1, val2, val3); + } + } + return; +} +void HP_clif_sc_continue(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_continue_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *tid, enum send_target *target, int *type, int *val1, int *val2, int *val3); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_continue_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_sc_continue_pre[hIndex].func; + preHookFunc(&bl, &tid, &target, &type, &val1, &val2, &val3); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.sc_continue(bl, tid, target, type, val1, val2, val3); + } + if (HPMHooks.count.HP_clif_sc_continue_post > 0) { + 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_continue_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_sc_continue_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); + if (HPMHooks.count.HP_clif_sc_end_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *tid, enum send_target *target, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sc_end_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &tid, &target, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10858,25 +13950,25 @@ void HP_clif_sc_end(struct block_list *bl, int tid, enum send_target target, int { 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++ ) { + if (HPMHooks.count.HP_clif_sc_end_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_initialstatus_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_initialstatus_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10884,9 +13976,9 @@ void HP_clif_initialstatus(struct map_session_data *sd) { { HPMHooks.source.clif.initialstatus(sd); } - if( HPMHooks.count.HP_clif_initialstatus_post ) { + if (HPMHooks.count.HP_clif_initialstatus_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_initialstatus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_initialstatus_post[hIndex].func; postHookFunc(sd); } @@ -10895,14 +13987,14 @@ void HP_clif_initialstatus(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_cooldown_list_pre > 0) { + void (*preHookFunc) (int *fd, struct skill_cd **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cooldown_list_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10910,25 +14002,25 @@ void HP_clif_cooldown_list(int fd, struct skill_cd *cd) { { 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++ ) { + if (HPMHooks.count.HP_clif_cooldown_list_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_updatestatus_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestatus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestatus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_updatestatus_pre[hIndex].func; - preHookFunc(sd, &type); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10936,25 +14028,25 @@ void HP_clif_updatestatus(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_updatestatus_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_changestatus_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changestatus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changestatus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_changestatus_pre[hIndex].func; - preHookFunc(sd, &type, &val); + preHookFunc(&sd, &type, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10962,25 +14054,25 @@ void HP_clif_changestatus(struct map_session_data *sd, int type, int val) { { 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++ ) { + if (HPMHooks.count.HP_clif_changestatus_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_statusupack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type, int *ok, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_statusupack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type, &ok, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -10988,25 +14080,25 @@ void HP_clif_statusupack(struct map_session_data *sd, int type, int ok, int val) { 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++ ) { + if (HPMHooks.count.HP_clif_statusupack_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_movetoattack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_movetoattack_pre[hIndex].func; - preHookFunc(sd, bl); + preHookFunc(&sd, &bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11014,9 +14106,9 @@ void HP_clif_movetoattack(struct map_session_data *sd, struct block_list *bl) { { HPMHooks.source.clif.movetoattack(sd, bl); } - if( HPMHooks.count.HP_clif_movetoattack_post ) { + if (HPMHooks.count.HP_clif_movetoattack_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_movetoattack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_movetoattack_post[hIndex].func; postHookFunc(sd, bl); } @@ -11025,14 +14117,14 @@ void HP_clif_movetoattack(struct map_session_data *sd, struct block_list *bl) { } 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); + if (HPMHooks.count.HP_clif_solved_charname_pre > 0) { + void (*preHookFunc) (int *fd, int *charid, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_solved_charname_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &charid, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11040,25 +14132,25 @@ void HP_clif_solved_charname(int fd, int charid, const char *name) { { 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++ ) { + if (HPMHooks.count.HP_clif_solved_charname_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_charnameupdate_pre > 0) { + void (*preHookFunc) (struct map_session_data **ssd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_charnameupdate_pre[hIndex].func; - preHookFunc(ssd); + preHookFunc(&ssd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11066,9 +14158,9 @@ void HP_clif_charnameupdate(struct map_session_data *ssd) { { HPMHooks.source.clif.charnameupdate(ssd); } - if( HPMHooks.count.HP_clif_charnameupdate_post ) { + if (HPMHooks.count.HP_clif_charnameupdate_post > 0) { void (*postHookFunc) (struct map_session_data *ssd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_charnameupdate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_charnameupdate_post[hIndex].func; postHookFunc(ssd); } @@ -11078,14 +14170,14 @@ void HP_clif_charnameupdate(struct map_session_data *ssd) { int HP_clif_delayquit(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_delayquit_pre ) { + if (HPMHooks.count.HP_clif_delayquit_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delayquit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11093,25 +14185,25 @@ int HP_clif_delayquit(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.clif.delayquit(tid, tick, id, data); } - if( HPMHooks.count.HP_clif_delayquit_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delayquit_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_delayquit_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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); + if (HPMHooks.count.HP_clif_getareachar_pc_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **dstsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pc_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &dstsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11119,9 +14211,9 @@ void HP_clif_getareachar_pc(struct map_session_data *sd, struct map_session_data { HPMHooks.source.clif.getareachar_pc(sd, dstsd); } - if( HPMHooks.count.HP_clif_getareachar_pc_post ) { + if (HPMHooks.count.HP_clif_getareachar_pc_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_getareachar_pc_post; hIndex++ ) { + 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); } @@ -11130,14 +14222,14 @@ void HP_clif_getareachar_pc(struct map_session_data *sd, struct map_session_data } 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); + if (HPMHooks.count.HP_clif_disconnect_ack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disconnect_ack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11145,25 +14237,25 @@ void HP_clif_disconnect_ack(struct map_session_data *sd, short result) { { 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++ ) { + if (HPMHooks.count.HP_clif_disconnect_ack_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_PVPInfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PVPInfo_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11171,9 +14263,9 @@ void HP_clif_PVPInfo(struct map_session_data *sd) { { HPMHooks.source.clif.PVPInfo(sd); } - if( HPMHooks.count.HP_clif_PVPInfo_post ) { + if (HPMHooks.count.HP_clif_PVPInfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PVPInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PVPInfo_post[hIndex].func; postHookFunc(sd); } @@ -11182,14 +14274,14 @@ void HP_clif_PVPInfo(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_blacksmith_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_blacksmith_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11197,9 +14289,9 @@ void HP_clif_blacksmith(struct map_session_data *sd) { { HPMHooks.source.clif.blacksmith(sd); } - if( HPMHooks.count.HP_clif_blacksmith_post ) { + if (HPMHooks.count.HP_clif_blacksmith_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_blacksmith_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_blacksmith_post[hIndex].func; postHookFunc(sd); } @@ -11208,14 +14300,14 @@ void HP_clif_blacksmith(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_alchemist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_alchemist_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11223,9 +14315,9 @@ void HP_clif_alchemist(struct map_session_data *sd) { { HPMHooks.source.clif.alchemist(sd); } - if( HPMHooks.count.HP_clif_alchemist_post ) { + if (HPMHooks.count.HP_clif_alchemist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_alchemist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_alchemist_post[hIndex].func; postHookFunc(sd); } @@ -11234,14 +14326,14 @@ void HP_clif_alchemist(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_taekwon_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_taekwon_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11249,9 +14341,9 @@ void HP_clif_taekwon(struct map_session_data *sd) { { HPMHooks.source.clif.taekwon(sd); } - if( HPMHooks.count.HP_clif_taekwon_post ) { + if (HPMHooks.count.HP_clif_taekwon_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_taekwon_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_taekwon_post[hIndex].func; postHookFunc(sd); } @@ -11260,14 +14352,14 @@ void HP_clif_taekwon(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_ranking_pk_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_ranking_pk_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11275,9 +14367,9 @@ void HP_clif_ranking_pk(struct map_session_data *sd) { { HPMHooks.source.clif.ranking_pk(sd); } - if( HPMHooks.count.HP_clif_ranking_pk_post ) { + if (HPMHooks.count.HP_clif_ranking_pk_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ranking_pk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_ranking_pk_post[hIndex].func; postHookFunc(sd); } @@ -11286,14 +14378,14 @@ void HP_clif_ranking_pk(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_quitsave_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quitsave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_quitsave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_quitsave_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11301,25 +14393,25 @@ void HP_clif_quitsave(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_quitsave_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_misceffect_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_misceffect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_misceffect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_misceffect_pre[hIndex].func; - preHookFunc(bl, &type); + preHookFunc(&bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11327,25 +14419,25 @@ void HP_clif_misceffect(struct block_list *bl, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_misceffect_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_changeoption_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_changeoption_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11353,25 +14445,51 @@ void HP_clif_changeoption(struct block_list *bl) { { HPMHooks.source.clif.changeoption(bl); } - if( HPMHooks.count.HP_clif_changeoption_post ) { + if (HPMHooks.count.HP_clif_changeoption_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_post; hIndex++ ) { + 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_changeoption_target(struct block_list *bl, struct block_list *target_bl, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_changeoption_target_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct block_list **target_bl, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_target_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_changeoption_target_pre[hIndex].func; + preHookFunc(&bl, &target_bl, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.changeoption_target(bl, target_bl, target); + } + if (HPMHooks.count.HP_clif_changeoption_target_post > 0) { + void (*postHookFunc) (struct block_list *bl, struct block_list *target_bl, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption_target_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_changeoption_target_post[hIndex].func; + postHookFunc(bl, target_bl, target); + } + } + 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); + if (HPMHooks.count.HP_clif_changeoption2_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_changeoption2_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11379,9 +14497,9 @@ void HP_clif_changeoption2(struct block_list *bl) { { HPMHooks.source.clif.changeoption2(bl); } - if( HPMHooks.count.HP_clif_changeoption2_post ) { + if (HPMHooks.count.HP_clif_changeoption2_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changeoption2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_changeoption2_post[hIndex].func; postHookFunc(bl); } @@ -11390,14 +14508,14 @@ void HP_clif_changeoption2(struct block_list *bl) { } 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); + if (HPMHooks.count.HP_clif_emotion_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_emotion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_emotion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_emotion_pre[hIndex].func; - preHookFunc(bl, &type); + preHookFunc(&bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11405,25 +14523,25 @@ void HP_clif_emotion(struct block_list *bl, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_emotion_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_talkiebox_pre > 0) { + void (*preHookFunc) (struct block_list **bl, const char **talkie); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_talkiebox_pre[hIndex].func; - preHookFunc(bl, talkie); + preHookFunc(&bl, &talkie); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11431,9 +14549,9 @@ void HP_clif_talkiebox(struct block_list *bl, const char *talkie) { { HPMHooks.source.clif.talkiebox(bl, talkie); } - if( HPMHooks.count.HP_clif_talkiebox_post ) { + if (HPMHooks.count.HP_clif_talkiebox_post > 0) { void (*postHookFunc) (struct block_list *bl, const char *talkie); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_talkiebox_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_talkiebox_post[hIndex].func; postHookFunc(bl, talkie); } @@ -11442,14 +14560,14 @@ void HP_clif_talkiebox(struct block_list *bl, const char *talkie) { } 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); + if (HPMHooks.count.HP_clif_wedding_effect_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_wedding_effect_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11457,9 +14575,9 @@ void HP_clif_wedding_effect(struct block_list *bl) { { HPMHooks.source.clif.wedding_effect(bl); } - if( HPMHooks.count.HP_clif_wedding_effect_post ) { + if (HPMHooks.count.HP_clif_wedding_effect_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_wedding_effect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_wedding_effect_post[hIndex].func; postHookFunc(bl); } @@ -11468,14 +14586,14 @@ void HP_clif_wedding_effect(struct block_list *bl) { } 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); + if (HPMHooks.count.HP_clif_divorced_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_divorced_pre[hIndex].func; - preHookFunc(sd, name); + preHookFunc(&sd, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11483,9 +14601,9 @@ void HP_clif_divorced(struct map_session_data *sd, const char *name) { { HPMHooks.source.clif.divorced(sd, name); } - if( HPMHooks.count.HP_clif_divorced_post ) { + if (HPMHooks.count.HP_clif_divorced_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_divorced_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_divorced_post[hIndex].func; postHookFunc(sd, name); } @@ -11494,14 +14612,14 @@ void HP_clif_divorced(struct map_session_data *sd, const char *name) { } 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); + if (HPMHooks.count.HP_clif_callpartner_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_callpartner_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_callpartner_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_callpartner_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11509,26 +14627,26 @@ void HP_clif_callpartner(struct map_session_data *sd) { { HPMHooks.source.clif.callpartner(sd); } - if( HPMHooks.count.HP_clif_callpartner_post ) { + if (HPMHooks.count.HP_clif_callpartner_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_callpartner_post; hIndex++ ) { + 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, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, int type) { +int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, enum battle_dmg_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_skill_damage_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, int *type); + if (HPMHooks.count.HP_clif_skill_damage_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **dst, int64 *tick, int *sdelay, int *ddelay, int64 *damage, int *div, uint16 *skill_id, uint16 *skill_lv, enum battle_dmg_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_damage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &dst, &tick, &sdelay, &ddelay, &damage, &div, &skill_id, &skill_lv, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11536,11 +14654,11 @@ int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 t { 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, int64 *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++ ) { + if (HPMHooks.count.HP_clif_skill_damage_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *dst, int64 tick, int sdelay, int ddelay, int64 damage, int div, uint16 skill_id, uint16 skill_lv, enum battle_dmg_type 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); + retVal___ = postHookFunc(retVal___, src, dst, tick, sdelay, ddelay, damage, div, skill_id, skill_lv, type); } } return retVal___; @@ -11548,14 +14666,14 @@ int HP_clif_skill_damage(struct block_list *src, struct block_list *dst, int64 t 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___ = 0; - 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); + if (HPMHooks.count.HP_clif_skill_nodamage_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **dst, uint16 *skill_id, int *heal, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_nodamage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &dst, &skill_id, &heal, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -11563,25 +14681,25 @@ int HP_clif_skill_nodamage(struct block_list *src, struct block_list *dst, uint1 { 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++ ) { + if (HPMHooks.count.HP_clif_skill_nodamage_post > 0) { + 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); + 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, int64 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, int64 *tick); + if (HPMHooks.count.HP_clif_skill_poseffect_pre > 0) { + void (*preHookFunc) (struct block_list **src, uint16 *skill_id, int *val, int *x, int *y, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_poseffect_pre; hIndex++ ) { + 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); + preHookFunc(&src, &skill_id, &val, &x, &y, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11589,25 +14707,25 @@ void HP_clif_skill_poseffect(struct block_list *src, uint16 skill_id, int val, i { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_poseffect_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_skill_poseffect_post > 0) { + void (*postHookFunc) (struct block_list *src, uint16 skill_id, int val, int x, int y, int64 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); + 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); + if (HPMHooks.count.HP_clif_skill_estimation_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct block_list **dst); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_estimation_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &dst); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11615,9 +14733,9 @@ void HP_clif_skill_estimation(struct map_session_data *sd, struct block_list *ds { HPMHooks.source.clif.skill_estimation(sd, dst); } - if( HPMHooks.count.HP_clif_skill_estimation_post ) { + if (HPMHooks.count.HP_clif_skill_estimation_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct block_list *dst); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_estimation_post; hIndex++ ) { + 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); } @@ -11626,14 +14744,14 @@ void HP_clif_skill_estimation(struct map_session_data *sd, struct block_list *ds } 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); + if (HPMHooks.count.HP_clif_skill_warppoint_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_warppoint_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &skill_id, &skill_lv, &map1, &map2, &map3, &map4); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11641,51 +14759,51 @@ void HP_clif_skill_warppoint(struct map_session_data *sd, uint16 skill_id, uint1 { 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++ ) { + if (HPMHooks.count.HP_clif_skill_warppoint_post > 0) { + 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); + 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) { +void HP_clif_useskill(struct block_list *bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, uint16 skill_lv, 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); + if (HPMHooks.count.HP_clif_useskill_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *src_id, int *dst_id, int *dst_x, int *dst_y, uint16 *skill_id, uint16 *skill_lv, int *casttime); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_useskill_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_useskill_pre[hIndex].func; + preHookFunc(&bl, &src_id, &dst_id, &dst_x, &dst_y, &skill_id, &skill_lv, &casttime); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.skillcasting(bl, src_id, dst_id, dst_x, dst_y, skill_id, property, casttime); + HPMHooks.source.clif.useskill(bl, src_id, dst_id, dst_x, dst_y, skill_id, skill_lv, 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); + if (HPMHooks.count.HP_clif_useskill_post > 0) { + void (*postHookFunc) (struct block_list *bl, int src_id, int dst_id, int dst_x, int dst_y, uint16 skill_id, uint16 skill_lv, int casttime); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_useskill_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_useskill_post[hIndex].func; + postHookFunc(bl, src_id, dst_id, dst_x, dst_y, skill_id, skill_lv, 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); + if (HPMHooks.count.HP_clif_produce_effect_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_produce_effect_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &flag, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11693,25 +14811,25 @@ void HP_clif_produce_effect(struct map_session_data *sd, int flag, int nameid) { { 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++ ) { + if (HPMHooks.count.HP_clif_produce_effect_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_devotion_pre > 0) { + void (*preHookFunc) (struct block_list **src, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_devotion_pre[hIndex].func; - preHookFunc(src, tsd); + preHookFunc(&src, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11719,9 +14837,9 @@ void HP_clif_devotion(struct block_list *src, struct map_session_data *tsd) { { HPMHooks.source.clif.devotion(src, tsd); } - if( HPMHooks.count.HP_clif_devotion_post ) { + if (HPMHooks.count.HP_clif_devotion_post > 0) { void (*postHookFunc) (struct block_list *src, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_devotion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_devotion_post[hIndex].func; postHookFunc(src, tsd); } @@ -11730,14 +14848,14 @@ void HP_clif_devotion(struct block_list *src, struct map_session_data *tsd) { } void HP_clif_spiritball(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_spiritball_pre ) { - void (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_clif_spiritball_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_spiritball_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11745,9 +14863,9 @@ void HP_clif_spiritball(struct block_list *bl) { { HPMHooks.source.clif.spiritball(bl); } - if( HPMHooks.count.HP_clif_spiritball_post ) { + if (HPMHooks.count.HP_clif_spiritball_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_spiritball_post[hIndex].func; postHookFunc(bl); } @@ -11756,14 +14874,14 @@ void HP_clif_spiritball(struct block_list *bl) { } 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); + if (HPMHooks.count.HP_clif_spiritball_single_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritball_single_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11771,25 +14889,25 @@ void HP_clif_spiritball_single(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_spiritball_single_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_bladestop_pre > 0) { + void (*preHookFunc) (struct block_list **src, int *dst_id, int *active); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bladestop_pre; hIndex++ ) { + 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); + preHookFunc(&src, &dst_id, &active); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11797,25 +14915,25 @@ void HP_clif_bladestop(struct block_list *src, int dst_id, int active) { { 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++ ) { + if (HPMHooks.count.HP_clif_bladestop_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_mvp_effect_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_mvp_effect_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11823,9 +14941,9 @@ void HP_clif_mvp_effect(struct map_session_data *sd) { { HPMHooks.source.clif.mvp_effect(sd); } - if( HPMHooks.count.HP_clif_mvp_effect_post ) { + if (HPMHooks.count.HP_clif_mvp_effect_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mvp_effect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_mvp_effect_post[hIndex].func; postHookFunc(sd); } @@ -11834,14 +14952,14 @@ void HP_clif_mvp_effect(struct map_session_data *sd) { } void HP_clif_heal(int fd, int type, int val) { int hIndex = 0; - if( HPMHooks.count.HP_clif_heal_pre ) { + if (HPMHooks.count.HP_clif_heal_pre > 0) { void (*preHookFunc) (int *fd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_heal_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11849,25 +14967,25 @@ void HP_clif_heal(int fd, int type, int val) { { 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++ ) { + if (HPMHooks.count.HP_clif_heal_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_resurrection_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_resurrection_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_resurrection_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_resurrection_pre[hIndex].func; - preHookFunc(bl, &type); + preHookFunc(&bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11875,25 +14993,25 @@ void HP_clif_resurrection(struct block_list *bl, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_resurrection_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_refine_pre > 0) { void (*preHookFunc) (int *fd, int *fail, int *index, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_refine_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11901,25 +15019,25 @@ void HP_clif_refine(int fd, int fail, int index, int val) { { 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++ ) { + if (HPMHooks.count.HP_clif_refine_post > 0) { + 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); + postHookFunc(fd, fail, index, val); } } return; } void HP_clif_weather(int16 m) { int hIndex = 0; - if( HPMHooks.count.HP_clif_weather_pre ) { + if (HPMHooks.count.HP_clif_weather_pre > 0) { void (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11927,25 +15045,25 @@ void HP_clif_weather(int16 m) { { 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++ ) { + if (HPMHooks.count.HP_clif_weather_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_specialeffect_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *type, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_specialeffect_pre[hIndex].func; - preHookFunc(bl, &type, &target); + preHookFunc(&bl, &type, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11953,25 +15071,25 @@ void HP_clif_specialeffect(struct block_list *bl, int type, enum send_target tar { 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++ ) { + if (HPMHooks.count.HP_clif_specialeffect_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_specialeffect_single_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *type, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_single_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &type, &fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -11979,25 +15097,25 @@ void HP_clif_specialeffect_single(struct block_list *bl, int type, int fd) { { 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++ ) { + if (HPMHooks.count.HP_clif_specialeffect_single_post > 0) { + 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); + postHookFunc(bl, type, fd); } } return; } -void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, send_target target) { +void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, uint64 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); + if (HPMHooks.count.HP_clif_specialeffect_value_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *effect_id, uint64 *num, send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &effect_id, &num, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12005,25 +15123,103 @@ void HP_clif_specialeffect_value(struct block_list *bl, int effect_id, int num, { 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++ ) { + if (HPMHooks.count.HP_clif_specialeffect_value_post > 0) { + void (*postHookFunc) (struct block_list *bl, int effect_id, uint64 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); + postHookFunc(bl, effect_id, num, target); + } + } + return; +} +void HP_clif_specialeffect_value_single(struct block_list *bl, int effect_id, uint64 num, int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_specialeffect_value_single_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *effect_id, uint64 *num, int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_single_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_specialeffect_value_single_pre[hIndex].func; + preHookFunc(&bl, &effect_id, &num, &fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.specialeffect_value_single(bl, effect_id, num, fd); + } + if (HPMHooks.count.HP_clif_specialeffect_value_single_post > 0) { + void (*postHookFunc) (struct block_list *bl, int effect_id, uint64 num, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_specialeffect_value_single_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_specialeffect_value_single_post[hIndex].func; + postHookFunc(bl, effect_id, num, fd); + } + } + return; +} +void HP_clif_removeSpecialEffect(struct block_list *bl, int effectId, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_removeSpecialEffect_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *effectId, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_pre[hIndex].func; + preHookFunc(&bl, &effectId, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.removeSpecialEffect(bl, effectId, target); + } + if (HPMHooks.count.HP_clif_removeSpecialEffect_post > 0) { + void (*postHookFunc) (struct block_list *bl, int effectId, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_post[hIndex].func; + postHookFunc(bl, effectId, target); + } + } + return; +} +void HP_clif_removeSpecialEffect_single(struct block_list *bl, int effectId, struct block_list *targetBl) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_removeSpecialEffect_single_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *effectId, struct block_list **targetBl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_single_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_single_pre[hIndex].func; + preHookFunc(&bl, &effectId, &targetBl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.removeSpecialEffect_single(bl, effectId, targetBl); + } + if (HPMHooks.count.HP_clif_removeSpecialEffect_single_post > 0) { + void (*postHookFunc) (struct block_list *bl, int effectId, struct block_list *targetBl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_removeSpecialEffect_single_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_removeSpecialEffect_single_post[hIndex].func; + postHookFunc(bl, effectId, targetBl); } } return; } void HP_clif_millenniumshield(struct block_list *bl, short shields) { int hIndex = 0; - if( HPMHooks.count.HP_clif_millenniumshield_pre ) { - void (*preHookFunc) (struct block_list *bl, short *shields); + if (HPMHooks.count.HP_clif_millenniumshield_pre > 0) { + void (*preHookFunc) (struct block_list **bl, short *shields); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_millenniumshield_pre[hIndex].func; - preHookFunc(bl, &shields); + preHookFunc(&bl, &shields); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12031,25 +15227,25 @@ void HP_clif_millenniumshield(struct block_list *bl, short shields) { { HPMHooks.source.clif.millenniumshield(bl, shields); } - if( HPMHooks.count.HP_clif_millenniumshield_post ) { - void (*postHookFunc) (struct block_list *bl, short *shields); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_millenniumshield_post > 0) { + void (*postHookFunc) (struct block_list *bl, short shields); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_millenniumshield_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_millenniumshield_post[hIndex].func; - postHookFunc(bl, &shields); + postHookFunc(bl, shields); } } return; } void HP_clif_spiritcharm(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_spiritcharm_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_spiritcharm_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritcharm_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritcharm_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_spiritcharm_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12057,9 +15253,9 @@ void HP_clif_spiritcharm(struct map_session_data *sd) { { HPMHooks.source.clif.spiritcharm(sd); } - if( HPMHooks.count.HP_clif_spiritcharm_post ) { + if (HPMHooks.count.HP_clif_spiritcharm_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritcharm_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_spiritcharm_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_spiritcharm_post[hIndex].func; postHookFunc(sd); } @@ -12068,14 +15264,14 @@ void HP_clif_spiritcharm(struct map_session_data *sd) { } void HP_clif_charm_single(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_charm_single_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_charm_single_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_single_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12083,25 +15279,25 @@ void HP_clif_charm_single(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.charm_single(fd, sd); } - if( HPMHooks.count.HP_clif_charm_single_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_charm_single_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_charm_single_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + 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); + postHookFunc(fd, sd); } } 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); + if (HPMHooks.count.HP_clif_snap_pre > 0) { + void (*preHookFunc) (struct block_list **bl, short *x, short *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_snap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_snap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_snap_pre[hIndex].func; - preHookFunc(bl, &x, &y); + preHookFunc(&bl, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12109,25 +15305,25 @@ void HP_clif_snap(struct block_list *bl, short x, short y) { { 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++ ) { + if (HPMHooks.count.HP_clif_snap_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_weather_check_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_weather_check_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12135,9 +15331,9 @@ void HP_clif_weather_check(struct map_session_data *sd) { { HPMHooks.source.clif.weather_check(sd); } - if( HPMHooks.count.HP_clif_weather_check_post ) { + if (HPMHooks.count.HP_clif_weather_check_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_weather_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_weather_check_post[hIndex].func; postHookFunc(sd); } @@ -12146,14 +15342,14 @@ void HP_clif_weather_check(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_playBGM_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_playBGM_pre[hIndex].func; - preHookFunc(sd, name); + preHookFunc(&sd, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12161,9 +15357,9 @@ void HP_clif_playBGM(struct map_session_data *sd, const char *name) { { HPMHooks.source.clif.playBGM(sd, name); } - if( HPMHooks.count.HP_clif_playBGM_post ) { + if (HPMHooks.count.HP_clif_playBGM_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_playBGM_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_playBGM_post[hIndex].func; postHookFunc(sd, name); } @@ -12172,14 +15368,14 @@ void HP_clif_playBGM(struct map_session_data *sd, const char *name) { } 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); + if (HPMHooks.count.HP_clif_soundeffect_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, const char **name, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffect_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &bl, &name, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12187,25 +15383,25 @@ void HP_clif_soundeffect(struct map_session_data *sd, struct block_list *bl, con { 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++ ) { + if (HPMHooks.count.HP_clif_soundeffect_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_soundeffectall_pre > 0) { + void (*preHookFunc) (struct block_list **bl, const char **name, int *type, enum send_target *coverage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_soundeffectall_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &name, &type, &coverage); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12213,25 +15409,25 @@ void HP_clif_soundeffectall(struct block_list *bl, const char *name, int type, e { 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++ ) { + if (HPMHooks.count.HP_clif_soundeffectall_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_GlobalMessage_pre > 0) { + void (*preHookFunc) (struct block_list **bl, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_GlobalMessage_pre[hIndex].func; - preHookFunc(bl, message); + preHookFunc(&bl, &message); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12239,9 +15435,9 @@ void HP_clif_GlobalMessage(struct block_list *bl, const char *message) { { HPMHooks.source.clif.GlobalMessage(bl, message); } - if( HPMHooks.count.HP_clif_GlobalMessage_post ) { + if (HPMHooks.count.HP_clif_GlobalMessage_post > 0) { void (*postHookFunc) (struct block_list *bl, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_GlobalMessage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_GlobalMessage_post[hIndex].func; postHookFunc(bl, message); } @@ -12250,14 +15446,14 @@ void HP_clif_GlobalMessage(struct block_list *bl, const char *message) { } 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); + if (HPMHooks.count.HP_clif_createchat_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_createchat_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_createchat_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_createchat_pre[hIndex].func; - preHookFunc(sd, &flag); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12265,25 +15461,25 @@ void HP_clif_createchat(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_createchat_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_dispchat_pre > 0) { + void (*preHookFunc) (struct chat_data **cd, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dispchat_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_dispchat_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_dispchat_pre[hIndex].func; - preHookFunc(cd, &fd); + preHookFunc(&cd, &fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12291,25 +15487,25 @@ void HP_clif_dispchat(struct chat_data *cd, int fd) { { 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++ ) { + if (HPMHooks.count.HP_clif_dispchat_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_joinchatfail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatfail_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatfail_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_joinchatfail_pre[hIndex].func; - preHookFunc(sd, &flag); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12317,25 +15513,25 @@ void HP_clif_joinchatfail(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_joinchatfail_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_joinchatok_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_joinchatok_pre[hIndex].func; - preHookFunc(sd, cd); + preHookFunc(&sd, &cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12343,9 +15539,9 @@ void HP_clif_joinchatok(struct map_session_data *sd, struct chat_data *cd) { { HPMHooks.source.clif.joinchatok(sd, cd); } - if( HPMHooks.count.HP_clif_joinchatok_post ) { + if (HPMHooks.count.HP_clif_joinchatok_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_joinchatok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_joinchatok_post[hIndex].func; postHookFunc(sd, cd); } @@ -12354,14 +15550,14 @@ void HP_clif_joinchatok(struct map_session_data *sd, struct chat_data *cd) { } 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); + if (HPMHooks.count.HP_clif_addchat_pre > 0) { + void (*preHookFunc) (struct chat_data **cd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_addchat_pre[hIndex].func; - preHookFunc(cd, sd); + preHookFunc(&cd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12369,9 +15565,9 @@ void HP_clif_addchat(struct chat_data *cd, struct map_session_data *sd) { { HPMHooks.source.clif.addchat(cd, sd); } - if( HPMHooks.count.HP_clif_addchat_post ) { + if (HPMHooks.count.HP_clif_addchat_post > 0) { void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addchat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_addchat_post[hIndex].func; postHookFunc(cd, sd); } @@ -12380,14 +15576,14 @@ void HP_clif_addchat(struct chat_data *cd, struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_changechatowner_pre > 0) { + void (*preHookFunc) (struct chat_data **cd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatowner_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatowner_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_changechatowner_pre[hIndex].func; - preHookFunc(cd, sd); + preHookFunc(&cd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12395,25 +15591,51 @@ void HP_clif_changechatowner(struct chat_data *cd, struct map_session_data *sd) { HPMHooks.source.clif.changechatowner(cd, sd); } - if( HPMHooks.count.HP_clif_changechatowner_post ) { + if (HPMHooks.count.HP_clif_changechatowner_post > 0) { void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatowner_post; hIndex++ ) { + 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_chatRoleChange(struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_chatRoleChange_pre > 0) { + void (*preHookFunc) (struct chat_data **cd, struct map_session_data **sd, struct block_list **bl, int *isNotOwner); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatRoleChange_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_chatRoleChange_pre[hIndex].func; + preHookFunc(&cd, &sd, &bl, &isNotOwner); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.chatRoleChange(cd, sd, bl, isNotOwner); + } + if (HPMHooks.count.HP_clif_chatRoleChange_post > 0) { + void (*postHookFunc) (struct chat_data *cd, struct map_session_data *sd, struct block_list *bl, int isNotOwner); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_chatRoleChange_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_chatRoleChange_post[hIndex].func; + postHookFunc(cd, sd, bl, isNotOwner); + } + } + 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); + if (HPMHooks.count.HP_clif_clearchat_pre > 0) { + void (*preHookFunc) (struct chat_data **cd, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchat_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clearchat_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_clearchat_pre[hIndex].func; - preHookFunc(cd, &fd); + preHookFunc(&cd, &fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12421,25 +15643,25 @@ void HP_clif_clearchat(struct chat_data *cd, int fd) { { 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++ ) { + if (HPMHooks.count.HP_clif_clearchat_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_leavechat_pre > 0) { + void (*preHookFunc) (struct chat_data **cd, struct map_session_data **sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_leavechat_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_leavechat_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_leavechat_pre[hIndex].func; - preHookFunc(cd, sd, &flag); + preHookFunc(&cd, &sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12447,25 +15669,25 @@ void HP_clif_leavechat(struct chat_data *cd, struct map_session_data *sd, bool f { 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++ ) { + if (HPMHooks.count.HP_clif_leavechat_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_changechatstatus_pre > 0) { + void (*preHookFunc) (struct chat_data **cd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatstatus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatstatus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_changechatstatus_pre[hIndex].func; - preHookFunc(cd); + preHookFunc(&cd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12473,25 +15695,25 @@ void HP_clif_changechatstatus(struct chat_data *cd) { { HPMHooks.source.clif.changechatstatus(cd); } - if( HPMHooks.count.HP_clif_changechatstatus_post ) { + if (HPMHooks.count.HP_clif_changechatstatus_post > 0) { void (*postHookFunc) (struct chat_data *cd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_changechatstatus_post; hIndex++ ) { + 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, size_t mes_len) { +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, size_t *mes_len); + if (HPMHooks.count.HP_clif_wis_message_pre > 0) { + void (*preHookFunc) (int *fd, const char **nick, const char **mes, int *mes_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_message_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &nick, &mes, &mes_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12499,25 +15721,25 @@ void HP_clif_wis_message(int fd, const char *nick, const char *mes, size_t mes_l { 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, size_t *mes_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_message_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_wis_message_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_wis_end_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wis_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12525,51 +15747,51 @@ void HP_clif_wis_end(int fd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_wis_end_post > 0) { + 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); + postHookFunc(fd, flag); } } return; } -void HP_clif_disp_message(struct block_list *src, const char *mes, size_t len, enum send_target target) { +void HP_clif_disp_message(struct block_list *src, const char *mes, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_disp_message_pre ) { - void (*preHookFunc) (struct block_list *src, const char *mes, size_t *len, enum send_target *target); + if (HPMHooks.count.HP_clif_disp_message_pre > 0) { + void (*preHookFunc) (struct block_list **src, const char **mes, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_message_pre; hIndex++ ) { + 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); + preHookFunc(&src, &mes, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.disp_message(src, mes, len, target); + HPMHooks.source.clif.disp_message(src, mes, target); } - if( HPMHooks.count.HP_clif_disp_message_post ) { - void (*postHookFunc) (struct block_list *src, const char *mes, size_t *len, enum send_target *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_message_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_disp_message_post > 0) { + void (*postHookFunc) (struct block_list *src, const char *mes, 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); + postHookFunc(src, mes, target); } } return; } -void HP_clif_broadcast(struct block_list *bl, const char *mes, size_t len, int type, enum send_target target) { +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, size_t *len, int *type, enum send_target *target); + if (HPMHooks.count.HP_clif_broadcast_pre > 0) { + void (*preHookFunc) (struct block_list **bl, const char **mes, int *len, int *type, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &mes, &len, &type, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12577,25 +15799,25 @@ void HP_clif_broadcast(struct block_list *bl, const char *mes, size_t len, int t { 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, size_t *len, int *type, enum send_target *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_broadcast_post > 0) { + 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); + postHookFunc(bl, mes, len, type, target); } } return; } -void HP_clif_broadcast2(struct block_list *bl, const char *mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY, enum send_target target) { +void HP_clif_broadcast2(struct block_list *bl, const char *mes, int len, unsigned int 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, size_t *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target); + if (HPMHooks.count.HP_clif_broadcast2_pre > 0) { + void (*preHookFunc) (struct block_list **bl, const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast2_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &mes, &len, &fontColor, &fontType, &fontSize, &fontAlign, &fontY, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12603,25 +15825,25 @@ void HP_clif_broadcast2(struct block_list *bl, const char *mes, size_t len, unsi { 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, size_t *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY, enum send_target *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_broadcast2_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_broadcast2_post > 0) { + void (*postHookFunc) (struct block_list *bl, const char *mes, int len, unsigned int 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); + postHookFunc(bl, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, target); } } return; } void HP_clif_messagecolor_self(int fd, uint32 color, const char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_clif_messagecolor_self_pre ) { - void (*preHookFunc) (int *fd, uint32 *color, const char *msg); + if (HPMHooks.count.HP_clif_messagecolor_self_pre > 0) { + void (*preHookFunc) (int *fd, uint32 *color, const char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_messagecolor_self_pre[hIndex].func; - preHookFunc(&fd, &color, msg); + preHookFunc(&fd, &color, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12629,25 +15851,25 @@ void HP_clif_messagecolor_self(int fd, uint32 color, const char *msg) { { HPMHooks.source.clif.messagecolor_self(fd, color, msg); } - if( HPMHooks.count.HP_clif_messagecolor_self_post ) { - void (*postHookFunc) (int *fd, uint32 *color, const char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_messagecolor_self_post > 0) { + void (*postHookFunc) (int fd, uint32 color, const char *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_self_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_messagecolor_self_post[hIndex].func; - postHookFunc(&fd, &color, msg); + postHookFunc(fd, color, msg); } } return; } void HP_clif_messagecolor(struct block_list *bl, uint32 color, const char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_clif_messagecolor_pre ) { - void (*preHookFunc) (struct block_list *bl, uint32 *color, const char *msg); + if (HPMHooks.count.HP_clif_messagecolor_pre > 0) { + void (*preHookFunc) (struct block_list **bl, uint32 *color, const char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_messagecolor_pre[hIndex].func; - preHookFunc(bl, &color, msg); + preHookFunc(&bl, &color, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12655,51 +15877,103 @@ void HP_clif_messagecolor(struct block_list *bl, uint32 color, const char *msg) { HPMHooks.source.clif.messagecolor(bl, color, msg); } - if( HPMHooks.count.HP_clif_messagecolor_post ) { - void (*postHookFunc) (struct block_list *bl, uint32 *color, const char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messagecolor_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_messagecolor_post > 0) { + void (*postHookFunc) (struct block_list *bl, uint32 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); + postHookFunc(bl, color, msg); + } + } + return; +} +void HP_clif_serviceMessageColor(struct map_session_data *sd, uint32 color, const char *msg) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_serviceMessageColor_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint32 *color, const char **msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_serviceMessageColor_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_serviceMessageColor_pre[hIndex].func; + preHookFunc(&sd, &color, &msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.serviceMessageColor(sd, color, msg); + } + if (HPMHooks.count.HP_clif_serviceMessageColor_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint32 color, const char *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_serviceMessageColor_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_serviceMessageColor_post[hIndex].func; + postHookFunc(sd, color, msg); } } return; } -void HP_clif_disp_overhead(struct block_list *bl, const char *mes) { +void HP_clif_disp_overhead(struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl) { int hIndex = 0; - if( HPMHooks.count.HP_clif_disp_overhead_pre ) { - void (*preHookFunc) (struct block_list *bl, const char *mes); + if (HPMHooks.count.HP_clif_disp_overhead_pre > 0) { + void (*preHookFunc) (struct block_list **bl, const char **mes, enum send_target *target, struct block_list **target_bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_disp_overhead_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &mes, &target, &target_bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.disp_overhead(bl, mes); + HPMHooks.source.clif.disp_overhead(bl, mes, target, target_bl); } - 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++ ) { + if (HPMHooks.count.HP_clif_disp_overhead_post > 0) { + void (*postHookFunc) (struct block_list *bl, const char *mes, enum send_target target, struct block_list *target_bl); + 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, target, target_bl); + } + } + return; +} +void HP_clif_notify_playerchat(struct block_list *bl, const char *mes) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_notify_playerchat_pre > 0) { + void (*preHookFunc) (struct block_list **bl, const char **mes); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_playerchat_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_notify_playerchat_pre[hIndex].func; + preHookFunc(&bl, &mes); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.notify_playerchat(bl, mes); + } + if (HPMHooks.count.HP_clif_notify_playerchat_post > 0) { + void (*postHookFunc) (struct block_list *bl, const char *mes); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_playerchat_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_notify_playerchat_post[hIndex].func; postHookFunc(bl, mes); } } return; } -void HP_clif_msgtable(struct map_session_data *sd, unsigned short msg_id) { +void HP_clif_msgtable(struct map_session_data *sd, enum clif_messages msg_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_msgtable_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned short *msg_id); + if (HPMHooks.count.HP_clif_msgtable_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum clif_messages *msg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_msgtable_pre[hIndex].func; - preHookFunc(sd, &msg_id); + preHookFunc(&sd, &msg_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12707,25 +15981,25 @@ void HP_clif_msgtable(struct map_session_data *sd, unsigned short msg_id) { { HPMHooks.source.clif.msgtable(sd, msg_id); } - if( HPMHooks.count.HP_clif_msgtable_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned short *msg_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_msgtable_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum clif_messages msg_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_msgtable_post[hIndex].func; - postHookFunc(sd, &msg_id); + postHookFunc(sd, msg_id); } } return; } -void HP_clif_msgtable_num(struct map_session_data *sd, unsigned short msg_id, int value) { +void HP_clif_msgtable_num(struct map_session_data *sd, enum clif_messages msg_id, int value) { int hIndex = 0; - if( HPMHooks.count.HP_clif_msgtable_num_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned short *msg_id, int *value); + if (HPMHooks.count.HP_clif_msgtable_num_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum clif_messages *msg_id, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_msgtable_num_pre[hIndex].func; - preHookFunc(sd, &msg_id, &value); + preHookFunc(&sd, &msg_id, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12733,25 +16007,25 @@ void HP_clif_msgtable_num(struct map_session_data *sd, unsigned short msg_id, in { HPMHooks.source.clif.msgtable_num(sd, msg_id, value); } - if( HPMHooks.count.HP_clif_msgtable_num_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned short *msg_id, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_msgtable_num_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum clif_messages msg_id, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_msgtable_num_post[hIndex].func; - postHookFunc(sd, &msg_id, &value); + postHookFunc(sd, msg_id, value); } } return; } -void HP_clif_msgtable_skill(struct map_session_data *sd, uint16 skill_id, int msg_id) { +void HP_clif_msgtable_skill(struct map_session_data *sd, uint16 skill_id, enum clif_messages msg_id) { int hIndex = 0; - if( HPMHooks.count.HP_clif_msgtable_skill_pre ) { - void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *msg_id); + if (HPMHooks.count.HP_clif_msgtable_skill_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, enum clif_messages *msg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_msgtable_skill_pre[hIndex].func; - preHookFunc(sd, &skill_id, &msg_id); + preHookFunc(&sd, &skill_id, &msg_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12759,25 +16033,103 @@ void HP_clif_msgtable_skill(struct map_session_data *sd, uint16 skill_id, int ms { HPMHooks.source.clif.msgtable_skill(sd, skill_id, msg_id); } - if( HPMHooks.count.HP_clif_msgtable_skill_post ) { - void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *msg_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_msgtable_skill_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id, enum clif_messages msg_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_skill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_msgtable_skill_post[hIndex].func; - postHookFunc(sd, &skill_id, &msg_id); + postHookFunc(sd, skill_id, msg_id); + } + } + return; +} +void HP_clif_msgtable_str(struct map_session_data *sd, enum clif_messages p1, const char *value) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_msgtable_str_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum clif_messages *p1, const char **value); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_str_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_str_pre[hIndex].func; + preHookFunc(&sd, &p1, &value); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msgtable_str(sd, p1, value); + } + if (HPMHooks.count.HP_clif_msgtable_str_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum clif_messages p1, const char *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_str_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_str_post[hIndex].func; + postHookFunc(sd, p1, value); + } + } + return; +} +void HP_clif_msgtable_str_color(struct map_session_data *sd, enum clif_messages p1, const char *value, uint32 color) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_msgtable_str_color_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum clif_messages *p1, const char **value, uint32 *color); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_str_color_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_str_color_pre[hIndex].func; + preHookFunc(&sd, &p1, &value, &color); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msgtable_str_color(sd, p1, value, color); + } + if (HPMHooks.count.HP_clif_msgtable_str_color_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum clif_messages p1, const char *value, uint32 color); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_str_color_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_str_color_post[hIndex].func; + postHookFunc(sd, p1, value, color); + } + } + return; +} +void HP_clif_msgtable_color(struct map_session_data *sd, enum clif_messages p1, uint32 color) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_msgtable_color_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum clif_messages *p1, uint32 *color); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_color_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_msgtable_color_pre[hIndex].func; + preHookFunc(&sd, &p1, &color); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.msgtable_color(sd, p1, color); + } + if (HPMHooks.count.HP_clif_msgtable_color_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum clif_messages p1, uint32 color); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_msgtable_color_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_msgtable_color_post[hIndex].func; + postHookFunc(sd, p1, color); } } 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); + if (HPMHooks.count.HP_clif_message_pre > 0) { + void (*preHookFunc) (const int *fd, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_message_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_message_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_message_pre[hIndex].func; - preHookFunc(&fd, mes); + preHookFunc(&fd, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12785,25 +16137,25 @@ void HP_clif_message(const int fd, const char *mes) { { 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++ ) { + if (HPMHooks.count.HP_clif_message_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_messageln_pre > 0) { + void (*preHookFunc) (const int *fd, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_messageln_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_messageln_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_messageln_pre[hIndex].func; - preHookFunc(&fd, mes); + preHookFunc(&fd, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12811,52 +16163,79 @@ void HP_clif_messageln(const int fd, const char *mes) { { 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++ ) { + if (HPMHooks.count.HP_clif_messageln_post > 0) { + 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); + postHookFunc(fd, mes); } } return; } -bool HP_clif_process_message(struct map_session_data *sd, int format, const char **name_, size_t *namelen_, const char **message_, size_t *messagelen_) { +const char* HP_clif_process_chat_message(struct map_session_data *sd, const struct packet_chat_message *packet, char *out_buf, int out_buflen) { + int hIndex = 0; + const char* retVal___ = NULL; + if (HPMHooks.count.HP_clif_process_chat_message_pre > 0) { + const char* (*preHookFunc) (struct map_session_data **sd, const struct packet_chat_message **packet, char **out_buf, int *out_buflen); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_chat_message_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_process_chat_message_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &packet, &out_buf, &out_buflen); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.process_chat_message(sd, packet, out_buf, out_buflen); + } + if (HPMHooks.count.HP_clif_process_chat_message_post > 0) { + const char* (*postHookFunc) (const char* retVal___, struct map_session_data *sd, const struct packet_chat_message *packet, char *out_buf, int out_buflen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_chat_message_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_process_chat_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, packet, out_buf, out_buflen); + } + } + return retVal___; +} +bool HP_clif_process_whisper_message(struct map_session_data *sd, const struct packet_whisper_message *packet, char *out_name, char *out_message, int out_messagelen) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_process_message_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *format, const char **name_, size_t *namelen_, const char **message_, size_t *messagelen_); + if (HPMHooks.count.HP_clif_process_whisper_message_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const struct packet_whisper_message **packet, char **out_name, char **out_message, int *out_messagelen); *HPMforce_return = false; - 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_); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_whisper_message_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_process_whisper_message_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &packet, &out_name, &out_message, &out_messagelen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.clif.process_message(sd, format, name_, namelen_, message_, messagelen_); + retVal___ = HPMHooks.source.clif.process_whisper_message(sd, packet, out_name, out_message, out_messagelen); } - if( HPMHooks.count.HP_clif_process_message_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *format, const char **name_, size_t *namelen_, const char **message_, size_t *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_); + if (HPMHooks.count.HP_clif_process_whisper_message_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct packet_whisper_message *packet, char *out_name, char *out_message, int out_messagelen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_process_whisper_message_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_process_whisper_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, packet, out_name, out_message, out_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); + if (HPMHooks.count.HP_clif_wisexin_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisexin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisexin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_wisexin_pre[hIndex].func; - preHookFunc(sd, &type, &flag); + preHookFunc(&sd, &type, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12864,25 +16243,25 @@ void HP_clif_wisexin(struct map_session_data *sd, int type, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_wisexin_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_wisall_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisall_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_wisall_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_wisall_pre[hIndex].func; - preHookFunc(sd, &type, &flag); + preHookFunc(&sd, &type, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12890,25 +16269,25 @@ void HP_clif_wisall(struct map_session_data *sd, int type, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_wisall_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_PMIgnoreList_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PMIgnoreList_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PMIgnoreList_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PMIgnoreList_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12916,51 +16295,51 @@ void HP_clif_PMIgnoreList(struct map_session_data *sd) { { HPMHooks.source.clif.PMIgnoreList(sd); } - if( HPMHooks.count.HP_clif_PMIgnoreList_post ) { + if (HPMHooks.count.HP_clif_PMIgnoreList_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PMIgnoreList_post; hIndex++ ) { + 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_ShowScript(struct block_list *bl, const char *message) { +void HP_clif_ShowScript(struct block_list *bl, const char *message, enum send_target target) { int hIndex = 0; - if( HPMHooks.count.HP_clif_ShowScript_pre ) { - void (*preHookFunc) (struct block_list *bl, const char *message); + if (HPMHooks.count.HP_clif_ShowScript_pre > 0) { + void (*preHookFunc) (struct block_list **bl, const char **message, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_ShowScript_pre[hIndex].func; - preHookFunc(bl, message); + preHookFunc(&bl, &message, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.ShowScript(bl, message); + HPMHooks.source.clif.ShowScript(bl, message, target); } - if( HPMHooks.count.HP_clif_ShowScript_post ) { - void (*postHookFunc) (struct block_list *bl, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_ShowScript_post > 0) { + void (*postHookFunc) (struct block_list *bl, const char *message, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ShowScript_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_ShowScript_post[hIndex].func; - postHookFunc(bl, message); + postHookFunc(bl, message, target); } } 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); + if (HPMHooks.count.HP_clif_traderequest_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_traderequest_pre[hIndex].func; - preHookFunc(sd, name); + preHookFunc(&sd, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12968,9 +16347,9 @@ void HP_clif_traderequest(struct map_session_data *sd, const char *name) { { HPMHooks.source.clif.traderequest(sd, name); } - if( HPMHooks.count.HP_clif_traderequest_post ) { + if (HPMHooks.count.HP_clif_traderequest_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_traderequest_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_traderequest_post[hIndex].func; postHookFunc(sd, name); } @@ -12979,14 +16358,14 @@ void HP_clif_traderequest(struct map_session_data *sd, const char *name) { } 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); + if (HPMHooks.count.HP_clif_tradestart_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint8 *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradestart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradestart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_tradestart_pre[hIndex].func; - preHookFunc(sd, &type); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -12994,25 +16373,25 @@ void HP_clif_tradestart(struct map_session_data *sd, uint8 type) { { 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++ ) { + if (HPMHooks.count.HP_clif_tradestart_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_tradeadditem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeadditem_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &tsd, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13020,25 +16399,25 @@ void HP_clif_tradeadditem(struct map_session_data *sd, struct map_session_data * { 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++ ) { + if (HPMHooks.count.HP_clif_tradeadditem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_tradeitemok_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *index, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeitemok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeitemok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_tradeitemok_pre[hIndex].func; - preHookFunc(sd, &index, &fail); + preHookFunc(&sd, &index, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13046,25 +16425,25 @@ void HP_clif_tradeitemok(struct map_session_data *sd, int index, int fail) { { 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++ ) { + if (HPMHooks.count.HP_clif_tradeitemok_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_tradedeal_lock_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradedeal_lock_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13072,25 +16451,25 @@ void HP_clif_tradedeal_lock(struct map_session_data *sd, int fail) { { 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++ ) { + if (HPMHooks.count.HP_clif_tradedeal_lock_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_tradecancelled_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_tradecancelled_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13098,9 +16477,9 @@ void HP_clif_tradecancelled(struct map_session_data *sd) { { HPMHooks.source.clif.tradecancelled(sd); } - if( HPMHooks.count.HP_clif_tradecancelled_post ) { + if (HPMHooks.count.HP_clif_tradecancelled_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecancelled_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_tradecancelled_post[hIndex].func; postHookFunc(sd); } @@ -13109,14 +16488,14 @@ void HP_clif_tradecancelled(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_tradecompleted_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecompleted_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradecompleted_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_tradecompleted_pre[hIndex].func; - preHookFunc(sd, &fail); + preHookFunc(&sd, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13124,25 +16503,25 @@ void HP_clif_tradecompleted(struct map_session_data *sd, int fail) { { 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++ ) { + if (HPMHooks.count.HP_clif_tradecompleted_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_tradeundo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_tradeundo_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13150,9 +16529,9 @@ void HP_clif_tradeundo(struct map_session_data *sd) { { HPMHooks.source.clif.tradeundo(sd); } - if( HPMHooks.count.HP_clif_tradeundo_post ) { + if (HPMHooks.count.HP_clif_tradeundo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_tradeundo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_tradeundo_post[hIndex].func; postHookFunc(sd); } @@ -13161,14 +16540,14 @@ void HP_clif_tradeundo(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_openvendingreq_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *num); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingreq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingreq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_openvendingreq_pre[hIndex].func; - preHookFunc(sd, &num); + preHookFunc(&sd, &num); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13176,25 +16555,25 @@ void HP_clif_openvendingreq(struct map_session_data *sd, int num) { { 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++ ) { + if (HPMHooks.count.HP_clif_openvendingreq_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_showvendingboard_pre > 0) { + void (*preHookFunc) (struct block_list **bl, const char **message, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_showvendingboard_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_showvendingboard_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_showvendingboard_pre[hIndex].func; - preHookFunc(bl, message, &fd); + preHookFunc(&bl, &message, &fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13202,25 +16581,25 @@ void HP_clif_showvendingboard(struct block_list *bl, const char *message, int fd { 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++ ) { + if (HPMHooks.count.HP_clif_showvendingboard_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_closevendingboard_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_closevendingboard_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_closevendingboard_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_closevendingboard_pre[hIndex].func; - preHookFunc(bl, &fd); + preHookFunc(&bl, &fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13228,25 +16607,25 @@ void HP_clif_closevendingboard(struct block_list *bl, int fd) { { 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++ ) { + if (HPMHooks.count.HP_clif_closevendingboard_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_vendinglist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned int *id, struct s_vending **vending_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendinglist_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &id, &vending_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13254,25 +16633,25 @@ void HP_clif_vendinglist(struct map_session_data *sd, unsigned int id, struct s_ { 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++ ) { + if (HPMHooks.count.HP_clif_vendinglist_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_buyvending_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *index, int *amount, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyvending_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &index, &amount, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13280,25 +16659,25 @@ void HP_clif_buyvending(struct map_session_data *sd, int index, int amount, int { 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++ ) { + if (HPMHooks.count.HP_clif_buyvending_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_openvending_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *id, struct s_vending **vending_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvending_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &id, &vending_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13306,77 +16685,207 @@ void HP_clif_openvending(struct map_session_data *sd, int id, struct s_vending * { 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++ ) { + if (HPMHooks.count.HP_clif_openvending_post > 0) { + 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); + postHookFunc(sd, id, vending_list); + } + } + return; +} +void HP_clif_openvendingAck(int fd, int result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_openvendingAck_pre > 0) { + void (*preHookFunc) (int *fd, int *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_openvendingAck_pre[hIndex].func; + preHookFunc(&fd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.openvendingAck(fd, result); + } + if (HPMHooks.count.HP_clif_openvendingAck_post > 0) { + void (*postHookFunc) (int fd, int result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openvendingAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_openvendingAck_post[hIndex].func; + postHookFunc(fd, result); } } return; } -void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount) { +void HP_clif_vendingreport(struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny) { int hIndex = 0; - if( HPMHooks.count.HP_clif_vendingreport_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + if (HPMHooks.count.HP_clif_vendingreport_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *index, int *amount, uint32 *char_id, int *zeny); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_vendingreport_pre[hIndex].func; - preHookFunc(sd, &index, &amount); + preHookFunc(&sd, &index, &amount, &char_id, &zeny); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.vendingreport(sd, index, amount); + HPMHooks.source.clif.vendingreport(sd, index, amount, char_id, zeny); } - 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++ ) { + if (HPMHooks.count.HP_clif_vendingreport_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int index, int amount, uint32 char_id, int zeny); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_vendingreport_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_vendingreport_post[hIndex].func; - postHookFunc(sd, &index, &amount); + postHookFunc(sd, index, amount, char_id, zeny); + } + } + 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 > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item **items, int *items_length); + *HPMforce_return = false; + 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 > 0) { + 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_guildStorageList(struct map_session_data *sd, struct item *items, int items_length) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guildStorageList_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item **items, int *items_length); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guildStorageList_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guildStorageList_pre[hIndex].func; + preHookFunc(&sd, &items, &items_length); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guildStorageList(sd, items, items_length); + } + if (HPMHooks.count.HP_clif_guildStorageList_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item *items, int items_length); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guildStorageList_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guildStorageList_post[hIndex].func; + postHookFunc(sd, items, items_length); + } + } + return; +} +void HP_clif_storageItems(struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_storageItems_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type, struct item **items, int *items_length); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_storageItems_pre[hIndex].func; + preHookFunc(&sd, &type, &items, &items_length); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.storageItems(sd, type, items, items_length); + } + if (HPMHooks.count.HP_clif_storageItems_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type, struct item *items, int items_length); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_storageItems_post[hIndex].func; + postHookFunc(sd, type, items, items_length); + } + } + return; +} +void HP_clif_inventoryStart(struct map_session_data *sd, enum inventory_type type, const char *name) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_inventoryStart_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type, const char **name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryStart_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryStart_pre[hIndex].func; + preHookFunc(&sd, &type, &name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.inventoryStart(sd, type, name); + } + if (HPMHooks.count.HP_clif_inventoryStart_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryStart_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryStart_post[hIndex].func; + postHookFunc(sd, type, name); } } return; } -void HP_clif_storagelist(struct map_session_data *sd, struct item *items, int items_length) { +void HP_clif_inventoryEnd(struct map_session_data *sd, enum inventory_type type) { int hIndex = 0; - if( HPMHooks.count.HP_clif_storagelist_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct item *items, int *items_length); + if (HPMHooks.count.HP_clif_inventoryEnd_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum inventory_type *type); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryEnd_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_inventoryEnd_pre[hIndex].func; + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.storagelist(sd, items, items_length); + HPMHooks.source.clif.inventoryEnd(sd, type); } - 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); + if (HPMHooks.count.HP_clif_inventoryEnd_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum inventory_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_inventoryEnd_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_inventoryEnd_post[hIndex].func; + postHookFunc(sd, type); } } 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); + if (HPMHooks.count.HP_clif_updatestorageamount_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *amount, int *max_amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_updatestorageamount_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &amount, &max_amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13384,25 +16893,25 @@ void HP_clif_updatestorageamount(struct map_session_data *sd, int amount, int ma { 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++ ) { + if (HPMHooks.count.HP_clif_updatestorageamount_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_storageitemadded_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item **i, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemadded_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &i, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13410,25 +16919,25 @@ void HP_clif_storageitemadded(struct map_session_data *sd, struct item *i, int i { 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++ ) { + if (HPMHooks.count.HP_clif_storageitemadded_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_storageitemremoved_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemremoved_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageitemremoved_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_storageitemremoved_pre[hIndex].func; - preHookFunc(sd, &index, &amount); + preHookFunc(&sd, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13436,25 +16945,25 @@ void HP_clif_storageitemremoved(struct map_session_data *sd, int index, int amou { 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++ ) { + if (HPMHooks.count.HP_clif_storageitemremoved_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_storageclose_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_storageclose_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13462,9 +16971,9 @@ void HP_clif_storageclose(struct map_session_data *sd) { { HPMHooks.source.clif.storageclose(sd); } - if( HPMHooks.count.HP_clif_storageclose_post ) { + if (HPMHooks.count.HP_clif_storageclose_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_storageclose_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_storageclose_post[hIndex].func; postHookFunc(sd); } @@ -13473,14 +16982,14 @@ void HP_clif_storageclose(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_skillinfoblock_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_skillinfoblock_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13488,9 +16997,9 @@ void HP_clif_skillinfoblock(struct map_session_data *sd) { { HPMHooks.source.clif.skillinfoblock(sd); } - if( HPMHooks.count.HP_clif_skillinfoblock_post ) { + if (HPMHooks.count.HP_clif_skillinfoblock_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfoblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_skillinfoblock_post[hIndex].func; postHookFunc(sd); } @@ -13499,14 +17008,14 @@ void HP_clif_skillinfoblock(struct map_session_data *sd) { } void HP_clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_skillup_pre ) { - void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *skill_lv, int *flag); + if (HPMHooks.count.HP_clif_skillup_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, int *skill_lv, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_skillup_pre[hIndex].func; - preHookFunc(sd, &skill_id, &skill_lv, &flag); + preHookFunc(&sd, &skill_id, &skill_lv, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13514,25 +17023,25 @@ void HP_clif_skillup(struct map_session_data *sd, uint16 skill_id, int skill_lv, { HPMHooks.source.clif.skillup(sd, skill_id, skill_lv, flag); } - if( HPMHooks.count.HP_clif_skillup_post ) { - void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *skill_lv, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_skillup_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint16 skill_id, int skill_lv, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_skillup_post[hIndex].func; - postHookFunc(sd, &skill_id, &skill_lv, &flag); + postHookFunc(sd, skill_id, skill_lv, flag); } } 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); + if (HPMHooks.count.HP_clif_skillinfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *inf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_skillinfo_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &skill_id, &inf); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13540,25 +17049,25 @@ void HP_clif_skillinfo(struct map_session_data *sd, int skill_id, int inf) { { 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++ ) { + if (HPMHooks.count.HP_clif_skillinfo_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_addskill_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_addskill_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_addskill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_addskill_pre[hIndex].func; - preHookFunc(sd, &id); + preHookFunc(&sd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13566,25 +17075,25 @@ void HP_clif_addskill(struct map_session_data *sd, int id) { { 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++ ) { + if (HPMHooks.count.HP_clif_addskill_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_deleteskill_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_deleteskill_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_deleteskill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_deleteskill_pre[hIndex].func; - preHookFunc(sd, &id); + preHookFunc(&sd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13592,25 +17101,51 @@ void HP_clif_deleteskill(struct map_session_data *sd, int id) { { 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++ ) { + if (HPMHooks.count.HP_clif_deleteskill_post > 0) { + 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); + postHookFunc(sd, id); + } + } + return; +} +void HP_clif_playerSkillToPacket(struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_playerSkillToPacket_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct SKILLDATA **skillData, int *skillId, int *idx, bool *newSkill); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_playerSkillToPacket_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_playerSkillToPacket_pre[hIndex].func; + preHookFunc(&sd, &skillData, &skillId, &idx, &newSkill); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.playerSkillToPacket(sd, skillData, skillId, idx, newSkill); + } + if (HPMHooks.count.HP_clif_playerSkillToPacket_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct SKILLDATA *skillData, int skillId, int idx, bool newSkill); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_playerSkillToPacket_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_playerSkillToPacket_post[hIndex].func; + postHookFunc(sd, skillData, skillId, idx, newSkill); } } 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); + if (HPMHooks.count.HP_clif_party_created_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_created_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13618,25 +17153,25 @@ void HP_clif_party_created(struct map_session_data *sd, int result) { { 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++ ) { + if (HPMHooks.count.HP_clif_party_created_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_party_member_info_pre > 0) { + void (*preHookFunc) (struct party_data **p, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_member_info_pre; hIndex++ ) { + 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); + preHookFunc(&p, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13644,9 +17179,9 @@ void HP_clif_party_member_info(struct party_data *p, struct map_session_data *sd { HPMHooks.source.clif.party_member_info(p, sd); } - if( HPMHooks.count.HP_clif_party_member_info_post ) { + if (HPMHooks.count.HP_clif_party_member_info_post > 0) { void (*postHookFunc) (struct party_data *p, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_member_info_post; hIndex++ ) { + 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); } @@ -13655,14 +17190,14 @@ void HP_clif_party_member_info(struct party_data *p, struct map_session_data *sd } 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); + if (HPMHooks.count.HP_clif_party_info_pre > 0) { + void (*preHookFunc) (struct party_data **p, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_info_pre; hIndex++ ) { + 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); + preHookFunc(&p, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13670,25 +17205,51 @@ void HP_clif_party_info(struct party_data *p, struct map_session_data *sd) { { HPMHooks.source.clif.party_info(p, sd); } - if( HPMHooks.count.HP_clif_party_info_post ) { + if (HPMHooks.count.HP_clif_party_info_post > 0) { void (*postHookFunc) (struct party_data *p, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_info_post; hIndex++ ) { + 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_job_and_level(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_party_job_and_level_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_job_and_level_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_party_job_and_level_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_job_and_level(sd); + } + if (HPMHooks.count.HP_clif_party_job_and_level_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_job_and_level_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_party_job_and_level_post[hIndex].func; + postHookFunc(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); + if (HPMHooks.count.HP_clif_party_invite_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_invite_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13696,9 +17257,9 @@ void HP_clif_party_invite(struct map_session_data *sd, struct map_session_data * { HPMHooks.source.clif.party_invite(sd, tsd); } - if( HPMHooks.count.HP_clif_party_invite_post ) { + if (HPMHooks.count.HP_clif_party_invite_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_invite_post; hIndex++ ) { + 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); } @@ -13707,14 +17268,14 @@ void HP_clif_party_invite(struct map_session_data *sd, struct map_session_data * } 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); + if (HPMHooks.count.HP_clif_party_inviteack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **nick, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_inviteack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &nick, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13722,25 +17283,25 @@ void HP_clif_party_inviteack(struct map_session_data *sd, const char *nick, int { 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++ ) { + if (HPMHooks.count.HP_clif_party_inviteack_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_party_option_pre > 0) { + void (*preHookFunc) (struct party_data **p, struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_option_pre; hIndex++ ) { + 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); + preHookFunc(&p, &sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13748,25 +17309,25 @@ void HP_clif_party_option(struct party_data *p, struct map_session_data *sd, int { 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++ ) { + if (HPMHooks.count.HP_clif_party_option_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_party_withdraw_pre > 0) { + void (*preHookFunc) (struct party_data **p, struct map_session_data **sd, int *account_id, const char **name, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_withdraw_pre; hIndex++ ) { + 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); + preHookFunc(&p, &sd, &account_id, &name, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13774,25 +17335,25 @@ void HP_clif_party_withdraw(struct party_data *p, struct map_session_data *sd, i { 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++ ) { + if (HPMHooks.count.HP_clif_party_withdraw_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_party_message_pre > 0) { + void (*preHookFunc) (struct party_data **p, int *account_id, const char **mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_message_pre; hIndex++ ) { + 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); + preHookFunc(&p, &account_id, &mes, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13800,25 +17361,25 @@ void HP_clif_party_message(struct party_data *p, int account_id, const char *mes { 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++ ) { + if (HPMHooks.count.HP_clif_party_message_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_party_xy_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_party_xy_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13826,9 +17387,9 @@ void HP_clif_party_xy(struct map_session_data *sd) { { HPMHooks.source.clif.party_xy(sd); } - if( HPMHooks.count.HP_clif_party_xy_post ) { + if (HPMHooks.count.HP_clif_party_xy_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_party_xy_post[hIndex].func; postHookFunc(sd); } @@ -13837,14 +17398,14 @@ void HP_clif_party_xy(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_party_xy_single_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_single_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13852,25 +17413,25 @@ void HP_clif_party_xy_single(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_party_xy_single_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_party_hp_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_party_hp_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13878,9 +17439,9 @@ void HP_clif_party_hp(struct map_session_data *sd) { { HPMHooks.source.clif.party_hp(sd); } - if( HPMHooks.count.HP_clif_party_hp_post ) { + if (HPMHooks.count.HP_clif_party_hp_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_hp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_party_hp_post[hIndex].func; postHookFunc(sd); } @@ -13889,14 +17450,14 @@ void HP_clif_party_hp(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_party_xy_remove_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_remove_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13904,9 +17465,9 @@ void HP_clif_party_xy_remove(struct map_session_data *sd) { { HPMHooks.source.clif.party_xy_remove(sd); } - if( HPMHooks.count.HP_clif_party_xy_remove_post ) { + if (HPMHooks.count.HP_clif_party_xy_remove_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_xy_remove_post; hIndex++ ) { + 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); } @@ -13915,14 +17476,14 @@ void HP_clif_party_xy_remove(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_party_show_picker_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item **item_data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_show_picker_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &item_data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13930,9 +17491,9 @@ void HP_clif_party_show_picker(struct map_session_data *sd, struct item *item_da { HPMHooks.source.clif.party_show_picker(sd, item_data); } - if( HPMHooks.count.HP_clif_party_show_picker_post ) { + if (HPMHooks.count.HP_clif_party_show_picker_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct item *item_data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_show_picker_post; hIndex++ ) { + 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); } @@ -13941,14 +17502,14 @@ void HP_clif_party_show_picker(struct map_session_data *sd, struct item *item_da } 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); + if (HPMHooks.count.HP_clif_partyinvitationstate_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_partyinvitationstate_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13956,9 +17517,9 @@ void HP_clif_partyinvitationstate(struct map_session_data *sd) { { HPMHooks.source.clif.partyinvitationstate(sd); } - if( HPMHooks.count.HP_clif_partyinvitationstate_post ) { + if (HPMHooks.count.HP_clif_partyinvitationstate_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_partyinvitationstate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_partyinvitationstate_post[hIndex].func; postHookFunc(sd); } @@ -13967,14 +17528,14 @@ void HP_clif_partyinvitationstate(struct map_session_data *sd) { } void HP_clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid, int new_leader_aid) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyLeaderChanged_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *prev_leader_aid, int *new_leader_aid); + if (HPMHooks.count.HP_clif_PartyLeaderChanged_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *prev_leader_aid, int *new_leader_aid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyLeaderChanged_pre[hIndex].func; - preHookFunc(sd, &prev_leader_aid, &new_leader_aid); + preHookFunc(&sd, &prev_leader_aid, &new_leader_aid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -13982,25 +17543,25 @@ void HP_clif_PartyLeaderChanged(struct map_session_data *sd, int prev_leader_aid { HPMHooks.source.clif.PartyLeaderChanged(sd, prev_leader_aid, new_leader_aid); } - if( HPMHooks.count.HP_clif_PartyLeaderChanged_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *prev_leader_aid, int *new_leader_aid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_PartyLeaderChanged_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int prev_leader_aid, int new_leader_aid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyLeaderChanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyLeaderChanged_post[hIndex].func; - postHookFunc(sd, &prev_leader_aid, &new_leader_aid); + postHookFunc(sd, prev_leader_aid, new_leader_aid); } } 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); + if (HPMHooks.count.HP_clif_guild_created_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_created_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14008,25 +17569,25 @@ void HP_clif_guild_created(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_guild_created_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_guild_belonginfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_belonginfo_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14034,9 +17595,9 @@ void HP_clif_guild_belonginfo(struct map_session_data *sd, struct guild *g) { { HPMHooks.source.clif.guild_belonginfo(sd, g); } - if( HPMHooks.count.HP_clif_guild_belonginfo_post ) { + if (HPMHooks.count.HP_clif_guild_belonginfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_belonginfo_post; hIndex++ ) { + 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); } @@ -14045,14 +17606,14 @@ void HP_clif_guild_belonginfo(struct map_session_data *sd, struct guild *g) { } 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); + if (HPMHooks.count.HP_clif_guild_masterormember_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_masterormember_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14060,9 +17621,9 @@ void HP_clif_guild_masterormember(struct map_session_data *sd) { { HPMHooks.source.clif.guild_masterormember(sd); } - if( HPMHooks.count.HP_clif_guild_masterormember_post ) { + if (HPMHooks.count.HP_clif_guild_masterormember_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_masterormember_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_masterormember_post[hIndex].func; postHookFunc(sd); } @@ -14071,14 +17632,14 @@ void HP_clif_guild_masterormember(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_guild_basicinfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_basicinfo_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14086,9 +17647,9 @@ void HP_clif_guild_basicinfo(struct map_session_data *sd) { { HPMHooks.source.clif.guild_basicinfo(sd); } - if( HPMHooks.count.HP_clif_guild_basicinfo_post ) { + if (HPMHooks.count.HP_clif_guild_basicinfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_basicinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_basicinfo_post[hIndex].func; postHookFunc(sd); } @@ -14097,14 +17658,14 @@ void HP_clif_guild_basicinfo(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_guild_allianceinfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_allianceinfo_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14112,25 +17673,77 @@ void HP_clif_guild_allianceinfo(struct map_session_data *sd) { { HPMHooks.source.clif.guild_allianceinfo(sd); } - if( HPMHooks.count.HP_clif_guild_allianceinfo_post ) { + if (HPMHooks.count.HP_clif_guild_allianceinfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceinfo_post; hIndex++ ) { + 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_castlelist(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_castlelist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castlelist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_castlelist_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_castlelist(sd); + } + if (HPMHooks.count.HP_clif_guild_castlelist_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castlelist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_castlelist_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_castleinfo(struct map_session_data *sd, struct guild_castle *gc) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_castleinfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct guild_castle **gc); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleinfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_castleinfo_pre[hIndex].func; + preHookFunc(&sd, &gc); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_castleinfo(sd, gc); + } + if (HPMHooks.count.HP_clif_guild_castleinfo_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct guild_castle *gc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleinfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_castleinfo_post[hIndex].func; + postHookFunc(sd, gc); + } + } + 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); + if (HPMHooks.count.HP_clif_guild_memberlist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_memberlist_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14138,9 +17751,9 @@ void HP_clif_guild_memberlist(struct map_session_data *sd) { { HPMHooks.source.clif.guild_memberlist(sd); } - if( HPMHooks.count.HP_clif_guild_memberlist_post ) { + if (HPMHooks.count.HP_clif_guild_memberlist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_memberlist_post[hIndex].func; postHookFunc(sd); } @@ -14149,14 +17762,14 @@ void HP_clif_guild_memberlist(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_guild_skillinfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_skillinfo_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14164,9 +17777,9 @@ void HP_clif_guild_skillinfo(struct map_session_data *sd) { { HPMHooks.source.clif.guild_skillinfo(sd); } - if( HPMHooks.count.HP_clif_guild_skillinfo_post ) { + if (HPMHooks.count.HP_clif_guild_skillinfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_skillinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_skillinfo_post[hIndex].func; postHookFunc(sd); } @@ -14175,14 +17788,14 @@ void HP_clif_guild_skillinfo(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_guild_send_onlineinfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_send_onlineinfo_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14190,9 +17803,9 @@ void HP_clif_guild_send_onlineinfo(struct map_session_data *sd) { { HPMHooks.source.clif.guild_send_onlineinfo(sd); } - if( HPMHooks.count.HP_clif_guild_send_onlineinfo_post ) { + if (HPMHooks.count.HP_clif_guild_send_onlineinfo_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_send_onlineinfo_post; hIndex++ ) { + 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); } @@ -14201,14 +17814,14 @@ void HP_clif_guild_send_onlineinfo(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_guild_memberlogin_notice_pre > 0) { + void (*preHookFunc) (struct guild **g, int *idx, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberlogin_notice_pre; hIndex++ ) { + 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); + preHookFunc(&g, &idx, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14216,25 +17829,25 @@ void HP_clif_guild_memberlogin_notice(struct guild *g, int idx, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_guild_memberlogin_notice_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_guild_invite_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_invite_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14242,9 +17855,9 @@ void HP_clif_guild_invite(struct map_session_data *sd, struct guild *g) { { HPMHooks.source.clif.guild_invite(sd, g); } - if( HPMHooks.count.HP_clif_guild_invite_post ) { + if (HPMHooks.count.HP_clif_guild_invite_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_invite_post; hIndex++ ) { + 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); } @@ -14253,14 +17866,14 @@ void HP_clif_guild_invite(struct map_session_data *sd, struct guild *g) { } 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); + if (HPMHooks.count.HP_clif_guild_inviteack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_inviteack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14268,77 +17881,77 @@ void HP_clif_guild_inviteack(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_guild_inviteack_post > 0) { + 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); + postHookFunc(sd, flag); } } return; } -void HP_clif_guild_leave(struct map_session_data *sd, const char *name, const char *mes) { +void HP_clif_guild_leave(struct map_session_data *sd, const char *name, int char_id, 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); + if (HPMHooks.count.HP_clif_guild_leave_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **name, int *char_id, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_leave_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &name, &char_id, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.guild_leave(sd, name, mes); + HPMHooks.source.clif.guild_leave(sd, name, char_id, 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++ ) { + if (HPMHooks.count.HP_clif_guild_leave_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const char *name, int char_id, 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); + postHookFunc(sd, name, char_id, mes); } } return; } -void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, const char *mes, int account_id) { +void HP_clif_guild_expulsion(struct map_session_data *sd, const char *name, int char_id, 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); + if (HPMHooks.count.HP_clif_guild_expulsion_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **name, int *char_id, const char **mes, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsion_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &name, &char_id, &mes, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.guild_expulsion(sd, name, mes, account_id); + HPMHooks.source.clif.guild_expulsion(sd, name, char_id, 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++ ) { + if (HPMHooks.count.HP_clif_guild_expulsion_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const char *name, int char_id, 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); + postHookFunc(sd, name, char_id, 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); + if (HPMHooks.count.HP_clif_guild_positionchanged_pre > 0) { + void (*preHookFunc) (struct guild **g, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionchanged_pre; hIndex++ ) { + 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); + preHookFunc(&g, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14346,25 +17959,25 @@ void HP_clif_guild_positionchanged(struct guild *g, int idx) { { 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++ ) { + if (HPMHooks.count.HP_clif_guild_positionchanged_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_guild_memberpositionchanged_pre > 0) { + void (*preHookFunc) (struct guild **g, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_memberpositionchanged_pre; hIndex++ ) { + 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); + preHookFunc(&g, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14372,25 +17985,25 @@ void HP_clif_guild_memberpositionchanged(struct guild *g, int idx) { { 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++ ) { + if (HPMHooks.count.HP_clif_guild_memberpositionchanged_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_guild_emblem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14398,9 +18011,9 @@ void HP_clif_guild_emblem(struct map_session_data *sd, struct guild *g) { { HPMHooks.source.clif.guild_emblem(sd, g); } - if( HPMHooks.count.HP_clif_guild_emblem_post ) { + if (HPMHooks.count.HP_clif_guild_emblem_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_post; hIndex++ ) { + 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); } @@ -14409,14 +18022,14 @@ void HP_clif_guild_emblem(struct map_session_data *sd, struct guild *g) { } 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); + if (HPMHooks.count.HP_clif_guild_emblem_area_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_area_pre; hIndex++ ) { + 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); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14424,9 +18037,9 @@ void HP_clif_guild_emblem_area(struct block_list *bl) { { HPMHooks.source.clif.guild_emblem_area(bl); } - if( HPMHooks.count.HP_clif_guild_emblem_area_post ) { + if (HPMHooks.count.HP_clif_guild_emblem_area_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_emblem_area_post; hIndex++ ) { + 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); } @@ -14435,14 +18048,14 @@ void HP_clif_guild_emblem_area(struct block_list *bl) { } 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); + if (HPMHooks.count.HP_clif_guild_notice_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_notice_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14450,9 +18063,9 @@ void HP_clif_guild_notice(struct map_session_data *sd, struct guild *g) { { HPMHooks.source.clif.guild_notice(sd, g); } - if( HPMHooks.count.HP_clif_guild_notice_post ) { + if (HPMHooks.count.HP_clif_guild_notice_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_notice_post; hIndex++ ) { + 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); } @@ -14461,14 +18074,14 @@ void HP_clif_guild_notice(struct map_session_data *sd, struct guild *g) { } 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); + if (HPMHooks.count.HP_clif_guild_message_pre > 0) { + void (*preHookFunc) (struct guild **g, int *account_id, const char **mes, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_message_pre; hIndex++ ) { + 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); + preHookFunc(&g, &account_id, &mes, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14476,25 +18089,25 @@ void HP_clif_guild_message(struct guild *g, int account_id, const char *mes, int { 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++ ) { + if (HPMHooks.count.HP_clif_guild_message_post > 0) { + 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); + postHookFunc(g, account_id, mes, len); } } return; } 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); + if (HPMHooks.count.HP_clif_guild_reqalliance_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *account_id, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_reqalliance_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &account_id, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14502,25 +18115,25 @@ void HP_clif_guild_reqalliance(struct map_session_data *sd, int account_id, cons { 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++ ) { + if (HPMHooks.count.HP_clif_guild_reqalliance_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_guild_allianceack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_allianceack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14528,25 +18141,25 @@ void HP_clif_guild_allianceack(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_guild_allianceack_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_guild_delalliance_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_delalliance_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &guild_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14554,25 +18167,25 @@ void HP_clif_guild_delalliance(struct map_session_data *sd, int guild_id, int fl { 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++ ) { + if (HPMHooks.count.HP_clif_guild_delalliance_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_guild_oppositionack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_oppositionack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14580,25 +18193,25 @@ void HP_clif_guild_oppositionack(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_guild_oppositionack_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_guild_broken_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_broken_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14606,25 +18219,25 @@ void HP_clif_guild_broken(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_guild_broken_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_guild_xy_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_xy_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14632,9 +18245,9 @@ void HP_clif_guild_xy(struct map_session_data *sd) { { HPMHooks.source.clif.guild_xy(sd); } - if( HPMHooks.count.HP_clif_guild_xy_post ) { + if (HPMHooks.count.HP_clif_guild_xy_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_xy_post[hIndex].func; postHookFunc(sd); } @@ -14643,14 +18256,14 @@ void HP_clif_guild_xy(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_guild_xy_single_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_single_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14658,25 +18271,25 @@ void HP_clif_guild_xy_single(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_guild_xy_single_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_guild_xy_remove_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_remove_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14684,9 +18297,9 @@ void HP_clif_guild_xy_remove(struct map_session_data *sd) { { HPMHooks.source.clif.guild_xy_remove(sd); } - if( HPMHooks.count.HP_clif_guild_xy_remove_post ) { + if (HPMHooks.count.HP_clif_guild_xy_remove_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_xy_remove_post; hIndex++ ) { + 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); } @@ -14695,14 +18308,14 @@ void HP_clif_guild_xy_remove(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_guild_positionnamelist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_positionnamelist_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14710,9 +18323,9 @@ void HP_clif_guild_positionnamelist(struct map_session_data *sd) { { HPMHooks.source.clif.guild_positionnamelist(sd); } - if( HPMHooks.count.HP_clif_guild_positionnamelist_post ) { + if (HPMHooks.count.HP_clif_guild_positionnamelist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positionnamelist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_positionnamelist_post[hIndex].func; postHookFunc(sd); } @@ -14721,14 +18334,14 @@ void HP_clif_guild_positionnamelist(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_guild_positioninfolist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_positioninfolist_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14736,9 +18349,9 @@ void HP_clif_guild_positioninfolist(struct map_session_data *sd) { { HPMHooks.source.clif.guild_positioninfolist(sd); } - if( HPMHooks.count.HP_clif_guild_positioninfolist_post ) { + if (HPMHooks.count.HP_clif_guild_positioninfolist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_positioninfolist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_guild_positioninfolist_post[hIndex].func; postHookFunc(sd); } @@ -14747,14 +18360,14 @@ void HP_clif_guild_positioninfolist(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_guild_expulsionlist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsionlist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsionlist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_guild_expulsionlist_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14762,26 +18375,78 @@ void HP_clif_guild_expulsionlist(struct map_session_data *sd) { { HPMHooks.source.clif.guild_expulsionlist(sd); } - if( HPMHooks.count.HP_clif_guild_expulsionlist_post ) { + if (HPMHooks.count.HP_clif_guild_expulsionlist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_expulsionlist_post; hIndex++ ) { + 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; } +void HP_clif_guild_set_position(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_set_position_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_set_position_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_set_position_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_set_position(sd); + } + if (HPMHooks.count.HP_clif_guild_set_position_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_set_position_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_set_position_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_guild_position_selected(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_position_selected_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_position_selected_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_position_selected_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_position_selected(sd); + } + if (HPMHooks.count.HP_clif_guild_position_selected_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_position_selected_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_position_selected_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} bool HP_clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_validate_emblem_pre ) { - bool (*preHookFunc) (const uint8 *emblem, unsigned long *emblem_len); + if (HPMHooks.count.HP_clif_validate_emblem_pre > 0) { + bool (*preHookFunc) (const uint8 **emblem, unsigned long *emblem_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_validate_emblem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&emblem, &emblem_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -14789,25 +18454,25 @@ bool HP_clif_validate_emblem(const uint8 *emblem, unsigned long emblem_len) { { 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++ ) { + if (HPMHooks.count.HP_clif_validate_emblem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_bg_hp_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_bg_hp_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14815,9 +18480,9 @@ void HP_clif_bg_hp(struct map_session_data *sd) { { HPMHooks.source.clif.bg_hp(sd); } - if( HPMHooks.count.HP_clif_bg_hp_post ) { + if (HPMHooks.count.HP_clif_bg_hp_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_hp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bg_hp_post[hIndex].func; postHookFunc(sd); } @@ -14826,14 +18491,14 @@ void HP_clif_bg_hp(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_bg_xy_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_bg_xy_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14841,9 +18506,9 @@ void HP_clif_bg_xy(struct map_session_data *sd) { { HPMHooks.source.clif.bg_xy(sd); } - if( HPMHooks.count.HP_clif_bg_xy_post ) { + if (HPMHooks.count.HP_clif_bg_xy_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bg_xy_post[hIndex].func; postHookFunc(sd); } @@ -14852,14 +18517,14 @@ void HP_clif_bg_xy(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_bg_xy_remove_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_remove_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14867,51 +18532,51 @@ void HP_clif_bg_xy_remove(struct map_session_data *sd) { { HPMHooks.source.clif.bg_xy_remove(sd); } - if( HPMHooks.count.HP_clif_bg_xy_remove_post ) { + if (HPMHooks.count.HP_clif_bg_xy_remove_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_xy_remove_post; hIndex++ ) { + 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, size_t len) { +void HP_clif_bg_message(struct battleground_data *bgd, int src_id, const char *name, const char *mes) { 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, size_t *len); + if (HPMHooks.count.HP_clif_bg_message_pre > 0) { + void (*preHookFunc) (struct battleground_data **bgd, int *src_id, const char **name, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_message_pre; hIndex++ ) { + 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); + preHookFunc(&bgd, &src_id, &name, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.bg_message(bgd, src_id, name, mes, len); + HPMHooks.source.clif.bg_message(bgd, src_id, name, mes); } - if( HPMHooks.count.HP_clif_bg_message_post ) { - void (*postHookFunc) (struct battleground_data *bgd, int *src_id, const char *name, const char *mes, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_message_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_bg_message_post > 0) { + void (*postHookFunc) (struct battleground_data *bgd, int src_id, const char *name, const char *mes); + 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); + postHookFunc(bgd, src_id, name, mes); } } return; } void HP_clif_bg_updatescore(int16 m) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bg_updatescore_pre ) { + if (HPMHooks.count.HP_clif_bg_updatescore_pre > 0) { void (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14919,25 +18584,25 @@ void HP_clif_bg_updatescore(int16 m) { { 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++ ) { + if (HPMHooks.count.HP_clif_bg_updatescore_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_bg_updatescore_single_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_single_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14945,9 +18610,9 @@ void HP_clif_bg_updatescore_single(struct map_session_data *sd) { { HPMHooks.source.clif.bg_updatescore_single(sd); } - if( HPMHooks.count.HP_clif_bg_updatescore_single_post ) { + if (HPMHooks.count.HP_clif_bg_updatescore_single_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bg_updatescore_single_post; hIndex++ ) { + 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); } @@ -14956,14 +18621,14 @@ void HP_clif_bg_updatescore_single(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_sendbgemblem_area_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_sendbgemblem_area_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14971,9 +18636,9 @@ void HP_clif_sendbgemblem_area(struct map_session_data *sd) { { HPMHooks.source.clif.sendbgemblem_area(sd); } - if( HPMHooks.count.HP_clif_sendbgemblem_area_post ) { + if (HPMHooks.count.HP_clif_sendbgemblem_area_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_area_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_sendbgemblem_area_post[hIndex].func; postHookFunc(sd); } @@ -14982,14 +18647,14 @@ void HP_clif_sendbgemblem_area(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_sendbgemblem_single_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendbgemblem_single_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -14997,11 +18662,11 @@ void HP_clif_sendbgemblem_single(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_sendbgemblem_single_post > 0) { + 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); + postHookFunc(fd, sd); } } return; @@ -15009,14 +18674,14 @@ void HP_clif_sendbgemblem_single(int fd, struct map_session_data *sd) { int HP_clif_instance(int instance_id, int type, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_instance_pre ) { + if (HPMHooks.count.HP_clif_instance_pre > 0) { int (*preHookFunc) (int *instance_id, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15024,25 +18689,25 @@ int HP_clif_instance(int instance_id, int type, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_instance_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_instance_join_pre > 0) { void (*preHookFunc) (int *fd, int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_join_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15050,25 +18715,25 @@ void HP_clif_instance_join(int fd, int instance_id) { { 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++ ) { + if (HPMHooks.count.HP_clif_instance_join_post > 0) { + 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); + postHookFunc(fd, instance_id); } } return; } void HP_clif_instance_leave(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_instance_leave_pre ) { + if (HPMHooks.count.HP_clif_instance_leave_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_instance_leave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15076,25 +18741,25 @@ void HP_clif_instance_leave(int fd) { { 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++ ) { + if (HPMHooks.count.HP_clif_instance_leave_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_catch_process_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_catch_process_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15102,9 +18767,9 @@ void HP_clif_catch_process(struct map_session_data *sd) { { HPMHooks.source.clif.catch_process(sd); } - if( HPMHooks.count.HP_clif_catch_process_post ) { + if (HPMHooks.count.HP_clif_catch_process_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_catch_process_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_catch_process_post[hIndex].func; postHookFunc(sd); } @@ -15113,14 +18778,14 @@ void HP_clif_catch_process(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_pet_roulette_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_roulette_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15128,25 +18793,25 @@ void HP_clif_pet_roulette(struct map_session_data *sd, int data) { { 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++ ) { + if (HPMHooks.count.HP_clif_pet_roulette_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_sendegg_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_sendegg_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15154,9 +18819,9 @@ void HP_clif_sendegg(struct map_session_data *sd) { { HPMHooks.source.clif.sendegg(sd); } - if( HPMHooks.count.HP_clif_sendegg_post ) { + if (HPMHooks.count.HP_clif_sendegg_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_sendegg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_sendegg_post[hIndex].func; postHookFunc(sd); } @@ -15165,14 +18830,14 @@ void HP_clif_sendegg(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_send_petstatus_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_send_petstatus_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15180,9 +18845,9 @@ void HP_clif_send_petstatus(struct map_session_data *sd) { { HPMHooks.source.clif.send_petstatus(sd); } - if( HPMHooks.count.HP_clif_send_petstatus_post ) { + if (HPMHooks.count.HP_clif_send_petstatus_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petstatus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_send_petstatus_post[hIndex].func; postHookFunc(sd); } @@ -15191,14 +18856,14 @@ void HP_clif_send_petstatus(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_send_petdata_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct pet_data **pd, int *type, int *param); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_petdata_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &pd, &type, ¶m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15206,25 +18871,25 @@ void HP_clif_send_petdata(struct map_session_data *sd, struct pet_data *pd, int { 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++ ) { + if (HPMHooks.count.HP_clif_send_petdata_post > 0) { + 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); + postHookFunc(sd, pd, type, param); } } 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); + if (HPMHooks.count.HP_clif_pet_emotion_pre > 0) { + void (*preHookFunc) (struct pet_data **pd, int *param); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_emotion_pre; hIndex++ ) { + 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); + preHookFunc(&pd, ¶m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15232,25 +18897,25 @@ void HP_clif_pet_emotion(struct pet_data *pd, int param) { { 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++ ) { + if (HPMHooks.count.HP_clif_pet_emotion_post > 0) { + 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); + postHookFunc(pd, param); } } 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); + if (HPMHooks.count.HP_clif_pet_food_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *foodid, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pet_food_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &foodid, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15258,11 +18923,11 @@ void HP_clif_pet_food(struct map_session_data *sd, int foodid, int fail) { { 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++ ) { + if (HPMHooks.count.HP_clif_pet_food_post > 0) { + 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); + postHookFunc(sd, foodid, fail); } } return; @@ -15270,16 +18935,16 @@ void HP_clif_pet_food(struct map_session_data *sd, int foodid, int fail) { int HP_clif_friendslist_toggle_sub(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_friendslist_toggle_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + if (HPMHooks.count.HP_clif_friendslist_toggle_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -15289,9 +18954,9 @@ int HP_clif_friendslist_toggle_sub(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.clif.friendslist_toggle_sub(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_clif_friendslist_toggle_sub_post ) { + if (HPMHooks.count.HP_clif_friendslist_toggle_sub_post > 0) { 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++ ) { + 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); @@ -15302,14 +18967,14 @@ int HP_clif_friendslist_toggle_sub(struct map_session_data *sd, va_list ap) { } 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); + if (HPMHooks.count.HP_clif_friendslist_send_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_friendslist_send_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15317,9 +18982,9 @@ void HP_clif_friendslist_send(struct map_session_data *sd) { { HPMHooks.source.clif.friendslist_send(sd); } - if( HPMHooks.count.HP_clif_friendslist_send_post ) { + if (HPMHooks.count.HP_clif_friendslist_send_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_send_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_friendslist_send_post[hIndex].func; postHookFunc(sd); } @@ -15328,14 +18993,14 @@ void HP_clif_friendslist_send(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_friendslist_reqack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **f_sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_reqack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &f_sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15343,25 +19008,25 @@ void HP_clif_friendslist_reqack(struct map_session_data *sd, struct map_session_ { 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++ ) { + if (HPMHooks.count.HP_clif_friendslist_reqack_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_friendslist_toggle_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *account_id, int *char_id, int *online); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendslist_toggle_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &account_id, &char_id, &online); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15369,25 +19034,25 @@ void HP_clif_friendslist_toggle(struct map_session_data *sd, int account_id, int { 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++ ) { + if (HPMHooks.count.HP_clif_friendslist_toggle_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_friendlist_req_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *account_id, int *char_id, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_friendlist_req_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &account_id, &char_id, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15395,25 +19060,25 @@ void HP_clif_friendlist_req(struct map_session_data *sd, int account_id, int cha { 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++ ) { + if (HPMHooks.count.HP_clif_friendlist_req_post > 0) { + 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); + postHookFunc(sd, account_id, char_id, name); } } return; } void HP_clif_GM_kickack(struct map_session_data *sd, int result) { int hIndex = 0; - if( HPMHooks.count.HP_clif_GM_kickack_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *result); + if (HPMHooks.count.HP_clif_GM_kickack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_GM_kickack_pre[hIndex].func; - preHookFunc(sd, &result); + preHookFunc(&sd, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15421,25 +19086,25 @@ void HP_clif_GM_kickack(struct map_session_data *sd, int result) { { HPMHooks.source.clif.GM_kickack(sd, result); } - if( HPMHooks.count.HP_clif_GM_kickack_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_GM_kickack_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kickack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_GM_kickack_post[hIndex].func; - postHookFunc(sd, &result); + postHookFunc(sd, result); } } 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); + if (HPMHooks.count.HP_clif_GM_kick_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kick_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15447,9 +19112,9 @@ void HP_clif_GM_kick(struct map_session_data *sd, struct map_session_data *tsd) { HPMHooks.source.clif.GM_kick(sd, tsd); } - if( HPMHooks.count.HP_clif_GM_kick_post ) { + if (HPMHooks.count.HP_clif_GM_kick_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_kick_post; hIndex++ ) { + 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); } @@ -15458,14 +19123,14 @@ void HP_clif_GM_kick(struct map_session_data *sd, struct map_session_data *tsd) } 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); + if (HPMHooks.count.HP_clif_manner_message_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint32 *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_manner_message_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15473,25 +19138,25 @@ void HP_clif_manner_message(struct map_session_data *sd, uint32 type) { { 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++ ) { + if (HPMHooks.count.HP_clif_manner_message_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_GM_silence_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd, uint8 *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_GM_silence_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &tsd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15499,25 +19164,25 @@ void HP_clif_GM_silence(struct map_session_data *sd, struct map_session_data *ts { 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++ ) { + if (HPMHooks.count.HP_clif_GM_silence_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_account_name_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *account_id, const char **accname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_account_name_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &account_id, &accname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15525,25 +19190,25 @@ void HP_clif_account_name(struct map_session_data *sd, int account_id, const cha { 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++ ) { + if (HPMHooks.count.HP_clif_account_name_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_check_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **pl_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_check_pre[hIndex].func; - preHookFunc(&fd, pl_sd); + preHookFunc(&fd, &pl_sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15551,25 +19216,25 @@ void HP_clif_check(int fd, struct map_session_data *pl_sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_check_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_hominfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct homun_data **hd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hominfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hominfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_hominfo_pre[hIndex].func; - preHookFunc(sd, hd, &flag); + preHookFunc(&sd, &hd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15577,25 +19242,25 @@ void HP_clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int fla { 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++ ) { + if (HPMHooks.count.HP_clif_hominfo_post > 0) { + 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); + postHookFunc(sd, hd, flag); } } return; } void HP_clif_homskillinfoblock(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_homskillinfoblock_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_homskillinfoblock_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_homskillinfoblock_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15603,9 +19268,9 @@ void HP_clif_homskillinfoblock(struct map_session_data *sd) { { HPMHooks.source.clif.homskillinfoblock(sd); } - if( HPMHooks.count.HP_clif_homskillinfoblock_post ) { + if (HPMHooks.count.HP_clif_homskillinfoblock_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillinfoblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_homskillinfoblock_post[hIndex].func; postHookFunc(sd); } @@ -15614,14 +19279,14 @@ void HP_clif_homskillinfoblock(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_homskillup_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_homskillup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_homskillup_pre[hIndex].func; - preHookFunc(sd, &skill_id); + preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15629,25 +19294,25 @@ void HP_clif_homskillup(struct map_session_data *sd, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_clif_homskillup_post > 0) { + 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); + postHookFunc(sd, skill_id); } } return; } void HP_clif_hom_food(struct map_session_data *sd, int foodid, int fail) { int hIndex = 0; - if( HPMHooks.count.HP_clif_hom_food_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *foodid, int *fail); + if (HPMHooks.count.HP_clif_hom_food_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *foodid, int *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_hom_food_pre[hIndex].func; - preHookFunc(sd, &foodid, &fail); + preHookFunc(&sd, &foodid, &fail); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15655,25 +19320,25 @@ void HP_clif_hom_food(struct map_session_data *sd, int foodid, int fail) { { HPMHooks.source.clif.hom_food(sd, foodid, fail); } - if( HPMHooks.count.HP_clif_hom_food_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *foodid, int *fail); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_hom_food_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_hom_food_post > 0) { + void (*postHookFunc) (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; - postHookFunc(sd, &foodid, &fail); + postHookFunc(sd, foodid, fail); } } return; } 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); + if (HPMHooks.count.HP_clif_send_homdata_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *state, int *param); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_homdata_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &state, ¶m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15681,25 +19346,25 @@ void HP_clif_send_homdata(struct map_session_data *sd, int state, int param) { { 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++ ) { + if (HPMHooks.count.HP_clif_send_homdata_post > 0) { + 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); + postHookFunc(sd, state, param); } } 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); + if (HPMHooks.count.HP_clif_quest_send_list_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_list_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15707,9 +19372,9 @@ void HP_clif_quest_send_list(struct map_session_data *sd) { { HPMHooks.source.clif.quest_send_list(sd); } - if( HPMHooks.count.HP_clif_quest_send_list_post ) { + if (HPMHooks.count.HP_clif_quest_send_list_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_list_post; hIndex++ ) { + 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); } @@ -15718,14 +19383,14 @@ void HP_clif_quest_send_list(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_quest_send_mission_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_mission_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15733,9 +19398,9 @@ void HP_clif_quest_send_mission(struct map_session_data *sd) { { HPMHooks.source.clif.quest_send_mission(sd); } - if( HPMHooks.count.HP_clif_quest_send_mission_post ) { + if (HPMHooks.count.HP_clif_quest_send_mission_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_send_mission_post; hIndex++ ) { + 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); } @@ -15744,14 +19409,14 @@ void HP_clif_quest_send_mission(struct map_session_data *sd) { } void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_quest_add_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct quest *qd); + if (HPMHooks.count.HP_clif_quest_add_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct quest **qd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_add_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &qd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15759,9 +19424,9 @@ void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd) { { HPMHooks.source.clif.quest_add(sd, qd); } - if( HPMHooks.count.HP_clif_quest_add_post ) { + if (HPMHooks.count.HP_clif_quest_add_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct quest *qd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_add_post; hIndex++ ) { + 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); } @@ -15770,14 +19435,14 @@ void HP_clif_quest_add(struct map_session_data *sd, struct quest *qd) { } 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); + if (HPMHooks.count.HP_clif_quest_delete_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *quest_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_delete_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &quest_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15785,25 +19450,25 @@ void HP_clif_quest_delete(struct map_session_data *sd, int quest_id) { { 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++ ) { + if (HPMHooks.count.HP_clif_quest_delete_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_quest_update_status_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *quest_id, bool *active); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_status_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &quest_id, &active); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15811,25 +19476,25 @@ void HP_clif_quest_update_status(struct map_session_data *sd, int quest_id, bool { 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++ ) { + if (HPMHooks.count.HP_clif_quest_update_status_post > 0) { + 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); + postHookFunc(sd, quest_id, active); } } return; } void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *qd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_quest_update_objective_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct quest *qd); + if (HPMHooks.count.HP_clif_quest_update_objective_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct quest **qd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_objective_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &qd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15837,25 +19502,51 @@ void HP_clif_quest_update_objective(struct map_session_data *sd, struct quest *q { HPMHooks.source.clif.quest_update_objective(sd, qd); } - if( HPMHooks.count.HP_clif_quest_update_objective_post ) { + if (HPMHooks.count.HP_clif_quest_update_objective_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct quest *qd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_update_objective_post; hIndex++ ) { + 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); } } return; } +void HP_clif_quest_notify_objective(struct map_session_data *sd, struct quest *qd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_quest_notify_objective_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct quest **qd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_notify_objective_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_quest_notify_objective_pre[hIndex].func; + preHookFunc(&sd, &qd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.quest_notify_objective(sd, qd); + } + if (HPMHooks.count.HP_clif_quest_notify_objective_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct quest *qd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_notify_objective_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_quest_notify_objective_post[hIndex].func; + postHookFunc(sd, qd); + } + } + 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); + if (HPMHooks.count.HP_clif_quest_show_event_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, short *state, short *color); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_quest_show_event_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &bl, &state, &color); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15863,25 +19554,25 @@ void HP_clif_quest_show_event(struct map_session_data *sd, struct block_list *bl { 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++ ) { + if (HPMHooks.count.HP_clif_quest_show_event_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_mail_window_pre > 0) { void (*preHookFunc) (int *fd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_window_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15889,25 +19580,25 @@ void HP_clif_mail_window(int fd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_mail_window_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_mail_read_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_read_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &mail_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15915,25 +19606,25 @@ void HP_clif_mail_read(struct map_session_data *sd, int mail_id) { { 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++ ) { + if (HPMHooks.count.HP_clif_mail_read_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_mail_delete_pre > 0) { void (*preHookFunc) (int *fd, int *mail_id, short *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15941,25 +19632,25 @@ void HP_clif_mail_delete(int fd, int mail_id, short fail) { { 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++ ) { + if (HPMHooks.count.HP_clif_mail_delete_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_mail_return_pre > 0) { void (*preHookFunc) (int *fd, int *mail_id, short *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_return_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15967,25 +19658,25 @@ void HP_clif_mail_return(int fd, int mail_id, short fail) { { 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++ ) { + if (HPMHooks.count.HP_clif_mail_return_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_mail_send_pre > 0) { void (*preHookFunc) (int *fd, bool *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_send_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -15993,25 +19684,25 @@ void HP_clif_mail_send(int fd, bool fail) { { 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++ ) { + if (HPMHooks.count.HP_clif_mail_send_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_mail_new_pre > 0) { + void (*preHookFunc) (int *fd, int *mail_id, const char **sender, const char **title); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_new_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &mail_id, &sender, &title); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16019,25 +19710,25 @@ void HP_clif_mail_new(int fd, int mail_id, const char *sender, const char *title { 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++ ) { + if (HPMHooks.count.HP_clif_mail_new_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_mail_refreshinbox_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_mail_refreshinbox_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16045,9 +19736,9 @@ void HP_clif_mail_refreshinbox(struct map_session_data *sd) { { HPMHooks.source.clif.mail_refreshinbox(sd); } - if( HPMHooks.count.HP_clif_mail_refreshinbox_post ) { + if (HPMHooks.count.HP_clif_mail_refreshinbox_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_refreshinbox_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_mail_refreshinbox_post[hIndex].func; postHookFunc(sd); } @@ -16056,14 +19747,14 @@ void HP_clif_mail_refreshinbox(struct map_session_data *sd) { } void HP_clif_mail_getattachment(int fd, uint8 flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_mail_getattachment_pre ) { + if (HPMHooks.count.HP_clif_mail_getattachment_pre > 0) { void (*preHookFunc) (int *fd, uint8 *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_getattachment_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16071,25 +19762,25 @@ void HP_clif_mail_getattachment(int fd, uint8 flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_mail_getattachment_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_mail_setattachment_pre > 0) { void (*preHookFunc) (int *fd, int *index, uint8 *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mail_setattachment_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16097,25 +19788,25 @@ void HP_clif_mail_setattachment(int fd, int index, uint8 flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_mail_setattachment_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_auction_openwindow_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_auction_openwindow_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16123,9 +19814,9 @@ void HP_clif_auction_openwindow(struct map_session_data *sd) { { HPMHooks.source.clif.auction_openwindow(sd); } - if( HPMHooks.count.HP_clif_auction_openwindow_post ) { + if (HPMHooks.count.HP_clif_auction_openwindow_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_openwindow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_auction_openwindow_post[hIndex].func; postHookFunc(sd); } @@ -16134,14 +19825,14 @@ void HP_clif_auction_openwindow(struct map_session_data *sd) { } void HP_clif_auction_results(struct map_session_data *sd, short count, short pages, const uint8 *buf) { int hIndex = 0; - if( HPMHooks.count.HP_clif_auction_results_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *count, short *pages, const uint8 *buf); + if (HPMHooks.count.HP_clif_auction_results_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *count, short *pages, const uint8 **buf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_results_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &count, &pages, &buf); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16149,25 +19840,25 @@ void HP_clif_auction_results(struct map_session_data *sd, short count, short pag { 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, const uint8 *buf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_results_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_auction_results_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, short count, short pages, const 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); + 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 ) { + if (HPMHooks.count.HP_clif_auction_message_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_message_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16175,25 +19866,25 @@ void HP_clif_auction_message(int fd, unsigned char flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_auction_message_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_auction_close_pre > 0) { void (*preHookFunc) (int *fd, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16201,25 +19892,25 @@ void HP_clif_auction_close(int fd, unsigned char flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_auction_close_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_auction_setitem_pre > 0) { void (*preHookFunc) (int *fd, int *index, bool *fail); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_auction_setitem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16227,25 +19918,25 @@ void HP_clif_auction_setitem(int fd, int index, bool fail) { { 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++ ) { + if (HPMHooks.count.HP_clif_auction_setitem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_mercenary_info_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_mercenary_info_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16253,9 +19944,9 @@ void HP_clif_mercenary_info(struct map_session_data *sd) { { HPMHooks.source.clif.mercenary_info(sd); } - if( HPMHooks.count.HP_clif_mercenary_info_post ) { + if (HPMHooks.count.HP_clif_mercenary_info_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_mercenary_info_post[hIndex].func; postHookFunc(sd); } @@ -16264,14 +19955,14 @@ void HP_clif_mercenary_info(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_mercenary_skillblock_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_mercenary_skillblock_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16279,9 +19970,9 @@ void HP_clif_mercenary_skillblock(struct map_session_data *sd) { { HPMHooks.source.clif.mercenary_skillblock(sd); } - if( HPMHooks.count.HP_clif_mercenary_skillblock_post ) { + if (HPMHooks.count.HP_clif_mercenary_skillblock_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_skillblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_mercenary_skillblock_post[hIndex].func; postHookFunc(sd); } @@ -16290,14 +19981,14 @@ void HP_clif_mercenary_skillblock(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_mercenary_message_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_message_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &message); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16305,25 +19996,25 @@ void HP_clif_mercenary_message(struct map_session_data *sd, int message) { { 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++ ) { + if (HPMHooks.count.HP_clif_mercenary_message_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_mercenary_updatestatus_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_mercenary_updatestatus_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16331,25 +20022,25 @@ void HP_clif_mercenary_updatestatus(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_mercenary_updatestatus_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_rental_time_pre > 0) { void (*preHookFunc) (int *fd, int *nameid, int *seconds); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_time_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16357,25 +20048,25 @@ void HP_clif_rental_time(int fd, int nameid, int seconds) { { 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++ ) { + if (HPMHooks.count.HP_clif_rental_time_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_rental_expired_pre > 0) { void (*preHookFunc) (int *fd, int *index, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_rental_expired_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16383,25 +20074,25 @@ void HP_clif_rental_expired(int fd, int index, int nameid) { { 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++ ) { + if (HPMHooks.count.HP_clif_rental_expired_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRegisterAck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyBookingRegisterAck_pre[hIndex].func; - preHookFunc(sd, &flag); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16409,25 +20100,25 @@ void HP_clif_PartyBookingRegisterAck(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_PartyBookingRegisterAck_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteAck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteAck_pre[hIndex].func; - preHookFunc(sd, &flag); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16435,25 +20126,25 @@ void HP_clif_PartyBookingDeleteAck(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_clif_PartyBookingDeleteAck_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_PartyBookingSearchAck_pre > 0) { + void (*preHookFunc) (int *fd, struct party_booking_ad_info ***results, int *count, bool *more_result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSearchAck_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &results, &count, &more_result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16461,25 +20152,25 @@ void HP_clif_PartyBookingSearchAck(int fd, struct party_booking_ad_info **result { 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++ ) { + if (HPMHooks.count.HP_clif_PartyBookingSearchAck_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_PartyBookingUpdateNotify_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingUpdateNotify_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingUpdateNotify_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyBookingUpdateNotify_pre[hIndex].func; - preHookFunc(sd, pb_ad); + preHookFunc(&sd, &pb_ad); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16487,9 +20178,9 @@ void HP_clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_ { HPMHooks.source.clif.PartyBookingUpdateNotify(sd, pb_ad); } - if( HPMHooks.count.HP_clif_PartyBookingUpdateNotify_post ) { + if (HPMHooks.count.HP_clif_PartyBookingUpdateNotify_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingUpdateNotify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingUpdateNotify_post[hIndex].func; postHookFunc(sd, pb_ad); } @@ -16498,14 +20189,14 @@ void HP_clif_PartyBookingUpdateNotify(struct map_session_data *sd, struct party_ } 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); + if (HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingDeleteNotify_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyBookingDeleteNotify_pre[hIndex].func; - preHookFunc(sd, &index); + preHookFunc(&sd, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16513,25 +20204,25 @@ void HP_clif_PartyBookingDeleteNotify(struct map_session_data *sd, int index) { { 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++ ) { + if (HPMHooks.count.HP_clif_PartyBookingDeleteNotify_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_PartyBookingInsertNotify_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingInsertNotify_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingInsertNotify_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyBookingInsertNotify_pre[hIndex].func; - preHookFunc(sd, pb_ad); + preHookFunc(&sd, &pb_ad); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16539,9 +20230,9 @@ void HP_clif_PartyBookingInsertNotify(struct map_session_data *sd, struct party_ { HPMHooks.source.clif.PartyBookingInsertNotify(sd, pb_ad); } - if( HPMHooks.count.HP_clif_PartyBookingInsertNotify_post ) { + if (HPMHooks.count.HP_clif_PartyBookingInsertNotify_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingInsertNotify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyBookingInsertNotify_post[hIndex].func; postHookFunc(sd, pb_ad); } @@ -16550,14 +20241,14 @@ void HP_clif_PartyBookingInsertNotify(struct map_session_data *sd, struct party_ } void HP_clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyRecruitRegisterAck_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *flag); + if (HPMHooks.count.HP_clif_PartyRecruitRegisterAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitRegisterAck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitRegisterAck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyRecruitRegisterAck_pre[hIndex].func; - preHookFunc(sd, &flag); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16565,25 +20256,25 @@ void HP_clif_PartyRecruitRegisterAck(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.PartyRecruitRegisterAck(sd, flag); } - if( HPMHooks.count.HP_clif_PartyRecruitRegisterAck_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitRegisterAck_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_PartyRecruitRegisterAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitRegisterAck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyRecruitRegisterAck_post[hIndex].func; - postHookFunc(sd, &flag); + postHookFunc(sd, flag); } } return; } void HP_clif_PartyRecruitDeleteAck(struct map_session_data *sd, int flag) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyRecruitDeleteAck_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *flag); + if (HPMHooks.count.HP_clif_PartyRecruitDeleteAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteAck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteAck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteAck_pre[hIndex].func; - preHookFunc(sd, &flag); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16591,25 +20282,25 @@ void HP_clif_PartyRecruitDeleteAck(struct map_session_data *sd, int flag) { { HPMHooks.source.clif.PartyRecruitDeleteAck(sd, flag); } - if( HPMHooks.count.HP_clif_PartyRecruitDeleteAck_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteAck_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_PartyRecruitDeleteAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteAck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteAck_post[hIndex].func; - postHookFunc(sd, &flag); + postHookFunc(sd, flag); } } return; } void HP_clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info **results, int count, bool more_result) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyRecruitSearchAck_pre ) { - void (*preHookFunc) (int *fd, struct party_booking_ad_info **results, int *count, bool *more_result); + if (HPMHooks.count.HP_clif_PartyRecruitSearchAck_pre > 0) { + void (*preHookFunc) (int *fd, struct party_booking_ad_info ***results, int *count, bool *more_result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitSearchAck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitSearchAck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyRecruitSearchAck_pre[hIndex].func; - preHookFunc(&fd, results, &count, &more_result); + preHookFunc(&fd, &results, &count, &more_result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16617,25 +20308,25 @@ void HP_clif_PartyRecruitSearchAck(int fd, struct party_booking_ad_info **result { HPMHooks.source.clif.PartyRecruitSearchAck(fd, results, count, more_result); } - if( HPMHooks.count.HP_clif_PartyRecruitSearchAck_post ) { - void (*postHookFunc) (int *fd, struct party_booking_ad_info **results, int *count, bool *more_result); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitSearchAck_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_PartyRecruitSearchAck_post > 0) { + void (*postHookFunc) (int fd, struct party_booking_ad_info **results, int count, bool more_result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitSearchAck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyRecruitSearchAck_post[hIndex].func; - postHookFunc(&fd, results, &count, &more_result); + postHookFunc(fd, results, count, more_result); } } return; } void HP_clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); + if (HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyRecruitUpdateNotify_pre[hIndex].func; - preHookFunc(sd, pb_ad); + preHookFunc(&sd, &pb_ad); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16643,9 +20334,9 @@ void HP_clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_ { HPMHooks.source.clif.PartyRecruitUpdateNotify(sd, pb_ad); } - if( HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_post ) { + if (HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitUpdateNotify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyRecruitUpdateNotify_post[hIndex].func; postHookFunc(sd, pb_ad); } @@ -16654,14 +20345,14 @@ void HP_clif_PartyRecruitUpdateNotify(struct map_session_data *sd, struct party_ } void HP_clif_PartyRecruitDeleteNotify(struct map_session_data *sd, int index) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *index); + if (HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteNotify_pre[hIndex].func; - preHookFunc(sd, &index); + preHookFunc(&sd, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16669,25 +20360,25 @@ void HP_clif_PartyRecruitDeleteNotify(struct map_session_data *sd, int index) { { HPMHooks.source.clif.PartyRecruitDeleteNotify(sd, index); } - if( HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitDeleteNotify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyRecruitDeleteNotify_post[hIndex].func; - postHookFunc(sd, &index); + postHookFunc(sd, index); } } return; } void HP_clif_PartyRecruitInsertNotify(struct map_session_data *sd, struct party_booking_ad_info *pb_ad) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyRecruitInsertNotify_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); + if (HPMHooks.count.HP_clif_PartyRecruitInsertNotify_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct party_booking_ad_info **pb_ad); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitInsertNotify_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitInsertNotify_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyRecruitInsertNotify_pre[hIndex].func; - preHookFunc(sd, pb_ad); + preHookFunc(&sd, &pb_ad); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16695,9 +20386,9 @@ void HP_clif_PartyRecruitInsertNotify(struct map_session_data *sd, struct party_ { HPMHooks.source.clif.PartyRecruitInsertNotify(sd, pb_ad); } - if( HPMHooks.count.HP_clif_PartyRecruitInsertNotify_post ) { + if (HPMHooks.count.HP_clif_PartyRecruitInsertNotify_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct party_booking_ad_info *pb_ad); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitInsertNotify_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyRecruitInsertNotify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_PartyRecruitInsertNotify_post[hIndex].func; postHookFunc(sd, pb_ad); } @@ -16706,14 +20397,14 @@ void HP_clif_PartyRecruitInsertNotify(struct map_session_data *sd, struct party_ } 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); + if (HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre > 0) { + void (*preHookFunc) (int *index, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyBookingVolunteerInfo_pre[hIndex].func; - preHookFunc(&index, sd); + preHookFunc(&index, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16721,25 +20412,25 @@ void HP_clif_PartyBookingVolunteerInfo(int index, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_PartyBookingVolunteerInfo_post > 0) { + 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); + postHookFunc(index, sd); } } return; } void HP_clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre ) { - void (*preHookFunc) (unsigned int *aid, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre > 0) { + void (*preHookFunc) (unsigned int *aid, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyBookingRefuseVolunteer_pre[hIndex].func; - preHookFunc(&aid, sd); + preHookFunc(&aid, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16747,25 +20438,25 @@ void HP_clif_PartyBookingRefuseVolunteer(unsigned int aid, struct map_session_da { HPMHooks.source.clif.PartyBookingRefuseVolunteer(aid, sd); } - if( HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post ) { - void (*postHookFunc) (unsigned int *aid, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_PartyBookingRefuseVolunteer_post > 0) { + void (*postHookFunc) (unsigned int 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); + 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); + if (HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre > 0) { + void (*preHookFunc) (int *index, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyBookingCancelVolunteer_pre[hIndex].func; - preHookFunc(&index, sd); + preHookFunc(&index, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16773,25 +20464,25 @@ void HP_clif_PartyBookingCancelVolunteer(int index, struct map_session_data *sd) { 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++ ) { + if (HPMHooks.count.HP_clif_PartyBookingCancelVolunteer_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre > 0) { + void (*preHookFunc) (int *index, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingAddFilteringList_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyBookingAddFilteringList_pre[hIndex].func; - preHookFunc(&index, sd); + preHookFunc(&index, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16799,25 +20490,25 @@ void HP_clif_PartyBookingAddFilteringList(int index, struct map_session_data *sd { 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++ ) { + if (HPMHooks.count.HP_clif_PartyBookingAddFilteringList_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre > 0) { + void (*preHookFunc) (int *gid, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PartyBookingSubFilteringList_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_PartyBookingSubFilteringList_pre[hIndex].func; - preHookFunc(&gid, sd); + preHookFunc(&gid, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16825,25 +20516,25 @@ void HP_clif_PartyBookingSubFilteringList(int gid, struct map_session_data *sd) { 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++ ) { + if (HPMHooks.count.HP_clif_PartyBookingSubFilteringList_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_buyingstore_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_buyingstore_open_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16851,9 +20542,9 @@ void HP_clif_buyingstore_open(struct map_session_data *sd) { { HPMHooks.source.clif.buyingstore_open(sd); } - if( HPMHooks.count.HP_clif_buyingstore_open_post ) { + if (HPMHooks.count.HP_clif_buyingstore_open_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_buyingstore_open_post[hIndex].func; postHookFunc(sd); } @@ -16862,14 +20553,14 @@ void HP_clif_buyingstore_open(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_buyingstore_open_failed_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned short *result, unsigned int *weight); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_open_failed_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &result, &weight); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16877,25 +20568,25 @@ void HP_clif_buyingstore_open_failed(struct map_session_data *sd, unsigned short { 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++ ) { + if (HPMHooks.count.HP_clif_buyingstore_open_failed_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_buyingstore_myitemlist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_buyingstore_myitemlist_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16903,9 +20594,9 @@ void HP_clif_buyingstore_myitemlist(struct map_session_data *sd) { { HPMHooks.source.clif.buyingstore_myitemlist(sd); } - if( HPMHooks.count.HP_clif_buyingstore_myitemlist_post ) { + if (HPMHooks.count.HP_clif_buyingstore_myitemlist_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_myitemlist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_buyingstore_myitemlist_post[hIndex].func; postHookFunc(sd); } @@ -16914,14 +20605,14 @@ void HP_clif_buyingstore_myitemlist(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_buyingstore_entry_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16929,9 +20620,9 @@ void HP_clif_buyingstore_entry(struct map_session_data *sd) { { HPMHooks.source.clif.buyingstore_entry(sd); } - if( HPMHooks.count.HP_clif_buyingstore_entry_post ) { + if (HPMHooks.count.HP_clif_buyingstore_entry_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_buyingstore_entry_post[hIndex].func; postHookFunc(sd); } @@ -16940,14 +20631,14 @@ void HP_clif_buyingstore_entry(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_buyingstore_entry_single_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **pl_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_entry_single_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &pl_sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16955,9 +20646,9 @@ void HP_clif_buyingstore_entry_single(struct map_session_data *sd, struct map_se { HPMHooks.source.clif.buyingstore_entry_single(sd, pl_sd); } - if( HPMHooks.count.HP_clif_buyingstore_entry_single_post ) { + if (HPMHooks.count.HP_clif_buyingstore_entry_single_post > 0) { 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++ ) { + 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); } @@ -16966,14 +20657,14 @@ void HP_clif_buyingstore_entry_single(struct map_session_data *sd, struct map_se } 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); + if (HPMHooks.count.HP_clif_buyingstore_disappear_entry_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -16981,9 +20672,9 @@ void HP_clif_buyingstore_disappear_entry(struct map_session_data *sd) { { HPMHooks.source.clif.buyingstore_disappear_entry(sd); } - if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_post ) { + if (HPMHooks.count.HP_clif_buyingstore_disappear_entry_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_post; hIndex++ ) { + 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); } @@ -16992,14 +20683,14 @@ void HP_clif_buyingstore_disappear_entry(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **pl_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &pl_sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17007,9 +20698,9 @@ void HP_clif_buyingstore_disappear_entry_single(struct map_session_data *sd, str { HPMHooks.source.clif.buyingstore_disappear_entry_single(sd, pl_sd); } - if( HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_post ) { + if (HPMHooks.count.HP_clif_buyingstore_disappear_entry_single_post > 0) { 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++ ) { + 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); } @@ -17018,14 +20709,14 @@ void HP_clif_buyingstore_disappear_entry_single(struct map_session_data *sd, str } 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); + if (HPMHooks.count.HP_clif_buyingstore_itemlist_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **pl_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_itemlist_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &pl_sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17033,9 +20724,9 @@ void HP_clif_buyingstore_itemlist(struct map_session_data *sd, struct map_sessio { HPMHooks.source.clif.buyingstore_itemlist(sd, pl_sd); } - if( HPMHooks.count.HP_clif_buyingstore_itemlist_post ) { + if (HPMHooks.count.HP_clif_buyingstore_itemlist_post > 0) { 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++ ) { + 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); } @@ -17044,14 +20735,14 @@ void HP_clif_buyingstore_itemlist(struct map_session_data *sd, struct map_sessio } 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); + if (HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *result); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &result); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17059,51 +20750,51 @@ void HP_clif_buyingstore_trade_failed_buyer(struct map_session_data *sd, short r { 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++ ) { + if (HPMHooks.count.HP_clif_buyingstore_trade_failed_buyer_post > 0) { + 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); + postHookFunc(sd, result); } } return; } -void HP_clif_buyingstore_update_item(struct map_session_data *sd, unsigned short nameid, unsigned short amount) { +void HP_clif_buyingstore_update_item(struct map_session_data *sd, int nameid, unsigned short amount, uint32 char_id, int zeny) { 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); + if (HPMHooks.count.HP_clif_buyingstore_update_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *nameid, unsigned short *amount, uint32 *char_id, int *zeny); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_update_item_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &nameid, &amount, &char_id, &zeny); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.buyingstore_update_item(sd, nameid, amount); + HPMHooks.source.clif.buyingstore_update_item(sd, nameid, amount, char_id, zeny); } - 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++ ) { + if (HPMHooks.count.HP_clif_buyingstore_update_item_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int nameid, unsigned short amount, uint32 char_id, int zeny); + 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); + postHookFunc(sd, nameid, amount, char_id, zeny); } } 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); + if (HPMHooks.count.HP_clif_buyingstore_delete_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *index, unsigned short *amount, int *price); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_delete_item_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &index, &amount, &price); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17111,25 +20802,25 @@ void HP_clif_buyingstore_delete_item(struct map_session_data *sd, short index, u { 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++ ) { + if (HPMHooks.count.HP_clif_buyingstore_delete_item_post > 0) { + 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); + postHookFunc(sd, index, amount, price); } } return; } -void HP_clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short result, unsigned short nameid) { +void HP_clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short result, int 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); + if (HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *result, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &result, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17137,25 +20828,25 @@ void HP_clif_buyingstore_trade_failed_seller(struct map_session_data *sd, short { 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++ ) { + if (HPMHooks.count.HP_clif_buyingstore_trade_failed_seller_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, short result, int 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); + 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); + if (HPMHooks.count.HP_clif_search_store_info_ack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_ack_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17163,9 +20854,9 @@ void HP_clif_search_store_info_ack(struct map_session_data *sd) { { HPMHooks.source.clif.search_store_info_ack(sd); } - if( HPMHooks.count.HP_clif_search_store_info_ack_post ) { + if (HPMHooks.count.HP_clif_search_store_info_ack_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_ack_post; hIndex++ ) { + 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); } @@ -17174,14 +20865,14 @@ void HP_clif_search_store_info_ack(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_search_store_info_failed_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned char *reason); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_failed_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &reason); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17189,25 +20880,25 @@ void HP_clif_search_store_info_failed(struct map_session_data *sd, unsigned char { 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++ ) { + if (HPMHooks.count.HP_clif_search_store_info_failed_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_open_search_store_info_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_search_store_info_pre; hIndex++ ) { + 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); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17215,9 +20906,9 @@ void HP_clif_open_search_store_info(struct map_session_data *sd) { { HPMHooks.source.clif.open_search_store_info(sd); } - if( HPMHooks.count.HP_clif_open_search_store_info_post ) { + if (HPMHooks.count.HP_clif_open_search_store_info_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_search_store_info_post; hIndex++ ) { + 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); } @@ -17226,14 +20917,14 @@ void HP_clif_open_search_store_info(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_search_store_info_click_ack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *x, short *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_search_store_info_click_ack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17241,25 +20932,25 @@ void HP_clif_search_store_info_click_ack(struct map_session_data *sd, short x, s { 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++ ) { + if (HPMHooks.count.HP_clif_search_store_info_click_ack_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_elemental_info_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_elemental_info_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17267,9 +20958,9 @@ void HP_clif_elemental_info(struct map_session_data *sd) { { HPMHooks.source.clif.elemental_info(sd); } - if( HPMHooks.count.HP_clif_elemental_info_post ) { + if (HPMHooks.count.HP_clif_elemental_info_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_info_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_elemental_info_post[hIndex].func; postHookFunc(sd); } @@ -17278,14 +20969,14 @@ void HP_clif_elemental_info(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_elemental_updatestatus_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_elemental_updatestatus_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17293,25 +20984,25 @@ void HP_clif_elemental_updatestatus(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_elemental_updatestatus_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_bgqueue_ack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum BATTLEGROUNDS_QUEUE_ACK *response, unsigned char *arena_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_ack_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &response, &arena_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17319,25 +21010,25 @@ void HP_clif_bgqueue_ack(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_A { 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++ ) { + if (HPMHooks.count.HP_clif_bgqueue_ack_post > 0) { + 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); + postHookFunc(sd, response, arena_id); } } return; } void HP_clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, const 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, const char *name); + if (HPMHooks.count.HP_clif_bgqueue_notice_delete_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED *response, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_notice_delete_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &response, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17345,25 +21036,25 @@ void HP_clif_bgqueue_notice_delete(struct map_session_data *sd, enum BATTLEGROUN { 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, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_notice_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_bgqueue_notice_delete_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum BATTLEGROUNDS_QUEUE_NOTICE_DELETED response, const 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); + 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); + if (HPMHooks.count.HP_clif_bgqueue_update_info_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned char *arena_id, int *position); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_update_info_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &arena_id, &position); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17371,25 +21062,25 @@ void HP_clif_bgqueue_update_info(struct map_session_data *sd, unsigned char aren { 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++ ) { + if (HPMHooks.count.HP_clif_bgqueue_update_info_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_bgqueue_joined_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_joined_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17397,25 +21088,25 @@ void HP_clif_bgqueue_joined(struct map_session_data *sd, int pos) { { 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++ ) { + if (HPMHooks.count.HP_clif_bgqueue_joined_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_bgqueue_pcleft_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_bgqueue_pcleft_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17423,9 +21114,9 @@ void HP_clif_bgqueue_pcleft(struct map_session_data *sd) { { HPMHooks.source.clif.bgqueue_pcleft(sd); } - if( HPMHooks.count.HP_clif_bgqueue_pcleft_post ) { + if (HPMHooks.count.HP_clif_bgqueue_pcleft_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_pcleft_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bgqueue_pcleft_post[hIndex].func; postHookFunc(sd); } @@ -17434,14 +21125,14 @@ void HP_clif_bgqueue_pcleft(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_clif_bgqueue_battlebegins_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned char *arena_id, enum send_target *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bgqueue_battlebegins_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &arena_id, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17449,25 +21140,25 @@ void HP_clif_bgqueue_battlebegins(struct map_session_data *sd, unsigned char are { 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++ ) { + if (HPMHooks.count.HP_clif_bgqueue_battlebegins_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_adopt_reply_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_reply_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17475,25 +21166,25 @@ void HP_clif_adopt_reply(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_clif_adopt_reply_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_adopt_request_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **src, int *p_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_adopt_request_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &src, &p_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17501,25 +21192,25 @@ void HP_clif_adopt_request(struct map_session_data *sd, struct map_session_data { 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++ ) { + if (HPMHooks.count.HP_clif_adopt_request_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_clif_readbook_pre > 0) { void (*preHookFunc) (int *fd, int *book_id, int *page); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_readbook_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17527,25 +21218,25 @@ void HP_clif_readbook(int fd, int book_id, int page) { { 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++ ) { + if (HPMHooks.count.HP_clif_readbook_post > 0) { + 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); + postHookFunc(fd, book_id, page); } } return; } void HP_clif_notify_time(struct map_session_data *sd, int64 time) { int hIndex = 0; - if( HPMHooks.count.HP_clif_notify_time_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int64 *time); + if (HPMHooks.count.HP_clif_notify_time_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_time_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &time); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17553,25 +21244,25 @@ void HP_clif_notify_time(struct map_session_data *sd, int64 time) { { HPMHooks.source.clif.notify_time(sd, time); } - if( HPMHooks.count.HP_clif_notify_time_post ) { - void (*postHookFunc) (struct map_session_data *sd, int64 *time); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_time_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_notify_time_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 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); + 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); + if (HPMHooks.count.HP_clif_user_count_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_user_count_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17579,25 +21270,25 @@ void HP_clif_user_count(struct map_session_data *sd, int count) { { 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++ ) { + if (HPMHooks.count.HP_clif_user_count_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_noask_sub_pre > 0) { + void (*preHookFunc) (struct map_session_data **src, struct map_session_data **target, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_noask_sub_pre; hIndex++ ) { + 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); + preHookFunc(&src, &target, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17605,25 +21296,25 @@ void HP_clif_noask_sub(struct map_session_data *src, struct map_session_data *ta { 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++ ) { + if (HPMHooks.count.HP_clif_noask_sub_post > 0) { + 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); + postHookFunc(src, target, type); } } return; } void HP_clif_bc_ready(void) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bc_ready_pre ) { + if (HPMHooks.count.HP_clif_bc_ready_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bc_ready_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17631,9 +21322,9 @@ void HP_clif_bc_ready(void) { { HPMHooks.source.clif.bc_ready(); } - if( HPMHooks.count.HP_clif_bc_ready_post ) { + if (HPMHooks.count.HP_clif_bc_ready_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bc_ready_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bc_ready_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bc_ready_post[hIndex].func; postHookFunc(); } @@ -17642,14 +21333,14 @@ void HP_clif_bc_ready(void) { } void HP_clif_channel_msg(struct channel_data *chan, struct map_session_data *sd, char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_clif_channel_msg_pre ) { - void (*preHookFunc) (struct channel_data *chan, struct map_session_data *sd, char *msg); + if (HPMHooks.count.HP_clif_channel_msg_pre > 0) { + void (*preHookFunc) (struct channel_data **chan, struct map_session_data **sd, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_channel_msg_pre[hIndex].func; - preHookFunc(chan, sd, msg); + preHookFunc(&chan, &sd, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17657,9 +21348,9 @@ void HP_clif_channel_msg(struct channel_data *chan, struct map_session_data *sd, { HPMHooks.source.clif.channel_msg(chan, sd, msg); } - if( HPMHooks.count.HP_clif_channel_msg_post ) { + if (HPMHooks.count.HP_clif_channel_msg_post > 0) { void (*postHookFunc) (struct channel_data *chan, struct map_session_data *sd, char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_channel_msg_post[hIndex].func; postHookFunc(chan, sd, msg); } @@ -17668,14 +21359,14 @@ void HP_clif_channel_msg(struct channel_data *chan, struct map_session_data *sd, } void HP_clif_channel_msg2(struct channel_data *chan, char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_clif_channel_msg2_pre ) { - void (*preHookFunc) (struct channel_data *chan, char *msg); + if (HPMHooks.count.HP_clif_channel_msg2_pre > 0) { + void (*preHookFunc) (struct channel_data **chan, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_channel_msg2_pre[hIndex].func; - preHookFunc(chan, msg); + preHookFunc(&chan, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17683,9 +21374,9 @@ void HP_clif_channel_msg2(struct channel_data *chan, char *msg) { { HPMHooks.source.clif.channel_msg2(chan, msg); } - if( HPMHooks.count.HP_clif_channel_msg2_post ) { + if (HPMHooks.count.HP_clif_channel_msg2_post > 0) { void (*postHookFunc) (struct channel_data *chan, char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_channel_msg2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_channel_msg2_post[hIndex].func; postHookFunc(chan, msg); } @@ -17695,14 +21386,14 @@ void HP_clif_channel_msg2(struct channel_data *chan, char *msg) { int HP_clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_undisguise_timer_pre ) { + if (HPMHooks.count.HP_clif_undisguise_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17710,25 +21401,25 @@ int HP_clif_undisguise_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.clif.undisguise_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_clif_undisguise_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_undisguise_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_undisguise_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } void HP_clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK reason) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bank_deposit_pre ) { - void (*preHookFunc) (struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK *reason); + if (HPMHooks.count.HP_clif_bank_deposit_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum e_BANKING_DEPOSIT_ACK *reason); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_deposit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_deposit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_bank_deposit_pre[hIndex].func; - preHookFunc(sd, &reason); + preHookFunc(&sd, &reason); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17736,25 +21427,25 @@ void HP_clif_bank_deposit(struct map_session_data *sd, enum e_BANKING_DEPOSIT_AC { HPMHooks.source.clif.bank_deposit(sd, reason); } - if( HPMHooks.count.HP_clif_bank_deposit_post ) { - void (*postHookFunc) (struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK *reason); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_deposit_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_bank_deposit_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum e_BANKING_DEPOSIT_ACK reason); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_deposit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bank_deposit_post[hIndex].func; - postHookFunc(sd, &reason); + postHookFunc(sd, reason); } } return; } void HP_clif_bank_withdraw(struct map_session_data *sd, enum e_BANKING_WITHDRAW_ACK reason) { int hIndex = 0; - if( HPMHooks.count.HP_clif_bank_withdraw_pre ) { - void (*preHookFunc) (struct map_session_data *sd, enum e_BANKING_WITHDRAW_ACK *reason); + if (HPMHooks.count.HP_clif_bank_withdraw_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum e_BANKING_WITHDRAW_ACK *reason); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_withdraw_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_withdraw_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_bank_withdraw_pre[hIndex].func; - preHookFunc(sd, &reason); + preHookFunc(&sd, &reason); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17762,25 +21453,25 @@ void HP_clif_bank_withdraw(struct map_session_data *sd, enum e_BANKING_WITHDRAW_ { HPMHooks.source.clif.bank_withdraw(sd, reason); } - if( HPMHooks.count.HP_clif_bank_withdraw_post ) { - void (*postHookFunc) (struct map_session_data *sd, enum e_BANKING_WITHDRAW_ACK *reason); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_withdraw_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_bank_withdraw_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum e_BANKING_WITHDRAW_ACK reason); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bank_withdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_bank_withdraw_post[hIndex].func; - postHookFunc(sd, &reason); + postHookFunc(sd, reason); } } return; } void HP_clif_show_modifiers(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_show_modifiers_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_show_modifiers_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_show_modifiers_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_show_modifiers_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_show_modifiers_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17788,9 +21479,9 @@ void HP_clif_show_modifiers(struct map_session_data *sd) { { HPMHooks.source.clif.show_modifiers(sd); } - if( HPMHooks.count.HP_clif_show_modifiers_post ) { + if (HPMHooks.count.HP_clif_show_modifiers_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_show_modifiers_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_show_modifiers_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_show_modifiers_post[hIndex].func; postHookFunc(sd); } @@ -17799,14 +21490,14 @@ void HP_clif_show_modifiers(struct map_session_data *sd) { } void HP_clif_notify_bounditem(struct map_session_data *sd, unsigned short index) { int hIndex = 0; - if( HPMHooks.count.HP_clif_notify_bounditem_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned short *index); + if (HPMHooks.count.HP_clif_notify_bounditem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned short *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_bounditem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_bounditem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_notify_bounditem_pre[hIndex].func; - preHookFunc(sd, &index); + preHookFunc(&sd, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17814,26 +21505,26 @@ void HP_clif_notify_bounditem(struct map_session_data *sd, unsigned short index) { HPMHooks.source.clif.notify_bounditem(sd, index); } - if( HPMHooks.count.HP_clif_notify_bounditem_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned short *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_bounditem_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_notify_bounditem_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, unsigned short index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_notify_bounditem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_notify_bounditem_post[hIndex].func; - postHookFunc(sd, &index); + postHookFunc(sd, index); } } return; } -int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, unsigned char type) { +int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, enum battle_dmg_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_delay_damage_pre ) { - int (*preHookFunc) (int64 *tick, struct block_list *src, struct block_list *dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, unsigned char *type); + if (HPMHooks.count.HP_clif_delay_damage_pre > 0) { + int (*preHookFunc) (int64 *tick, struct block_list **src, struct block_list **dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, enum battle_dmg_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_delay_damage_pre[hIndex].func; - retVal___ = preHookFunc(&tick, src, dst, &sdelay, &ddelay, &in_damage, &div, &type); + retVal___ = preHookFunc(&tick, &src, &dst, &sdelay, &ddelay, &in_damage, &div, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17841,11 +21532,11 @@ int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list * { retVal___ = HPMHooks.source.clif.delay_damage(tick, src, dst, sdelay, ddelay, in_damage, div, type); } - if( HPMHooks.count.HP_clif_delay_damage_post ) { - int (*postHookFunc) (int retVal___, int64 *tick, struct block_list *src, struct block_list *dst, int *sdelay, int *ddelay, int64 *in_damage, short *div, unsigned char *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_delay_damage_post > 0) { + int (*postHookFunc) (int retVal___, int64 tick, struct block_list *src, struct block_list *dst, int sdelay, int ddelay, int64 in_damage, short div, enum battle_dmg_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_delay_damage_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tick, src, dst, &sdelay, &ddelay, &in_damage, &div, &type); + retVal___ = postHookFunc(retVal___, tick, src, dst, sdelay, ddelay, in_damage, div, type); } } return retVal___; @@ -17853,14 +21544,14 @@ int HP_clif_delay_damage(int64 tick, struct block_list *src, struct block_list * int HP_clif_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_delay_damage_sub_pre ) { + if (HPMHooks.count.HP_clif_delay_damage_sub_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_delay_damage_sub_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17868,25 +21559,25 @@ int HP_clif_delay_damage_sub(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.clif.delay_damage_sub(tid, tick, id, data); } - if( HPMHooks.count.HP_clif_delay_damage_sub_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_delay_damage_sub_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_delay_damage_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_delay_damage_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } void HP_clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_npc_market_open_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + if (HPMHooks.count.HP_clif_npc_market_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_npc_market_open_pre[hIndex].func; - preHookFunc(sd, nd); + preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17894,25 +21585,25 @@ void HP_clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) { { HPMHooks.source.clif.npc_market_open(sd, nd); } - if( HPMHooks.count.HP_clif_npc_market_open_post ) { + if (HPMHooks.count.HP_clif_npc_market_open_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_npc_market_open_post[hIndex].func; postHookFunc(sd, nd); } } return; } -void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, unsigned char response) { +void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response) { int hIndex = 0; - if( HPMHooks.count.HP_clif_npc_market_purchase_ack_pre ) { - void (*preHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char *response); + if (HPMHooks.count.HP_clif_npc_market_purchase_ack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const struct itemlist **item_list, enum market_buy_result *response); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_pre[hIndex].func; - preHookFunc(sd, item_list, &response); + preHookFunc(&sd, &item_list, &response); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17920,11 +21611,11 @@ void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct i { HPMHooks.source.clif.npc_market_purchase_ack(sd, item_list, response); } - if( HPMHooks.count.HP_clif_npc_market_purchase_ack_post ) { - void (*postHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, unsigned char *response); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_npc_market_purchase_ack_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const struct itemlist *item_list, enum market_buy_result response); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_market_purchase_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_npc_market_purchase_ack_post[hIndex].func; - postHookFunc(sd, item_list, &response); + postHookFunc(sd, item_list, response); } } return; @@ -17932,14 +21623,14 @@ void HP_clif_npc_market_purchase_ack(struct map_session_data *sd, const struct i bool HP_clif_parse_roulette_db(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_clif_parse_roulette_db_pre ) { + if (HPMHooks.count.HP_clif_parse_roulette_db_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_parse_roulette_db_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -17947,25 +21638,25 @@ bool HP_clif_parse_roulette_db(void) { { retVal___ = HPMHooks.source.clif.parse_roulette_db(); } - if( HPMHooks.count.HP_clif_parse_roulette_db_post ) { + if (HPMHooks.count.HP_clif_parse_roulette_db_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_parse_roulette_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_parse_roulette_db_post[hIndex].func; retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char result, short stage, short prizeIdx, short bonusItemID) { +void HP_clif_roulette_generate_ack(struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID) { int hIndex = 0; - if( HPMHooks.count.HP_clif_roulette_generate_ack_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned char *result, short *stage, short *prizeIdx, short *bonusItemID); + if (HPMHooks.count.HP_clif_roulette_generate_ack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum GENERATE_ROULETTE_ACK *result, short *stage, short *prizeIdx, int *bonusItemID); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_pre[hIndex].func; - preHookFunc(sd, &result, &stage, &prizeIdx, &bonusItemID); + preHookFunc(&sd, &result, &stage, &prizeIdx, &bonusItemID); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17973,25 +21664,51 @@ void HP_clif_roulette_generate_ack(struct map_session_data *sd, unsigned char re { HPMHooks.source.clif.roulette_generate_ack(sd, result, stage, prizeIdx, bonusItemID); } - if( HPMHooks.count.HP_clif_roulette_generate_ack_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned char *result, short *stage, short *prizeIdx, short *bonusItemID); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_roulette_generate_ack_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum GENERATE_ROULETTE_ACK result, short stage, short prizeIdx, int bonusItemID); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_generate_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_roulette_generate_ack_post[hIndex].func; - postHookFunc(sd, &result, &stage, &prizeIdx, &bonusItemID); + postHookFunc(sd, result, stage, prizeIdx, bonusItemID); + } + } + return; +} +void HP_clif_roulette_close(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_roulette_close_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_close_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_roulette_close_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.roulette_close(sd); + } + if (HPMHooks.count.HP_clif_roulette_close_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_roulette_close_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_roulette_close_post[hIndex].func; + postHookFunc(sd); } } return; } void HP_clif_openmergeitem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_openmergeitem_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_openmergeitem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_openmergeitem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -17999,25 +21716,25 @@ void HP_clif_openmergeitem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.openmergeitem(fd, sd); } - if( HPMHooks.count.HP_clif_openmergeitem_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_openmergeitem_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_openmergeitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_openmergeitem_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_cancelmergeitem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_cancelmergeitem_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_cancelmergeitem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_cancelmergeitem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18025,11 +21742,11 @@ void HP_clif_cancelmergeitem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.cancelmergeitem(fd, sd); } - if( HPMHooks.count.HP_clif_cancelmergeitem_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_cancelmergeitem_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cancelmergeitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_cancelmergeitem_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; @@ -18037,14 +21754,14 @@ void HP_clif_cancelmergeitem(int fd, struct map_session_data *sd) { int HP_clif_comparemergeitem(const void *a, const void *b) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_clif_comparemergeitem_pre ) { - int (*preHookFunc) (const void *a, const void *b); + if (HPMHooks.count.HP_clif_comparemergeitem_pre > 0) { + int (*preHookFunc) (const void **a, const void **b); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_comparemergeitem_pre[hIndex].func; - retVal___ = preHookFunc(a, b); + retVal___ = preHookFunc(&a, &b); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -18052,9 +21769,9 @@ int HP_clif_comparemergeitem(const void *a, const void *b) { { retVal___ = HPMHooks.source.clif.comparemergeitem(a, b); } - if( HPMHooks.count.HP_clif_comparemergeitem_post ) { + if (HPMHooks.count.HP_clif_comparemergeitem_post > 0) { int (*postHookFunc) (int retVal___, const void *a, const void *b); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_comparemergeitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_comparemergeitem_post[hIndex].func; retVal___ = postHookFunc(retVal___, a, b); } @@ -18063,14 +21780,14 @@ int HP_clif_comparemergeitem(const void *a, const void *b) { } void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_ackmergeitems_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_ackmergeitems_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_ackmergeitems_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18078,25 +21795,287 @@ void HP_clif_ackmergeitems(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.ackmergeitems(fd, sd); } - if( HPMHooks.count.HP_clif_ackmergeitems_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_ackmergeitems_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ackmergeitems_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_ackmergeitems_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_mergeitems(int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_mergeitems_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *index, int *amount, enum mergeitem_reason *reason); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mergeitems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_mergeitems_pre[hIndex].func; + preHookFunc(&fd, &sd, &index, &amount, &reason); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.mergeitems(fd, sd, index, amount, reason); + } + if (HPMHooks.count.HP_clif_mergeitems_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int index, int amount, enum mergeitem_reason reason); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_mergeitems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_mergeitems_post[hIndex].func; + postHookFunc(fd, sd, index, amount, reason); + } + } + return; +} +bool HP_clif_isdisguised(struct block_list *bl) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_isdisguised_pre > 0) { + bool (*preHookFunc) (struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_isdisguised_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_isdisguised_pre[hIndex].func; + retVal___ = preHookFunc(&bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.isdisguised(bl); + } + if (HPMHooks.count.HP_clif_isdisguised_post > 0) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_isdisguised_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_isdisguised_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +void HP_clif_navigate_to(struct map_session_data *sd, const char *mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_navigate_to_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **mapname, uint16 *x, uint16 *y, uint8 *flag, bool *hideWindow, uint16 *mob_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_navigate_to_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_navigate_to_pre[hIndex].func; + preHookFunc(&sd, &mapname, &x, &y, &flag, &hideWindow, &mob_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.navigate_to(sd, mapname, x, y, flag, hideWindow, mob_id); + } + if (HPMHooks.count.HP_clif_navigate_to_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const char *mapname, uint16 x, uint16 y, uint8 flag, bool hideWindow, uint16 mob_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_navigate_to_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_navigate_to_post[hIndex].func; + postHookFunc(sd, mapname, x, y, flag, hideWindow, mob_id); + } + } + return; +} +unsigned char HP_clif_bl_type(struct block_list *bl) { + int hIndex = 0; + unsigned char retVal___ = 0; + if (HPMHooks.count.HP_clif_bl_type_pre > 0) { + unsigned char (*preHookFunc) (struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bl_type_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_bl_type_pre[hIndex].func; + retVal___ = preHookFunc(&bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.bl_type(bl); + } + if (HPMHooks.count.HP_clif_bl_type_post > 0) { + unsigned char (*postHookFunc) (unsigned char retVal___, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_bl_type_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_bl_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +void HP_clif_achievement_send_list(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_achievement_send_list_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_send_list_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_achievement_send_list_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.achievement_send_list(fd, sd); + } + if (HPMHooks.count.HP_clif_achievement_send_list_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_send_list_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_achievement_send_list_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_achievement_send_update(int fd, struct map_session_data *sd, const struct achievement_data *ad) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_achievement_send_update_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, const struct achievement_data **ad); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_send_update_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_achievement_send_update_pre[hIndex].func; + preHookFunc(&fd, &sd, &ad); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.achievement_send_update(fd, sd, ad); + } + if (HPMHooks.count.HP_clif_achievement_send_update_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, const struct achievement_data *ad); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_send_update_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_achievement_send_update_post[hIndex].func; + postHookFunc(fd, sd, ad); + } + } + return; +} +void HP_clif_pAchievementGetReward(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pAchievementGetReward_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAchievementGetReward_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pAchievementGetReward_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAchievementGetReward(fd, sd); + } + if (HPMHooks.count.HP_clif_pAchievementGetReward_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAchievementGetReward_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pAchievementGetReward_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_achievement_reward_ack(int fd, struct map_session_data *sd, const struct achievement_data *ad) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_achievement_reward_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, const struct achievement_data **ad); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_reward_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_achievement_reward_ack_pre[hIndex].func; + preHookFunc(&fd, &sd, &ad); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.achievement_reward_ack(fd, sd, ad); + } + if (HPMHooks.count.HP_clif_achievement_reward_ack_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, const struct achievement_data *ad); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_achievement_reward_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_achievement_reward_ack_post[hIndex].func; + postHookFunc(fd, sd, ad); + } + } + return; +} +void HP_clif_change_title_ack(int fd, struct map_session_data *sd, int title_id) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_change_title_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *title_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_change_title_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_change_title_ack_pre[hIndex].func; + preHookFunc(&fd, &sd, &title_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.change_title_ack(fd, sd, title_id); + } + if (HPMHooks.count.HP_clif_change_title_ack_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int title_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_change_title_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_change_title_ack_post[hIndex].func; + postHookFunc(fd, sd, title_id); + } + } + return; +} +void HP_clif_pChangeTitle(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pChangeTitle_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeTitle_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pChangeTitle_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pChangeTitle(fd, sd); + } + if (HPMHooks.count.HP_clif_pChangeTitle_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeTitle_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pChangeTitle_post[hIndex].func; + postHookFunc(fd, sd); } } 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); + if (HPMHooks.count.HP_clif_pWantToConnection_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWantToConnection_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWantToConnection_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pWantToConnection_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18104,25 +22083,25 @@ void HP_clif_pWantToConnection(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pWantToConnection_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pLoadEndAck_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLoadEndAck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLoadEndAck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pLoadEndAck_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18130,25 +22109,25 @@ void HP_clif_pLoadEndAck(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pLoadEndAck_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pTickSend_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTickSend_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTickSend_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pTickSend_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18156,51 +22135,77 @@ void HP_clif_pTickSend(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pTickSend_post > 0) { + 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); + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pHotkey1(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pHotkey1_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey1_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pHotkey1_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pHotkey1(fd, sd); + } + if (HPMHooks.count.HP_clif_pHotkey1_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey1_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pHotkey1_post[hIndex].func; + postHookFunc(fd, sd); } } return; } -void HP_clif_pHotkey(int fd, struct map_session_data *sd) { +void HP_clif_pHotkey2(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); + if (HPMHooks.count.HP_clif_pHotkey2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_pHotkey_pre[hIndex].func; - preHookFunc(&fd, sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pHotkey2_pre[hIndex].func; + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.pHotkey(fd, sd); + HPMHooks.source.clif.pHotkey2(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); + if (HPMHooks.count.HP_clif_pHotkey2_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkey2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pHotkey2_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); + if (HPMHooks.count.HP_clif_pProgressbar_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProgressbar_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProgressbar_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pProgressbar_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18208,25 +22213,25 @@ void HP_clif_pProgressbar(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pProgressbar_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pWalkToXY_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWalkToXY_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWalkToXY_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pWalkToXY_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18234,25 +22239,25 @@ void HP_clif_pWalkToXY(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pWalkToXY_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pQuitGame_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pQuitGame_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pQuitGame_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pQuitGame_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18260,25 +22265,25 @@ void HP_clif_pQuitGame(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pQuitGame_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGetCharNameRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetCharNameRequest_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetCharNameRequest_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGetCharNameRequest_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18286,25 +22291,25 @@ void HP_clif_pGetCharNameRequest(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGetCharNameRequest_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGlobalMessage_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGlobalMessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGlobalMessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGlobalMessage_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18312,25 +22317,25 @@ void HP_clif_pGlobalMessage(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGlobalMessage_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMapMove_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMapMove_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMapMove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pMapMove_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18338,25 +22343,25 @@ void HP_clif_pMapMove(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMapMove_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pChangeDir_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDir_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pChangeDir_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18364,25 +22369,25 @@ void HP_clif_pChangeDir(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pChangeDir_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pEmotion_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEmotion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEmotion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pEmotion_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18390,25 +22395,25 @@ void HP_clif_pEmotion(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pEmotion_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pHowManyConnections_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHowManyConnections_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHowManyConnections_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pHowManyConnections_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18416,25 +22421,25 @@ void HP_clif_pHowManyConnections(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pHowManyConnections_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pActionRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pActionRequest_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18442,25 +22447,25 @@ void HP_clif_pActionRequest(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pActionRequest_post > 0) { + 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); + postHookFunc(fd, sd); } } return; } void HP_clif_pActionRequest_sub(struct map_session_data *sd, int action_type, int target_id, int64 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, int64 *tick); + if (HPMHooks.count.HP_clif_pActionRequest_sub_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *action_type, int *target_id, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_sub_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &action_type, &target_id, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18468,25 +22473,25 @@ void HP_clif_pActionRequest_sub(struct map_session_data *sd, int action_type, in { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pActionRequest_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pActionRequest_sub_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int action_type, int target_id, int64 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); + 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); + if (HPMHooks.count.HP_clif_pRestart_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRestart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRestart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRestart_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18494,25 +22499,25 @@ void HP_clif_pRestart(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pRestart_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pWisMessage_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWisMessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWisMessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pWisMessage_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18520,25 +22525,25 @@ void HP_clif_pWisMessage(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pWisMessage_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pBroadcast_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBroadcast_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBroadcast_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBroadcast_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18546,25 +22551,25 @@ void HP_clif_pBroadcast(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pBroadcast_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pTakeItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTakeItem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTakeItem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pTakeItem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18572,25 +22577,25 @@ void HP_clif_pTakeItem(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pTakeItem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pDropItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDropItem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDropItem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pDropItem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18598,25 +22603,25 @@ void HP_clif_pDropItem(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pDropItem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pUseItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseItem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseItem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pUseItem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18624,25 +22629,25 @@ void HP_clif_pUseItem(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pUseItem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pEquipItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipItem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipItem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pEquipItem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18650,25 +22655,25 @@ void HP_clif_pEquipItem(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pEquipItem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pUnequipItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUnequipItem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUnequipItem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pUnequipItem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18676,25 +22681,25 @@ void HP_clif_pUnequipItem(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pUnequipItem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pNpcClicked_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcClicked_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcClicked_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNpcClicked_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18702,25 +22707,25 @@ void HP_clif_pNpcClicked(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pNpcClicked_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pNpcBuySellSelected_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuySellSelected_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuySellSelected_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNpcBuySellSelected_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18728,25 +22733,25 @@ void HP_clif_pNpcBuySellSelected(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pNpcBuySellSelected_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pNpcBuyListSend_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuyListSend_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcBuyListSend_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNpcBuyListSend_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18754,25 +22759,25 @@ void HP_clif_pNpcBuyListSend(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pNpcBuyListSend_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pNpcSellListSend_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSellListSend_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSellListSend_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNpcSellListSend_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18780,25 +22785,25 @@ void HP_clif_pNpcSellListSend(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pNpcSellListSend_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCreateChatRoom_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateChatRoom_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateChatRoom_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCreateChatRoom_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18806,25 +22811,25 @@ void HP_clif_pCreateChatRoom(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCreateChatRoom_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pChatAddMember_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatAddMember_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatAddMember_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pChatAddMember_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18832,25 +22837,25 @@ void HP_clif_pChatAddMember(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pChatAddMember_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pChatRoomStatusChange_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatRoomStatusChange_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatRoomStatusChange_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pChatRoomStatusChange_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18858,25 +22863,25 @@ void HP_clif_pChatRoomStatusChange(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pChatRoomStatusChange_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pChangeChatOwner_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeChatOwner_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeChatOwner_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pChangeChatOwner_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18884,25 +22889,25 @@ void HP_clif_pChangeChatOwner(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pChangeChatOwner_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pKickFromChat_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pKickFromChat_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pKickFromChat_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pKickFromChat_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18910,25 +22915,25 @@ void HP_clif_pKickFromChat(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pKickFromChat_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pChatLeave_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatLeave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChatLeave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pChatLeave_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18936,25 +22941,25 @@ void HP_clif_pChatLeave(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pChatLeave_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pTradeRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeRequest_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeRequest_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pTradeRequest_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18962,25 +22967,25 @@ void HP_clif_pTradeRequest(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pTradeRequest_post > 0) { + 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); + postHookFunc(fd, sd); } } 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); + if (HPMHooks.count.HP_clif_pTradeAck_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pTradeAck_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -18988,25 +22993,25 @@ void HP_clif_pTradeAck(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pTradeAck_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pTradeAddItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAddItem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeAddItem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pTradeAddItem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19014,25 +23019,25 @@ void HP_clif_pTradeAddItem(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pTradeAddItem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pTradeOk_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeOk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeOk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pTradeOk_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19040,25 +23045,25 @@ void HP_clif_pTradeOk(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pTradeOk_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pTradeCancel_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pTradeCancel_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19066,25 +23071,25 @@ void HP_clif_pTradeCancel(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pTradeCancel_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pTradeCommit_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCommit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTradeCommit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pTradeCommit_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19092,25 +23097,25 @@ void HP_clif_pTradeCommit(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pTradeCommit_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pStopAttack_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopAttack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopAttack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pStopAttack_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19118,25 +23123,25 @@ void HP_clif_pStopAttack(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pStopAttack_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPutItemToCart_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPutItemToCart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPutItemToCart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPutItemToCart_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19144,25 +23149,25 @@ void HP_clif_pPutItemToCart(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPutItemToCart_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGetItemFromCart_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetItemFromCart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGetItemFromCart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGetItemFromCart_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19170,25 +23175,25 @@ void HP_clif_pGetItemFromCart(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGetItemFromCart_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pRemoveOption_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemoveOption_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemoveOption_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRemoveOption_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19196,25 +23201,25 @@ void HP_clif_pRemoveOption(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pRemoveOption_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pChangeCart_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeCart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeCart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pChangeCart_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19222,25 +23227,25 @@ void HP_clif_pChangeCart(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pChangeCart_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pStatusUp_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStatusUp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStatusUp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pStatusUp_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19248,25 +23253,25 @@ void HP_clif_pStatusUp(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pStatusUp_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pSkillUp_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillUp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillUp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pSkillUp_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19274,25 +23279,51 @@ void HP_clif_pSkillUp(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pSkillUp_post > 0) { + 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); + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_useSkillToIdReal(int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_useSkillToIdReal_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *skill_id, int *skill_lv, int *target_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_useSkillToIdReal_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_useSkillToIdReal_pre[hIndex].func; + preHookFunc(&fd, &sd, &skill_id, &skill_lv, &target_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.useSkillToIdReal(fd, sd, skill_id, skill_lv, target_id); + } + if (HPMHooks.count.HP_clif_useSkillToIdReal_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int skill_id, int skill_lv, int target_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_useSkillToIdReal_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_useSkillToIdReal_post[hIndex].func; + postHookFunc(fd, sd, skill_id, skill_lv, target_id); } } 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); + if (HPMHooks.count.HP_clif_pUseSkillToId_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pUseSkillToId_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19300,25 +23331,77 @@ void HP_clif_pUseSkillToId(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pUseSkillToId_post > 0) { + 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); + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pStartUseSkillToId(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pStartUseSkillToId_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStartUseSkillToId_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pStartUseSkillToId_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pStartUseSkillToId(fd, sd); + } + if (HPMHooks.count.HP_clif_pStartUseSkillToId_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStartUseSkillToId_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pStartUseSkillToId_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pStopUseSkillToId(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pStopUseSkillToId_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopUseSkillToId_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pStopUseSkillToId_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pStopUseSkillToId(fd, sd); + } + if (HPMHooks.count.HP_clif_pStopUseSkillToId_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStopUseSkillToId_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pStopUseSkillToId_post[hIndex].func; + postHookFunc(fd, sd); } } return; } void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data *sd, int64 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, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); + if (HPMHooks.count.HP_clif_pUseSkillToId_homun_pre > 0) { + void (*preHookFunc) (struct homun_data **hd, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_homun_pre; hIndex++ ) { + 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); + preHookFunc(&hd, &sd, &tick, &skill_id, &skill_lv, &target_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19326,25 +23409,25 @@ void HP_clif_pUseSkillToId_homun(struct homun_data *hd, struct map_session_data { 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, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_homun_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pUseSkillToId_homun_post > 0) { + void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, int64 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); + 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, int64 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, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); + if (HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre > 0) { + void (*preHookFunc) (struct mercenary_data **md, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_mercenary_pre; hIndex++ ) { + 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); + preHookFunc(&md, &sd, &tick, &skill_id, &skill_lv, &target_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19352,25 +23435,25 @@ void HP_clif_pUseSkillToId_mercenary(struct mercenary_data *md, struct map_sessi { 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, int64 *tick, uint16 *skill_id, uint16 *skill_lv, int *target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToId_mercenary_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pUseSkillToId_mercenary_post > 0) { + void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, int64 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); + 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); + if (HPMHooks.count.HP_clif_pUseSkillToPos_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPos_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19378,25 +23461,25 @@ void HP_clif_pUseSkillToPos(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pUseSkillToPos_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pUseSkillToPosSub_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, uint16 *skill_lv, uint16 *skill_id, short *x, short *y, int *skillmoreinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosSub_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd, &skill_lv, &skill_id, &x, &y, &skillmoreinfo); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19404,25 +23487,25 @@ void HP_clif_pUseSkillToPosSub(int fd, struct map_session_data *sd, uint16 skill { 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++ ) { + if (HPMHooks.count.HP_clif_pUseSkillToPosSub_post > 0) { + 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); + 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, int64 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, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); + if (HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre > 0) { + void (*preHookFunc) (struct homun_data **hd, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_homun_pre; hIndex++ ) { + 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); + preHookFunc(&hd, &sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19430,25 +23513,25 @@ void HP_clif_pUseSkillToPos_homun(struct homun_data *hd, struct map_session_data { 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, int64 *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++ ) { + if (HPMHooks.count.HP_clif_pUseSkillToPos_homun_post > 0) { + void (*postHookFunc) (struct homun_data *hd, struct map_session_data *sd, int64 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); + 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, int64 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, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); + if (HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre > 0) { + void (*preHookFunc) (struct mercenary_data **md, struct map_session_data **sd, int64 *tick, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *skillmoreinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_pre; hIndex++ ) { + 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); + preHookFunc(&md, &sd, &tick, &skill_id, &skill_lv, &x, &y, &skillmoreinfo); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19456,25 +23539,25 @@ void HP_clif_pUseSkillToPos_mercenary(struct mercenary_data *md, struct map_sess { 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, int64 *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++ ) { + if (HPMHooks.count.HP_clif_pUseSkillToPos_mercenary_post > 0) { + void (*postHookFunc) (struct mercenary_data *md, struct map_session_data *sd, int64 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); + 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); + if (HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pUseSkillToPosMoreInfo_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19482,25 +23565,25 @@ void HP_clif_pUseSkillToPosMoreInfo(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pUseSkillToPosMoreInfo_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pUseSkillMap_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillMap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseSkillMap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pUseSkillMap_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19508,25 +23591,25 @@ void HP_clif_pUseSkillMap(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pUseSkillMap_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pRequestMemo_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRequestMemo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRequestMemo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRequestMemo_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19534,25 +23617,25 @@ void HP_clif_pRequestMemo(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pRequestMemo_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pProduceMix_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProduceMix_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pProduceMix_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pProduceMix_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19560,25 +23643,25 @@ void HP_clif_pProduceMix(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pProduceMix_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCooking_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCooking_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCooking_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCooking_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19586,25 +23669,25 @@ void HP_clif_pCooking(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCooking_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pRepairItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRepairItem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRepairItem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRepairItem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19612,25 +23695,25 @@ void HP_clif_pRepairItem(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pRepairItem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pWeaponRefine_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWeaponRefine_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pWeaponRefine_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pWeaponRefine_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19638,25 +23721,25 @@ void HP_clif_pWeaponRefine(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pWeaponRefine_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pNpcSelectMenu_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSelectMenu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcSelectMenu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNpcSelectMenu_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19664,25 +23747,25 @@ void HP_clif_pNpcSelectMenu(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pNpcSelectMenu_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pNpcNextClicked_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcNextClicked_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcNextClicked_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNpcNextClicked_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19690,25 +23773,25 @@ void HP_clif_pNpcNextClicked(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pNpcNextClicked_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pNpcAmountInput_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcAmountInput_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcAmountInput_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNpcAmountInput_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19716,25 +23799,25 @@ void HP_clif_pNpcAmountInput(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pNpcAmountInput_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pNpcStringInput_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcStringInput_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcStringInput_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNpcStringInput_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19742,25 +23825,25 @@ void HP_clif_pNpcStringInput(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pNpcStringInput_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pNpcCloseClicked_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcCloseClicked_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNpcCloseClicked_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNpcCloseClicked_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19768,25 +23851,25 @@ void HP_clif_pNpcCloseClicked(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pNpcCloseClicked_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pItemIdentify_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemIdentify_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemIdentify_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pItemIdentify_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19794,25 +23877,25 @@ void HP_clif_pItemIdentify(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pItemIdentify_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pSelectArrow_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectArrow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectArrow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pSelectArrow_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19820,25 +23903,25 @@ void HP_clif_pSelectArrow(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pSelectArrow_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAutoSpell_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoSpell_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoSpell_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pAutoSpell_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19846,25 +23929,25 @@ void HP_clif_pAutoSpell(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAutoSpell_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pUseCard_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseCard_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pUseCard_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pUseCard_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19872,25 +23955,25 @@ void HP_clif_pUseCard(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pUseCard_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pInsertCard_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInsertCard_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pInsertCard_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pInsertCard_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19898,25 +23981,25 @@ void HP_clif_pInsertCard(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pInsertCard_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pSolveCharName_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSolveCharName_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSolveCharName_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pSolveCharName_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19924,25 +24007,25 @@ void HP_clif_pSolveCharName(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pSolveCharName_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pResetChar_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetChar_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetChar_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pResetChar_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19950,25 +24033,25 @@ void HP_clif_pResetChar(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pResetChar_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pLocalBroadcast_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLocalBroadcast_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLocalBroadcast_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pLocalBroadcast_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -19976,25 +24059,25 @@ void HP_clif_pLocalBroadcast(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pLocalBroadcast_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMoveToKafra_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafra_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafra_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pMoveToKafra_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20002,25 +24085,25 @@ void HP_clif_pMoveToKafra(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMoveToKafra_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMoveFromKafra_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafra_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafra_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pMoveFromKafra_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20028,25 +24111,25 @@ void HP_clif_pMoveFromKafra(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMoveFromKafra_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveToKafraFromCart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pMoveToKafraFromCart_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20054,25 +24137,25 @@ void HP_clif_pMoveToKafraFromCart(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMoveToKafraFromCart_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveFromKafraToCart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pMoveFromKafraToCart_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20080,25 +24163,25 @@ void HP_clif_pMoveFromKafraToCart(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMoveFromKafraToCart_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCloseKafra_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseKafra_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseKafra_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCloseKafra_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20106,25 +24189,25 @@ void HP_clif_pCloseKafra(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCloseKafra_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pStoragePassword_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStoragePassword_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStoragePassword_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pStoragePassword_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20132,25 +24215,25 @@ void HP_clif_pStoragePassword(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pStoragePassword_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCreateParty_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCreateParty_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20158,25 +24241,25 @@ void HP_clif_pCreateParty(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCreateParty_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCreateParty2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateParty2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCreateParty2_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20184,25 +24267,25 @@ void HP_clif_pCreateParty2(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCreateParty2_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyInvite_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyInvite_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20210,25 +24293,25 @@ void HP_clif_pPartyInvite(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyInvite_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyInvite2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyInvite2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyInvite2_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20236,25 +24319,25 @@ void HP_clif_pPartyInvite2(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyInvite2_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pReplyPartyInvite_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20262,25 +24345,25 @@ void HP_clif_pReplyPartyInvite(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pReplyPartyInvite_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pReplyPartyInvite2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReplyPartyInvite2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pReplyPartyInvite2_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20288,25 +24371,25 @@ void HP_clif_pReplyPartyInvite2(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pReplyPartyInvite2_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pLeaveParty_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLeaveParty_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLeaveParty_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pLeaveParty_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20314,25 +24397,25 @@ void HP_clif_pLeaveParty(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pLeaveParty_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pRemovePartyMember_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemovePartyMember_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRemovePartyMember_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRemovePartyMember_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20340,25 +24423,25 @@ void HP_clif_pRemovePartyMember(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pRemovePartyMember_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyChangeOption_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeOption_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeOption_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyChangeOption_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20366,25 +24449,25 @@ void HP_clif_pPartyChangeOption(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyChangeOption_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyMessage_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyMessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyMessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyMessage_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20392,25 +24475,25 @@ void HP_clif_pPartyMessage(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyMessage_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyChangeLeader_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeLeader_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyChangeLeader_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyChangeLeader_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20418,25 +24501,25 @@ void HP_clif_pPartyChangeLeader(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyChangeLeader_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRegisterReq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyBookingRegisterReq_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20444,25 +24527,25 @@ void HP_clif_pPartyBookingRegisterReq(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyBookingRegisterReq_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSearchReq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyBookingSearchReq_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20470,25 +24553,25 @@ void HP_clif_pPartyBookingSearchReq(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyBookingSearchReq_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingDeleteReq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyBookingDeleteReq_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20496,25 +24579,25 @@ void HP_clif_pPartyBookingDeleteReq(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyBookingDeleteReq_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingUpdateReq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyBookingUpdateReq_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20522,25 +24605,25 @@ void HP_clif_pPartyBookingUpdateReq(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyBookingUpdateReq_post > 0) { + 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); + postHookFunc(fd, sd); } } return; } void HP_clif_pPartyRecruitRegisterReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitRegisterReq_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20548,25 +24631,25 @@ void HP_clif_pPartyRecruitRegisterReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyRecruitRegisterReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitRegisterReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitRegisterReq_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pPartyRecruitSearchReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyRecruitSearchReq_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pPartyRecruitSearchReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitSearchReq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitSearchReq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitSearchReq_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20574,25 +24657,25 @@ void HP_clif_pPartyRecruitSearchReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyRecruitSearchReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyRecruitSearchReq_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitSearchReq_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pPartyRecruitSearchReq_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitSearchReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitSearchReq_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pPartyRecruitDeleteReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitDeleteReq_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20600,25 +24683,25 @@ void HP_clif_pPartyRecruitDeleteReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyRecruitDeleteReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitDeleteReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitDeleteReq_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pPartyRecruitUpdateReq(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyRecruitUpdateReq_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20626,25 +24709,25 @@ void HP_clif_pPartyRecruitUpdateReq(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pPartyRecruitUpdateReq(fd, sd); } - if( HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyRecruitUpdateReq_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pPartyRecruitUpdateReq_post[hIndex].func; - postHookFunc(&fd, sd); + 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); + if (HPMHooks.count.HP_clif_pCloseVending_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseVending_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseVending_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCloseVending_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20652,25 +24735,25 @@ void HP_clif_pCloseVending(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCloseVending_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pVendingListReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pVendingListReq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pVendingListReq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pVendingListReq_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20678,25 +24761,25 @@ void HP_clif_pVendingListReq(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pVendingListReq_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPurchaseReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPurchaseReq_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20704,25 +24787,25 @@ void HP_clif_pPurchaseReq(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPurchaseReq_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPurchaseReq2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPurchaseReq2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPurchaseReq2_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20730,25 +24813,25 @@ void HP_clif_pPurchaseReq2(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPurchaseReq2_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pOpenVending_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenVending_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenVending_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pOpenVending_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20756,25 +24839,25 @@ void HP_clif_pOpenVending(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pOpenVending_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCreateGuild_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateGuild_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCreateGuild_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCreateGuild_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20782,25 +24865,25 @@ void HP_clif_pCreateGuild(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCreateGuild_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildCheckMaster_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCheckMaster_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCheckMaster_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildCheckMaster_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20808,25 +24891,25 @@ void HP_clif_pGuildCheckMaster(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildCheckMaster_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildRequestInfo_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildRequestInfo_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20834,25 +24917,25 @@ void HP_clif_pGuildRequestInfo(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildRequestInfo_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangePositionInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildChangePositionInfo_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20860,25 +24943,25 @@ void HP_clif_pGuildChangePositionInfo(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildChangePositionInfo_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeMemberPosition_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildChangeMemberPosition_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20886,25 +24969,25 @@ void HP_clif_pGuildChangeMemberPosition(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildChangeMemberPosition_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildRequestEmblem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestEmblem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestEmblem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildRequestEmblem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20912,25 +24995,25 @@ void HP_clif_pGuildRequestEmblem(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildRequestEmblem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildChangeEmblem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeEmblem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeEmblem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildChangeEmblem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20938,25 +25021,25 @@ void HP_clif_pGuildChangeEmblem(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildChangeEmblem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildChangeNotice_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeNotice_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildChangeNotice_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildChangeNotice_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20964,25 +25047,25 @@ void HP_clif_pGuildChangeNotice(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildChangeNotice_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildInvite_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildInvite_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -20990,25 +25073,25 @@ void HP_clif_pGuildInvite(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildInvite_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildReplyInvite_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyInvite_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyInvite_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildReplyInvite_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21016,25 +25099,25 @@ void HP_clif_pGuildReplyInvite(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildReplyInvite_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildLeave_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildLeave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildLeave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildLeave_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21042,25 +25125,25 @@ void HP_clif_pGuildLeave(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildLeave_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildExpulsion_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildExpulsion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildExpulsion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildExpulsion_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21068,25 +25151,25 @@ void HP_clif_pGuildExpulsion(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildExpulsion_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildMessage_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildMessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildMessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildMessage_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21094,25 +25177,25 @@ void HP_clif_pGuildMessage(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildMessage_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildRequestAlliance_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestAlliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildRequestAlliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildRequestAlliance_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21120,25 +25203,25 @@ void HP_clif_pGuildRequestAlliance(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildRequestAlliance_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildReplyAlliance_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyAlliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildReplyAlliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildReplyAlliance_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21146,25 +25229,25 @@ void HP_clif_pGuildReplyAlliance(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildReplyAlliance_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildDelAlliance_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildDelAlliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildDelAlliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildDelAlliance_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21172,25 +25255,25 @@ void HP_clif_pGuildDelAlliance(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildDelAlliance_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildOpposition_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildOpposition_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildOpposition_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildOpposition_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21198,25 +25281,25 @@ void HP_clif_pGuildOpposition(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildOpposition_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildBreak_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildBreak_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildBreak_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildBreak_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21224,25 +25307,25 @@ void HP_clif_pGuildBreak(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildBreak_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPetMenu_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetMenu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetMenu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPetMenu_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21250,25 +25333,25 @@ void HP_clif_pPetMenu(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPetMenu_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCatchPet_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCatchPet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCatchPet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCatchPet_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21276,25 +25359,25 @@ void HP_clif_pCatchPet(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCatchPet_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pSelectEgg_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectEgg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectEgg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pSelectEgg_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21302,25 +25385,25 @@ void HP_clif_pSelectEgg(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pSelectEgg_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pSendEmotion_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSendEmotion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSendEmotion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pSendEmotion_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21328,25 +25411,25 @@ void HP_clif_pSendEmotion(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pSendEmotion_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pChangePetName_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangePetName_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangePetName_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pChangePetName_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21354,25 +25437,25 @@ void HP_clif_pChangePetName(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pChangePetName_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGMKick_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMKick_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21380,25 +25463,25 @@ void HP_clif_pGMKick(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGMKick_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGMKickAll_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKickAll_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMKickAll_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMKickAll_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21406,25 +25489,25 @@ void HP_clif_pGMKickAll(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGMKickAll_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGMShift_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMShift_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMShift_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMShift_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21432,25 +25515,25 @@ void HP_clif_pGMShift(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGMShift_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGMRemove2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRemove2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRemove2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMRemove2_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21458,25 +25541,25 @@ void HP_clif_pGMRemove2(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGMRemove2_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGMRecall_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMRecall_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21484,25 +25567,25 @@ void HP_clif_pGMRecall(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGMRecall_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGMRecall2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRecall2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMRecall2_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21510,25 +25593,25 @@ void HP_clif_pGMRecall2(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGMRecall2_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGM_Monster_Item_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGM_Monster_Item_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21536,25 +25619,25 @@ void HP_clif_pGM_Monster_Item(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGM_Monster_Item_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGMHide_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMHide_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMHide_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMHide_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21562,25 +25645,25 @@ void HP_clif_pGMHide(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGMHide_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGMReqNoChat_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqNoChat_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqNoChat_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMReqNoChat_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21588,25 +25671,25 @@ void HP_clif_pGMReqNoChat(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGMReqNoChat_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGMRc_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMRc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMRc_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21614,25 +25697,25 @@ void HP_clif_pGMRc(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGMRc_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGMReqAccountName_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqAccountName_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMReqAccountName_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMReqAccountName_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21640,25 +25723,25 @@ void HP_clif_pGMReqAccountName(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGMReqAccountName_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGMChangeMapType_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMChangeMapType_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMChangeMapType_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMChangeMapType_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21666,25 +25749,25 @@ void HP_clif_pGMChangeMapType(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGMChangeMapType_post > 0) { + 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); + postHookFunc(fd, sd); } } return; } void HP_clif_pGMFullStrip(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pGMFullStrip_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pGMFullStrip_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGMFullStrip_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21692,25 +25775,25 @@ void HP_clif_pGMFullStrip(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pGMFullStrip(fd, sd); } - if( HPMHooks.count.HP_clif_pGMFullStrip_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pGMFullStrip_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGMFullStrip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pGMFullStrip_post[hIndex].func; - postHookFunc(&fd, sd); + 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); + if (HPMHooks.count.HP_clif_pPMIgnore_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnore_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnore_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPMIgnore_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21718,25 +25801,25 @@ void HP_clif_pPMIgnore(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPMIgnore_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPMIgnoreAll_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreAll_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreAll_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPMIgnoreAll_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21744,25 +25827,25 @@ void HP_clif_pPMIgnoreAll(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPMIgnoreAll_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPMIgnoreList_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreList_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPMIgnoreList_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPMIgnoreList_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21770,25 +25853,25 @@ void HP_clif_pPMIgnoreList(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPMIgnoreList_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pNoviceDoriDori_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceDoriDori_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceDoriDori_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNoviceDoriDori_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21796,25 +25879,25 @@ void HP_clif_pNoviceDoriDori(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pNoviceDoriDori_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNoviceExplosionSpirits_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNoviceExplosionSpirits_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21822,25 +25905,25 @@ void HP_clif_pNoviceExplosionSpirits(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pNoviceExplosionSpirits_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pFriendsListAdd_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListAdd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListAdd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pFriendsListAdd_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21848,25 +25931,25 @@ void HP_clif_pFriendsListAdd(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pFriendsListAdd_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pFriendsListReply_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListReply_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListReply_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pFriendsListReply_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21874,25 +25957,25 @@ void HP_clif_pFriendsListReply(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pFriendsListReply_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pFriendsListRemove_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListRemove_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFriendsListRemove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pFriendsListRemove_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21900,25 +25983,25 @@ void HP_clif_pFriendsListRemove(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pFriendsListRemove_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPVPInfo_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPVPInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPVPInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPVPInfo_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21926,25 +26009,25 @@ void HP_clif_pPVPInfo(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPVPInfo_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pBlacksmith_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBlacksmith_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBlacksmith_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBlacksmith_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21952,25 +26035,25 @@ void HP_clif_pBlacksmith(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pBlacksmith_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAlchemist_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAlchemist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAlchemist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pAlchemist_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -21978,25 +26061,25 @@ void HP_clif_pAlchemist(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAlchemist_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pTaekwon_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTaekwon_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pTaekwon_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pTaekwon_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22004,25 +26087,25 @@ void HP_clif_pTaekwon(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pTaekwon_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pRankingPk_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRankingPk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRankingPk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRankingPk_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22030,25 +26113,25 @@ void HP_clif_pRankingPk(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pRankingPk_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pFeelSaveOk_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFeelSaveOk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pFeelSaveOk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pFeelSaveOk_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22056,25 +26139,25 @@ void HP_clif_pFeelSaveOk(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pFeelSaveOk_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pChangeHomunculusName_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeHomunculusName_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeHomunculusName_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pChangeHomunculusName_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22082,25 +26165,25 @@ void HP_clif_pChangeHomunculusName(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pChangeHomunculusName_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pHomMoveToMaster_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveToMaster_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveToMaster_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pHomMoveToMaster_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22108,25 +26191,25 @@ void HP_clif_pHomMoveToMaster(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pHomMoveToMaster_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pHomMoveTo_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveTo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMoveTo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pHomMoveTo_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22134,25 +26217,25 @@ void HP_clif_pHomMoveTo(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pHomMoveTo_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pHomAttack_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomAttack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomAttack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pHomAttack_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22160,25 +26243,25 @@ void HP_clif_pHomAttack(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pHomAttack_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pHomMenu_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMenu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHomMenu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pHomMenu_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22186,25 +26269,25 @@ void HP_clif_pHomMenu(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pHomMenu_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAutoRevive_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoRevive_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAutoRevive_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pAutoRevive_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22212,25 +26295,25 @@ void HP_clif_pAutoRevive(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAutoRevive_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCheck_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCheck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCheck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCheck_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22238,25 +26321,25 @@ void HP_clif_pCheck(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCheck_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMail_refreshinbox_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_refreshinbox_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22264,25 +26347,25 @@ void HP_clif_pMail_refreshinbox(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMail_refreshinbox_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMail_read_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_read_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22290,25 +26373,25 @@ void HP_clif_pMail_read(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMail_read_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMail_getattach_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_getattach_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22316,25 +26399,25 @@ void HP_clif_pMail_getattach(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMail_getattach_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMail_delete_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_delete_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22342,25 +26425,25 @@ void HP_clif_pMail_delete(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMail_delete_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMail_return_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_return_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22368,25 +26451,25 @@ void HP_clif_pMail_return(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMail_return_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMail_setattach_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_setattach_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22394,25 +26477,25 @@ void HP_clif_pMail_setattach(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMail_setattach_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMail_winopen_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_winopen_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22420,25 +26503,25 @@ void HP_clif_pMail_winopen(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMail_winopen_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMail_send_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMail_send_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22446,25 +26529,25 @@ void HP_clif_pMail_send(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMail_send_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAuction_cancelreg_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancelreg_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22472,25 +26555,25 @@ void HP_clif_pAuction_cancelreg(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAuction_cancelreg_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAuction_setitem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_setitem_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22498,25 +26581,25 @@ void HP_clif_pAuction_setitem(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAuction_setitem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAuction_register_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_register_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22524,25 +26607,25 @@ void HP_clif_pAuction_register(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAuction_register_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAuction_cancel_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_cancel_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22550,25 +26633,25 @@ void HP_clif_pAuction_cancel(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAuction_cancel_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAuction_close_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_close_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22576,25 +26659,25 @@ void HP_clif_pAuction_close(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAuction_close_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAuction_bid_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_bid_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22602,25 +26685,25 @@ void HP_clif_pAuction_bid(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAuction_bid_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAuction_search_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_search_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22628,25 +26711,25 @@ void HP_clif_pAuction_search(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAuction_search_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAuction_buysell_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAuction_buysell_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22654,25 +26737,25 @@ void HP_clif_pAuction_buysell(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAuction_buysell_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pcashshop_buy_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pcashshop_buy_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22680,25 +26763,25 @@ void HP_clif_pcashshop_buy(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pcashshop_buy_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAdopt_request_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_request_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22706,25 +26789,25 @@ void HP_clif_pAdopt_request(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAdopt_request_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pAdopt_reply_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAdopt_reply_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22732,25 +26815,25 @@ void HP_clif_pAdopt_reply(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pAdopt_reply_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pViewPlayerEquip_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pViewPlayerEquip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pViewPlayerEquip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pViewPlayerEquip_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22758,51 +26841,51 @@ void HP_clif_pViewPlayerEquip(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pViewPlayerEquip_post > 0) { + 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); + postHookFunc(fd, sd); } } return; } -void HP_clif_pEquipTick(int fd, struct map_session_data *sd) { +void HP_clif_p_cz_config(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); + if (HPMHooks.count.HP_clif_p_cz_config_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipTick_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_pEquipTick_pre[hIndex].func; - preHookFunc(&fd, sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_p_cz_config_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_p_cz_config_pre[hIndex].func; + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.pEquipTick(fd, sd); + HPMHooks.source.clif.p_cz_config(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); + if (HPMHooks.count.HP_clif_p_cz_config_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_p_cz_config_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_p_cz_config_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); + if (HPMHooks.count.HP_clif_pquestStateAck_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pquestStateAck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pquestStateAck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pquestStateAck_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22810,25 +26893,25 @@ void HP_clif_pquestStateAck(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pquestStateAck_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pmercenary_action_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pmercenary_action_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22836,25 +26919,25 @@ void HP_clif_pmercenary_action(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pmercenary_action_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pBattleChat_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBattleChat_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBattleChat_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBattleChat_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22862,25 +26945,25 @@ void HP_clif_pBattleChat(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pBattleChat_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pLessEffect_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLessEffect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLessEffect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pLessEffect_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22888,25 +26971,25 @@ void HP_clif_pLessEffect(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pLessEffect_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pItemListWindowSelected_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemListWindowSelected_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pItemListWindowSelected_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pItemListWindowSelected_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22914,25 +26997,25 @@ void HP_clif_pItemListWindowSelected(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pItemListWindowSelected_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqOpenBuyingStore_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pReqOpenBuyingStore_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22940,25 +27023,25 @@ void HP_clif_pReqOpenBuyingStore(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pReqOpenBuyingStore_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqCloseBuyingStore_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pReqCloseBuyingStore_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22966,25 +27049,25 @@ void HP_clif_pReqCloseBuyingStore(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pReqCloseBuyingStore_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pReqClickBuyingStore_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqClickBuyingStore_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqClickBuyingStore_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pReqClickBuyingStore_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -22992,25 +27075,25 @@ void HP_clif_pReqClickBuyingStore(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pReqClickBuyingStore_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqTradeBuyingStore_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pReqTradeBuyingStore_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23018,25 +27101,25 @@ void HP_clif_pReqTradeBuyingStore(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pReqTradeBuyingStore_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pSearchStoreInfo_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfo_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23044,25 +27127,25 @@ void HP_clif_pSearchStoreInfo(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pSearchStoreInfo_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoNextPage_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23070,25 +27153,25 @@ void HP_clif_pSearchStoreInfoNextPage(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pSearchStoreInfoNextPage_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCloseSearchStoreInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCloseSearchStoreInfo_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23096,25 +27179,25 @@ void HP_clif_pCloseSearchStoreInfo(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCloseSearchStoreInfo_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pSearchStoreInfoListItemClick_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23122,25 +27205,25 @@ void HP_clif_pSearchStoreInfoListItemClick(int fd, struct map_session_data *sd) { 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++ ) { + if (HPMHooks.count.HP_clif_pSearchStoreInfoListItemClick_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pDebug_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDebug_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDebug_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pDebug_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23148,25 +27231,25 @@ void HP_clif_pDebug(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pDebug_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pSkillSelectMenu_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillSelectMenu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSkillSelectMenu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pSkillSelectMenu_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23174,25 +27257,25 @@ void HP_clif_pSkillSelectMenu(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pSkillSelectMenu_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pMoveItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveItem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMoveItem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pMoveItem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23200,25 +27283,25 @@ void HP_clif_pMoveItem(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pMoveItem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pDull_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDull_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pDull_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pDull_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23226,25 +27309,51 @@ void HP_clif_pDull(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pDull_post > 0) { + 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); + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_p_cz_blocking_play_cancel(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_p_cz_blocking_play_cancel_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_p_cz_blocking_play_cancel_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_p_cz_blocking_play_cancel_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.p_cz_blocking_play_cancel(fd, sd); + } + if (HPMHooks.count.HP_clif_p_cz_blocking_play_cancel_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_p_cz_blocking_play_cancel_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_p_cz_blocking_play_cancel_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); + if (HPMHooks.count.HP_clif_pBGQueueRegister_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRegister_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRegister_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBGQueueRegister_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23252,25 +27361,25 @@ void HP_clif_pBGQueueRegister(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pBGQueueRegister_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pBGQueueCheckState_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueCheckState_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueCheckState_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBGQueueCheckState_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23278,25 +27387,25 @@ void HP_clif_pBGQueueCheckState(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pBGQueueCheckState_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueRevokeReq_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBGQueueRevokeReq_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23304,25 +27413,25 @@ void HP_clif_pBGQueueRevokeReq(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pBGQueueRevokeReq_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBGQueueBattleBeginAck_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23330,51 +27439,103 @@ void HP_clif_pBGQueueBattleBeginAck(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pBGQueueBattleBeginAck_post > 0) { + 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); + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pCashShopOpen1(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pCashShopOpen1_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen1_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen1_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCashShopOpen1(fd, sd); + } + if (HPMHooks.count.HP_clif_pCashShopOpen1_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen1_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopOpen1_post[hIndex].func; + postHookFunc(fd, sd); } } return; } -void HP_clif_pCashShopOpen(int fd, struct map_session_data *sd) { +void HP_clif_pCashShopOpen2(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); + if (HPMHooks.count.HP_clif_pCashShopOpen2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen_pre[hIndex].func; - preHookFunc(&fd, sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopOpen2_pre[hIndex].func; + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.pCashShopOpen(fd, sd); + HPMHooks.source.clif.pCashShopOpen2(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); + if (HPMHooks.count.HP_clif_pCashShopOpen2_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopOpen2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopOpen2_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pCashShopLimitedReq(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pCashShopLimitedReq_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopLimitedReq_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pCashShopLimitedReq_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCashShopLimitedReq(fd, sd); + } + if (HPMHooks.count.HP_clif_pCashShopLimitedReq_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopLimitedReq_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pCashShopLimitedReq_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); + if (HPMHooks.count.HP_clif_pCashShopClose_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopClose_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopClose_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCashShopClose_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23382,25 +27543,25 @@ void HP_clif_pCashShopClose(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCashShopClose_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCashShopReqTab_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopReqTab_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopReqTab_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCashShopReqTab_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23408,25 +27569,25 @@ void HP_clif_pCashShopReqTab(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCashShopReqTab_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCashShopSchedule_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopSchedule_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopSchedule_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCashShopSchedule_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23434,25 +27595,25 @@ void HP_clif_pCashShopSchedule(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCashShopSchedule_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pCashShopBuy_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopBuy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCashShopBuy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pCashShopBuy_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23460,25 +27621,25 @@ void HP_clif_pCashShopBuy(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pCashShopBuy_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyTick_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyTick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyTick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyTick_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23486,25 +27647,25 @@ void HP_clif_pPartyTick(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyTick_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pGuildInvite2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildInvite2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pGuildInvite2_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23512,25 +27673,77 @@ void HP_clif_pGuildInvite2(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pGuildInvite2_post > 0) { + 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); + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_cashShopBuyAck(int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cashShopBuyAck_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *itemId, enum CASH_SHOP_BUY_RESULT *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopBuyAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cashShopBuyAck_pre[hIndex].func; + preHookFunc(&fd, &sd, &itemId, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cashShopBuyAck(fd, sd, itemId, result); + } + if (HPMHooks.count.HP_clif_cashShopBuyAck_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int itemId, enum CASH_SHOP_BUY_RESULT result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopBuyAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cashShopBuyAck_post[hIndex].func; + postHookFunc(fd, sd, itemId, result); + } + } + return; +} +void HP_clif_cashShopOpen(int fd, struct map_session_data *sd, int tab) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_cashShopOpen_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int *tab); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopOpen_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_cashShopOpen_pre[hIndex].func; + preHookFunc(&fd, &sd, &tab); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.cashShopOpen(fd, sd, tab); + } + if (HPMHooks.count.HP_clif_cashShopOpen_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int tab); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_cashShopOpen_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_cashShopOpen_post[hIndex].func; + postHookFunc(fd, sd, tab); } } 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); + if (HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingAddFilter_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyBookingAddFilter_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23538,25 +27751,25 @@ void HP_clif_pPartyBookingAddFilter(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyBookingAddFilter_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingSubFilter_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyBookingSubFilter_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23564,25 +27777,25 @@ void HP_clif_pPartyBookingSubFilter(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyBookingSubFilter_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyBookingReqVolunteer_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23590,25 +27803,25 @@ void HP_clif_pPartyBookingReqVolunteer(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyBookingReqVolunteer_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyBookingRefuseVolunteer_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23616,25 +27829,25 @@ void HP_clif_pPartyBookingRefuseVolunteer(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyBookingRefuseVolunteer_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pPartyBookingCancelVolunteer_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23642,25 +27855,25 @@ void HP_clif_pPartyBookingCancelVolunteer(int fd, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_clif_pPartyBookingCancelVolunteer_post > 0) { + 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); + postHookFunc(fd, sd); } } return; } void HP_clif_pBankDeposit(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBankDeposit_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pBankDeposit_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankDeposit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankDeposit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBankDeposit_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23668,25 +27881,25 @@ void HP_clif_pBankDeposit(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBankDeposit(fd, sd); } - if( HPMHooks.count.HP_clif_pBankDeposit_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankDeposit_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pBankDeposit_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankDeposit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBankDeposit_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pBankWithdraw(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBankWithdraw_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pBankWithdraw_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankWithdraw_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankWithdraw_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBankWithdraw_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23694,25 +27907,25 @@ void HP_clif_pBankWithdraw(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBankWithdraw(fd, sd); } - if( HPMHooks.count.HP_clif_pBankWithdraw_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankWithdraw_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pBankWithdraw_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankWithdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBankWithdraw_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pBankCheck(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBankCheck_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pBankCheck_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankCheck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankCheck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBankCheck_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23720,25 +27933,25 @@ void HP_clif_pBankCheck(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBankCheck(fd, sd); } - if( HPMHooks.count.HP_clif_pBankCheck_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankCheck_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pBankCheck_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankCheck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBankCheck_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pBankOpen(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBankOpen_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pBankOpen_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankOpen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankOpen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBankOpen_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23746,25 +27959,25 @@ void HP_clif_pBankOpen(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBankOpen(fd, sd); } - if( HPMHooks.count.HP_clif_pBankOpen_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankOpen_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pBankOpen_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankOpen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBankOpen_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pBankClose(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pBankClose_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pBankClose_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankClose_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankClose_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pBankClose_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23772,25 +27985,25 @@ void HP_clif_pBankClose(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pBankClose(fd, sd); } - if( HPMHooks.count.HP_clif_pBankClose_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankClose_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pBankClose_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pBankClose_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pBankClose_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pRouletteOpen(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRouletteOpen_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pRouletteOpen_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRouletteOpen_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23798,25 +28011,25 @@ void HP_clif_pRouletteOpen(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRouletteOpen(fd, sd); } - if( HPMHooks.count.HP_clif_pRouletteOpen_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pRouletteOpen_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteOpen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRouletteOpen_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pRouletteInfo(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRouletteInfo_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pRouletteInfo_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRouletteInfo_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23824,25 +28037,25 @@ void HP_clif_pRouletteInfo(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRouletteInfo(fd, sd); } - if( HPMHooks.count.HP_clif_pRouletteInfo_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pRouletteInfo_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteInfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRouletteInfo_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pRouletteClose(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRouletteClose_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pRouletteClose_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRouletteClose_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23850,25 +28063,25 @@ void HP_clif_pRouletteClose(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRouletteClose(fd, sd); } - if( HPMHooks.count.HP_clif_pRouletteClose_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pRouletteClose_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteClose_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRouletteClose_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pRouletteGenerate(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRouletteGenerate_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pRouletteGenerate_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRouletteGenerate_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23876,25 +28089,25 @@ void HP_clif_pRouletteGenerate(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRouletteGenerate(fd, sd); } - if( HPMHooks.count.HP_clif_pRouletteGenerate_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pRouletteGenerate_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteGenerate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRouletteGenerate_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pRouletteRecvItem(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pRouletteRecvItem_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pRouletteRecvItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pRouletteRecvItem_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23902,25 +28115,25 @@ void HP_clif_pRouletteRecvItem(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pRouletteRecvItem(fd, sd); } - if( HPMHooks.count.HP_clif_pRouletteRecvItem_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pRouletteRecvItem_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRouletteRecvItem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pRouletteRecvItem_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pNPCShopClosed(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNPCShopClosed_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pNPCShopClosed_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCShopClosed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCShopClosed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNPCShopClosed_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23928,25 +28141,25 @@ void HP_clif_pNPCShopClosed(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNPCShopClosed(fd, sd); } - if( HPMHooks.count.HP_clif_pNPCShopClosed_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCShopClosed_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pNPCShopClosed_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCShopClosed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNPCShopClosed_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pNPCMarketClosed(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNPCMarketClosed_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pNPCMarketClosed_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketClosed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketClosed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNPCMarketClosed_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23954,25 +28167,25 @@ void HP_clif_pNPCMarketClosed(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNPCMarketClosed(fd, sd); } - if( HPMHooks.count.HP_clif_pNPCMarketClosed_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketClosed_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pNPCMarketClosed_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketClosed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNPCMarketClosed_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_pNPCMarketPurchase(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pNPCMarketPurchase_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pNPCMarketPurchase_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketPurchase_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketPurchase_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pNPCMarketPurchase_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -23980,77 +28193,104 @@ void HP_clif_pNPCMarketPurchase(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pNPCMarketPurchase(fd, sd); } - if( HPMHooks.count.HP_clif_pNPCMarketPurchase_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketPurchase_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pNPCMarketPurchase_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCMarketPurchase_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pNPCMarketPurchase_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } -void HP_clif_add_random_options(unsigned char *buf, struct item *item) { +int HP_clif_add_item_options(struct ItemOptions *buf, const struct item *it) { int hIndex = 0; - if( HPMHooks.count.HP_clif_add_random_options_pre ) { - void (*preHookFunc) (unsigned char *buf, struct item *item); + int retVal___ = 0; + if (HPMHooks.count.HP_clif_add_item_options_pre > 0) { + int (*preHookFunc) (struct ItemOptions **buf, const struct item **it); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_random_options_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_add_random_options_pre[hIndex].func; - preHookFunc(buf, item); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_item_options_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_add_item_options_pre[hIndex].func; + retVal___ = preHookFunc(&buf, &it); } - if( *HPMforce_return ) { + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.add_item_options(buf, it); + } + if (HPMHooks.count.HP_clif_add_item_options_post > 0) { + int (*postHookFunc) (int retVal___, struct ItemOptions *buf, const struct item *it); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_item_options_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_add_item_options_post[hIndex].func; + retVal___ = postHookFunc(retVal___, buf, it); + } + } + return retVal___; +} +void HP_clif_pHotkeyRowShift1(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pHotkeyRowShift1_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift1_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift1_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.add_random_options(buf, item); + HPMHooks.source.clif.pHotkeyRowShift1(fd, sd); } - if( HPMHooks.count.HP_clif_add_random_options_post ) { - void (*postHookFunc) (unsigned char *buf, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_add_random_options_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_add_random_options_post[hIndex].func; - postHookFunc(buf, item); + if (HPMHooks.count.HP_clif_pHotkeyRowShift1_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift1_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift1_post[hIndex].func; + postHookFunc(fd, sd); } } return; } -void HP_clif_pHotkeyRowShift(int fd, struct map_session_data *sd) { +void HP_clif_pHotkeyRowShift2(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pHotkeyRowShift_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pHotkeyRowShift2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift_pre[hIndex].func; - preHookFunc(&fd, sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift2_pre[hIndex].func; + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.clif.pHotkeyRowShift(fd, sd); + HPMHooks.source.clif.pHotkeyRowShift2(fd, sd); } - if( HPMHooks.count.HP_clif_pHotkeyRowShift_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift_post[hIndex].func; - postHookFunc(&fd, sd); + if (HPMHooks.count.HP_clif_pHotkeyRowShift2_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pHotkeyRowShift2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pHotkeyRowShift2_post[hIndex].func; + postHookFunc(fd, sd); } } return; } void HP_clif_dressroom_open(struct map_session_data *sd, int view) { int hIndex = 0; - if( HPMHooks.count.HP_clif_dressroom_open_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *view); + if (HPMHooks.count.HP_clif_dressroom_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *view); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_dressroom_open_pre[hIndex].func; - preHookFunc(sd, &view); + preHookFunc(&sd, &view); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24058,25 +28298,25 @@ void HP_clif_dressroom_open(struct map_session_data *sd, int view) { { HPMHooks.source.clif.dressroom_open(sd, view); } - if( HPMHooks.count.HP_clif_dressroom_open_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *view); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_dressroom_open_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int view); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_dressroom_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_dressroom_open_post[hIndex].func; - postHookFunc(sd, &view); + postHookFunc(sd, view); } } return; } void HP_clif_pOneClick_ItemIdentify(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pOneClick_ItemIdentify_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pOneClick_ItemIdentify_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOneClick_ItemIdentify_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOneClick_ItemIdentify_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pOneClick_ItemIdentify_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24084,25 +28324,25 @@ void HP_clif_pOneClick_ItemIdentify(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pOneClick_ItemIdentify(fd, sd); } - if( HPMHooks.count.HP_clif_pOneClick_ItemIdentify_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOneClick_ItemIdentify_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pOneClick_ItemIdentify_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOneClick_ItemIdentify_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pOneClick_ItemIdentify_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; } void HP_clif_selectcart(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_selectcart_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_clif_selectcart_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_selectcart_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24110,9 +28350,9 @@ void HP_clif_selectcart(struct map_session_data *sd) { { HPMHooks.source.clif.selectcart(sd); } - if( HPMHooks.count.HP_clif_selectcart_post ) { + if (HPMHooks.count.HP_clif_selectcart_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_selectcart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_selectcart_post[hIndex].func; postHookFunc(sd); } @@ -24121,14 +28361,14 @@ void HP_clif_selectcart(struct map_session_data *sd) { } void HP_clif_pSelectCart(int fd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_clif_pSelectCart_pre ) { - void (*preHookFunc) (int *fd, struct map_session_data *sd); + if (HPMHooks.count.HP_clif_pSelectCart_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_pSelectCart_pre[hIndex].func; - preHookFunc(&fd, sd); + preHookFunc(&fd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24136,11 +28376,11 @@ void HP_clif_pSelectCart(int fd, struct map_session_data *sd) { { HPMHooks.source.clif.pSelectCart(fd, sd); } - if( HPMHooks.count.HP_clif_pSelectCart_post ) { - void (*postHookFunc) (int *fd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_post; hIndex++ ) { + if (HPMHooks.count.HP_clif_pSelectCart_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pSelectCart_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_pSelectCart_post[hIndex].func; - postHookFunc(&fd, sd); + postHookFunc(fd, sd); } } return; @@ -24148,14 +28388,14 @@ void HP_clif_pSelectCart(int fd, struct map_session_data *sd) { const char* HP_clif_get_bl_name(const struct block_list *bl) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_clif_get_bl_name_pre ) { - const char* (*preHookFunc) (const struct block_list *bl); + if (HPMHooks.count.HP_clif_get_bl_name_pre > 0) { + const char* (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_bl_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_bl_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_get_bl_name_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24163,26 +28403,2461 @@ const char* HP_clif_get_bl_name(const struct block_list *bl) { { retVal___ = HPMHooks.source.clif.get_bl_name(bl); } - if( HPMHooks.count.HP_clif_get_bl_name_post ) { + if (HPMHooks.count.HP_clif_get_bl_name_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_bl_name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_get_bl_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_get_bl_name_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -/* cmdline */ +void HP_clif_pRodexOpenWriteMail(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexOpenWriteMail_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexOpenWriteMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexOpenWriteMail_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexOpenWriteMail(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexOpenWriteMail_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexOpenWriteMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexOpenWriteMail_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_open_write_mail(int fd, const char *receiver_name, int8 result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_open_write_mail_pre > 0) { + void (*preHookFunc) (int *fd, const char **receiver_name, int8 *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_open_write_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_open_write_mail_pre[hIndex].func; + preHookFunc(&fd, &receiver_name, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_open_write_mail(fd, receiver_name, result); + } + if (HPMHooks.count.HP_clif_rodex_open_write_mail_post > 0) { + void (*postHookFunc) (int fd, const char *receiver_name, int8 result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_open_write_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_open_write_mail_post[hIndex].func; + postHookFunc(fd, receiver_name, result); + } + } + return; +} +void HP_clif_pRodexAddItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexAddItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexAddItem_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexAddItem_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexAddItem(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexAddItem_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexAddItem_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexAddItem_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_add_item_result(struct map_session_data *sd, int16 idx, int16 amount, enum rodex_add_item result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_add_item_result_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount, enum rodex_add_item *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_add_item_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_add_item_result_pre[hIndex].func; + preHookFunc(&sd, &idx, &amount, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_add_item_result(sd, idx, amount, result); + } + if (HPMHooks.count.HP_clif_rodex_add_item_result_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount, enum rodex_add_item result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_add_item_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_add_item_result_post[hIndex].func; + postHookFunc(sd, idx, amount, result); + } + } + return; +} +void HP_clif_pRodexRemoveItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexRemoveItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRemoveItem_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexRemoveItem_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexRemoveItem(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexRemoveItem_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRemoveItem_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexRemoveItem_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_remove_item_result(struct map_session_data *sd, int16 idx, int16 amount) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_remove_item_result_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_remove_item_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_remove_item_result_pre[hIndex].func; + preHookFunc(&sd, &idx, &amount); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_remove_item_result(sd, idx, amount); + } + if (HPMHooks.count.HP_clif_rodex_remove_item_result_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_remove_item_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_remove_item_result_post[hIndex].func; + postHookFunc(sd, idx, amount); + } + } + return; +} +void HP_clif_pRodexSendMail(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexSendMail_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexSendMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexSendMail_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexSendMail(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexSendMail_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexSendMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexSendMail_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_send_mail_result(int fd, struct map_session_data *sd, int8 result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_send_mail_result_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int8 *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mail_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_send_mail_result_pre[hIndex].func; + preHookFunc(&fd, &sd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_send_mail_result(fd, sd, result); + } + if (HPMHooks.count.HP_clif_rodex_send_mail_result_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int8 result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mail_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_send_mail_result_post[hIndex].func; + postHookFunc(fd, sd, result); + } + } + return; +} +void HP_clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_type, int64 page_start) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_send_maillist_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int8 *open_type, int64 *page_start); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_maillist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_send_maillist_pre[hIndex].func; + preHookFunc(&fd, &sd, &open_type, &page_start); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_send_maillist(fd, sd, open_type, page_start); + } + if (HPMHooks.count.HP_clif_rodex_send_maillist_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int8 open_type, int64 page_start); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_maillist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_send_maillist_post[hIndex].func; + postHookFunc(fd, sd, open_type, page_start); + } + } + return; +} +void HP_clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type, int count) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_send_refresh_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int8 *open_type, int *count); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_refresh_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_send_refresh_pre[hIndex].func; + preHookFunc(&fd, &sd, &open_type, &count); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_send_refresh(fd, sd, open_type, count); + } + if (HPMHooks.count.HP_clif_rodex_send_refresh_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int8 open_type, int count); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_refresh_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_send_refresh_post[hIndex].func; + postHookFunc(fd, sd, open_type, count); + } + } + return; +} +void HP_clif_rodex_send_mails_all(int fd, struct map_session_data *sd, int64 mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_send_mails_all_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mails_all_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_send_mails_all_pre[hIndex].func; + preHookFunc(&fd, &sd, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_send_mails_all(fd, sd, mail_id); + } + if (HPMHooks.count.HP_clif_rodex_send_mails_all_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_send_mails_all_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_send_mails_all_post[hIndex].func; + postHookFunc(fd, sd, mail_id); + } + } + return; +} +void HP_clif_pRodexReadMail(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexReadMail_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexReadMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexReadMail_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexReadMail(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexReadMail_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexReadMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexReadMail_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, struct rodex_message *msg) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_read_mail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, struct rodex_message **msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_read_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_read_mail_pre[hIndex].func; + preHookFunc(&sd, &opentype, &msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_read_mail(sd, opentype, msg); + } + if (HPMHooks.count.HP_clif_rodex_read_mail_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, struct rodex_message *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_read_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_read_mail_post[hIndex].func; + postHookFunc(sd, opentype, msg); + } + } + return; +} +void HP_clif_pRodexNextMaillist(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexNextMaillist_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexNextMaillist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexNextMaillist_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexNextMaillist(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexNextMaillist_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexNextMaillist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexNextMaillist_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRodexCloseMailbox(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexCloseMailbox_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCloseMailbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexCloseMailbox_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexCloseMailbox(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexCloseMailbox_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCloseMailbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexCloseMailbox_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRodexCancelWriteMail(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexCancelWriteMail_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCancelWriteMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexCancelWriteMail_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexCancelWriteMail(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexCancelWriteMail_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCancelWriteMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexCancelWriteMail_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRodexOpenMailbox(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexOpenMailbox_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexOpenMailbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexOpenMailbox_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexOpenMailbox(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexOpenMailbox_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexOpenMailbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexOpenMailbox_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRodexCheckName(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexCheckName_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCheckName_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexCheckName_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexCheckName(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexCheckName_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexCheckName_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexCheckName_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, int class_, int base_level, const char *name) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_checkname_result_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *char_id, int *class_, int *base_level, const char **name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_pre[hIndex].func; + preHookFunc(&sd, &char_id, &class_, &base_level, &name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_checkname_result(sd, char_id, class_, base_level, name); + } + if (HPMHooks.count.HP_clif_rodex_checkname_result_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_post[hIndex].func; + postHookFunc(sd, char_id, class_, base_level, name); + } + } + return; +} +void HP_clif_pRodexDeleteMail(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexDeleteMail_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexDeleteMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexDeleteMail_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexDeleteMail(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexDeleteMail_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexDeleteMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexDeleteMail_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_delete_mail(struct map_session_data *sd, int8 opentype, int64 mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_delete_mail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_delete_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_delete_mail_pre[hIndex].func; + preHookFunc(&sd, &opentype, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_delete_mail(sd, opentype, mail_id); + } + if (HPMHooks.count.HP_clif_rodex_delete_mail_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_delete_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_delete_mail_post[hIndex].func; + postHookFunc(sd, opentype, mail_id); + } + } + return; +} +void HP_clif_pRodexRefreshMaillist(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexRefreshMaillist_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRefreshMaillist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexRefreshMaillist_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexRefreshMaillist(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexRefreshMaillist_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRefreshMaillist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexRefreshMaillist_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRodexRequestZeny(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexRequestZeny_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRequestZeny_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexRequestZeny_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexRequestZeny(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexRequestZeny_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRequestZeny_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexRequestZeny_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_request_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_zeny result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_request_zeny_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_zeny *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_zeny_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_request_zeny_pre[hIndex].func; + preHookFunc(&sd, &opentype, &mail_id, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_request_zeny(sd, opentype, mail_id, result); + } + if (HPMHooks.count.HP_clif_rodex_request_zeny_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_zeny result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_zeny_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_request_zeny_post[hIndex].func; + postHookFunc(sd, opentype, mail_id, result); + } + } + return; +} +void HP_clif_pRodexRequestItems(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRodexRequestItems_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRequestItems_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRodexRequestItems_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRodexRequestItems(fd, sd); + } + if (HPMHooks.count.HP_clif_pRodexRequestItems_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRodexRequestItems_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRodexRequestItems_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_items result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_request_items_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id, enum rodex_get_items *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_request_items_pre[hIndex].func; + preHookFunc(&sd, &opentype, &mail_id, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_request_items(sd, opentype, mail_id, result); + } + if (HPMHooks.count.HP_clif_rodex_request_items_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id, enum rodex_get_items result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_request_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_request_items_post[hIndex].func; + postHookFunc(sd, opentype, mail_id, result); + } + } + return; +} +void HP_clif_rodex_icon(int fd, bool show) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_rodex_icon_pre > 0) { + void (*preHookFunc) (int *fd, bool *show); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_icon_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_rodex_icon_pre[hIndex].func; + preHookFunc(&fd, &show); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.rodex_icon(fd, show); + } + if (HPMHooks.count.HP_clif_rodex_icon_post > 0) { + void (*postHookFunc) (int fd, bool show); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_icon_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_rodex_icon_post[hIndex].func; + postHookFunc(fd, show); + } + } + return; +} +void HP_clif_skill_scale(struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_skill_scale_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *src_id, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *casttime); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_scale_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_skill_scale_pre[hIndex].func; + preHookFunc(&bl, &src_id, &x, &y, &skill_id, &skill_lv, &casttime); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.skill_scale(bl, src_id, x, y, skill_id, skill_lv, casttime); + } + if (HPMHooks.count.HP_clif_skill_scale_post > 0) { + void (*postHookFunc) (struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_skill_scale_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_skill_scale_post[hIndex].func; + postHookFunc(bl, src_id, x, y, skill_id, skill_lv, casttime); + } + } + return; +} +void HP_clif_clan_basicinfo(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_clan_basicinfo_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clan_basicinfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_clan_basicinfo_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.clan_basicinfo(sd); + } + if (HPMHooks.count.HP_clif_clan_basicinfo_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clan_basicinfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_clan_basicinfo_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_clan_onlinecount(struct clan *c) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_clan_onlinecount_pre > 0) { + void (*preHookFunc) (struct clan **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clan_onlinecount_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_clan_onlinecount_pre[hIndex].func; + preHookFunc(&c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.clan_onlinecount(c); + } + if (HPMHooks.count.HP_clif_clan_onlinecount_post > 0) { + void (*postHookFunc) (struct clan *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clan_onlinecount_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_clan_onlinecount_post[hIndex].func; + postHookFunc(c); + } + } + return; +} +void HP_clif_clan_leave(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_clan_leave_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clan_leave_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_clan_leave_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.clan_leave(sd); + } + if (HPMHooks.count.HP_clif_clan_leave_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clan_leave_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_clan_leave_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_clan_message(struct clan *c, const char *mes, int len) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_clan_message_pre > 0) { + void (*preHookFunc) (struct clan **c, const char **mes, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clan_message_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_clan_message_pre[hIndex].func; + preHookFunc(&c, &mes, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.clan_message(c, mes, len); + } + if (HPMHooks.count.HP_clif_clan_message_post > 0) { + void (*postHookFunc) (struct clan *c, const char *mes, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_clan_message_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_clan_message_post[hIndex].func; + postHookFunc(c, mes, len); + } + } + return; +} +void HP_clif_pClanMessage(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pClanMessage_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClanMessage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pClanMessage_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pClanMessage(fd, sd); + } + if (HPMHooks.count.HP_clif_pClanMessage_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClanMessage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pClanMessage_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_hat_effect(struct block_list *bl, struct block_list *tbl, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_hat_effect_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct block_list **tbl, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hat_effect_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_hat_effect_pre[hIndex].func; + preHookFunc(&bl, &tbl, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.hat_effect(bl, tbl, target); + } + if (HPMHooks.count.HP_clif_hat_effect_post > 0) { + void (*postHookFunc) (struct block_list *bl, struct block_list *tbl, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hat_effect_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_hat_effect_post[hIndex].func; + postHookFunc(bl, tbl, target); + } + } + return; +} +void HP_clif_hat_effect_single(struct block_list *bl, uint16 effectId, bool enable) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_hat_effect_single_pre > 0) { + void (*preHookFunc) (struct block_list **bl, uint16 *effectId, bool *enable); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hat_effect_single_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_hat_effect_single_pre[hIndex].func; + preHookFunc(&bl, &effectId, &enable); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.hat_effect_single(bl, effectId, enable); + } + if (HPMHooks.count.HP_clif_hat_effect_single_post > 0) { + void (*postHookFunc) (struct block_list *bl, uint16 effectId, bool enable); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_hat_effect_single_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_hat_effect_single_post[hIndex].func; + postHookFunc(bl, effectId, enable); + } + } + return; +} +void HP_clif_overweight_percent(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_overweight_percent_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_overweight_percent_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_overweight_percent_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.overweight_percent(sd); + } + if (HPMHooks.count.HP_clif_overweight_percent_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_overweight_percent_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_overweight_percent_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_pChangeDress(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pChangeDress_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDress_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pChangeDress_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pChangeDress(fd, sd); + } + if (HPMHooks.count.HP_clif_pChangeDress_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pChangeDress_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pChangeDress_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +bool HP_clif_pAttendanceDB(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_pAttendanceDB_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAttendanceDB_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pAttendanceDB_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.pAttendanceDB(); + } + if (HPMHooks.count.HP_clif_pAttendanceDB_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAttendanceDB_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pAttendanceDB_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_clif_attendancedb_libconfig_sub(struct config_setting_t *it, int n, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_attendancedb_libconfig_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *n, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendancedb_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_attendancedb_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &n, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.attendancedb_libconfig_sub(it, n, source); + } + if (HPMHooks.count.HP_clif_attendancedb_libconfig_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int n, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendancedb_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_attendancedb_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, n, source); + } + } + return retVal___; +} +bool HP_clif_attendance_timediff(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_attendance_timediff_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendance_timediff_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_attendance_timediff_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.attendance_timediff(sd); + } + if (HPMHooks.count.HP_clif_attendance_timediff_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendance_timediff_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_attendance_timediff_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +time_t HP_clif_attendance_getendtime(void) { + int hIndex = 0; + time_t retVal___ = 0; + if (HPMHooks.count.HP_clif_attendance_getendtime_pre > 0) { + time_t (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendance_getendtime_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_attendance_getendtime_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.attendance_getendtime(); + } + if (HPMHooks.count.HP_clif_attendance_getendtime_post > 0) { + time_t (*postHookFunc) (time_t retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_attendance_getendtime_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_attendance_getendtime_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_clif_pOpenUIRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pOpenUIRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenUIRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pOpenUIRequest_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pOpenUIRequest(fd, sd); + } + if (HPMHooks.count.HP_clif_pOpenUIRequest_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pOpenUIRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pOpenUIRequest_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_open_ui(struct map_session_data *sd, enum cz_ui_types uiType) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_open_ui_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum cz_ui_types *uiType); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_ui_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_open_ui_pre[hIndex].func; + preHookFunc(&sd, &uiType); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.open_ui(sd, uiType); + } + if (HPMHooks.count.HP_clif_open_ui_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum cz_ui_types uiType); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_open_ui_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_open_ui_post[hIndex].func; + postHookFunc(sd, uiType); + } + } + return; +} +void HP_clif_pAttendanceRewardRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pAttendanceRewardRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAttendanceRewardRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pAttendanceRewardRequest_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAttendanceRewardRequest(fd, sd); + } + if (HPMHooks.count.HP_clif_pAttendanceRewardRequest_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAttendanceRewardRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pAttendanceRewardRequest_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_ui_action(struct map_session_data *sd, int32 UIType, int32 data) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_ui_action_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int32 *UIType, int32 *data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ui_action_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_ui_action_pre[hIndex].func; + preHookFunc(&sd, &UIType, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ui_action(sd, UIType, data); + } + if (HPMHooks.count.HP_clif_ui_action_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int32 UIType, int32 data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ui_action_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_ui_action_post[hIndex].func; + postHookFunc(sd, UIType, data); + } + } + return; +} +void HP_clif_pPrivateAirshipRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pPrivateAirshipRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPrivateAirshipRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pPrivateAirshipRequest_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPrivateAirshipRequest(fd, sd); + } + if (HPMHooks.count.HP_clif_pPrivateAirshipRequest_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPrivateAirshipRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pPrivateAirshipRequest_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_PrivateAirshipResponse(struct map_session_data *sd, uint32 flag) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_PrivateAirshipResponse_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint32 *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PrivateAirshipResponse_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_PrivateAirshipResponse_pre[hIndex].func; + preHookFunc(&sd, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.PrivateAirshipResponse(sd, flag); + } + if (HPMHooks.count.HP_clif_PrivateAirshipResponse_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint32 flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_PrivateAirshipResponse_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_PrivateAirshipResponse_post[hIndex].func; + postHookFunc(sd, flag); + } + } + return; +} +void HP_clif_pReqStyleChange(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pReqStyleChange_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pReqStyleChange_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqStyleChange(fd, sd); + } + if (HPMHooks.count.HP_clif_pReqStyleChange_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pReqStyleChange_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pReqStyleChange2(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pReqStyleChange2_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange2_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pReqStyleChange2_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqStyleChange2(fd, sd); + } + if (HPMHooks.count.HP_clif_pReqStyleChange2_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqStyleChange2_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pReqStyleChange2_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pStyleClose(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pStyleClose_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStyleClose_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pStyleClose_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pStyleClose(fd, sd); + } + if (HPMHooks.count.HP_clif_pStyleClose_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pStyleClose_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pStyleClose_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_style_change_response_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum stylist_shop *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_style_change_response_pre[hIndex].func; + preHookFunc(&sd, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.style_change_response(sd, flag); + } + if (HPMHooks.count.HP_clif_style_change_response_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum stylist_shop flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_style_change_response_post[hIndex].func; + postHookFunc(sd, flag); + } + } + return; +} +void HP_clif_pPetEvolution(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pPetEvolution_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetEvolution_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pPetEvolution_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPetEvolution(fd, sd); + } + if (HPMHooks.count.HP_clif_pPetEvolution_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPetEvolution_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pPetEvolution_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_petEvolutionResult(int fd, enum pet_evolution_result result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_petEvolutionResult_pre > 0) { + void (*preHookFunc) (int *fd, enum pet_evolution_result *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petEvolutionResult_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_petEvolutionResult_pre[hIndex].func; + preHookFunc(&fd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.petEvolutionResult(fd, result); + } + if (HPMHooks.count.HP_clif_petEvolutionResult_post > 0) { + void (*postHookFunc) (int fd, enum pet_evolution_result result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_petEvolutionResult_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_petEvolutionResult_post[hIndex].func; + postHookFunc(fd, result); + } + } + return; +} +void HP_clif_party_dead_notification(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_party_dead_notification_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_dead_notification_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_party_dead_notification_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.party_dead_notification(sd); + } + if (HPMHooks.count.HP_clif_party_dead_notification_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_party_dead_notification_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_party_dead_notification_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_pMemorialDungeonCommand(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pMemorialDungeonCommand_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMemorialDungeonCommand_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pMemorialDungeonCommand_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pMemorialDungeonCommand(fd, sd); + } + if (HPMHooks.count.HP_clif_pMemorialDungeonCommand_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pMemorialDungeonCommand_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pMemorialDungeonCommand_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_camera_showWindow(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_camera_showWindow_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_showWindow_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_camera_showWindow_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.camera_showWindow(sd); + } + if (HPMHooks.count.HP_clif_camera_showWindow_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_showWindow_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_camera_showWindow_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_camera_change(struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_camera_change_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, float *range, float *rotation, float *latitude, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_change_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_camera_change_pre[hIndex].func; + preHookFunc(&sd, &range, &rotation, &latitude, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.camera_change(sd, range, rotation, latitude, target); + } + if (HPMHooks.count.HP_clif_camera_change_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, float range, float rotation, float latitude, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_camera_change_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_camera_change_post[hIndex].func; + postHookFunc(sd, range, rotation, latitude, target); + } + } + return; +} +void HP_clif_pCameraInfo(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pCameraInfo_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCameraInfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pCameraInfo_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pCameraInfo(fd, sd); + } + if (HPMHooks.count.HP_clif_pCameraInfo_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pCameraInfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pCameraInfo_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_item_preview(struct map_session_data *sd, int n) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_item_preview_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_preview_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_item_preview_pre[hIndex].func; + preHookFunc(&sd, &n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.item_preview(sd, n); + } + if (HPMHooks.count.HP_clif_item_preview_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_item_preview_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_item_preview_post[hIndex].func; + postHookFunc(sd, n); + } + } + return; +} +bool HP_clif_enchant_equipment(struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_enchant_equipment_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, enum equip_pos *pos, int *cardSlot, int *cardId); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_enchant_equipment_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_enchant_equipment_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &pos, &cardSlot, &cardId); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.enchant_equipment(sd, pos, cardSlot, cardId); + } + if (HPMHooks.count.HP_clif_enchant_equipment_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum equip_pos pos, int cardSlot, int cardId); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_enchant_equipment_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_enchant_equipment_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, pos, cardSlot, cardId); + } + } + return retVal___; +} +void HP_clif_pReqRemainTime(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pReqRemainTime_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqRemainTime_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pReqRemainTime_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqRemainTime(fd, sd); + } + if (HPMHooks.count.HP_clif_pReqRemainTime_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqRemainTime_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pReqRemainTime_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_npc_barter_open(struct map_session_data *sd, struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_npc_barter_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_barter_open_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_npc_barter_open_pre[hIndex].func; + preHookFunc(&sd, &nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.npc_barter_open(sd, nd); + } + if (HPMHooks.count.HP_clif_npc_barter_open_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_barter_open_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_npc_barter_open_post[hIndex].func; + postHookFunc(sd, nd); + } + } + return; +} +void HP_clif_pNPCBarterClosed(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pNPCBarterClosed_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterClosed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pNPCBarterClosed_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNPCBarterClosed(fd, sd); + } + if (HPMHooks.count.HP_clif_pNPCBarterClosed_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterClosed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pNPCBarterClosed_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pNPCBarterPurchase(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pNPCBarterPurchase_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterPurchase_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pNPCBarterPurchase_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNPCBarterPurchase(fd, sd); + } + if (HPMHooks.count.HP_clif_pNPCBarterPurchase_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCBarterPurchase_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pNPCBarterPurchase_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pNPCExpandedBarterClosed(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pNPCExpandedBarterClosed_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCExpandedBarterClosed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pNPCExpandedBarterClosed_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNPCExpandedBarterClosed(fd, sd); + } + if (HPMHooks.count.HP_clif_pNPCExpandedBarterClosed_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCExpandedBarterClosed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pNPCExpandedBarterClosed_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pNPCExpandedBarterPurchase(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pNPCExpandedBarterPurchase_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCExpandedBarterPurchase_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pNPCExpandedBarterPurchase_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pNPCExpandedBarterPurchase(fd, sd); + } + if (HPMHooks.count.HP_clif_pNPCExpandedBarterPurchase_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pNPCExpandedBarterPurchase_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pNPCExpandedBarterPurchase_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_npc_expanded_barter_open(struct map_session_data *sd, struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_npc_expanded_barter_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_expanded_barter_open_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_npc_expanded_barter_open_pre[hIndex].func; + preHookFunc(&sd, &nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.npc_expanded_barter_open(sd, nd); + } + if (HPMHooks.count.HP_clif_npc_expanded_barter_open_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_npc_expanded_barter_open_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_npc_expanded_barter_open_post[hIndex].func; + postHookFunc(sd, nd); + } + } + return; +} +void HP_clif_pClientVersion(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pClientVersion_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pClientVersion_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pClientVersion(fd, sd); + } + if (HPMHooks.count.HP_clif_pClientVersion_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pClientVersion_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pClientVersion_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pPing(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pPing_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPing_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pPing_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pPing(fd, sd); + } + if (HPMHooks.count.HP_clif_pPing_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pPing_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pPing_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_ping(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_ping_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ping_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_ping_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.ping(sd); + } + if (HPMHooks.count.HP_clif_ping_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_ping_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_ping_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +int HP_clif_pingTimer(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_clif_pingTimer_pre > 0) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimer_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pingTimer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.pingTimer(tid, tick, id, data); + } + if (HPMHooks.count.HP_clif_pingTimer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimer_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pingTimer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); + } + } + return retVal___; +} +int HP_clif_pingTimerSub(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_clif_pingTimerSub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimerSub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_clif_pingTimerSub_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.pingTimerSub(sd, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_clif_pingTimerSub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pingTimerSub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_clif_pingTimerSub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +void HP_clif_pResetCooldown(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pResetCooldown_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetCooldown_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pResetCooldown_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pResetCooldown(fd, sd); + } + if (HPMHooks.count.HP_clif_pResetCooldown_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pResetCooldown_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pResetCooldown_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_loadConfirm(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_loadConfirm_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_loadConfirm_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_loadConfirm_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.loadConfirm(sd); + } + if (HPMHooks.count.HP_clif_loadConfirm_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_loadConfirm_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_loadConfirm_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_send_selforarea(int fd, struct block_list *bl, const void *buf, int len) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_send_selforarea_pre > 0) { + void (*preHookFunc) (int *fd, struct block_list **bl, const void **buf, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_selforarea_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_send_selforarea_pre[hIndex].func; + preHookFunc(&fd, &bl, &buf, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.send_selforarea(fd, bl, buf, len); + } + if (HPMHooks.count.HP_clif_send_selforarea_post > 0) { + void (*postHookFunc) (int fd, struct block_list *bl, const void *buf, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_send_selforarea_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_send_selforarea_post[hIndex].func; + postHookFunc(fd, bl, buf, len); + } + } + return; +} +void HP_clif_OpenRefineryUI(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_OpenRefineryUI_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_OpenRefineryUI_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_OpenRefineryUI_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.OpenRefineryUI(sd); + } + if (HPMHooks.count.HP_clif_OpenRefineryUI_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_OpenRefineryUI_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_OpenRefineryUI_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_clif_pAddItemRefineryUI(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pAddItemRefineryUI_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAddItemRefineryUI_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pAddItemRefineryUI_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pAddItemRefineryUI(fd, sd); + } + if (HPMHooks.count.HP_clif_pAddItemRefineryUI_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pAddItemRefineryUI_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pAddItemRefineryUI_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_AddItemRefineryUIAck(struct map_session_data *sd, int item_index, struct s_refine_requirement *req) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_AddItemRefineryUIAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *item_index, struct s_refine_requirement **req); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_AddItemRefineryUIAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_AddItemRefineryUIAck_pre[hIndex].func; + preHookFunc(&sd, &item_index, &req); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.AddItemRefineryUIAck(sd, item_index, req); + } + if (HPMHooks.count.HP_clif_AddItemRefineryUIAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int item_index, struct s_refine_requirement *req); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_AddItemRefineryUIAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_AddItemRefineryUIAck_post[hIndex].func; + postHookFunc(sd, item_index, req); + } + } + return; +} +void HP_clif_pRefineryUIClose(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRefineryUIClose_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIClose_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRefineryUIClose_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRefineryUIClose(fd, sd); + } + if (HPMHooks.count.HP_clif_pRefineryUIClose_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIClose_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRefineryUIClose_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pRefineryUIRefine(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pRefineryUIRefine_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIRefine_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pRefineryUIRefine_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pRefineryUIRefine(fd, sd); + } + if (HPMHooks.count.HP_clif_pRefineryUIRefine_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pRefineryUIRefine_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pRefineryUIRefine_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_announce_refine_status(struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_announce_refine_status_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *item_id, int *refine_level, bool *success, enum send_target *target); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_announce_refine_status_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_announce_refine_status_pre[hIndex].func; + preHookFunc(&sd, &item_id, &refine_level, &success, &target); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.announce_refine_status(sd, item_id, refine_level, success, target); + } + if (HPMHooks.count.HP_clif_announce_refine_status_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int item_id, int refine_level, bool success, enum send_target target); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_announce_refine_status_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_announce_refine_status_post[hIndex].func; + postHookFunc(sd, item_id, refine_level, success, target); + } + } + return; +} +void HP_clif_pGuildCastleTeleportRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pGuildCastleTeleportRequest_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildCastleTeleportRequest(fd, sd); + } + if (HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleTeleportRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pGuildCastleTeleportRequest_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pGuildCastleInfoRequest(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pGuildCastleInfoRequest_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleInfoRequest_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pGuildCastleInfoRequest_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pGuildCastleInfoRequest(fd, sd); + } + if (HPMHooks.count.HP_clif_pGuildCastleInfoRequest_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pGuildCastleInfoRequest_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pGuildCastleInfoRequest_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_guild_castleteleport_res(struct map_session_data *sd, enum siege_teleport_result result) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_guild_castleteleport_res_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum siege_teleport_result *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleteleport_res_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_guild_castleteleport_res_pre[hIndex].func; + preHookFunc(&sd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.guild_castleteleport_res(sd, result); + } + if (HPMHooks.count.HP_clif_guild_castleteleport_res_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum siege_teleport_result result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_guild_castleteleport_res_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_guild_castleteleport_res_post[hIndex].func; + postHookFunc(sd, result); + } + } + return; +} +bool HP_clif_lapineDdukDdak_open(struct map_session_data *sd, int item_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_lapineDdukDdak_open_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *item_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineDdukDdak_open_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_lapineDdukDdak_open_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &item_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.lapineDdukDdak_open(sd, item_id); + } + if (HPMHooks.count.HP_clif_lapineDdukDdak_open_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int item_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineDdukDdak_open_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_lapineDdukDdak_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_id); + } + } + return retVal___; +} +bool HP_clif_lapineDdukDdak_result(struct map_session_data *sd, enum lapineddukddak_result result) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_lapineDdukDdak_result_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, enum lapineddukddak_result *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineDdukDdak_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_lapineDdukDdak_result_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.lapineDdukDdak_result(sd, result); + } + if (HPMHooks.count.HP_clif_lapineDdukDdak_result_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum lapineddukddak_result result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineDdukDdak_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_lapineDdukDdak_result_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, result); + } + } + return retVal___; +} +void HP_clif_plapineDdukDdak_ack(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_plapineDdukDdak_ack_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_plapineDdukDdak_ack_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_plapineDdukDdak_ack_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.plapineDdukDdak_ack(fd, sd); + } + if (HPMHooks.count.HP_clif_plapineDdukDdak_ack_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_plapineDdukDdak_ack_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_plapineDdukDdak_ack_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_plapineDdukDdak_close(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_plapineDdukDdak_close_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_plapineDdukDdak_close_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_plapineDdukDdak_close_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.plapineDdukDdak_close(fd, sd); + } + if (HPMHooks.count.HP_clif_plapineDdukDdak_close_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_plapineDdukDdak_close_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_plapineDdukDdak_close_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +bool HP_clif_lapineUpgrade_open(struct map_session_data *sd, int item_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_lapineUpgrade_open_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *item_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineUpgrade_open_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_lapineUpgrade_open_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &item_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.lapineUpgrade_open(sd, item_id); + } + if (HPMHooks.count.HP_clif_lapineUpgrade_open_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int item_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineUpgrade_open_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_lapineUpgrade_open_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_id); + } + } + return retVal___; +} +bool HP_clif_lapineUpgrade_result(struct map_session_data *sd, enum lapineUpgrade_result result) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_clif_lapineUpgrade_result_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, enum lapineUpgrade_result *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineUpgrade_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_lapineUpgrade_result_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.clif.lapineUpgrade_result(sd, result); + } + if (HPMHooks.count.HP_clif_lapineUpgrade_result_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, enum lapineUpgrade_result result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_lapineUpgrade_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_lapineUpgrade_result_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, result); + } + } + return retVal___; +} +void HP_clif_pLapineUpgrade_close(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pLapineUpgrade_close_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLapineUpgrade_close_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pLapineUpgrade_close_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pLapineUpgrade_close(fd, sd); + } + if (HPMHooks.count.HP_clif_pLapineUpgrade_close_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLapineUpgrade_close_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pLapineUpgrade_close_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pLapineUpgrade_makeItem(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pLapineUpgrade_makeItem_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLapineUpgrade_makeItem_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pLapineUpgrade_makeItem_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pLapineUpgrade_makeItem(fd, sd); + } + if (HPMHooks.count.HP_clif_pLapineUpgrade_makeItem_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pLapineUpgrade_makeItem_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pLapineUpgrade_makeItem_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +void HP_clif_pReqGearOff(int fd, struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_clif_pReqGearOff_pre > 0) { + void (*preHookFunc) (int *fd, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqGearOff_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_clif_pReqGearOff_pre[hIndex].func; + preHookFunc(&fd, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.clif.pReqGearOff(fd, sd); + } + if (HPMHooks.count.HP_clif_pReqGearOff_post > 0) { + void (*postHookFunc) (int fd, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pReqGearOff_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_clif_pReqGearOff_post[hIndex].func; + postHookFunc(fd, sd); + } + } + return; +} +/* cmdline_interface */ void HP_cmdline_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_init_pre ) { + if (HPMHooks.count.HP_cmdline_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24190,9 +30865,9 @@ void HP_cmdline_init(void) { { HPMHooks.source.cmdline.init(); } - if( HPMHooks.count.HP_cmdline_init_post ) { + if (HPMHooks.count.HP_cmdline_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func; postHookFunc(); } @@ -24201,14 +30876,14 @@ void HP_cmdline_init(void) { } void HP_cmdline_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_cmdline_final_pre ) { + if (HPMHooks.count.HP_cmdline_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24216,9 +30891,9 @@ void HP_cmdline_final(void) { { HPMHooks.source.cmdline.final(); } - if( HPMHooks.count.HP_cmdline_final_post ) { + if (HPMHooks.count.HP_cmdline_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func; postHookFunc(); } @@ -24228,14 +30903,14 @@ void HP_cmdline_final(void) { bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_add_pre ) { - bool (*preHookFunc) (unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); + if (HPMHooks.count.HP_cmdline_arg_add_pre > 0) { + bool (*preHookFunc) (unsigned int *pluginID, const char **name, char *shortname, CmdlineExecFunc *func, const char **help, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func; - retVal___ = preHookFunc(&pluginID, name, &shortname, &func, help, &options); + retVal___ = preHookFunc(&pluginID, &name, &shortname, &func, &help, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24243,11 +30918,11 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, { retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options); } - if( HPMHooks.count.HP_cmdline_arg_add_post ) { - bool (*postHookFunc) (bool retVal___, unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) { + if (HPMHooks.count.HP_cmdline_arg_add_post > 0) { + bool (*postHookFunc) (bool retVal___, unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &pluginID, name, &shortname, &func, help, &options); + retVal___ = postHookFunc(retVal___, pluginID, name, shortname, func, help, options); } } return retVal___; @@ -24255,14 +30930,14 @@ bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, int HP_cmdline_exec(int argc, char **argv, unsigned int options) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_cmdline_exec_pre ) { - int (*preHookFunc) (int *argc, char **argv, unsigned int *options); + if (HPMHooks.count.HP_cmdline_exec_pre > 0) { + int (*preHookFunc) (int *argc, char ***argv, unsigned int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func; - retVal___ = preHookFunc(&argc, argv, &options); + retVal___ = preHookFunc(&argc, &argv, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24270,11 +30945,11 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { { retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options); } - if( HPMHooks.count.HP_cmdline_exec_post ) { - int (*postHookFunc) (int retVal___, int *argc, char **argv, unsigned int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) { + if (HPMHooks.count.HP_cmdline_exec_post > 0) { + int (*postHookFunc) (int retVal___, int argc, char **argv, unsigned int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &argc, argv, &options); + retVal___ = postHookFunc(retVal___, argc, argv, options); } } return retVal___; @@ -24282,14 +30957,14 @@ int HP_cmdline_exec(int argc, char **argv, unsigned int options) { bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) { - bool (*preHookFunc) (const char *name, int *current_arg, int *argc); + if (HPMHooks.count.HP_cmdline_arg_next_value_pre > 0) { + bool (*preHookFunc) (const char **name, int *current_arg, int *argc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func; - retVal___ = preHookFunc(name, ¤t_arg, &argc); + retVal___ = preHookFunc(&name, ¤t_arg, &argc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24297,11 +30972,11 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { { retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc); } - if( HPMHooks.count.HP_cmdline_arg_next_value_post ) { - bool (*postHookFunc) (bool retVal___, const char *name, int *current_arg, int *argc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) { + if (HPMHooks.count.HP_cmdline_arg_next_value_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *name, int current_arg, int argc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func; - retVal___ = postHookFunc(retVal___, name, ¤t_arg, &argc); + retVal___ = postHookFunc(retVal___, name, current_arg, argc); } } return retVal___; @@ -24309,14 +30984,14 @@ bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) { const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_cmdline_arg_source_pre ) { - const char* (*preHookFunc) (struct CmdlineArgData *arg); + if (HPMHooks.count.HP_cmdline_arg_source_pre > 0) { + const char* (*preHookFunc) (struct CmdlineArgData **arg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func; - retVal___ = preHookFunc(arg); + retVal___ = preHookFunc(&arg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24324,26 +30999,26 @@ const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) { { retVal___ = HPMHooks.source.cmdline.arg_source(arg); } - if( HPMHooks.count.HP_cmdline_arg_source_post ) { + if (HPMHooks.count.HP_cmdline_arg_source_post > 0) { const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++) { postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func; retVal___ = postHookFunc(retVal___, arg); } } return retVal___; } -/* console */ +/* console_interface */ void HP_console_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_init_pre ) { + if (HPMHooks.count.HP_console_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24351,9 +31026,9 @@ void HP_console_init(void) { { HPMHooks.source.console.init(); } - if( HPMHooks.count.HP_console_init_post ) { + if (HPMHooks.count.HP_console_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func; postHookFunc(); } @@ -24362,14 +31037,14 @@ void HP_console_init(void) { } void HP_console_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_final_pre ) { + if (HPMHooks.count.HP_console_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24377,9 +31052,9 @@ void HP_console_final(void) { { HPMHooks.source.console.final(); } - if( HPMHooks.count.HP_console_final_post ) { + if (HPMHooks.count.HP_console_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func; postHookFunc(); } @@ -24388,14 +31063,14 @@ void HP_console_final(void) { } void HP_console_display_title(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_title_pre ) { + if (HPMHooks.count.HP_console_display_title_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24403,9 +31078,9 @@ void HP_console_display_title(void) { { HPMHooks.source.console.display_title(); } - if( HPMHooks.count.HP_console_display_title_post ) { + if (HPMHooks.count.HP_console_display_title_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func; postHookFunc(); } @@ -24414,14 +31089,14 @@ void HP_console_display_title(void) { } void HP_console_display_gplnotice(void) { int hIndex = 0; - if( HPMHooks.count.HP_console_display_gplnotice_pre ) { + if (HPMHooks.count.HP_console_display_gplnotice_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_console_display_gplnotice_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24429,26 +31104,26 @@ void HP_console_display_gplnotice(void) { { HPMHooks.source.console.display_gplnotice(); } - if( HPMHooks.count.HP_console_display_gplnotice_post ) { + if (HPMHooks.count.HP_console_display_gplnotice_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++) { postHookFunc = HPMHooks.list.HP_console_display_gplnotice_post[hIndex].func; postHookFunc(); } } return; } -/* core */ +/* core_interface */ void HP_core_shutdown_callback(void) { int hIndex = 0; - if( HPMHooks.count.HP_core_shutdown_callback_pre ) { + if (HPMHooks.count.HP_core_shutdown_callback_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24456,27 +31131,27 @@ void HP_core_shutdown_callback(void) { { HPMHooks.source.core.shutdown_callback(); } - if( HPMHooks.count.HP_core_shutdown_callback_post ) { + if (HPMHooks.count.HP_core_shutdown_callback_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++) { postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func; postHookFunc(); } } return; } -/* DB */ +/* db_interface */ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { int hIndex = 0; enum DBOptions retVal___ = DB_OPT_BASE; - if( HPMHooks.count.HP_DB_fix_options_pre ) { + if (HPMHooks.count.HP_DB_fix_options_pre > 0) { enum DBOptions (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24484,11 +31159,11 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.fix_options(type, options); } - if( HPMHooks.count.HP_DB_fix_options_post ) { - enum DBOptions (*postHookFunc) (enum DBOptions retVal___, enum DBType *type, enum DBOptions *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_fix_options_post > 0) { + enum DBOptions (*postHookFunc) (enum DBOptions retVal___, enum DBType type, enum DBOptions options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type, &options); + retVal___ = postHookFunc(retVal___, type, options); } } return retVal___; @@ -24496,14 +31171,14 @@ enum DBOptions HP_DB_fix_options(enum DBType type, enum DBOptions options) { DBComparator HP_DB_default_cmp(enum DBType type) { int hIndex = 0; DBComparator retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_cmp_pre ) { + if (HPMHooks.count.HP_DB_default_cmp_pre > 0) { DBComparator (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24511,11 +31186,11 @@ DBComparator HP_DB_default_cmp(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_cmp(type); } - if( HPMHooks.count.HP_DB_default_cmp_post ) { - DBComparator (*postHookFunc) (DBComparator retVal___, enum DBType *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_default_cmp_post > 0) { + DBComparator (*postHookFunc) (DBComparator retVal___, enum DBType type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type); + retVal___ = postHookFunc(retVal___, type); } } return retVal___; @@ -24523,14 +31198,14 @@ DBComparator HP_DB_default_cmp(enum DBType type) { DBHasher HP_DB_default_hash(enum DBType type) { int hIndex = 0; DBHasher retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_hash_pre ) { + if (HPMHooks.count.HP_DB_default_hash_pre > 0) { DBHasher (*preHookFunc) (enum DBType *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24538,11 +31213,11 @@ DBHasher HP_DB_default_hash(enum DBType type) { { retVal___ = HPMHooks.source.DB.default_hash(type); } - if( HPMHooks.count.HP_DB_default_hash_post ) { - DBHasher (*postHookFunc) (DBHasher retVal___, enum DBType *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_default_hash_post > 0) { + DBHasher (*postHookFunc) (DBHasher retVal___, enum DBType type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type); + retVal___ = postHookFunc(retVal___, type); } } return retVal___; @@ -24550,14 +31225,14 @@ DBHasher HP_DB_default_hash(enum DBType type) { DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_default_release_pre ) { + if (HPMHooks.count.HP_DB_default_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBType *type, enum DBOptions *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func; retVal___ = preHookFunc(&type, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24565,11 +31240,11 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { { retVal___ = HPMHooks.source.DB.default_release(type, options); } - if( HPMHooks.count.HP_DB_default_release_post ) { - DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBType *type, enum DBOptions *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_default_release_post > 0) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBType type, enum DBOptions options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &type, &options); + retVal___ = postHookFunc(retVal___, type, options); } } return retVal___; @@ -24577,14 +31252,14 @@ DBReleaser HP_DB_default_release(enum DBType type, enum DBOptions options) { DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { int hIndex = 0; DBReleaser retVal___ = NULL; - if( HPMHooks.count.HP_DB_custom_release_pre ) { + if (HPMHooks.count.HP_DB_custom_release_pre > 0) { DBReleaser (*preHookFunc) (enum DBReleaseOption *which); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func; retVal___ = preHookFunc(&which); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24592,11 +31267,11 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { { retVal___ = HPMHooks.source.DB.custom_release(which); } - if( HPMHooks.count.HP_DB_custom_release_post ) { - DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBReleaseOption *which); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_custom_release_post > 0) { + DBReleaser (*postHookFunc) (DBReleaser retVal___, enum DBReleaseOption which); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &which); + retVal___ = postHookFunc(retVal___, which); } } return retVal___; @@ -24604,14 +31279,14 @@ DBReleaser HP_DB_custom_release(enum DBReleaseOption which) { struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen) { int hIndex = 0; struct DBMap* retVal___ = NULL; - if( HPMHooks.count.HP_DB_alloc_pre ) { - struct DBMap* (*preHookFunc) (const char *file, const char *func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); + if (HPMHooks.count.HP_DB_alloc_pre > 0) { + struct DBMap* (*preHookFunc) (const char **file, const char **func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func; - retVal___ = preHookFunc(file, func, &line, &type, &options, &maxlen); + retVal___ = preHookFunc(&file, &func, &line, &type, &options, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24619,27 +31294,26 @@ struct DBMap* HP_DB_alloc(const char *file, const char *func, int line, enum DBT { retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen); } - if( HPMHooks.count.HP_DB_alloc_post ) { - struct DBMap* (*postHookFunc) (struct DBMap* retVal___, const char *file, const char *func, int *line, enum DBType *type, enum DBOptions *options, unsigned short *maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_alloc_post > 0) { + struct DBMap* (*postHookFunc) (struct DBMap* retVal___, const char *file, const char *func, int line, enum DBType type, enum DBOptions options, unsigned short maxlen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, file, func, &line, &type, &options, &maxlen); + retVal___ = postHookFunc(retVal___, file, func, line, type, options, maxlen); } } return retVal___; } union DBKey HP_DB_i2key(int key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_i2key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_i2key_pre > 0) { union DBKey (*preHookFunc) (int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24647,27 +31321,26 @@ union DBKey HP_DB_i2key(int key) { { retVal___ = HPMHooks.source.DB.i2key(key); } - if( HPMHooks.count.HP_DB_i2key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, int *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_i2key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, int key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } union DBKey HP_DB_ui2key(unsigned int key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_ui2key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ui2key_pre > 0) { union DBKey (*preHookFunc) (unsigned int *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24675,27 +31348,26 @@ union DBKey HP_DB_ui2key(unsigned int key) { { retVal___ = HPMHooks.source.DB.ui2key(key); } - if( HPMHooks.count.HP_DB_ui2key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, unsigned int *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_ui2key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, unsigned int key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } union DBKey HP_DB_str2key(const char *key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_str2key_pre ) { - union DBKey (*preHookFunc) (const char *key); + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_str2key_pre > 0) { + union DBKey (*preHookFunc) (const char **key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func; - retVal___ = preHookFunc(key); + retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24703,9 +31375,9 @@ union DBKey HP_DB_str2key(const char *key) { { retVal___ = HPMHooks.source.DB.str2key(key); } - if( HPMHooks.count.HP_DB_str2key_post ) { + if (HPMHooks.count.HP_DB_str2key_post > 0) { union DBKey (*postHookFunc) (union DBKey retVal___, const char *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func; retVal___ = postHookFunc(retVal___, key); } @@ -24714,16 +31386,15 @@ union DBKey HP_DB_str2key(const char *key) { } union DBKey HP_DB_i642key(int64 key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_i642key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_i642key_pre > 0) { union DBKey (*preHookFunc) (int64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24731,27 +31402,26 @@ union DBKey HP_DB_i642key(int64 key) { { retVal___ = HPMHooks.source.DB.i642key(key); } - if( HPMHooks.count.HP_DB_i642key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, int64 *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_i642key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, int64 key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } union DBKey HP_DB_ui642key(uint64 key) { int hIndex = 0; - union DBKey retVal___; - memset(&retVal___, '\0', sizeof(union DBKey)); - if( HPMHooks.count.HP_DB_ui642key_pre ) { + union DBKey retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ui642key_pre > 0) { union DBKey (*preHookFunc) (uint64 *key); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func; retVal___ = preHookFunc(&key); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24759,27 +31429,26 @@ union DBKey HP_DB_ui642key(uint64 key) { { retVal___ = HPMHooks.source.DB.ui642key(key); } - if( HPMHooks.count.HP_DB_ui642key_post ) { - union DBKey (*postHookFunc) (union DBKey retVal___, uint64 *key); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_ui642key_post > 0) { + union DBKey (*postHookFunc) (union DBKey retVal___, uint64 key); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key); + retVal___ = postHookFunc(retVal___, key); } } return retVal___; } struct DBData HP_DB_i2data(int data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_DB_i2data_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_i2data_pre > 0) { struct DBData (*preHookFunc) (int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24787,27 +31456,26 @@ struct DBData HP_DB_i2data(int data) { { retVal___ = HPMHooks.source.DB.i2data(data); } - if( HPMHooks.count.HP_DB_i2data_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, int *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_i2data_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, int data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &data); + retVal___ = postHookFunc(retVal___, data); } } return retVal___; } struct DBData HP_DB_ui2data(unsigned int data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_DB_ui2data_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ui2data_pre > 0) { struct DBData (*preHookFunc) (unsigned int *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func; retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24815,27 +31483,26 @@ struct DBData HP_DB_ui2data(unsigned int data) { { retVal___ = HPMHooks.source.DB.ui2data(data); } - if( HPMHooks.count.HP_DB_ui2data_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, unsigned int *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) { + if (HPMHooks.count.HP_DB_ui2data_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, unsigned int data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &data); + retVal___ = postHookFunc(retVal___, data); } } return retVal___; } struct DBData HP_DB_ptr2data(void *data) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_DB_ptr2data_pre ) { - struct DBData (*preHookFunc) (void *data); + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_DB_ptr2data_pre > 0) { + struct DBData (*preHookFunc) (void **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24843,9 +31510,9 @@ struct DBData HP_DB_ptr2data(void *data) { { retVal___ = HPMHooks.source.DB.ptr2data(data); } - if( HPMHooks.count.HP_DB_ptr2data_post ) { + if (HPMHooks.count.HP_DB_ptr2data_post > 0) { struct DBData (*postHookFunc) (struct DBData retVal___, void *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -24855,14 +31522,14 @@ struct DBData HP_DB_ptr2data(void *data) { int HP_DB_data2i(struct DBData *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2i_pre ) { - int (*preHookFunc) (struct DBData *data); + if (HPMHooks.count.HP_DB_data2i_pre > 0) { + int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24870,9 +31537,9 @@ int HP_DB_data2i(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2i(data); } - if( HPMHooks.count.HP_DB_data2i_post ) { + if (HPMHooks.count.HP_DB_data2i_post > 0) { int (*postHookFunc) (int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -24882,14 +31549,14 @@ int HP_DB_data2i(struct DBData *data) { unsigned int HP_DB_data2ui(struct DBData *data) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_DB_data2ui_pre ) { - unsigned int (*preHookFunc) (struct DBData *data); + if (HPMHooks.count.HP_DB_data2ui_pre > 0) { + unsigned int (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24897,9 +31564,9 @@ unsigned int HP_DB_data2ui(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ui(data); } - if( HPMHooks.count.HP_DB_data2ui_post ) { + if (HPMHooks.count.HP_DB_data2ui_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -24909,14 +31576,14 @@ unsigned int HP_DB_data2ui(struct DBData *data) { void* HP_DB_data2ptr(struct DBData *data) { int hIndex = 0; void* retVal___ = NULL; - if( HPMHooks.count.HP_DB_data2ptr_pre ) { - void* (*preHookFunc) (struct DBData *data); + if (HPMHooks.count.HP_DB_data2ptr_pre > 0) { + void* (*preHookFunc) (struct DBData **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -24924,9 +31591,9 @@ void* HP_DB_data2ptr(struct DBData *data) { { retVal___ = HPMHooks.source.DB.data2ptr(data); } - if( HPMHooks.count.HP_DB_data2ptr_post ) { + if (HPMHooks.count.HP_DB_data2ptr_post > 0) { void* (*postHookFunc) (void* retVal___, struct DBData *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -24935,14 +31602,14 @@ void* HP_DB_data2ptr(struct DBData *data) { } void HP_DB_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_init_pre ) { + if (HPMHooks.count.HP_DB_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24950,9 +31617,9 @@ void HP_DB_init(void) { { HPMHooks.source.DB.init(); } - if( HPMHooks.count.HP_DB_init_post ) { + if (HPMHooks.count.HP_DB_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func; postHookFunc(); } @@ -24961,14 +31628,14 @@ void HP_DB_init(void) { } void HP_DB_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_DB_final_pre ) { + if (HPMHooks.count.HP_DB_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -24976,27 +31643,80 @@ void HP_DB_final(void) { { HPMHooks.source.DB.final(); } - if( HPMHooks.count.HP_DB_final_post ) { + if (HPMHooks.count.HP_DB_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func; postHookFunc(); } } return; } -/* duel */ +/* des_interface */ +void HP_des_decrypt_block(struct des_bit64 *block) { + int hIndex = 0; + if (HPMHooks.count.HP_des_decrypt_block_pre > 0) { + void (*preHookFunc) (struct des_bit64 **block); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_des_decrypt_block_pre[hIndex].func; + preHookFunc(&block); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.des.decrypt_block(block); + } + if (HPMHooks.count.HP_des_decrypt_block_post > 0) { + void (*postHookFunc) (struct des_bit64 *block); + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_block_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_des_decrypt_block_post[hIndex].func; + postHookFunc(block); + } + } + return; +} +void HP_des_decrypt(unsigned char *data, size_t size) { + int hIndex = 0; + if (HPMHooks.count.HP_des_decrypt_pre > 0) { + void (*preHookFunc) (unsigned char **data, size_t *size); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_des_decrypt_pre[hIndex].func; + preHookFunc(&data, &size); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.des.decrypt(data, size); + } + if (HPMHooks.count.HP_des_decrypt_post > 0) { + void (*postHookFunc) (unsigned char *data, size_t size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_des_decrypt_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_des_decrypt_post[hIndex].func; + postHookFunc(data, size); + } + } + return; +} +/* duel_interface */ int HP_duel_create(struct map_session_data *sd, const unsigned int maxpl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_duel_create_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const unsigned int *maxpl); + if (HPMHooks.count.HP_duel_create_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const unsigned int *maxpl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_duel_create_pre[hIndex].func; - retVal___ = preHookFunc(sd, &maxpl); + retVal___ = preHookFunc(&sd, &maxpl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25004,25 +31724,25 @@ int HP_duel_create(struct map_session_data *sd, const unsigned int maxpl) { { 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++ ) { + if (HPMHooks.count.HP_duel_create_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_duel_invite_pre > 0) { + void (*preHookFunc) (const unsigned int *did, struct map_session_data **sd, struct map_session_data **target_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_invite_pre; hIndex++ ) { + 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); + preHookFunc(&did, &sd, &target_sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25030,25 +31750,25 @@ void HP_duel_invite(const unsigned int did, struct map_session_data *sd, struct { 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++ ) { + if (HPMHooks.count.HP_duel_invite_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_duel_accept_pre > 0) { + void (*preHookFunc) (const unsigned int *did, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_accept_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_accept_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_duel_accept_pre[hIndex].func; - preHookFunc(&did, sd); + preHookFunc(&did, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25056,25 +31776,25 @@ void HP_duel_accept(const unsigned int did, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_duel_accept_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_duel_reject_pre > 0) { + void (*preHookFunc) (const unsigned int *did, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_reject_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_reject_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_duel_reject_pre[hIndex].func; - preHookFunc(&did, sd); + preHookFunc(&did, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25082,25 +31802,25 @@ void HP_duel_reject(const unsigned int did, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_duel_reject_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_duel_leave_pre > 0) { + void (*preHookFunc) (const unsigned int *did, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_leave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_leave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_duel_leave_pre[hIndex].func; - preHookFunc(&did, sd); + preHookFunc(&did, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25108,25 +31828,25 @@ void HP_duel_leave(const unsigned int did, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_duel_leave_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_duel_showinfo_pre > 0) { + void (*preHookFunc) (const unsigned int *did, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_showinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_showinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_duel_showinfo_pre[hIndex].func; - preHookFunc(&did, sd); + preHookFunc(&did, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25134,37 +31854,37 @@ void HP_duel_showinfo(const unsigned int did, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_duel_showinfo_post > 0) { + 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); + postHookFunc(did, sd); } } return; } -int HP_duel_checktime(struct map_session_data *sd) { +int64 HP_duel_difftime(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_duel_checktime_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + int64 retVal___ = 0; + if (HPMHooks.count.HP_duel_difftime_pre > 0) { + int64 (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_checktime_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_duel_checktime_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_difftime_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_duel_difftime_pre[hIndex].func; + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.duel.checktime(sd); + retVal___ = HPMHooks.source.duel.difftime(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; + if (HPMHooks.count.HP_duel_difftime_post > 0) { + int64 (*postHookFunc) (int64 retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_difftime_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_duel_difftime_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } } @@ -25172,14 +31892,14 @@ int HP_duel_checktime(struct map_session_data *sd) { } void HP_duel_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_duel_init_pre ) { + if (HPMHooks.count.HP_duel_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_duel_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25187,25 +31907,25 @@ void HP_duel_init(bool minimal) { { HPMHooks.source.duel.init(minimal); } - if( HPMHooks.count.HP_duel_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_post; hIndex++ ) { + if (HPMHooks.count.HP_duel_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_duel_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_duel_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_duel_final_pre ) { + if (HPMHooks.count.HP_duel_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_duel_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25213,27 +31933,27 @@ void HP_duel_final(void) { { HPMHooks.source.duel.final(); } - if( HPMHooks.count.HP_duel_final_post ) { + if (HPMHooks.count.HP_duel_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_duel_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_duel_final_post[hIndex].func; postHookFunc(); } } return; } -/* elemental */ +/* elemental_interface */ int HP_elemental_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_init_pre ) { + if (HPMHooks.count.HP_elemental_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_elemental_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25241,25 +31961,25 @@ int HP_elemental_init(bool minimal) { { retVal___ = HPMHooks.source.elemental.init(minimal); } - if( HPMHooks.count.HP_elemental_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_post; hIndex++ ) { + if (HPMHooks.count.HP_elemental_init_post > 0) { + int (*postHookFunc) (int retVal___, bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + retVal___ = postHookFunc(retVal___, minimal); } } return retVal___; } void HP_elemental_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_elemental_final_pre ) { + if (HPMHooks.count.HP_elemental_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_elemental_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25267,9 +31987,9 @@ void HP_elemental_final(void) { { HPMHooks.source.elemental.final(); } - if( HPMHooks.count.HP_elemental_final_post ) { + if (HPMHooks.count.HP_elemental_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_final_post[hIndex].func; postHookFunc(); } @@ -25279,14 +31999,14 @@ void HP_elemental_final(void) { bool HP_elemental_class(int class_) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_elemental_class_pre ) { + if (HPMHooks.count.HP_elemental_class_pre > 0) { bool (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_class_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25294,11 +32014,11 @@ bool HP_elemental_class(int class_) { { 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++ ) { + if (HPMHooks.count.HP_elemental_class_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, class_); } } return retVal___; @@ -25306,14 +32026,14 @@ bool HP_elemental_class(int class_) { 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 ) { + if (HPMHooks.count.HP_elemental_get_viewdata_pre > 0) { struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25321,11 +32041,11 @@ struct view_data* HP_elemental_get_viewdata(int class_) { { 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++ ) { + if (HPMHooks.count.HP_elemental_get_viewdata_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, class_); } } return retVal___; @@ -25333,14 +32053,14 @@ struct view_data* HP_elemental_get_viewdata(int class_) { int HP_elemental_create(struct map_session_data *sd, int class_, unsigned int lifetime) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_create_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *class_, unsigned int *lifetime); + if (HPMHooks.count.HP_elemental_create_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *class_, unsigned int *lifetime); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_create_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &class_, &lifetime); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25348,11 +32068,11 @@ int HP_elemental_create(struct map_session_data *sd, int class_, unsigned int li { 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++ ) { + if (HPMHooks.count.HP_elemental_create_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, class_, lifetime); } } return retVal___; @@ -25360,14 +32080,14 @@ int HP_elemental_create(struct map_session_data *sd, int class_, unsigned int li int HP_elemental_data_received(const struct s_elemental *ele, bool flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_data_received_pre ) { - int (*preHookFunc) (const struct s_elemental *ele, bool *flag); + if (HPMHooks.count.HP_elemental_data_received_pre > 0) { + int (*preHookFunc) (const struct s_elemental **ele, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_data_received_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&ele, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25375,11 +32095,11 @@ int HP_elemental_data_received(const struct s_elemental *ele, bool flag) { { retVal___ = HPMHooks.source.elemental.data_received(ele, flag); } - if( HPMHooks.count.HP_elemental_data_received_post ) { - int (*postHookFunc) (int retVal___, const struct s_elemental *ele, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_data_received_post; hIndex++ ) { + if (HPMHooks.count.HP_elemental_data_received_post > 0) { + int (*postHookFunc) (int retVal___, const 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); + retVal___ = postHookFunc(retVal___, ele, flag); } } return retVal___; @@ -25387,14 +32107,14 @@ int HP_elemental_data_received(const struct s_elemental *ele, bool flag) { int HP_elemental_save(struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_save_pre ) { - int (*preHookFunc) (struct elemental_data *ed); + if (HPMHooks.count.HP_elemental_save_pre > 0) { + int (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_elemental_save_pre[hIndex].func; - retVal___ = preHookFunc(ed); + retVal___ = preHookFunc(&ed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25402,9 +32122,9 @@ int HP_elemental_save(struct elemental_data *ed) { { retVal___ = HPMHooks.source.elemental.save(ed); } - if( HPMHooks.count.HP_elemental_save_post ) { + if (HPMHooks.count.HP_elemental_save_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_save_post[hIndex].func; retVal___ = postHookFunc(retVal___, ed); } @@ -25414,14 +32134,14 @@ int HP_elemental_save(struct elemental_data *ed) { int HP_elemental_change_mode_ack(struct elemental_data *ed, int mode) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_change_mode_ack_pre ) { - int (*preHookFunc) (struct elemental_data *ed, int *mode); + if (HPMHooks.count.HP_elemental_change_mode_ack_pre > 0) { + int (*preHookFunc) (struct elemental_data **ed, int *mode); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_ack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&ed, &mode); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25429,11 +32149,11 @@ int HP_elemental_change_mode_ack(struct elemental_data *ed, int mode) { { 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++ ) { + if (HPMHooks.count.HP_elemental_change_mode_ack_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, ed, mode); } } return retVal___; @@ -25441,14 +32161,14 @@ int HP_elemental_change_mode_ack(struct elemental_data *ed, int mode) { int HP_elemental_change_mode(struct elemental_data *ed, uint32 mode) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_change_mode_pre ) { - int (*preHookFunc) (struct elemental_data *ed, uint32 *mode); + if (HPMHooks.count.HP_elemental_change_mode_pre > 0) { + int (*preHookFunc) (struct elemental_data **ed, uint32 *mode); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&ed, &mode); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25456,25 +32176,25 @@ int HP_elemental_change_mode(struct elemental_data *ed, uint32 mode) { { retVal___ = HPMHooks.source.elemental.change_mode(ed, mode); } - if( HPMHooks.count.HP_elemental_change_mode_post ) { - int (*postHookFunc) (int retVal___, struct elemental_data *ed, uint32 *mode); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_change_mode_post; hIndex++ ) { + if (HPMHooks.count.HP_elemental_change_mode_post > 0) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, uint32 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); + 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); + if (HPMHooks.count.HP_elemental_heal_pre > 0) { + void (*preHookFunc) (struct elemental_data **ed, int *hp, int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_heal_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_heal_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_elemental_heal_pre[hIndex].func; - preHookFunc(ed, &hp, &sp); + preHookFunc(&ed, &hp, &sp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25482,11 +32202,11 @@ void HP_elemental_heal(struct elemental_data *ed, int hp, int sp) { { 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++ ) { + if (HPMHooks.count.HP_elemental_heal_post > 0) { + 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); + postHookFunc(ed, hp, sp); } } return; @@ -25494,14 +32214,14 @@ void HP_elemental_heal(struct elemental_data *ed, int hp, int sp) { int HP_elemental_dead(struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_dead_pre ) { - int (*preHookFunc) (struct elemental_data *ed); + if (HPMHooks.count.HP_elemental_dead_pre > 0) { + int (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_elemental_dead_pre[hIndex].func; - retVal___ = preHookFunc(ed); + retVal___ = preHookFunc(&ed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25509,9 +32229,9 @@ int HP_elemental_dead(struct elemental_data *ed) { { retVal___ = HPMHooks.source.elemental.dead(ed); } - if( HPMHooks.count.HP_elemental_dead_post ) { + if (HPMHooks.count.HP_elemental_dead_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_dead_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_dead_post[hIndex].func; retVal___ = postHookFunc(retVal___, ed); } @@ -25521,14 +32241,14 @@ int HP_elemental_dead(struct elemental_data *ed) { int HP_elemental_delete(struct elemental_data *ed, int reply) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_delete_pre ) { - int (*preHookFunc) (struct elemental_data *ed, int *reply); + if (HPMHooks.count.HP_elemental_delete_pre > 0) { + int (*preHookFunc) (struct elemental_data **ed, int *reply); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_elemental_delete_pre[hIndex].func; - retVal___ = preHookFunc(ed, &reply); + retVal___ = preHookFunc(&ed, &reply); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25536,25 +32256,25 @@ int HP_elemental_delete(struct elemental_data *ed, int reply) { { 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++ ) { + if (HPMHooks.count.HP_elemental_delete_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_elemental_summon_stop_pre > 0) { + void (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_elemental_summon_stop_pre[hIndex].func; - preHookFunc(ed); + preHookFunc(&ed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25562,9 +32282,9 @@ void HP_elemental_summon_stop(struct elemental_data *ed) { { HPMHooks.source.elemental.summon_stop(ed); } - if( HPMHooks.count.HP_elemental_summon_stop_post ) { + if (HPMHooks.count.HP_elemental_summon_stop_post > 0) { void (*postHookFunc) (struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_stop_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_summon_stop_post[hIndex].func; postHookFunc(ed); } @@ -25574,14 +32294,14 @@ void HP_elemental_summon_stop(struct elemental_data *ed) { int HP_elemental_get_lifetime(struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_get_lifetime_pre ) { - int (*preHookFunc) (struct elemental_data *ed); + if (HPMHooks.count.HP_elemental_get_lifetime_pre > 0) { + int (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_lifetime_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&ed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25589,9 +32309,9 @@ int HP_elemental_get_lifetime(struct elemental_data *ed) { { retVal___ = HPMHooks.source.elemental.get_lifetime(ed); } - if( HPMHooks.count.HP_elemental_get_lifetime_post ) { + if (HPMHooks.count.HP_elemental_get_lifetime_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_get_lifetime_post; hIndex++ ) { + 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); } @@ -25601,14 +32321,14 @@ int HP_elemental_get_lifetime(struct elemental_data *ed) { int HP_elemental_unlocktarget(struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_unlocktarget_pre ) { - int (*preHookFunc) (struct elemental_data *ed); + if (HPMHooks.count.HP_elemental_unlocktarget_pre > 0) { + int (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_elemental_unlocktarget_pre[hIndex].func; - retVal___ = preHookFunc(ed); + retVal___ = preHookFunc(&ed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25616,9 +32336,9 @@ int HP_elemental_unlocktarget(struct elemental_data *ed) { { retVal___ = HPMHooks.source.elemental.unlocktarget(ed); } - if( HPMHooks.count.HP_elemental_unlocktarget_post ) { + if (HPMHooks.count.HP_elemental_unlocktarget_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_unlocktarget_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_unlocktarget_post[hIndex].func; retVal___ = postHookFunc(retVal___, ed); } @@ -25628,14 +32348,14 @@ int HP_elemental_unlocktarget(struct elemental_data *ed) { int HP_elemental_skillnotok(uint16 skill_id, struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_skillnotok_pre ) { - int (*preHookFunc) (uint16 *skill_id, struct elemental_data *ed); + if (HPMHooks.count.HP_elemental_skillnotok_pre > 0) { + int (*preHookFunc) (uint16 *skill_id, struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skillnotok_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&skill_id, &ed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25643,11 +32363,11 @@ int HP_elemental_skillnotok(uint16 skill_id, struct elemental_data *ed) { { 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++ ) { + if (HPMHooks.count.HP_elemental_skillnotok_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, skill_id, ed); } } return retVal___; @@ -25655,14 +32375,14 @@ int HP_elemental_skillnotok(uint16 skill_id, struct elemental_data *ed) { int HP_elemental_set_target(struct map_session_data *sd, struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_set_target_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); + if (HPMHooks.count.HP_elemental_set_target_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_set_target_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25670,9 +32390,9 @@ int HP_elemental_set_target(struct map_session_data *sd, struct block_list *bl) { retVal___ = HPMHooks.source.elemental.set_target(sd, bl); } - if( HPMHooks.count.HP_elemental_set_target_post ) { + if (HPMHooks.count.HP_elemental_set_target_post > 0) { 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++ ) { + 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); } @@ -25682,14 +32402,14 @@ int HP_elemental_set_target(struct map_session_data *sd, struct block_list *bl) int HP_elemental_clean_single_effect(struct elemental_data *ed, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_clean_single_effect_pre ) { - int (*preHookFunc) (struct elemental_data *ed, uint16 *skill_id); + if (HPMHooks.count.HP_elemental_clean_single_effect_pre > 0) { + int (*preHookFunc) (struct elemental_data **ed, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_single_effect_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&ed, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25697,11 +32417,11 @@ int HP_elemental_clean_single_effect(struct elemental_data *ed, uint16 skill_id) { 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++ ) { + if (HPMHooks.count.HP_elemental_clean_single_effect_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, ed, skill_id); } } return retVal___; @@ -25709,14 +32429,14 @@ int HP_elemental_clean_single_effect(struct elemental_data *ed, uint16 skill_id) int HP_elemental_clean_effect(struct elemental_data *ed) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_clean_effect_pre ) { - int (*preHookFunc) (struct elemental_data *ed); + if (HPMHooks.count.HP_elemental_clean_effect_pre > 0) { + int (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_effect_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&ed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25724,9 +32444,9 @@ int HP_elemental_clean_effect(struct elemental_data *ed) { { retVal___ = HPMHooks.source.elemental.clean_effect(ed); } - if( HPMHooks.count.HP_elemental_clean_effect_post ) { + if (HPMHooks.count.HP_elemental_clean_effect_post > 0) { int (*postHookFunc) (int retVal___, struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_clean_effect_post; hIndex++ ) { + 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); } @@ -25736,14 +32456,14 @@ int HP_elemental_clean_effect(struct elemental_data *ed) { int HP_elemental_action(struct elemental_data *ed, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_action_pre ) { - int (*preHookFunc) (struct elemental_data *ed, struct block_list *bl, int64 *tick); + if (HPMHooks.count.HP_elemental_action_pre > 0) { + int (*preHookFunc) (struct elemental_data **ed, struct block_list **bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_action_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&ed, &bl, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25751,27 +32471,26 @@ int HP_elemental_action(struct elemental_data *ed, struct block_list *bl, int64 { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_action_post; hIndex++ ) { + if (HPMHooks.count.HP_elemental_action_post > 0) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct block_list *bl, int64 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); + 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 retVal___ = { 0 }; + if (HPMHooks.count.HP_elemental_skill_get_requirements_pre > 0) { struct skill_condition (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_skill_get_requirements_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25779,11 +32498,11 @@ struct skill_condition HP_elemental_skill_get_requirements(uint16 skill_id, uint { 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++ ) { + if (HPMHooks.count.HP_elemental_skill_get_requirements_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; @@ -25791,14 +32510,14 @@ struct skill_condition HP_elemental_skill_get_requirements(uint16 skill_id, uint int HP_elemental_read_skilldb(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_read_skilldb_pre ) { + if (HPMHooks.count.HP_elemental_read_skilldb_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_skilldb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25806,9 +32525,9 @@ int HP_elemental_read_skilldb(void) { { retVal___ = HPMHooks.source.elemental.read_skilldb(); } - if( HPMHooks.count.HP_elemental_read_skilldb_post ) { + if (HPMHooks.count.HP_elemental_read_skilldb_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_skilldb_post; hIndex++ ) { + 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___); } @@ -25817,14 +32536,14 @@ int HP_elemental_read_skilldb(void) { } void HP_elemental_reload_db(void) { int hIndex = 0; - if( HPMHooks.count.HP_elemental_reload_db_pre ) { + if (HPMHooks.count.HP_elemental_reload_db_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25832,9 +32551,9 @@ void HP_elemental_reload_db(void) { { HPMHooks.source.elemental.reload_db(); } - if( HPMHooks.count.HP_elemental_reload_db_post ) { + if (HPMHooks.count.HP_elemental_reload_db_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_reload_db_post[hIndex].func; postHookFunc(); } @@ -25843,14 +32562,14 @@ void HP_elemental_reload_db(void) { } void HP_elemental_reload_skilldb(void) { int hIndex = 0; - if( HPMHooks.count.HP_elemental_reload_skilldb_pre ) { + if (HPMHooks.count.HP_elemental_reload_skilldb_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_skilldb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25858,9 +32577,9 @@ void HP_elemental_reload_skilldb(void) { { HPMHooks.source.elemental.reload_skilldb(); } - if( HPMHooks.count.HP_elemental_reload_skilldb_post ) { + if (HPMHooks.count.HP_elemental_reload_skilldb_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_skilldb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_reload_skilldb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_reload_skilldb_post[hIndex].func; postHookFunc(); } @@ -25870,14 +32589,14 @@ void HP_elemental_reload_skilldb(void) { int HP_elemental_search_index(int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_search_index_pre ) { + if (HPMHooks.count.HP_elemental_search_index_pre > 0) { int (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_search_index_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25885,25 +32604,25 @@ int HP_elemental_search_index(int class_) { { 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++ ) { + if (HPMHooks.count.HP_elemental_search_index_post > 0) { + 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_); + 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); + if (HPMHooks.count.HP_elemental_summon_init_pre > 0) { + void (*preHookFunc) (struct elemental_data **ed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_elemental_summon_init_pre[hIndex].func; - preHookFunc(ed); + preHookFunc(&ed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -25911,9 +32630,9 @@ void HP_elemental_summon_init(struct elemental_data *ed) { { HPMHooks.source.elemental.summon_init(ed); } - if( HPMHooks.count.HP_elemental_summon_init_post ) { + if (HPMHooks.count.HP_elemental_summon_init_post > 0) { void (*postHookFunc) (struct elemental_data *ed); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_elemental_summon_init_post[hIndex].func; postHookFunc(ed); } @@ -25923,14 +32642,14 @@ void HP_elemental_summon_init(struct elemental_data *ed) { int HP_elemental_summon_end_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_summon_end_timer_pre ) { + if (HPMHooks.count.HP_elemental_summon_end_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_end_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25938,11 +32657,11 @@ int HP_elemental_summon_end_timer(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_summon_end_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_elemental_summon_end_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -25950,16 +32669,16 @@ int HP_elemental_summon_end_timer(int tid, int64 tick, int id, intptr_t data) { int HP_elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25969,9 +32688,9 @@ int HP_elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_elemental_ai_sub_timer_activesearch_post > 0) { 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++ ) { + 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); @@ -25983,14 +32702,14 @@ int HP_elemental_ai_sub_timer_activesearch(struct block_list *bl, va_list ap) { int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data *sd, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_ai_sub_timer_pre ) { - int (*preHookFunc) (struct elemental_data *ed, struct map_session_data *sd, int64 *tick); + if (HPMHooks.count.HP_elemental_ai_sub_timer_pre > 0) { + int (*preHookFunc) (struct elemental_data **ed, struct map_session_data **sd, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&ed, &sd, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -25998,11 +32717,11 @@ int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_elemental_ai_sub_timer_post > 0) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, struct map_session_data *sd, int64 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); + retVal___ = postHookFunc(retVal___, ed, sd, tick); } } return retVal___; @@ -26010,16 +32729,16 @@ int HP_elemental_ai_sub_timer(struct elemental_data *ed, struct map_session_data int HP_elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + if (HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_sub_foreachclient_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26029,9 +32748,9 @@ int HP_elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.elemental.ai_sub_foreachclient(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_elemental_ai_sub_foreachclient_post ) { + if (HPMHooks.count.HP_elemental_ai_sub_foreachclient_post > 0) { 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++ ) { + 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); @@ -26043,14 +32762,14 @@ int HP_elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int HP_elemental_ai_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_ai_timer_pre ) { + if (HPMHooks.count.HP_elemental_ai_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26058,11 +32777,11 @@ int HP_elemental_ai_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.elemental.ai_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_elemental_ai_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_ai_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_elemental_ai_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -26070,14 +32789,14 @@ int HP_elemental_ai_timer(int tid, int64 tick, int id, intptr_t data) { int HP_elemental_read_db(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_elemental_read_db_pre ) { + if (HPMHooks.count.HP_elemental_read_db_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26085,26 +32804,214 @@ int HP_elemental_read_db(void) { { retVal___ = HPMHooks.source.elemental.read_db(); } - if( HPMHooks.count.HP_elemental_read_db_post ) { + if (HPMHooks.count.HP_elemental_read_db_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_elemental_read_db_post; hIndex++ ) { + 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 */ +/* grfio_interface */ +void HP_grfio_init(const char *fname) { + int hIndex = 0; + if (HPMHooks.count.HP_grfio_init_pre > 0) { + void (*preHookFunc) (const char **fname); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_grfio_init_pre[hIndex].func; + preHookFunc(&fname); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.grfio.init(fname); + } + if (HPMHooks.count.HP_grfio_init_post > 0) { + void (*postHookFunc) (const char *fname); + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_grfio_init_post[hIndex].func; + postHookFunc(fname); + } + } + return; +} +void HP_grfio_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_grfio_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_grfio_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.grfio.final(); + } + if (HPMHooks.count.HP_grfio_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_grfio_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void* HP_grfio_reads(const char *fname, int *size) { + int hIndex = 0; + void* retVal___ = NULL; + if (HPMHooks.count.HP_grfio_reads_pre > 0) { + void* (*preHookFunc) (const char **fname, int **size); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_reads_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_grfio_reads_pre[hIndex].func; + retVal___ = preHookFunc(&fname, &size); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.grfio.reads(fname, size); + } + if (HPMHooks.count.HP_grfio_reads_post > 0) { + void* (*postHookFunc) (void* retVal___, const char *fname, int *size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_reads_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_grfio_reads_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fname, size); + } + } + return retVal___; +} +const char* HP_grfio_find_file(const char *fname) { + int hIndex = 0; + const char* retVal___ = NULL; + if (HPMHooks.count.HP_grfio_find_file_pre > 0) { + const char* (*preHookFunc) (const char **fname); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_find_file_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_grfio_find_file_pre[hIndex].func; + retVal___ = preHookFunc(&fname); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.grfio.find_file(fname); + } + if (HPMHooks.count.HP_grfio_find_file_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const char *fname); + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_find_file_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_grfio_find_file_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fname); + } + } + return retVal___; +} +unsigned long HP_grfio_crc32(const unsigned char *buf, unsigned int len) { + int hIndex = 0; + unsigned long retVal___ = 0; + if (HPMHooks.count.HP_grfio_crc32_pre > 0) { + unsigned long (*preHookFunc) (const unsigned char **buf, unsigned int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_crc32_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_grfio_crc32_pre[hIndex].func; + retVal___ = preHookFunc(&buf, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.grfio.crc32(buf, len); + } + if (HPMHooks.count.HP_grfio_crc32_post > 0) { + unsigned long (*postHookFunc) (unsigned long retVal___, const unsigned char *buf, unsigned int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_crc32_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_grfio_crc32_post[hIndex].func; + retVal___ = postHookFunc(retVal___, buf, len); + } + } + return retVal___; +} +int HP_grfio_decode_zip(void *dest, unsigned long *dest_len, const void *source, unsigned long source_len) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_grfio_decode_zip_pre > 0) { + int (*preHookFunc) (void **dest, unsigned long **dest_len, const void **source, unsigned long *source_len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_decode_zip_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_grfio_decode_zip_pre[hIndex].func; + retVal___ = preHookFunc(&dest, &dest_len, &source, &source_len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.grfio.decode_zip(dest, dest_len, source, source_len); + } + if (HPMHooks.count.HP_grfio_decode_zip_post > 0) { + int (*postHookFunc) (int retVal___, void *dest, unsigned long *dest_len, const void *source, unsigned long source_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_decode_zip_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_grfio_decode_zip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, dest, dest_len, source, source_len); + } + } + return retVal___; +} +int HP_grfio_encode_zip(void *dest, unsigned long *dest_len, const void *source, unsigned long source_len) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_grfio_encode_zip_pre > 0) { + int (*preHookFunc) (void **dest, unsigned long **dest_len, const void **source, unsigned long *source_len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_encode_zip_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_grfio_encode_zip_pre[hIndex].func; + retVal___ = preHookFunc(&dest, &dest_len, &source, &source_len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.grfio.encode_zip(dest, dest_len, source, source_len); + } + if (HPMHooks.count.HP_grfio_encode_zip_post > 0) { + int (*postHookFunc) (int retVal___, void *dest, unsigned long *dest_len, const void *source, unsigned long source_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_grfio_encode_zip_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_grfio_encode_zip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, dest, dest_len, source, source_len); + } + } + return retVal___; +} +/* guild_interface */ void HP_guild_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_guild_init_pre ) { + if (HPMHooks.count.HP_guild_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -26112,25 +33019,25 @@ void HP_guild_init(bool minimal) { { HPMHooks.source.guild.init(minimal); } - if( HPMHooks.count.HP_guild_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_guild_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_final_pre ) { + if (HPMHooks.count.HP_guild_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -26138,9 +33045,9 @@ void HP_guild_final(void) { { HPMHooks.source.guild.final(); } - if( HPMHooks.count.HP_guild_final_post ) { + if (HPMHooks.count.HP_guild_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_final_post[hIndex].func; postHookFunc(); } @@ -26150,14 +33057,14 @@ void HP_guild_final(void) { int HP_guild_skill_get_max(int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_skill_get_max_pre ) { + if (HPMHooks.count.HP_guild_skill_get_max_pre > 0) { int (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skill_get_max_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26165,11 +33072,11 @@ int HP_guild_skill_get_max(int id) { { 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++ ) { + if (HPMHooks.count.HP_guild_skill_get_max_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -26177,14 +33084,14 @@ int HP_guild_skill_get_max(int id) { int HP_guild_checkskill(struct guild *g, int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_checkskill_pre ) { - int (*preHookFunc) (struct guild *g, int *id); + if (HPMHooks.count.HP_guild_checkskill_pre > 0) { + int (*preHookFunc) (struct guild **g, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkskill_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkskill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_checkskill_pre[hIndex].func; - retVal___ = preHookFunc(g, &id); + retVal___ = preHookFunc(&g, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26192,11 +33099,11 @@ int HP_guild_checkskill(struct guild *g, int id) { { 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++ ) { + if (HPMHooks.count.HP_guild_checkskill_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, g, id); } } return retVal___; @@ -26204,14 +33111,14 @@ int HP_guild_checkskill(struct guild *g, int id) { int HP_guild_check_skill_require(struct guild *g, int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_check_skill_require_pre ) { - int (*preHookFunc) (struct guild *g, int *id); + if (HPMHooks.count.HP_guild_check_skill_require_pre > 0) { + int (*preHookFunc) (struct guild **g, int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_skill_require_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&g, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26219,11 +33126,11 @@ int HP_guild_check_skill_require(struct guild *g, int id) { { 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++ ) { + if (HPMHooks.count.HP_guild_check_skill_require_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, g, id); } } return retVal___; @@ -26231,14 +33138,14 @@ int HP_guild_check_skill_require(struct guild *g, int id) { int HP_guild_checkcastles(struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_checkcastles_pre ) { - int (*preHookFunc) (struct guild *g); + if (HPMHooks.count.HP_guild_checkcastles_pre > 0) { + int (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_checkcastles_pre[hIndex].func; - retVal___ = preHookFunc(g); + retVal___ = preHookFunc(&g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26246,9 +33153,9 @@ int HP_guild_checkcastles(struct guild *g) { { retVal___ = HPMHooks.source.guild.checkcastles(g); } - if( HPMHooks.count.HP_guild_checkcastles_post ) { + if (HPMHooks.count.HP_guild_checkcastles_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_checkcastles_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_checkcastles_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -26258,14 +33165,14 @@ int HP_guild_checkcastles(struct guild *g) { bool HP_guild_isallied(int guild_id, int guild_id2) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_guild_isallied_pre ) { + if (HPMHooks.count.HP_guild_isallied_pre > 0) { bool (*preHookFunc) (int *guild_id, int *guild_id2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_isallied_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26273,11 +33180,11 @@ bool HP_guild_isallied(int guild_id, int guild_id2) { { 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++ ) { + if (HPMHooks.count.HP_guild_isallied_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, guild_id2); } } return retVal___; @@ -26285,14 +33192,14 @@ bool HP_guild_isallied(int guild_id, int guild_id2) { struct guild* HP_guild_search(int guild_id) { int hIndex = 0; struct guild* retVal___ = NULL; - if( HPMHooks.count.HP_guild_search_pre ) { + if (HPMHooks.count.HP_guild_search_pre > 0) { struct guild* (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26300,26 +33207,26 @@ struct guild* HP_guild_search(int guild_id) { { 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++ ) { + if (HPMHooks.count.HP_guild_search_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id); } } return retVal___; } -struct guild* HP_guild_searchname(char *str) { +struct guild* HP_guild_searchname(const char *str) { int hIndex = 0; struct guild* retVal___ = NULL; - if( HPMHooks.count.HP_guild_searchname_pre ) { - struct guild* (*preHookFunc) (char *str); + if (HPMHooks.count.HP_guild_searchname_pre > 0) { + struct guild* (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_searchname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_searchname_pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26327,9 +33234,9 @@ struct guild* HP_guild_searchname(char *str) { { 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++ ) { + if (HPMHooks.count.HP_guild_searchname_post > 0) { + struct guild* (*postHookFunc) (struct guild* retVal___, const 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); } @@ -26339,14 +33246,14 @@ struct guild* HP_guild_searchname(char *str) { 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 ) { + if (HPMHooks.count.HP_guild_castle_search_pre > 0) { struct guild_castle* (*preHookFunc) (int *gcid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26354,11 +33261,11 @@ struct guild_castle* HP_guild_castle_search(int gcid) { { 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++ ) { + if (HPMHooks.count.HP_guild_castle_search_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, gcid); } } return retVal___; @@ -26366,14 +33273,14 @@ struct guild_castle* HP_guild_castle_search(int gcid) { 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); + if (HPMHooks.count.HP_guild_mapname2gc_pre > 0) { + struct guild_castle* (*preHookFunc) (const char **mapname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_mapname2gc_pre[hIndex].func; - retVal___ = preHookFunc(mapname); + retVal___ = preHookFunc(&mapname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26381,9 +33288,9 @@ struct guild_castle* HP_guild_mapname2gc(const char *mapname) { { retVal___ = HPMHooks.source.guild.mapname2gc(mapname); } - if( HPMHooks.count.HP_guild_mapname2gc_post ) { + if (HPMHooks.count.HP_guild_mapname2gc_post > 0) { struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, const char *mapname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapname2gc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_mapname2gc_post[hIndex].func; retVal___ = postHookFunc(retVal___, mapname); } @@ -26393,14 +33300,14 @@ struct guild_castle* HP_guild_mapname2gc(const char *mapname) { struct guild_castle* HP_guild_mapindex2gc(short map_index) { int hIndex = 0; struct guild_castle* retVal___ = NULL; - if( HPMHooks.count.HP_guild_mapindex2gc_pre ) { + if (HPMHooks.count.HP_guild_mapindex2gc_pre > 0) { struct guild_castle* (*preHookFunc) (short *map_index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_mapindex2gc_pre[hIndex].func; retVal___ = preHookFunc(&map_index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26408,11 +33315,11 @@ struct guild_castle* HP_guild_mapindex2gc(short map_index) { { retVal___ = HPMHooks.source.guild.mapindex2gc(map_index); } - if( HPMHooks.count.HP_guild_mapindex2gc_post ) { - struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, short *map_index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_mapindex2gc_post > 0) { + struct guild_castle* (*postHookFunc) (struct guild_castle* retVal___, short map_index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_mapindex2gc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_mapindex2gc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &map_index); + retVal___ = postHookFunc(retVal___, map_index); } } return retVal___; @@ -26420,14 +33327,14 @@ struct guild_castle* HP_guild_mapindex2gc(short map_index) { 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); + if (HPMHooks.count.HP_guild_getavailablesd_pre > 0) { + struct map_session_data* (*preHookFunc) (struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_getavailablesd_pre[hIndex].func; - retVal___ = preHookFunc(g); + retVal___ = preHookFunc(&g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26435,9 +33342,9 @@ struct map_session_data* HP_guild_getavailablesd(struct guild *g) { { retVal___ = HPMHooks.source.guild.getavailablesd(g); } - if( HPMHooks.count.HP_guild_getavailablesd_post ) { + if (HPMHooks.count.HP_guild_getavailablesd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_getavailablesd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_getavailablesd_post[hIndex].func; retVal___ = postHookFunc(retVal___, g); } @@ -26447,14 +33354,14 @@ struct map_session_data* HP_guild_getavailablesd(struct guild *g) { int HP_guild_getindex(const struct guild *g, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_getindex_pre ) { - int (*preHookFunc) (const struct guild *g, int *account_id, int *char_id); + if (HPMHooks.count.HP_guild_getindex_pre > 0) { + int (*preHookFunc) (const struct guild **g, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getindex_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&g, &account_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26462,11 +33369,11 @@ int HP_guild_getindex(const struct guild *g, int account_id, int char_id) { { retVal___ = HPMHooks.source.guild.getindex(g, account_id, char_id); } - if( HPMHooks.count.HP_guild_getindex_post ) { - int (*postHookFunc) (int retVal___, const struct guild *g, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getindex_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_getindex_post > 0) { + int (*postHookFunc) (int retVal___, const 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); + retVal___ = postHookFunc(retVal___, g, account_id, char_id); } } return retVal___; @@ -26474,14 +33381,14 @@ int HP_guild_getindex(const struct guild *g, int account_id, int char_id) { int HP_guild_getposition(struct guild *g, struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_getposition_pre ) { - int (*preHookFunc) (struct guild *g, struct map_session_data *sd); + if (HPMHooks.count.HP_guild_getposition_pre > 0) { + int (*preHookFunc) (struct guild **g, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getposition_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_getposition_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_getposition_pre[hIndex].func; - retVal___ = preHookFunc(g, sd); + retVal___ = preHookFunc(&g, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26489,26 +33396,26 @@ int HP_guild_getposition(struct guild *g, struct map_session_data *sd) { { retVal___ = HPMHooks.source.guild.getposition(g, sd); } - if( HPMHooks.count.HP_guild_getposition_post ) { + if (HPMHooks.count.HP_guild_getposition_post > 0) { int (*postHookFunc) (int retVal___, struct guild *g, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getposition_post; hIndex++ ) { + 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) { +uint64 HP_guild_payexp(struct map_session_data *sd, uint64 exp) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_guild_payexp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd, unsigned int *exp); + uint64 retVal___ = 0; + if (HPMHooks.count.HP_guild_payexp_pre > 0) { + uint64 (*preHookFunc) (struct map_session_data **sd, uint64 *exp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_payexp_pre[hIndex].func; - retVal___ = preHookFunc(sd, &exp); + retVal___ = preHookFunc(&sd, &exp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26516,11 +33423,11 @@ unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) { { 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++ ) { + if (HPMHooks.count.HP_guild_payexp_post > 0) { + uint64 (*postHookFunc) (uint64 retVal___, struct map_session_data *sd, uint64 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); + retVal___ = postHookFunc(retVal___, sd, exp); } } return retVal___; @@ -26528,14 +33435,14 @@ unsigned int HP_guild_payexp(struct map_session_data *sd, unsigned int exp) { int HP_guild_getexp(struct map_session_data *sd, int exp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_getexp_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *exp); + if (HPMHooks.count.HP_guild_getexp_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *exp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_getexp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_getexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_getexp_pre[hIndex].func; - retVal___ = preHookFunc(sd, &exp); + retVal___ = preHookFunc(&sd, &exp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26543,11 +33450,11 @@ int HP_guild_getexp(struct map_session_data *sd, int exp) { { 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++ ) { + if (HPMHooks.count.HP_guild_getexp_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, exp); } } return retVal___; @@ -26555,14 +33462,14 @@ int HP_guild_getexp(struct map_session_data *sd, int exp) { int HP_guild_create(struct map_session_data *sd, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_create_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *name); + if (HPMHooks.count.HP_guild_create_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_create_pre[hIndex].func; - retVal___ = preHookFunc(sd, name); + retVal___ = preHookFunc(&sd, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26570,9 +33477,9 @@ int HP_guild_create(struct map_session_data *sd, const char *name) { { retVal___ = HPMHooks.source.guild.create(sd, name); } - if( HPMHooks.count.HP_guild_create_post ) { + if (HPMHooks.count.HP_guild_create_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_post; hIndex++ ) { + 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); } @@ -26582,14 +33489,14 @@ int HP_guild_create(struct map_session_data *sd, const char *name) { int HP_guild_created(int account_id, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_created_pre ) { + if (HPMHooks.count.HP_guild_created_pre > 0) { int (*preHookFunc) (int *account_id, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_created_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26597,11 +33504,11 @@ int HP_guild_created(int account_id, int guild_id) { { 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++ ) { + if (HPMHooks.count.HP_guild_created_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, guild_id); } } return retVal___; @@ -26609,14 +33516,14 @@ int HP_guild_created(int account_id, int guild_id) { int HP_guild_request_info(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_request_info_pre ) { + if (HPMHooks.count.HP_guild_request_info_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_request_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26624,11 +33531,11 @@ int HP_guild_request_info(int guild_id) { { 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++ ) { + if (HPMHooks.count.HP_guild_request_info_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id); } } return retVal___; @@ -26636,14 +33543,14 @@ int HP_guild_request_info(int guild_id) { int HP_guild_recv_noinfo(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_recv_noinfo_pre ) { + if (HPMHooks.count.HP_guild_recv_noinfo_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_noinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26651,11 +33558,11 @@ int HP_guild_recv_noinfo(int guild_id) { { 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++ ) { + if (HPMHooks.count.HP_guild_recv_noinfo_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id); } } return retVal___; @@ -26663,14 +33570,14 @@ int HP_guild_recv_noinfo(int guild_id) { int HP_guild_recv_info(const struct guild *sg) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_recv_info_pre ) { - int (*preHookFunc) (const struct guild *sg); + if (HPMHooks.count.HP_guild_recv_info_pre > 0) { + int (*preHookFunc) (const struct guild **sg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_info_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26678,9 +33585,9 @@ int HP_guild_recv_info(const struct guild *sg) { { retVal___ = HPMHooks.source.guild.recv_info(sg); } - if( HPMHooks.count.HP_guild_recv_info_post ) { + if (HPMHooks.count.HP_guild_recv_info_post > 0) { int (*postHookFunc) (int retVal___, const struct guild *sg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_info_post; hIndex++ ) { + 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); } @@ -26690,14 +33597,14 @@ int HP_guild_recv_info(const struct guild *sg) { int HP_guild_npc_request_info(int guild_id, const char *ev) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_npc_request_info_pre ) { - int (*preHookFunc) (int *guild_id, const char *ev); + if (HPMHooks.count.HP_guild_npc_request_info_pre > 0) { + int (*preHookFunc) (int *guild_id, const char **ev); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_npc_request_info_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &ev); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26705,11 +33612,11 @@ int HP_guild_npc_request_info(int guild_id, const char *ev) { { 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++ ) { + if (HPMHooks.count.HP_guild_npc_request_info_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, ev); } } return retVal___; @@ -26717,14 +33624,14 @@ int HP_guild_npc_request_info(int guild_id, const char *ev) { int HP_guild_invite(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_invite_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + if (HPMHooks.count.HP_guild_invite_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_invite_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_invite_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_invite_pre[hIndex].func; - retVal___ = preHookFunc(sd, tsd); + retVal___ = preHookFunc(&sd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26732,9 +33639,9 @@ int HP_guild_invite(struct map_session_data *sd, struct map_session_data *tsd) { { retVal___ = HPMHooks.source.guild.invite(sd, tsd); } - if( HPMHooks.count.HP_guild_invite_post ) { + if (HPMHooks.count.HP_guild_invite_post > 0) { 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++ ) { + 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); } @@ -26744,14 +33651,14 @@ int HP_guild_invite(struct map_session_data *sd, struct map_session_data *tsd) { int HP_guild_reply_invite(struct map_session_data *sd, int guild_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_reply_invite_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *flag); + if (HPMHooks.count.HP_guild_reply_invite_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_invite_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &guild_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26759,25 +33666,25 @@ int HP_guild_reply_invite(struct map_session_data *sd, int guild_id, int flag) { { 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++ ) { + if (HPMHooks.count.HP_guild_reply_invite_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_guild_member_joined_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_member_joined_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -26785,9 +33692,9 @@ void HP_guild_member_joined(struct map_session_data *sd) { { HPMHooks.source.guild.member_joined(sd); } - if( HPMHooks.count.HP_guild_member_joined_post ) { + if (HPMHooks.count.HP_guild_member_joined_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_joined_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_member_joined_post[hIndex].func; postHookFunc(sd); } @@ -26797,14 +33704,14 @@ void HP_guild_member_joined(struct map_session_data *sd) { int HP_guild_member_added(int guild_id, int account_id, int char_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_member_added_pre ) { + if (HPMHooks.count.HP_guild_member_added_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_added_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26812,11 +33719,11 @@ int HP_guild_member_added(int guild_id, int account_id, int char_id, int flag) { { 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++ ) { + if (HPMHooks.count.HP_guild_member_added_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, flag); } } return retVal___; @@ -26824,14 +33731,14 @@ int HP_guild_member_added(int guild_id, int account_id, int char_id, int flag) { 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___ = 0; - 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); + if (HPMHooks.count.HP_guild_leave_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *guild_id, int *account_id, int *char_id, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_leave_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &guild_id, &account_id, &char_id, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26839,11 +33746,11 @@ int HP_guild_leave(struct map_session_data *sd, int guild_id, int account_id, in { 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++ ) { + if (HPMHooks.count.HP_guild_leave_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, guild_id, account_id, char_id, mes); } } return retVal___; @@ -26851,14 +33758,14 @@ int HP_guild_leave(struct map_session_data *sd, int guild_id, int account_id, in 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___ = 0; - 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); + if (HPMHooks.count.HP_guild_member_withdraw_pre > 0) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char **name, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_member_withdraw_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, &name, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26866,11 +33773,11 @@ int HP_guild_member_withdraw(int guild_id, int account_id, int char_id, int flag { 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++ ) { + if (HPMHooks.count.HP_guild_member_withdraw_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, flag, name, mes); } } return retVal___; @@ -26878,14 +33785,14 @@ int HP_guild_member_withdraw(int guild_id, int account_id, int char_id, int flag 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___ = 0; - 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); + if (HPMHooks.count.HP_guild_expulsion_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *guild_id, int *account_id, int *char_id, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expulsion_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &guild_id, &account_id, &char_id, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26893,11 +33800,11 @@ int HP_guild_expulsion(struct map_session_data *sd, int guild_id, int account_id { 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++ ) { + if (HPMHooks.count.HP_guild_expulsion_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, guild_id, account_id, char_id, mes); } } return retVal___; @@ -26905,14 +33812,14 @@ int HP_guild_expulsion(struct map_session_data *sd, int guild_id, int account_id int HP_guild_skillup(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_skillup_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if (HPMHooks.count.HP_guild_skillup_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillup_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26920,25 +33827,25 @@ int HP_guild_skillup(struct map_session_data *sd, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_guild_skillup_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_guild_block_skill_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_block_skill_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &time); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -26946,11 +33853,11 @@ void HP_guild_block_skill(struct map_session_data *sd, int time) { { 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++ ) { + if (HPMHooks.count.HP_guild_block_skill_post > 0) { + 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); + postHookFunc(sd, time); } } return; @@ -26958,14 +33865,14 @@ void HP_guild_block_skill(struct map_session_data *sd, int time) { int HP_guild_reqalliance(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_reqalliance_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + if (HPMHooks.count.HP_guild_reqalliance_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reqalliance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_reqalliance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_reqalliance_pre[hIndex].func; - retVal___ = preHookFunc(sd, tsd); + retVal___ = preHookFunc(&sd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -26973,9 +33880,9 @@ int HP_guild_reqalliance(struct map_session_data *sd, struct map_session_data *t { retVal___ = HPMHooks.source.guild.reqalliance(sd, tsd); } - if( HPMHooks.count.HP_guild_reqalliance_post ) { + if (HPMHooks.count.HP_guild_reqalliance_post > 0) { 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++ ) { + 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); } @@ -26985,14 +33892,14 @@ int HP_guild_reqalliance(struct map_session_data *sd, struct map_session_data *t int HP_guild_reply_reqalliance(struct map_session_data *sd, int account_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_reply_reqalliance_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *account_id, int *flag); + if (HPMHooks.count.HP_guild_reply_reqalliance_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *account_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_reply_reqalliance_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &account_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27000,11 +33907,11 @@ int HP_guild_reply_reqalliance(struct map_session_data *sd, int account_id, int { 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++ ) { + if (HPMHooks.count.HP_guild_reply_reqalliance_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, account_id, flag); } } return retVal___; @@ -27012,14 +33919,14 @@ int HP_guild_reply_reqalliance(struct map_session_data *sd, int account_id, int 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___ = 0; - 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); + if (HPMHooks.count.HP_guild_allianceack_pre > 0) { + int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag, const char **name1, const char **name2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_allianceack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id1, &guild_id2, &account_id1, &account_id2, &flag, &name1, &name2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27027,11 +33934,11 @@ int HP_guild_allianceack(int guild_id1, int guild_id2, int account_id1, int acco { 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++ ) { + if (HPMHooks.count.HP_guild_allianceack_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id1, guild_id2, account_id1, account_id2, flag, name1, name2); } } return retVal___; @@ -27039,14 +33946,14 @@ int HP_guild_allianceack(int guild_id1, int guild_id2, int account_id1, int acco int HP_guild_delalliance(struct map_session_data *sd, int guild_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_delalliance_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *guild_id, int *flag); + if (HPMHooks.count.HP_guild_delalliance_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_delalliance_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &guild_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27054,11 +33961,11 @@ int HP_guild_delalliance(struct map_session_data *sd, int guild_id, int flag) { { 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++ ) { + if (HPMHooks.count.HP_guild_delalliance_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, guild_id, flag); } } return retVal___; @@ -27066,14 +33973,14 @@ int HP_guild_delalliance(struct map_session_data *sd, int guild_id, int flag) { int HP_guild_opposition(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_opposition_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + if (HPMHooks.count.HP_guild_opposition_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_opposition_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_opposition_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_opposition_pre[hIndex].func; - retVal___ = preHookFunc(sd, tsd); + retVal___ = preHookFunc(&sd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27081,9 +33988,9 @@ int HP_guild_opposition(struct map_session_data *sd, struct map_session_data *ts { retVal___ = HPMHooks.source.guild.opposition(sd, tsd); } - if( HPMHooks.count.HP_guild_opposition_post ) { + if (HPMHooks.count.HP_guild_opposition_post > 0) { 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++ ) { + 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); } @@ -27093,14 +34000,14 @@ int HP_guild_opposition(struct map_session_data *sd, struct map_session_data *ts int HP_guild_check_alliance(int guild_id1, int guild_id2, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_check_alliance_pre ) { + if (HPMHooks.count.HP_guild_check_alliance_pre > 0) { int (*preHookFunc) (int *guild_id1, int *guild_id2, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_alliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27108,11 +34015,11 @@ int HP_guild_check_alliance(int guild_id1, int guild_id2, int flag) { { 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++ ) { + if (HPMHooks.count.HP_guild_check_alliance_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id1, guild_id2, flag); } } return retVal___; @@ -27120,14 +34027,14 @@ int HP_guild_check_alliance(int guild_id1, int guild_id2, int flag) { int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_send_memberinfoshort_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *online); + if (HPMHooks.count.HP_guild_send_memberinfoshort_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *online); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_memberinfoshort_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &online); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27135,38 +34042,38 @@ int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) { { 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++ ) { + if (HPMHooks.count.HP_guild_send_memberinfoshort_post > 0) { + 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); + 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 HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login) { int hIndex = 0; int retVal___ = 0; - 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_); + if (HPMHooks.count.HP_guild_recv_memberinfoshort_pre > 0) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class, uint32 *last_login); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class, &last_login); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class_); + retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class, last_login); } - 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++ ) { + if (HPMHooks.count.HP_guild_recv_memberinfoshort_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login); + 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_); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class, last_login); } } return retVal___; @@ -27174,14 +34081,14 @@ int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int int HP_guild_change_memberposition(int guild_id, int account_id, int char_id, short idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_change_memberposition_pre ) { + if (HPMHooks.count.HP_guild_change_memberposition_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, short *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_memberposition_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27189,11 +34096,11 @@ int HP_guild_change_memberposition(int guild_id, int account_id, int char_id, sh { 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++ ) { + if (HPMHooks.count.HP_guild_change_memberposition_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, idx); } } return retVal___; @@ -27201,14 +34108,14 @@ int HP_guild_change_memberposition(int guild_id, int account_id, int char_id, sh int HP_guild_memberposition_changed(struct guild *g, int idx, int pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_memberposition_changed_pre ) { - int (*preHookFunc) (struct guild *g, int *idx, int *pos); + if (HPMHooks.count.HP_guild_memberposition_changed_pre > 0) { + int (*preHookFunc) (struct guild **g, int *idx, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_memberposition_changed_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&g, &idx, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27216,11 +34123,11 @@ int HP_guild_memberposition_changed(struct guild *g, int idx, int pos) { { 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++ ) { + if (HPMHooks.count.HP_guild_memberposition_changed_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, g, idx, pos); } } return retVal___; @@ -27228,14 +34135,14 @@ int HP_guild_memberposition_changed(struct guild *g, int idx, int pos) { int HP_guild_change_position(int guild_id, int idx, int mode, int exp_mode, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_change_position_pre ) { - int (*preHookFunc) (int *guild_id, int *idx, int *mode, int *exp_mode, const char *name); + if (HPMHooks.count.HP_guild_change_position_pre > 0) { + int (*preHookFunc) (int *guild_id, int *idx, int *mode, int *exp_mode, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_position_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &idx, &mode, &exp_mode, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27243,11 +34150,11 @@ int HP_guild_change_position(int guild_id, int idx, int mode, int exp_mode, cons { 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++ ) { + if (HPMHooks.count.HP_guild_change_position_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, idx, mode, exp_mode, name); } } return retVal___; @@ -27255,14 +34162,14 @@ int HP_guild_change_position(int guild_id, int idx, int mode, int exp_mode, cons int HP_guild_position_changed(int guild_id, int idx, const struct guild_position *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_position_changed_pre ) { - int (*preHookFunc) (int *guild_id, int *idx, const struct guild_position *p); + if (HPMHooks.count.HP_guild_position_changed_pre > 0) { + int (*preHookFunc) (int *guild_id, int *idx, const struct guild_position **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_position_changed_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &idx, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27270,11 +34177,11 @@ int HP_guild_position_changed(int guild_id, int idx, const struct guild_position { 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, const struct guild_position *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_position_changed_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_position_changed_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, int idx, const 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); + retVal___ = postHookFunc(retVal___, guild_id, idx, p); } } return retVal___; @@ -27282,14 +34189,14 @@ int HP_guild_position_changed(int guild_id, int idx, const struct guild_position int HP_guild_change_notice(struct map_session_data *sd, int guild_id, const char *mes1, const char *mes2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_change_notice_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *guild_id, const char *mes1, const char *mes2); + if (HPMHooks.count.HP_guild_change_notice_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *guild_id, const char **mes1, const char **mes2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_notice_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &guild_id, &mes1, &mes2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27297,11 +34204,11 @@ int HP_guild_change_notice(struct map_session_data *sd, int guild_id, const char { 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++ ) { + if (HPMHooks.count.HP_guild_change_notice_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, guild_id, mes1, mes2); } } return retVal___; @@ -27309,14 +34216,14 @@ int HP_guild_change_notice(struct map_session_data *sd, int guild_id, const char int HP_guild_notice_changed(int guild_id, const char *mes1, const char *mes2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_notice_changed_pre ) { - int (*preHookFunc) (int *guild_id, const char *mes1, const char *mes2); + if (HPMHooks.count.HP_guild_notice_changed_pre > 0) { + int (*preHookFunc) (int *guild_id, const char **mes1, const char **mes2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_notice_changed_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &mes1, &mes2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27324,11 +34231,11 @@ int HP_guild_notice_changed(int guild_id, const char *mes1, const char *mes2) { { 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++ ) { + if (HPMHooks.count.HP_guild_notice_changed_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, mes1, mes2); } } return retVal___; @@ -27336,14 +34243,14 @@ int HP_guild_notice_changed(int guild_id, const char *mes1, const char *mes2) { int HP_guild_change_emblem(struct map_session_data *sd, int len, const char *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_change_emblem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *len, const char *data); + if (HPMHooks.count.HP_guild_change_emblem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *len, const char **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_change_emblem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &len, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27351,11 +34258,11 @@ int HP_guild_change_emblem(struct map_session_data *sd, int len, const char *dat { 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++ ) { + if (HPMHooks.count.HP_guild_change_emblem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, len, data); } } return retVal___; @@ -27363,14 +34270,14 @@ int HP_guild_change_emblem(struct map_session_data *sd, int len, const char *dat int HP_guild_emblem_changed(int len, int guild_id, int emblem_id, const char *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_emblem_changed_pre ) { - int (*preHookFunc) (int *len, int *guild_id, int *emblem_id, const char *data); + if (HPMHooks.count.HP_guild_emblem_changed_pre > 0) { + int (*preHookFunc) (int *len, int *guild_id, int *emblem_id, const char **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_emblem_changed_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&len, &guild_id, &emblem_id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27378,65 +34285,38 @@ int HP_guild_emblem_changed(int len, int guild_id, int emblem_id, const char *da { 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++ ) { + if (HPMHooks.count.HP_guild_emblem_changed_post > 0) { + 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); + 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 HP_guild_send_message(struct map_session_data *sd, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_send_message_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len); + if (HPMHooks.count.HP_guild_send_message_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_message_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.guild.send_message(sd, mes, len); + retVal___ = HPMHooks.source.guild.send_message(sd, mes); } - 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++ ) { + if (HPMHooks.count.HP_guild_send_message_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes); + 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___ = 0; - if( HPMHooks.count.HP_guild_recv_message_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, const char *mes, int *len); - *HPMforce_return = false; - 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); + retVal___ = postHookFunc(retVal___, sd, mes); } } return retVal___; @@ -27444,14 +34324,14 @@ int HP_guild_recv_message(int guild_id, int account_id, const char *mes, int len int HP_guild_send_dot_remove(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_send_dot_remove_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_guild_send_dot_remove_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_dot_remove_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27459,9 +34339,9 @@ int HP_guild_send_dot_remove(struct map_session_data *sd) { { retVal___ = HPMHooks.source.guild.send_dot_remove(sd); } - if( HPMHooks.count.HP_guild_send_dot_remove_post ) { + if (HPMHooks.count.HP_guild_send_dot_remove_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_dot_remove_post; hIndex++ ) { + 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); } @@ -27471,14 +34351,14 @@ int HP_guild_send_dot_remove(struct map_session_data *sd) { int HP_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_skillupack_pre ) { + if (HPMHooks.count.HP_guild_skillupack_pre > 0) { int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_skillupack_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27486,11 +34366,11 @@ int HP_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { { 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++ ) { + if (HPMHooks.count.HP_guild_skillupack_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, skill_id, account_id); } } return retVal___; @@ -27498,14 +34378,14 @@ int HP_guild_skillupack(int guild_id, uint16 skill_id, int account_id) { int HP_guild_dobreak(struct map_session_data *sd, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_dobreak_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *name); + if (HPMHooks.count.HP_guild_dobreak_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_dobreak_pre[hIndex].func; - retVal___ = preHookFunc(sd, name); + retVal___ = preHookFunc(&sd, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27513,9 +34393,9 @@ int HP_guild_dobreak(struct map_session_data *sd, const char *name) { { retVal___ = HPMHooks.source.guild.dobreak(sd, name); } - if( HPMHooks.count.HP_guild_dobreak_post ) { + if (HPMHooks.count.HP_guild_dobreak_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_dobreak_post; hIndex++ ) { + 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); } @@ -27525,14 +34405,14 @@ int HP_guild_dobreak(struct map_session_data *sd, const char *name) { int HP_guild_broken(int guild_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_broken_pre ) { + if (HPMHooks.count.HP_guild_broken_pre > 0) { int (*preHookFunc) (int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27540,38 +34420,38 @@ int HP_guild_broken(int guild_id, int flag) { { 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++ ) { + if (HPMHooks.count.HP_guild_broken_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, flag); } } return retVal___; } -int HP_guild_gm_change(int guild_id, struct map_session_data *sd) { +int HP_guild_gm_change(int guild_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_gm_change_pre ) { - int (*preHookFunc) (int *guild_id, struct map_session_data *sd); + if (HPMHooks.count.HP_guild_gm_change_pre > 0) { + int (*preHookFunc) (int *guild_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_change_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.guild.gm_change(guild_id, sd); + retVal___ = HPMHooks.source.guild.gm_change(guild_id, char_id); } - 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++ ) { + if (HPMHooks.count.HP_guild_gm_change_post > 0) { + int (*postHookFunc) (int retVal___, int guild_id, int char_id); + 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); + retVal___ = postHookFunc(retVal___, guild_id, char_id); } } return retVal___; @@ -27579,14 +34459,14 @@ int HP_guild_gm_change(int guild_id, struct map_session_data *sd) { int HP_guild_gm_changed(int guild_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_gm_changed_pre ) { + if (HPMHooks.count.HP_guild_gm_changed_pre > 0) { int (*preHookFunc) (int *guild_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_gm_changed_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27594,25 +34474,25 @@ int HP_guild_gm_changed(int guild_id, int account_id, int char_id) { { 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++ ) { + if (HPMHooks.count.HP_guild_gm_changed_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_guild_castle_map_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_map_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27620,9 +34500,9 @@ void HP_guild_castle_map_init(void) { { HPMHooks.source.guild.castle_map_init(); } - if( HPMHooks.count.HP_guild_castle_map_init_post ) { + if (HPMHooks.count.HP_guild_castle_map_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_map_init_post; hIndex++ ) { + 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(); } @@ -27632,14 +34512,14 @@ void HP_guild_castle_map_init(void) { int HP_guild_castledatasave(int castle_id, int index, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_castledatasave_pre ) { + if (HPMHooks.count.HP_guild_castledatasave_pre > 0) { int (*preHookFunc) (int *castle_id, int *index, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledatasave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27647,11 +34527,11 @@ int HP_guild_castledatasave(int castle_id, int index, int value) { { 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++ ) { + if (HPMHooks.count.HP_guild_castledatasave_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, castle_id, index, value); } } return retVal___; @@ -27659,14 +34539,14 @@ int HP_guild_castledatasave(int castle_id, int index, int value) { int HP_guild_castledataloadack(int len, const struct guild_castle *gc) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_castledataloadack_pre ) { - int (*preHookFunc) (int *len, const struct guild_castle *gc); + if (HPMHooks.count.HP_guild_castledataloadack_pre > 0) { + int (*preHookFunc) (int *len, const struct guild_castle **gc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_castledataloadack_pre[hIndex].func; - retVal___ = preHookFunc(&len, gc); + retVal___ = preHookFunc(&len, &gc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27674,25 +34554,25 @@ int HP_guild_castledataloadack(int len, const struct guild_castle *gc) { { retVal___ = HPMHooks.source.guild.castledataloadack(len, gc); } - if( HPMHooks.count.HP_guild_castledataloadack_post ) { - int (*postHookFunc) (int retVal___, int *len, const struct guild_castle *gc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castledataloadack_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_castledataloadack_post > 0) { + int (*postHookFunc) (int retVal___, int len, const 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); + 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 ) { + if (HPMHooks.count.HP_guild_castle_reconnect_pre > 0) { void (*preHookFunc) (int *castle_id, int *index, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27700,25 +34580,25 @@ void HP_guild_castle_reconnect(int castle_id, int index, int value) { { 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++ ) { + if (HPMHooks.count.HP_guild_castle_reconnect_post > 0) { + 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); + postHookFunc(castle_id, index, value); } } return; } void HP_guild_agit_start(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_agit_start_pre ) { + if (HPMHooks.count.HP_guild_agit_start_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_start_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27726,9 +34606,9 @@ void HP_guild_agit_start(void) { { HPMHooks.source.guild.agit_start(); } - if( HPMHooks.count.HP_guild_agit_start_post ) { + if (HPMHooks.count.HP_guild_agit_start_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_start_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_start_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_agit_start_post[hIndex].func; postHookFunc(); } @@ -27737,14 +34617,14 @@ void HP_guild_agit_start(void) { } void HP_guild_agit_end(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_agit_end_pre ) { + if (HPMHooks.count.HP_guild_agit_end_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27752,9 +34632,9 @@ void HP_guild_agit_end(void) { { HPMHooks.source.guild.agit_end(); } - if( HPMHooks.count.HP_guild_agit_end_post ) { + if (HPMHooks.count.HP_guild_agit_end_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_end_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit_end_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_agit_end_post[hIndex].func; postHookFunc(); } @@ -27763,14 +34643,14 @@ void HP_guild_agit_end(void) { } void HP_guild_agit2_start(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_agit2_start_pre ) { + if (HPMHooks.count.HP_guild_agit2_start_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_start_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27778,9 +34658,9 @@ void HP_guild_agit2_start(void) { { HPMHooks.source.guild.agit2_start(); } - if( HPMHooks.count.HP_guild_agit2_start_post ) { + if (HPMHooks.count.HP_guild_agit2_start_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_start_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_start_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_agit2_start_post[hIndex].func; postHookFunc(); } @@ -27789,14 +34669,14 @@ void HP_guild_agit2_start(void) { } void HP_guild_agit2_end(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_agit2_end_pre ) { + if (HPMHooks.count.HP_guild_agit2_end_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27804,9 +34684,9 @@ void HP_guild_agit2_end(void) { { HPMHooks.source.guild.agit2_end(); } - if( HPMHooks.count.HP_guild_agit2_end_post ) { + if (HPMHooks.count.HP_guild_agit2_end_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_end_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_agit2_end_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_agit2_end_post[hIndex].func; postHookFunc(); } @@ -27815,14 +34695,14 @@ void HP_guild_agit2_end(void) { } 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); + if (HPMHooks.count.HP_guild_flag_add_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_flag_add_pre[hIndex].func; - preHookFunc(nd); + preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27830,9 +34710,9 @@ void HP_guild_flag_add(struct npc_data *nd) { { HPMHooks.source.guild.flag_add(nd); } - if( HPMHooks.count.HP_guild_flag_add_post ) { + if (HPMHooks.count.HP_guild_flag_add_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_flag_add_post[hIndex].func; postHookFunc(nd); } @@ -27841,14 +34721,14 @@ void HP_guild_flag_add(struct npc_data *nd) { } 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); + if (HPMHooks.count.HP_guild_flag_remove_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_flag_remove_pre[hIndex].func; - preHookFunc(nd); + preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27856,9 +34736,9 @@ void HP_guild_flag_remove(struct npc_data *nd) { { HPMHooks.source.guild.flag_remove(nd); } - if( HPMHooks.count.HP_guild_flag_remove_post ) { + if (HPMHooks.count.HP_guild_flag_remove_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_flag_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_flag_remove_post[hIndex].func; postHookFunc(nd); } @@ -27867,14 +34747,14 @@ void HP_guild_flag_remove(struct npc_data *nd) { } void HP_guild_flags_clear(void) { int hIndex = 0; - if( HPMHooks.count.HP_guild_flags_clear_pre ) { + if (HPMHooks.count.HP_guild_flags_clear_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flags_clear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27882,9 +34762,9 @@ void HP_guild_flags_clear(void) { { HPMHooks.source.guild.flags_clear(); } - if( HPMHooks.count.HP_guild_flags_clear_post ) { + if (HPMHooks.count.HP_guild_flags_clear_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_flags_clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_flags_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_flags_clear_post[hIndex].func; postHookFunc(); } @@ -27893,14 +34773,14 @@ void HP_guild_flags_clear(void) { } 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); + if (HPMHooks.count.HP_guild_aura_refresh_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_aura_refresh_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27908,25 +34788,25 @@ void HP_guild_aura_refresh(struct map_session_data *sd, uint16 skill_id, uint16 { 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++ ) { + if (HPMHooks.count.HP_guild_aura_refresh_post > 0) { + 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); + postHookFunc(sd, skill_id, skill_lv); } } return; } void HP_guild_retrieveitembound(int char_id, int aid, int guild_id) { int hIndex = 0; - if( HPMHooks.count.HP_guild_retrieveitembound_pre ) { + if (HPMHooks.count.HP_guild_retrieveitembound_pre > 0) { void (*preHookFunc) (int *char_id, int *aid, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_retrieveitembound_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_retrieveitembound_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_retrieveitembound_pre[hIndex].func; preHookFunc(&char_id, &aid, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -27934,11 +34814,11 @@ void HP_guild_retrieveitembound(int char_id, int aid, int guild_id) { { HPMHooks.source.guild.retrieveitembound(char_id, aid, guild_id); } - if( HPMHooks.count.HP_guild_retrieveitembound_post ) { - void (*postHookFunc) (int *char_id, int *aid, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_retrieveitembound_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_retrieveitembound_post > 0) { + void (*postHookFunc) (int char_id, int aid, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_retrieveitembound_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_retrieveitembound_post[hIndex].func; - postHookFunc(&char_id, &aid, &guild_id); + postHookFunc(char_id, aid, guild_id); } } return; @@ -27946,14 +34826,14 @@ void HP_guild_retrieveitembound(int char_id, int aid, int guild_id) { int HP_guild_payexp_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_payexp_timer_pre ) { + if (HPMHooks.count.HP_guild_payexp_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27961,11 +34841,11 @@ int HP_guild_payexp_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.guild.payexp_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_guild_payexp_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_payexp_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -27973,14 +34853,14 @@ int HP_guild_payexp_timer(int tid, int64 tick, int id, intptr_t data) { struct map_session_data* HP_guild_sd_check(int guild_id, int account_id, int char_id) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_guild_sd_check_pre ) { + if (HPMHooks.count.HP_guild_sd_check_pre > 0) { struct map_session_data* (*preHookFunc) (int *guild_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_sd_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -27988,11 +34868,11 @@ struct map_session_data* HP_guild_sd_check(int guild_id, int account_id, int cha { retVal___ = HPMHooks.source.guild.sd_check(guild_id, account_id, char_id); } - if( HPMHooks.count.HP_guild_sd_check_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int *guild_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_sd_check_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_sd_check_post > 0) { + struct map_session_data* (*postHookFunc) (struct map_session_data* 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); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id); } } return retVal___; @@ -28000,14 +34880,14 @@ struct map_session_data* HP_guild_sd_check(int guild_id, int account_id, int cha bool HP_guild_read_guildskill_tree_db(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_guild_read_guildskill_tree_db_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + if (HPMHooks.count.HP_guild_read_guildskill_tree_db_pre > 0) { + bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_guildskill_tree_db_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&split, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28015,38 +34895,92 @@ bool HP_guild_read_guildskill_tree_db(char *split[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_guild_read_guildskill_tree_db_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, split, columns, current); + } + } + return retVal___; +} +bool HP_guild_read_castledb_libconfig(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_guild_read_castledb_libconfig_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.read_castledb_libconfig(); + } + if (HPMHooks.count.HP_guild_read_castledb_libconfig_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -bool HP_guild_read_castledb(char *str[], int columns, int current) { +bool HP_guild_read_castledb_libconfig_sub(struct config_setting_t *it, int idx, const char *source) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_guild_read_castledb_pre ) { - bool (*preHookFunc) (char *str[], int *columns, int *current); + if (HPMHooks.count.HP_guild_read_castledb_libconfig_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *idx, const char **source); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &idx, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.guild.read_castledb(str, columns, current); + retVal___ = HPMHooks.source.guild.read_castledb_libconfig_sub(it, idx, source); } - 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); + if (HPMHooks.count.HP_guild_read_castledb_libconfig_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int idx, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, idx, source); + } + } + return retVal___; +} +bool HP_guild_read_castledb_libconfig_sub_warp(struct config_setting_t *wd, const char *source, struct guild_castle *gc) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **wd, const char **source, struct guild_castle **gc); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_sub_warp_pre[hIndex].func; + retVal___ = preHookFunc(&wd, &source, &gc); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.guild.read_castledb_libconfig_sub_warp(wd, source, gc); + } + if (HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *wd, const char *source, struct guild_castle *gc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_read_castledb_libconfig_sub_warp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_guild_read_castledb_libconfig_sub_warp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, wd, source, gc); } } return retVal___; @@ -28054,16 +34988,16 @@ bool HP_guild_read_castledb(char *str[], int columns, int current) { int HP_guild_payexp_timer_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_payexp_timer_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_guild_payexp_timer_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28073,12 +35007,12 @@ int HP_guild_payexp_timer_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_payexp_timer_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_payexp_timer_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -28087,16 +35021,16 @@ int HP_guild_payexp_timer_sub(union DBKey key, struct DBData *data, va_list ap) int HP_guild_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_send_xy_timer_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_guild_send_xy_timer_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28106,12 +35040,12 @@ int HP_guild_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_send_xy_timer_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -28120,14 +35054,14 @@ int HP_guild_send_xy_timer_sub(union DBKey key, struct DBData *data, va_list ap) int HP_guild_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_send_xy_timer_pre ) { + if (HPMHooks.count.HP_guild_send_xy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28135,29 +35069,28 @@ int HP_guild_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_send_xy_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_send_xy_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } struct DBData HP_guild_create_expcache(union DBKey key, va_list args) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_guild_create_expcache_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_guild_create_expcache_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_expcache_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28167,12 +35100,12 @@ struct DBData HP_guild_create_expcache(union DBKey key, va_list args) { retVal___ = HPMHooks.source.guild.create_expcache(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_guild_create_expcache_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_create_expcache_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_create_expcache_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, union 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); + retVal___ = postHookFunc(retVal___, key, args___copy); va_end(args___copy); } } @@ -28181,16 +35114,16 @@ struct DBData HP_guild_create_expcache(union DBKey key, va_list args) { int HP_guild_eventlist_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_eventlist_db_final_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_guild_eventlist_db_final_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_eventlist_db_final_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28200,12 +35133,12 @@ int HP_guild_eventlist_db_final(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_eventlist_db_final_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_eventlist_db_final_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -28214,16 +35147,16 @@ int HP_guild_eventlist_db_final(union DBKey key, struct DBData *data, va_list ap int HP_guild_expcache_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_expcache_db_final_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_guild_expcache_db_final_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expcache_db_final_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28233,12 +35166,12 @@ int HP_guild_expcache_db_final(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_expcache_db_final_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_expcache_db_final_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -28247,16 +35180,16 @@ int HP_guild_expcache_db_final(union DBKey key, struct DBData *data, va_list ap) int HP_guild_castle_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_castle_db_final_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_guild_castle_db_final_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_db_final_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28266,12 +35199,12 @@ int HP_guild_castle_db_final(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_db_final_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_castle_db_final_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -28280,16 +35213,16 @@ int HP_guild_castle_db_final(union DBKey key, struct DBData *data, va_list ap) { int HP_guild_broken_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_broken_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_guild_broken_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28299,12 +35232,12 @@ int HP_guild_broken_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_broken_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_broken_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -28313,16 +35246,16 @@ int HP_guild_broken_sub(union DBKey key, struct DBData *data, va_list ap) { int HP_guild_castle_broken_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_castle_broken_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_guild_castle_broken_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_broken_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28332,12 +35265,12 @@ int HP_guild_castle_broken_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_broken_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_guild_castle_broken_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -28345,14 +35278,14 @@ int HP_guild_castle_broken_sub(union DBKey key, struct DBData *data, va_list ap) } 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); + if (HPMHooks.count.HP_guild_makemember_pre > 0) { + void (*preHookFunc) (struct guild_member **m, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_makemember_pre[hIndex].func; - preHookFunc(m, sd); + preHookFunc(&m, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28360,9 +35293,9 @@ void HP_guild_makemember(struct guild_member *m, struct map_session_data *sd) { { HPMHooks.source.guild.makemember(m, sd); } - if( HPMHooks.count.HP_guild_makemember_post ) { + if (HPMHooks.count.HP_guild_makemember_post > 0) { void (*postHookFunc) (struct guild_member *m, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_makemember_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_makemember_post[hIndex].func; postHookFunc(m, sd); } @@ -28372,14 +35305,14 @@ void HP_guild_makemember(struct guild_member *m, struct map_session_data *sd) { int HP_guild_check_member(const struct guild *g) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_check_member_pre ) { - int (*preHookFunc) (const struct guild *g); + if (HPMHooks.count.HP_guild_check_member_pre > 0) { + int (*preHookFunc) (const struct guild **g); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_member_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&g); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28387,9 +35320,9 @@ int HP_guild_check_member(const struct guild *g) { { retVal___ = HPMHooks.source.guild.check_member(g); } - if( HPMHooks.count.HP_guild_check_member_post ) { + if (HPMHooks.count.HP_guild_check_member_post > 0) { int (*postHookFunc) (int retVal___, const struct guild *g); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_check_member_post; hIndex++ ) { + 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); } @@ -28399,14 +35332,14 @@ int HP_guild_check_member(const struct guild *g) { int HP_guild_get_alliance_count(struct guild *g, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_guild_get_alliance_count_pre ) { - int (*preHookFunc) (struct guild *g, int *flag); + if (HPMHooks.count.HP_guild_get_alliance_count_pre > 0) { + int (*preHookFunc) (struct guild **g, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_get_alliance_count_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&g, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28414,27 +35347,27 @@ int HP_guild_get_alliance_count(struct guild *g, int flag) { { 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++ ) { + if (HPMHooks.count.HP_guild_get_alliance_count_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_guild_castle_reconnect_sub_pre > 0) { + void (*preHookFunc) (void **key, void **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_sub_pre; hIndex++ ) { + 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); + preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28444,9 +35377,9 @@ void HP_guild_castle_reconnect_sub(void *key, void *data, va_list ap) { HPMHooks.source.guild.castle_reconnect_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_guild_castle_reconnect_sub_post ) { + if (HPMHooks.count.HP_guild_castle_reconnect_sub_post > 0) { void (*postHookFunc) (void *key, void *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_guild_castle_reconnect_sub_post; hIndex++ ) { + 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); @@ -28455,18 +35388,18 @@ void HP_guild_castle_reconnect_sub(void *key, void *data, va_list ap) { } return; } -/* gstorage */ +/* guild_storage_interface */ struct guild_storage* HP_gstorage_ensure(int guild_id) { int hIndex = 0; struct guild_storage* retVal___ = NULL; - if( HPMHooks.count.HP_gstorage_ensure_pre ) { + if (HPMHooks.count.HP_gstorage_ensure_pre > 0) { struct guild_storage* (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_gstorage_ensure_pre[hIndex].func; retVal___ = preHookFunc(&guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28474,25 +35407,25 @@ struct guild_storage* HP_gstorage_ensure(int guild_id) { { retVal___ = HPMHooks.source.gstorage.ensure(guild_id); } - if( HPMHooks.count.HP_gstorage_ensure_post ) { - struct guild_storage* (*postHookFunc) (struct guild_storage* retVal___, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_post; hIndex++ ) { + if (HPMHooks.count.HP_gstorage_ensure_post > 0) { + struct guild_storage* (*postHookFunc) (struct guild_storage* retVal___, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_ensure_post; hIndex++) { postHookFunc = HPMHooks.list.HP_gstorage_ensure_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &guild_id); + retVal___ = postHookFunc(retVal___, guild_id); } } return retVal___; } void HP_gstorage_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_gstorage_init_pre ) { + if (HPMHooks.count.HP_gstorage_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_gstorage_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28500,25 +35433,25 @@ void HP_gstorage_init(bool minimal) { { HPMHooks.source.gstorage.init(minimal); } - if( HPMHooks.count.HP_gstorage_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_post; hIndex++ ) { + if (HPMHooks.count.HP_gstorage_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_gstorage_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_gstorage_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_gstorage_final_pre ) { + if (HPMHooks.count.HP_gstorage_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_gstorage_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28526,9 +35459,9 @@ void HP_gstorage_final(void) { { HPMHooks.source.gstorage.final(); } - if( HPMHooks.count.HP_gstorage_final_post ) { + if (HPMHooks.count.HP_gstorage_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_gstorage_final_post[hIndex].func; postHookFunc(); } @@ -28538,14 +35471,14 @@ void HP_gstorage_final(void) { int HP_gstorage_delete(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_delete_pre ) { + if (HPMHooks.count.HP_gstorage_delete_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28553,11 +35486,11 @@ int HP_gstorage_delete(int guild_id) { { 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++ ) { + if (HPMHooks.count.HP_gstorage_delete_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id); } } return retVal___; @@ -28565,14 +35498,14 @@ int HP_gstorage_delete(int guild_id) { int HP_gstorage_open(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_open_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_gstorage_open_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_gstorage_open_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28580,9 +35513,9 @@ int HP_gstorage_open(struct map_session_data *sd) { { retVal___ = HPMHooks.source.gstorage.open(sd); } - if( HPMHooks.count.HP_gstorage_open_post ) { + if (HPMHooks.count.HP_gstorage_open_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_gstorage_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -28592,14 +35525,14 @@ int HP_gstorage_open(struct map_session_data *sd) { int HP_gstorage_additem(struct map_session_data *sd, struct guild_storage *stor, struct item *item_data, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_additem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct guild_storage *stor, struct item *item_data, int *amount); + if (HPMHooks.count.HP_gstorage_additem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct guild_storage **stor, struct item **item_data, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_additem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &stor, &item_data, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28607,11 +35540,11 @@ int HP_gstorage_additem(struct map_session_data *sd, struct guild_storage *stor, { 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++ ) { + if (HPMHooks.count.HP_gstorage_additem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, stor, item_data, amount); } } return retVal___; @@ -28619,14 +35552,14 @@ int HP_gstorage_additem(struct map_session_data *sd, struct guild_storage *stor, int HP_gstorage_delitem(struct map_session_data *sd, struct guild_storage *stor, int n, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_delitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct guild_storage *stor, int *n, int *amount); + if (HPMHooks.count.HP_gstorage_delitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct guild_storage **stor, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_delitem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &stor, &n, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28634,11 +35567,11 @@ int HP_gstorage_delitem(struct map_session_data *sd, struct guild_storage *stor, { 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++ ) { + if (HPMHooks.count.HP_gstorage_delitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, stor, n, amount); } } return retVal___; @@ -28646,14 +35579,14 @@ int HP_gstorage_delitem(struct map_session_data *sd, struct guild_storage *stor, int HP_gstorage_add(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_add_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + if (HPMHooks.count.HP_gstorage_add_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_add_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28661,11 +35594,11 @@ int HP_gstorage_add(struct map_session_data *sd, int index, int amount) { { 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++ ) { + if (HPMHooks.count.HP_gstorage_add_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, index, amount); } } return retVal___; @@ -28673,14 +35606,14 @@ int HP_gstorage_add(struct map_session_data *sd, int index, int amount) { int HP_gstorage_get(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_get_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + if (HPMHooks.count.HP_gstorage_get_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_get_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28688,11 +35621,11 @@ int HP_gstorage_get(struct map_session_data *sd, int index, int amount) { { 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++ ) { + if (HPMHooks.count.HP_gstorage_get_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, index, amount); } } return retVal___; @@ -28700,14 +35633,14 @@ int HP_gstorage_get(struct map_session_data *sd, int index, int amount) { int HP_gstorage_addfromcart(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_addfromcart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + if (HPMHooks.count.HP_gstorage_addfromcart_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_addfromcart_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28715,11 +35648,11 @@ int HP_gstorage_addfromcart(struct map_session_data *sd, int index, int amount) { 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++ ) { + if (HPMHooks.count.HP_gstorage_addfromcart_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, index, amount); } } return retVal___; @@ -28727,14 +35660,14 @@ int HP_gstorage_addfromcart(struct map_session_data *sd, int index, int amount) int HP_gstorage_gettocart(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_gettocart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + if (HPMHooks.count.HP_gstorage_gettocart_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_gettocart_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28742,11 +35675,11 @@ int HP_gstorage_gettocart(struct map_session_data *sd, int index, int amount) { { 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++ ) { + if (HPMHooks.count.HP_gstorage_gettocart_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, index, amount); } } return retVal___; @@ -28754,14 +35687,14 @@ int HP_gstorage_gettocart(struct map_session_data *sd, int index, int amount) { int HP_gstorage_close(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_close_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_gstorage_close_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_gstorage_close_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28769,9 +35702,9 @@ int HP_gstorage_close(struct map_session_data *sd) { { retVal___ = HPMHooks.source.gstorage.close(sd); } - if( HPMHooks.count.HP_gstorage_close_post ) { + if (HPMHooks.count.HP_gstorage_close_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_gstorage_close_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -28781,14 +35714,14 @@ int HP_gstorage_close(struct map_session_data *sd) { int HP_gstorage_pc_quit(struct map_session_data *sd, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_pc_quit_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *flag); + if (HPMHooks.count.HP_gstorage_pc_quit_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_pc_quit_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28796,11 +35729,11 @@ int HP_gstorage_pc_quit(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_gstorage_pc_quit_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, flag); } } return retVal___; @@ -28808,14 +35741,14 @@ int HP_gstorage_pc_quit(struct map_session_data *sd, int flag) { int HP_gstorage_save(int account_id, int guild_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_save_pre ) { + if (HPMHooks.count.HP_gstorage_save_pre > 0) { int (*preHookFunc) (int *account_id, int *guild_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_save_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28823,11 +35756,11 @@ int HP_gstorage_save(int account_id, int guild_id, int flag) { { 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++ ) { + if (HPMHooks.count.HP_gstorage_save_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, guild_id, flag); } } return retVal___; @@ -28835,14 +35768,14 @@ int HP_gstorage_save(int account_id, int guild_id, int flag) { int HP_gstorage_saved(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_gstorage_saved_pre ) { + if (HPMHooks.count.HP_gstorage_saved_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_saved_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28850,29 +35783,28 @@ int HP_gstorage_saved(int guild_id) { { 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++ ) { + if (HPMHooks.count.HP_gstorage_saved_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id); } } return retVal___; } struct DBData HP_gstorage_create(union DBKey key, va_list args) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_gstorage_create_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_gstorage_create_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -28882,28 +35814,28 @@ struct DBData HP_gstorage_create(union DBKey key, va_list args) { retVal___ = HPMHooks.source.gstorage.create(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_gstorage_create_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_gstorage_create_post; hIndex++ ) { + if (HPMHooks.count.HP_gstorage_create_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, union 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); + retVal___ = postHookFunc(retVal___, key, args___copy); va_end(args___copy); } } return retVal___; } -/* homun */ +/* homunculus_interface */ void HP_homun_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_homun_init_pre ) { + if (HPMHooks.count.HP_homun_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28911,25 +35843,25 @@ void HP_homun_init(bool minimal) { { HPMHooks.source.homun.init(minimal); } - if( HPMHooks.count.HP_homun_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_post; hIndex++ ) { + if (HPMHooks.count.HP_homun_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_homun_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_final_pre ) { + if (HPMHooks.count.HP_homun_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28937,9 +35869,9 @@ void HP_homun_final(void) { { HPMHooks.source.homun.final(); } - if( HPMHooks.count.HP_homun_final_post ) { + if (HPMHooks.count.HP_homun_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_final_post[hIndex].func; postHookFunc(); } @@ -28948,14 +35880,14 @@ void HP_homun_final(void) { } void HP_homun_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_reload_pre ) { + if (HPMHooks.count.HP_homun_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28963,9 +35895,9 @@ void HP_homun_reload(void) { { HPMHooks.source.homun.reload(); } - if( HPMHooks.count.HP_homun_reload_post ) { + if (HPMHooks.count.HP_homun_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_reload_post[hIndex].func; postHookFunc(); } @@ -28974,14 +35906,14 @@ void HP_homun_reload(void) { } void HP_homun_reload_skill(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_reload_skill_pre ) { + if (HPMHooks.count.HP_homun_reload_skill_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_skill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -28989,9 +35921,9 @@ void HP_homun_reload_skill(void) { { HPMHooks.source.homun.reload_skill(); } - if( HPMHooks.count.HP_homun_reload_skill_post ) { + if (HPMHooks.count.HP_homun_reload_skill_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_skill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_reload_skill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_reload_skill_post[hIndex].func; postHookFunc(); } @@ -29001,14 +35933,14 @@ void HP_homun_reload_skill(void) { 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 ) { + if (HPMHooks.count.HP_homun_get_viewdata_pre > 0) { struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29016,11 +35948,11 @@ struct view_data* HP_homun_get_viewdata(int class_) { { 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++ ) { + if (HPMHooks.count.HP_homun_get_viewdata_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, class_); } } return retVal___; @@ -29028,14 +35960,14 @@ struct view_data* HP_homun_get_viewdata(int class_) { enum homun_type HP_homun_class2type(int class_) { int hIndex = 0; enum homun_type retVal___ = HT_INVALID; - if( HPMHooks.count.HP_homun_class2type_pre ) { + if (HPMHooks.count.HP_homun_class2type_pre > 0) { enum homun_type (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_class2type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29043,25 +35975,25 @@ enum homun_type HP_homun_class2type(int class_) { { 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++ ) { + if (HPMHooks.count.HP_homun_class2type_post > 0) { + 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_); + 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); + if (HPMHooks.count.HP_homun_damaged_pre > 0) { + void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_damaged_pre[hIndex].func; - preHookFunc(hd); + preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29069,9 +36001,9 @@ void HP_homun_damaged(struct homun_data *hd) { { HPMHooks.source.homun.damaged(hd); } - if( HPMHooks.count.HP_homun_damaged_post ) { + if (HPMHooks.count.HP_homun_damaged_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_damaged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_damaged_post[hIndex].func; postHookFunc(hd); } @@ -29081,14 +36013,14 @@ void HP_homun_damaged(struct homun_data *hd) { int HP_homun_dead(struct homun_data *hd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_dead_pre ) { - int (*preHookFunc) (struct homun_data *hd); + if (HPMHooks.count.HP_homun_dead_pre > 0) { + int (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_dead_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_dead_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_dead_pre[hIndex].func; - retVal___ = preHookFunc(hd); + retVal___ = preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29096,38 +36028,38 @@ int HP_homun_dead(struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.dead(hd); } - if( HPMHooks.count.HP_homun_dead_post ) { + if (HPMHooks.count.HP_homun_dead_post > 0) { int (*postHookFunc) (int retVal___, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_dead_post; hIndex++ ) { + 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, enum homun_state flag) { +int HP_homun_vaporize(struct map_session_data *sd, enum homun_state state, bool force) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_vaporize_pre ) { - int (*preHookFunc) (struct map_session_data *sd, enum homun_state *flag); + if (HPMHooks.count.HP_homun_vaporize_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, enum homun_state *state, bool *force); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_vaporize_pre[hIndex].func; - retVal___ = preHookFunc(sd, &flag); + retVal___ = preHookFunc(&sd, &state, &force); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.homun.vaporize(sd, flag); + retVal___ = HPMHooks.source.homun.vaporize(sd, state, force); } - if( HPMHooks.count.HP_homun_vaporize_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum homun_state *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_vaporize_post; hIndex++ ) { + if (HPMHooks.count.HP_homun_vaporize_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum homun_state state, bool force); + 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); + retVal___ = postHookFunc(retVal___, sd, state, force); } } return retVal___; @@ -29135,14 +36067,14 @@ int HP_homun_vaporize(struct map_session_data *sd, enum homun_state flag) { int HP_homun_delete(struct homun_data *hd, int emote) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_delete_pre ) { - int (*preHookFunc) (struct homun_data *hd, int *emote); + if (HPMHooks.count.HP_homun_delete_pre > 0) { + int (*preHookFunc) (struct homun_data **hd, int *emote); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_delete_pre[hIndex].func; - retVal___ = preHookFunc(hd, &emote); + retVal___ = preHookFunc(&hd, &emote); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29150,11 +36082,11 @@ int HP_homun_delete(struct homun_data *hd, int emote) { { 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++ ) { + if (HPMHooks.count.HP_homun_delete_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, hd, emote); } } return retVal___; @@ -29162,14 +36094,14 @@ int HP_homun_delete(struct homun_data *hd, int emote) { int HP_homun_checkskill(struct homun_data *hd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_checkskill_pre ) { - int (*preHookFunc) (struct homun_data *hd, uint16 *skill_id); + if (HPMHooks.count.HP_homun_checkskill_pre > 0) { + int (*preHookFunc) (struct homun_data **hd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_checkskill_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&hd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29177,11 +36109,11 @@ int HP_homun_checkskill(struct homun_data *hd, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_homun_checkskill_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, hd, skill_id); } } return retVal___; @@ -29189,14 +36121,14 @@ int HP_homun_checkskill(struct homun_data *hd, uint16 skill_id) { int HP_homun_calc_skilltree(struct homun_data *hd, int flag_evolve) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_calc_skilltree_pre ) { - int (*preHookFunc) (struct homun_data *hd, int *flag_evolve); + if (HPMHooks.count.HP_homun_calc_skilltree_pre > 0) { + int (*preHookFunc) (struct homun_data **hd, int *flag_evolve); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_calc_skilltree_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&hd, &flag_evolve); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29204,11 +36136,11 @@ int HP_homun_calc_skilltree(struct homun_data *hd, int flag_evolve) { { 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++ ) { + if (HPMHooks.count.HP_homun_calc_skilltree_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, hd, flag_evolve); } } return retVal___; @@ -29216,14 +36148,14 @@ int HP_homun_calc_skilltree(struct homun_data *hd, int flag_evolve) { int HP_homun_skill_tree_get_max(int id, int b_class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_skill_tree_get_max_pre ) { + if (HPMHooks.count.HP_homun_skill_tree_get_max_pre > 0) { int (*preHookFunc) (int *id, int *b_class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_tree_get_max_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29231,25 +36163,25 @@ int HP_homun_skill_tree_get_max(int id, int b_class) { { 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++ ) { + if (HPMHooks.count.HP_homun_skill_tree_get_max_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_homun_skillup_pre > 0) { + void (*preHookFunc) (struct homun_data **hd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skillup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_skillup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_skillup_pre[hIndex].func; - preHookFunc(hd, &skill_id); + preHookFunc(&hd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29257,11 +36189,11 @@ void HP_homun_skillup(struct homun_data *hd, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_homun_skillup_post > 0) { + 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); + postHookFunc(hd, skill_id); } } return; @@ -29269,14 +36201,14 @@ void HP_homun_skillup(struct homun_data *hd, uint16 skill_id) { bool HP_homun_levelup(struct homun_data *hd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_levelup_pre ) { - bool (*preHookFunc) (struct homun_data *hd); + if (HPMHooks.count.HP_homun_levelup_pre > 0) { + bool (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_levelup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_levelup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_levelup_pre[hIndex].func; - retVal___ = preHookFunc(hd); + retVal___ = preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29284,26 +36216,26 @@ bool HP_homun_levelup(struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.levelup(hd); } - if( HPMHooks.count.HP_homun_levelup_post ) { + if (HPMHooks.count.HP_homun_levelup_post > 0) { bool (*postHookFunc) (bool retVal___, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_levelup_post; hIndex++ ) { + 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 HP_homun_change_class(struct homun_data *hd, int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_change_class_pre ) { - int (*preHookFunc) (struct homun_data *hd, short *class_); + if (HPMHooks.count.HP_homun_change_class_pre > 0) { + int (*preHookFunc) (struct homun_data **hd, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&hd, &class_); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29311,11 +36243,11 @@ int HP_homun_change_class(struct homun_data *hd, short class_) { { 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++ ) { + if (HPMHooks.count.HP_homun_change_class_post > 0) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, int 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_); + retVal___ = postHookFunc(retVal___, hd, class_); } } return retVal___; @@ -29323,14 +36255,14 @@ int HP_homun_change_class(struct homun_data *hd, short class_) { bool HP_homun_evolve(struct homun_data *hd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_evolve_pre ) { - bool (*preHookFunc) (struct homun_data *hd); + if (HPMHooks.count.HP_homun_evolve_pre > 0) { + bool (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_evolve_pre[hIndex].func; - retVal___ = preHookFunc(hd); + retVal___ = preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29338,9 +36270,9 @@ bool HP_homun_evolve(struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.evolve(hd); } - if( HPMHooks.count.HP_homun_evolve_post ) { + if (HPMHooks.count.HP_homun_evolve_post > 0) { bool (*postHookFunc) (bool retVal___, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_evolve_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_evolve_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd); } @@ -29350,14 +36282,14 @@ bool HP_homun_evolve(struct homun_data *hd) { bool HP_homun_mutate(struct homun_data *hd, int homun_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_mutate_pre ) { - bool (*preHookFunc) (struct homun_data *hd, int *homun_id); + if (HPMHooks.count.HP_homun_mutate_pre > 0) { + bool (*preHookFunc) (struct homun_data **hd, int *homun_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_mutate_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&hd, &homun_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29365,11 +36297,11 @@ bool HP_homun_mutate(struct homun_data *hd, int homun_id) { { 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++ ) { + if (HPMHooks.count.HP_homun_mutate_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, hd, homun_id); } } return retVal___; @@ -29377,14 +36309,14 @@ bool HP_homun_mutate(struct homun_data *hd, int homun_id) { int HP_homun_gainexp(struct homun_data *hd, unsigned int exp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_gainexp_pre ) { - int (*preHookFunc) (struct homun_data *hd, unsigned int *exp); + if (HPMHooks.count.HP_homun_gainexp_pre > 0) { + int (*preHookFunc) (struct homun_data **hd, unsigned int *exp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_gainexp_pre[hIndex].func; - retVal___ = preHookFunc(hd, &exp); + retVal___ = preHookFunc(&hd, &exp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29392,11 +36324,38 @@ int HP_homun_gainexp(struct homun_data *hd, unsigned int exp) { { 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++ ) { + if (HPMHooks.count.HP_homun_gainexp_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, hd, exp); + } + } + return retVal___; +} +int HP_homun_gainexp_real(struct homun_data *hd, unsigned int exp) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_homun_gainexp_real_pre > 0) { + int (*preHookFunc) (struct homun_data **hd, unsigned int *exp); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_real_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_homun_gainexp_real_pre[hIndex].func; + retVal___ = preHookFunc(&hd, &exp); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.homun.gainexp_real(hd, exp); + } + if (HPMHooks.count.HP_homun_gainexp_real_post > 0) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, unsigned int exp); + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_gainexp_real_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_homun_gainexp_real_post[hIndex].func; + retVal___ = postHookFunc(retVal___, hd, exp); } } return retVal___; @@ -29404,14 +36363,14 @@ int HP_homun_gainexp(struct homun_data *hd, unsigned int exp) { unsigned int HP_homun_add_intimacy(struct homun_data *hd, unsigned int value) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_homun_add_intimacy_pre ) { - unsigned int (*preHookFunc) (struct homun_data *hd, unsigned int *value); + if (HPMHooks.count.HP_homun_add_intimacy_pre > 0) { + unsigned int (*preHookFunc) (struct homun_data **hd, unsigned int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_add_intimacy_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&hd, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29419,11 +36378,11 @@ unsigned int HP_homun_add_intimacy(struct homun_data *hd, unsigned int value) { { 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++ ) { + if (HPMHooks.count.HP_homun_add_intimacy_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, hd, value); } } return retVal___; @@ -29431,14 +36390,14 @@ unsigned int HP_homun_add_intimacy(struct homun_data *hd, unsigned int value) { unsigned int HP_homun_consume_intimacy(struct homun_data *hd, unsigned int value) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_homun_consume_intimacy_pre ) { - unsigned int (*preHookFunc) (struct homun_data *hd, unsigned int *value); + if (HPMHooks.count.HP_homun_consume_intimacy_pre > 0) { + unsigned int (*preHookFunc) (struct homun_data **hd, unsigned int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_consume_intimacy_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&hd, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29446,25 +36405,25 @@ unsigned int HP_homun_consume_intimacy(struct homun_data *hd, unsigned int value { 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++ ) { + if (HPMHooks.count.HP_homun_consume_intimacy_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_homun_healed_pre > 0) { + void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_healed_pre[hIndex].func; - preHookFunc(hd); + preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29472,9 +36431,9 @@ void HP_homun_healed(struct homun_data *hd) { { HPMHooks.source.homun.healed(hd); } - if( HPMHooks.count.HP_homun_healed_post ) { + if (HPMHooks.count.HP_homun_healed_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_healed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_healed_post[hIndex].func; postHookFunc(hd); } @@ -29483,14 +36442,14 @@ void HP_homun_healed(struct homun_data *hd) { } void HP_homun_save(struct homun_data *hd) { int hIndex = 0; - if( HPMHooks.count.HP_homun_save_pre ) { - void (*preHookFunc) (struct homun_data *hd); + if (HPMHooks.count.HP_homun_save_pre > 0) { + void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_save_pre[hIndex].func; - preHookFunc(hd); + preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29498,9 +36457,9 @@ void HP_homun_save(struct homun_data *hd) { { HPMHooks.source.homun.save(hd); } - if( HPMHooks.count.HP_homun_save_post ) { + if (HPMHooks.count.HP_homun_save_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_save_post[hIndex].func; postHookFunc(hd); } @@ -29510,14 +36469,14 @@ void HP_homun_save(struct homun_data *hd) { unsigned char HP_homun_menu(struct map_session_data *sd, unsigned char menu_num) { int hIndex = 0; unsigned char retVal___ = 0; - if( HPMHooks.count.HP_homun_menu_pre ) { - unsigned char (*preHookFunc) (struct map_session_data *sd, unsigned char *menu_num); + if (HPMHooks.count.HP_homun_menu_pre > 0) { + unsigned char (*preHookFunc) (struct map_session_data **sd, unsigned char *menu_num); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_menu_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &menu_num); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29525,11 +36484,11 @@ unsigned char HP_homun_menu(struct map_session_data *sd, unsigned char menu_num) { 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++ ) { + if (HPMHooks.count.HP_homun_menu_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, menu_num); } } return retVal___; @@ -29537,14 +36496,14 @@ unsigned char HP_homun_menu(struct map_session_data *sd, unsigned char menu_num) bool HP_homun_feed(struct map_session_data *sd, struct homun_data *hd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_feed_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, struct homun_data *hd); + if (HPMHooks.count.HP_homun_feed_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_feed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_feed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_feed_pre[hIndex].func; - retVal___ = preHookFunc(sd, hd); + retVal___ = preHookFunc(&sd, &hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29552,9 +36511,9 @@ bool HP_homun_feed(struct map_session_data *sd, struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.feed(sd, hd); } - if( HPMHooks.count.HP_homun_feed_post ) { + if (HPMHooks.count.HP_homun_feed_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_feed_post; hIndex++ ) { + 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); } @@ -29564,14 +36523,14 @@ bool HP_homun_feed(struct map_session_data *sd, struct homun_data *hd) { int HP_homun_hunger_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_hunger_timer_pre ) { + if (HPMHooks.count.HP_homun_hunger_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29579,25 +36538,25 @@ int HP_homun_hunger_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.homun.hunger_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_homun_hunger_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_homun_hunger_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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); + if (HPMHooks.count.HP_homun_hunger_timer_delete_pre > 0) { + void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_delete_pre; hIndex++ ) { + 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); + preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29605,9 +36564,9 @@ void HP_homun_hunger_timer_delete(struct homun_data *hd) { { HPMHooks.source.homun.hunger_timer_delete(hd); } - if( HPMHooks.count.HP_homun_hunger_timer_delete_post ) { + if (HPMHooks.count.HP_homun_hunger_timer_delete_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_hunger_timer_delete_post; hIndex++ ) { + 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); } @@ -29617,14 +36576,14 @@ void HP_homun_hunger_timer_delete(struct homun_data *hd) { int HP_homun_change_name(struct map_session_data *sd, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_change_name_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *name); + if (HPMHooks.count.HP_homun_change_name_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29632,9 +36591,9 @@ int HP_homun_change_name(struct map_session_data *sd, const char *name) { { retVal___ = HPMHooks.source.homun.change_name(sd, name); } - if( HPMHooks.count.HP_homun_change_name_post ) { + if (HPMHooks.count.HP_homun_change_name_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_post; hIndex++ ) { + 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); } @@ -29644,14 +36603,14 @@ int HP_homun_change_name(struct map_session_data *sd, const char *name) { bool HP_homun_change_name_ack(struct map_session_data *sd, const char *name, int flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_change_name_ack_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const char *name, int *flag); + if (HPMHooks.count.HP_homun_change_name_ack_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const char **name, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_ack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &name, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29659,11 +36618,11 @@ bool HP_homun_change_name_ack(struct map_session_data *sd, const char *name, int { 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, const char *name, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_name_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_homun_change_name_ack_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const 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); + retVal___ = postHookFunc(retVal___, sd, name, flag); } } return retVal___; @@ -29671,14 +36630,14 @@ bool HP_homun_change_name_ack(struct map_session_data *sd, const char *name, int int HP_homun_db_search(int key, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_homun_db_search_pre ) { + if (HPMHooks.count.HP_homun_db_search_pre > 0) { int (*preHookFunc) (int *key, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_db_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29686,52 +36645,52 @@ int HP_homun_db_search(int key, int type) { { 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++ ) { + if (HPMHooks.count.HP_homun_db_search_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, key, type); } } return retVal___; } -bool HP_homun_create(struct map_session_data *sd, const struct s_homunculus *hom) { +bool HP_homun_create(struct map_session_data *sd, const struct s_homunculus *hom, bool is_new) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_create_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const struct s_homunculus *hom); + if (HPMHooks.count.HP_homun_create_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const struct s_homunculus **hom, bool *is_new); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_create_pre[hIndex].func; - retVal___ = preHookFunc(sd, hom); + retVal___ = preHookFunc(&sd, &hom, &is_new); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.homun.create(sd, hom); + retVal___ = HPMHooks.source.homun.create(sd, hom, is_new); } - if( HPMHooks.count.HP_homun_create_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct s_homunculus *hom); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_create_post; hIndex++ ) { + if (HPMHooks.count.HP_homun_create_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const struct s_homunculus *hom, bool is_new); + 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); + retVal___ = postHookFunc(retVal___, sd, hom, is_new); } } 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); + if (HPMHooks.count.HP_homun_init_timers_pre > 0) { + void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_init_timers_pre[hIndex].func; - preHookFunc(hd); + preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29739,9 +36698,9 @@ void HP_homun_init_timers(struct homun_data *hd) { { HPMHooks.source.homun.init_timers(hd); } - if( HPMHooks.count.HP_homun_init_timers_post ) { + if (HPMHooks.count.HP_homun_init_timers_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_init_timers_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_init_timers_post[hIndex].func; postHookFunc(hd); } @@ -29751,14 +36710,14 @@ void HP_homun_init_timers(struct homun_data *hd) { bool HP_homun_call(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_call_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_homun_call_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_call_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29766,9 +36725,9 @@ bool HP_homun_call(struct map_session_data *sd) { { retVal___ = HPMHooks.source.homun.call(sd); } - if( HPMHooks.count.HP_homun_call_post ) { + if (HPMHooks.count.HP_homun_call_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_call_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_call_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -29778,14 +36737,14 @@ bool HP_homun_call(struct map_session_data *sd) { bool HP_homun_recv_data(int account_id, const struct s_homunculus *sh, int flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_recv_data_pre ) { - bool (*preHookFunc) (int *account_id, const struct s_homunculus *sh, int *flag); + if (HPMHooks.count.HP_homun_recv_data_pre > 0) { + bool (*preHookFunc) (int *account_id, const struct s_homunculus **sh, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_recv_data_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&account_id, &sh, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29793,11 +36752,11 @@ bool HP_homun_recv_data(int account_id, const struct s_homunculus *sh, int flag) { 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, const struct s_homunculus *sh, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_recv_data_post; hIndex++ ) { + if (HPMHooks.count.HP_homun_recv_data_post > 0) { + bool (*postHookFunc) (bool retVal___, int account_id, const 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); + retVal___ = postHookFunc(retVal___, account_id, sh, flag); } } return retVal___; @@ -29805,14 +36764,14 @@ bool HP_homun_recv_data(int account_id, const struct s_homunculus *sh, int flag) bool HP_homun_creation_request(struct map_session_data *sd, int class_) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_creation_request_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *class_); + if (HPMHooks.count.HP_homun_creation_request_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_creation_request_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&sd, &class_); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29820,11 +36779,11 @@ bool HP_homun_creation_request(struct map_session_data *sd, int class_) { { 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++ ) { + if (HPMHooks.count.HP_homun_creation_request_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, sd, class_); } } return retVal___; @@ -29832,14 +36791,14 @@ bool HP_homun_creation_request(struct map_session_data *sd, int class_) { bool HP_homun_ressurect(struct map_session_data *sd, unsigned char per, short x, short y) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_ressurect_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, unsigned char *per, short *x, short *y); + if (HPMHooks.count.HP_homun_ressurect_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, unsigned char *per, short *x, short *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_ressurect_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &per, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29847,25 +36806,25 @@ bool HP_homun_ressurect(struct map_session_data *sd, unsigned char per, short x, { 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++ ) { + if (HPMHooks.count.HP_homun_ressurect_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_homun_revive_pre > 0) { + void (*preHookFunc) (struct homun_data **hd, unsigned int *hp, unsigned int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_revive_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_revive_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_revive_pre[hIndex].func; - preHookFunc(hd, &hp, &sp); + preHookFunc(&hd, &hp, &sp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29873,25 +36832,25 @@ void HP_homun_revive(struct homun_data *hd, unsigned int hp, unsigned int sp) { { 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++ ) { + if (HPMHooks.count.HP_homun_revive_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_homun_stat_reset_pre > 0) { + void (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_stat_reset_pre[hIndex].func; - preHookFunc(hd); + preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29899,9 +36858,9 @@ void HP_homun_stat_reset(struct homun_data *hd) { { HPMHooks.source.homun.stat_reset(hd); } - if( HPMHooks.count.HP_homun_stat_reset_post ) { + if (HPMHooks.count.HP_homun_stat_reset_post > 0) { void (*postHookFunc) (struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_stat_reset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_stat_reset_post[hIndex].func; postHookFunc(hd); } @@ -29911,14 +36870,14 @@ void HP_homun_stat_reset(struct homun_data *hd) { bool HP_homun_shuffle(struct homun_data *hd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_shuffle_pre ) { - bool (*preHookFunc) (struct homun_data *hd); + if (HPMHooks.count.HP_homun_shuffle_pre > 0) { + bool (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_shuffle_pre[hIndex].func; - retVal___ = preHookFunc(hd); + retVal___ = preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29926,9 +36885,9 @@ bool HP_homun_shuffle(struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.shuffle(hd); } - if( HPMHooks.count.HP_homun_shuffle_post ) { + if (HPMHooks.count.HP_homun_shuffle_post > 0) { bool (*postHookFunc) (bool retVal___, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_shuffle_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_shuffle_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd); } @@ -29938,14 +36897,14 @@ bool HP_homun_shuffle(struct homun_data *hd) { bool HP_homun_read_db_sub(char *str[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_read_db_sub_pre ) { - bool (*preHookFunc) (char *str[], int *columns, int *current); + if (HPMHooks.count.HP_homun_read_db_sub_pre > 0) { + bool (*preHookFunc) (char **str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&str, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -29953,25 +36912,25 @@ bool HP_homun_read_db_sub(char *str[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_homun_read_db_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, str, columns, current); } } return retVal___; } void HP_homun_read_db(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_read_db_pre ) { + if (HPMHooks.count.HP_homun_read_db_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -29979,9 +36938,9 @@ void HP_homun_read_db(void) { { HPMHooks.source.homun.read_db(); } - if( HPMHooks.count.HP_homun_read_db_post ) { + if (HPMHooks.count.HP_homun_read_db_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_read_db_post[hIndex].func; postHookFunc(); } @@ -29991,14 +36950,14 @@ void HP_homun_read_db(void) { bool HP_homun_read_skill_db_sub(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_homun_read_skill_db_sub_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + if (HPMHooks.count.HP_homun_read_skill_db_sub_pre > 0) { + bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_read_skill_db_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&split, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30006,25 +36965,25 @@ bool HP_homun_read_skill_db_sub(char *split[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_homun_read_skill_db_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, split, columns, current); } } return retVal___; } void HP_homun_skill_db_read(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_skill_db_read_pre ) { + if (HPMHooks.count.HP_homun_skill_db_read_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_db_read_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30032,9 +36991,9 @@ void HP_homun_skill_db_read(void) { { HPMHooks.source.homun.skill_db_read(); } - if( HPMHooks.count.HP_homun_skill_db_read_post ) { + if (HPMHooks.count.HP_homun_skill_db_read_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_skill_db_read_post; hIndex++ ) { + 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(); } @@ -30043,14 +37002,14 @@ void HP_homun_skill_db_read(void) { } void HP_homun_exp_db_read(void) { int hIndex = 0; - if( HPMHooks.count.HP_homun_exp_db_read_pre ) { + if (HPMHooks.count.HP_homun_exp_db_read_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_exp_db_read_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30058,9 +37017,9 @@ void HP_homun_exp_db_read(void) { { HPMHooks.source.homun.exp_db_read(); } - if( HPMHooks.count.HP_homun_exp_db_read_post ) { + if (HPMHooks.count.HP_homun_exp_db_read_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_exp_db_read_post; hIndex++ ) { + 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(); } @@ -30069,14 +37028,14 @@ void HP_homun_exp_db_read(void) { } 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); + if (HPMHooks.count.HP_homun_addspiritball_pre > 0) { + void (*preHookFunc) (struct homun_data **hd, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_addspiritball_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_addspiritball_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_addspiritball_pre[hIndex].func; - preHookFunc(hd, &max); + preHookFunc(&hd, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30084,25 +37043,25 @@ void HP_homun_addspiritball(struct homun_data *hd, int max) { { 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++ ) { + if (HPMHooks.count.HP_homun_addspiritball_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_homun_delspiritball_pre > 0) { + void (*preHookFunc) (struct homun_data **hd, int *count, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_delspiritball_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_delspiritball_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_delspiritball_pre[hIndex].func; - preHookFunc(hd, &count, &type); + preHookFunc(&hd, &count, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30110,11 +37069,11 @@ void HP_homun_delspiritball(struct homun_data *hd, int count, int type) { { 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++ ) { + if (HPMHooks.count.HP_homun_delspiritball_post > 0) { + 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); + postHookFunc(hd, count, type); } } return; @@ -30122,14 +37081,14 @@ void HP_homun_delspiritball(struct homun_data *hd, int count, int type) { int8 HP_homun_get_intimacy_grade(struct homun_data *hd) { int hIndex = 0; int8 retVal___ = 0; - if( HPMHooks.count.HP_homun_get_intimacy_grade_pre ) { - int8 (*preHookFunc) (struct homun_data *hd); + if (HPMHooks.count.HP_homun_get_intimacy_grade_pre > 0) { + int8 (*preHookFunc) (struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_get_intimacy_grade_pre[hIndex].func; - retVal___ = preHookFunc(hd); + retVal___ = preHookFunc(&hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30137,26 +37096,26 @@ int8 HP_homun_get_intimacy_grade(struct homun_data *hd) { { retVal___ = HPMHooks.source.homun.get_intimacy_grade(hd); } - if( HPMHooks.count.HP_homun_get_intimacy_grade_post ) { + if (HPMHooks.count.HP_homun_get_intimacy_grade_post > 0) { int8 (*postHookFunc) (int8 retVal___, struct homun_data *hd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_get_intimacy_grade_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_get_intimacy_grade_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd); } } return retVal___; } -/* instance */ +/* instance_interface */ void HP_instance_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_instance_init_pre ) { + if (HPMHooks.count.HP_instance_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_instance_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30164,25 +37123,25 @@ void HP_instance_init(bool minimal) { { HPMHooks.source.instance.init(minimal); } - if( HPMHooks.count.HP_instance_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_post; hIndex++ ) { + if (HPMHooks.count.HP_instance_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_instance_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_instance_final_pre ) { + if (HPMHooks.count.HP_instance_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_instance_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30190,9 +37149,9 @@ void HP_instance_final(void) { { HPMHooks.source.instance.final(); } - if( HPMHooks.count.HP_instance_final_post ) { + if (HPMHooks.count.HP_instance_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_final_post[hIndex].func; postHookFunc(); } @@ -30201,14 +37160,14 @@ void HP_instance_final(void) { } void HP_instance_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_instance_reload_pre ) { + if (HPMHooks.count.HP_instance_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_instance_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30216,9 +37175,9 @@ void HP_instance_reload(void) { { HPMHooks.source.instance.reload(); } - if( HPMHooks.count.HP_instance_reload_post ) { + if (HPMHooks.count.HP_instance_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_reload_post[hIndex].func; postHookFunc(); } @@ -30228,14 +37187,14 @@ void HP_instance_reload(void) { int HP_instance_create(int party_id, const char *name, enum instance_owner_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_create_pre ) { - int (*preHookFunc) (int *party_id, const char *name, enum instance_owner_type *type); + if (HPMHooks.count.HP_instance_create_pre > 0) { + int (*preHookFunc) (int *party_id, const char **name, enum instance_owner_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_create_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&party_id, &name, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30243,11 +37202,11 @@ int HP_instance_create(int party_id, const char *name, enum instance_owner_type { 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++ ) { + if (HPMHooks.count.HP_instance_create_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id, name, type); } } return retVal___; @@ -30255,14 +37214,14 @@ int HP_instance_create(int party_id, const char *name, enum instance_owner_type int HP_instance_add_map(const char *name, int instance_id, bool usebasename, const char *map_name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_add_map_pre ) { - int (*preHookFunc) (const char *name, int *instance_id, bool *usebasename, const char *map_name); + if (HPMHooks.count.HP_instance_add_map_pre > 0) { + int (*preHookFunc) (const char **name, int *instance_id, bool *usebasename, const char **map_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_add_map_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name, &instance_id, &usebasename, &map_name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30270,25 +37229,25 @@ int HP_instance_add_map(const char *name, int instance_id, bool usebasename, con { 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++ ) { + if (HPMHooks.count.HP_instance_add_map_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_instance_del_map_pre > 0) { void (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_del_map_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30296,11 +37255,11 @@ void HP_instance_del_map(int16 m) { { 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++ ) { + if (HPMHooks.count.HP_instance_del_map_post > 0) { + 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); + postHookFunc(m); } } return; @@ -30308,14 +37267,14 @@ void HP_instance_del_map(int16 m) { int HP_instance_map2imap(int16 m, int instance_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_map2imap_pre ) { + if (HPMHooks.count.HP_instance_map2imap_pre > 0) { int (*preHookFunc) (int16 *m, int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map2imap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30323,11 +37282,11 @@ int HP_instance_map2imap(int16 m, int instance_id) { { 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++ ) { + if (HPMHooks.count.HP_instance_map2imap_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, m, instance_id); } } return retVal___; @@ -30335,14 +37294,14 @@ int HP_instance_map2imap(int16 m, int instance_id) { int HP_instance_mapid2imapid(int16 m, int instance_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_mapid2imapid_pre ) { + if (HPMHooks.count.HP_instance_mapid2imapid_pre > 0) { int (*preHookFunc) (int16 *m, int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapid2imapid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30350,11 +37309,11 @@ int HP_instance_mapid2imapid(int16 m, int instance_id) { { 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++ ) { + if (HPMHooks.count.HP_instance_mapid2imapid_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, m, instance_id); } } return retVal___; @@ -30362,14 +37321,14 @@ int HP_instance_mapid2imapid(int16 m, int instance_id) { int HP_instance_mapname2imap(const char *map_name, int instance_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_mapname2imap_pre ) { - int (*preHookFunc) (const char *map_name, int *instance_id); + if (HPMHooks.count.HP_instance_mapname2imap_pre > 0) { + int (*preHookFunc) (const char **map_name, int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_instance_mapname2imap_pre[hIndex].func; - retVal___ = preHookFunc(map_name, &instance_id); + retVal___ = preHookFunc(&map_name, &instance_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30377,11 +37336,11 @@ int HP_instance_mapname2imap(const char *map_name, int instance_id) { { retVal___ = HPMHooks.source.instance.mapname2imap(map_name, instance_id); } - if( HPMHooks.count.HP_instance_mapname2imap_post ) { - int (*postHookFunc) (int retVal___, const char *map_name, int *instance_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_post; hIndex++ ) { + if (HPMHooks.count.HP_instance_mapname2imap_post > 0) { + int (*postHookFunc) (int retVal___, const char *map_name, int instance_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_mapname2imap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_mapname2imap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, map_name, &instance_id); + retVal___ = postHookFunc(retVal___, map_name, instance_id); } } return retVal___; @@ -30389,16 +37348,16 @@ int HP_instance_mapname2imap(const char *map_name, int instance_id) { int HP_instance_map_npcsub(struct block_list *bl, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_map_npcsub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list args); + if (HPMHooks.count.HP_instance_map_npcsub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_instance_map_npcsub_pre[hIndex].func; - retVal___ = preHookFunc(bl, args___copy); + retVal___ = preHookFunc(&bl, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30408,9 +37367,9 @@ int HP_instance_map_npcsub(struct block_list *bl, va_list args) { retVal___ = HPMHooks.source.instance.map_npcsub(bl, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_instance_map_npcsub_post ) { + if (HPMHooks.count.HP_instance_map_npcsub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_map_npcsub_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_instance_map_npcsub_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, args___copy); @@ -30422,16 +37381,16 @@ int HP_instance_map_npcsub(struct block_list *bl, va_list args) { int HP_instance_init_npc(struct block_list *bl, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_init_npc_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list args); + if (HPMHooks.count.HP_instance_init_npc_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_instance_init_npc_pre[hIndex].func; - retVal___ = preHookFunc(bl, args___copy); + retVal___ = preHookFunc(&bl, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30441,9 +37400,9 @@ int HP_instance_init_npc(struct block_list *bl, va_list args) { retVal___ = HPMHooks.source.instance.init_npc(bl, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_instance_init_npc_post ) { + if (HPMHooks.count.HP_instance_init_npc_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_init_npc_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_instance_init_npc_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, args___copy); @@ -30454,14 +37413,14 @@ int HP_instance_init_npc(struct block_list *bl, va_list args) { } void HP_instance_destroy(int instance_id) { int hIndex = 0; - if( HPMHooks.count.HP_instance_destroy_pre ) { + if (HPMHooks.count.HP_instance_destroy_pre > 0) { void (*preHookFunc) (int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30469,25 +37428,25 @@ void HP_instance_destroy(int instance_id) { { 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++ ) { + if (HPMHooks.count.HP_instance_destroy_post > 0) { + 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); + postHookFunc(instance_id); } } return; } void HP_instance_start(int instance_id) { int hIndex = 0; - if( HPMHooks.count.HP_instance_start_pre ) { + if (HPMHooks.count.HP_instance_start_pre > 0) { void (*preHookFunc) (int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_start_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30495,25 +37454,25 @@ void HP_instance_start(int instance_id) { { 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++ ) { + if (HPMHooks.count.HP_instance_start_post > 0) { + 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); + postHookFunc(instance_id); } } return; } void HP_instance_check_idle(int instance_id) { int hIndex = 0; - if( HPMHooks.count.HP_instance_check_idle_pre ) { + if (HPMHooks.count.HP_instance_check_idle_pre > 0) { void (*preHookFunc) (int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_idle_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30521,25 +37480,25 @@ void HP_instance_check_idle(int instance_id) { { 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++ ) { + if (HPMHooks.count.HP_instance_check_idle_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_instance_check_kick_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_instance_check_kick_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30547,9 +37506,9 @@ void HP_instance_check_kick(struct map_session_data *sd) { { HPMHooks.source.instance.check_kick(sd); } - if( HPMHooks.count.HP_instance_check_kick_post ) { + if (HPMHooks.count.HP_instance_check_kick_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_check_kick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_instance_check_kick_post[hIndex].func; postHookFunc(sd); } @@ -30558,14 +37517,14 @@ void HP_instance_check_kick(struct map_session_data *sd) { } 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 ) { + if (HPMHooks.count.HP_instance_set_timeout_pre > 0) { void (*preHookFunc) (int *instance_id, unsigned int *progress_timeout, unsigned int *idle_timeout); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_set_timeout_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -30573,11 +37532,11 @@ void HP_instance_set_timeout(int instance_id, unsigned int progress_timeout, uns { 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++ ) { + if (HPMHooks.count.HP_instance_set_timeout_post > 0) { + 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); + postHookFunc(instance_id, progress_timeout, idle_timeout); } } return; @@ -30585,14 +37544,14 @@ void HP_instance_set_timeout(int instance_id, unsigned int progress_timeout, uns bool HP_instance_valid(int instance_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_instance_valid_pre ) { + if (HPMHooks.count.HP_instance_valid_pre > 0) { bool (*preHookFunc) (int *instance_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_valid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30600,11 +37559,11 @@ bool HP_instance_valid(int instance_id) { { 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++ ) { + if (HPMHooks.count.HP_instance_valid_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, instance_id); } } return retVal___; @@ -30612,14 +37571,14 @@ bool HP_instance_valid(int instance_id) { int HP_instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_instance_destroy_timer_pre ) { + if (HPMHooks.count.HP_instance_destroy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30627,270 +37586,213 @@ int HP_instance_destroy_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.instance.destroy_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_instance_destroy_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_instance_destroy_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_instance_destroy_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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___ = 0; - if( HPMHooks.count.HP_intif_parse_pre ) { - int (*preHookFunc) (int *fd); - *HPMforce_return = false; - 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } 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 incubate, char *pet_name) { +void HP_instance_force_destroy(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - 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 *incubate, char *pet_name); + if (HPMHooks.count.HP_instance_force_destroy_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - 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, &incubate, pet_name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_force_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_instance_force_destroy_pre[hIndex].func; + preHookFunc(&sd); } - if( *HPMforce_return ) { + 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, incubate, 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 *incubate, 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, &incubate, pet_name); - } - } - return retVal___; -} -int HP_intif_broadcast(const char *mes, size_t len, int type) { - int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_intif_broadcast_pre ) { - int (*preHookFunc) (const char *mes, size_t *len, int *type); - *HPMforce_return = false; - 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___; + return; } } { - retVal___ = HPMHooks.source.intif.broadcast(mes, len, type); + HPMHooks.source.instance.force_destroy(sd); } - if( HPMHooks.count.HP_intif_broadcast_post ) { - int (*postHookFunc) (int retVal___, const char *mes, size_t *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); + if (HPMHooks.count.HP_instance_force_destroy_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_instance_force_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_instance_force_destroy_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_intif_broadcast2(const char *mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY) { +/* intif_interface */ +int HP_intif_parse(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_broadcast2_pre ) { - int (*preHookFunc) (const char *mes, size_t *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY); + if (HPMHooks.count.HP_intif_parse_pre > 0) { + int (*preHookFunc) (int *fd); *HPMforce_return = false; - 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); + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.intif.broadcast2(mes, len, fontColor, fontType, fontSize, fontAlign, fontY); + retVal___ = HPMHooks.source.intif.parse(fd); } - if( HPMHooks.count.HP_intif_broadcast2_post ) { - int (*postHookFunc) (int retVal___, const char *mes, size_t *len, unsigned int *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); + if (HPMHooks.count.HP_intif_parse_post > 0) { + 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_main_message(struct map_session_data *sd, const char *message) { +int HP_intif_create_pet(int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_main_message_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *message); + if (HPMHooks.count.HP_intif_create_pet_pre > 0) { + int (*preHookFunc) (int *account_id, int *char_id, int *pet_type, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); *HPMforce_return = false; - 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); + 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, &incubate, &pet_name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.intif.main_message(sd, message); + retVal___ = HPMHooks.source.intif.create_pet(account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); } - 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); + if (HPMHooks.count.HP_intif_create_pet_post > 0) { + int (*postHookFunc) (int retVal___, int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, 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, incubate, pet_name); } } return retVal___; } -int HP_intif_wis_message(struct map_session_data *sd, const char *nick, const char *mes, size_t mes_len) { +int HP_intif_saveregistry(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_wis_message_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *nick, const char *mes, size_t *mes_len); + if (HPMHooks.count.HP_intif_saveregistry_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_saveregistry_pre[hIndex].func; + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.intif.wis_message(sd, nick, mes, mes_len); + retVal___ = HPMHooks.source.intif.saveregistry(sd); } - if( HPMHooks.count.HP_intif_wis_message_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *nick, const char *mes, size_t *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); + if (HPMHooks.count.HP_intif_saveregistry_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_saveregistry_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -int HP_intif_wis_message_to_gm(char *Wisp_name, int permission, char *mes) { +int HP_intif_request_registry(struct map_session_data *sd, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_wis_message_to_gm_pre ) { - int (*preHookFunc) (char *Wisp_name, int *permission, char *mes); + if (HPMHooks.count.HP_intif_request_registry_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - 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); + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.intif.wis_message_to_gm(Wisp_name, permission, mes); + retVal___ = HPMHooks.source.intif.request_registry(sd, flag); } - 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); + if (HPMHooks.count.HP_intif_request_registry_post > 0) { + 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_saveregistry(struct map_session_data *sd) { +void HP_intif_request_account_storage(const struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_intif_saveregistry_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_intif_request_account_storage_pre > 0) { + void (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_intif_saveregistry_pre[hIndex].func; - retVal___ = preHookFunc(sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_account_storage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_request_account_storage_pre[hIndex].func; + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.intif.saveregistry(sd); + HPMHooks.source.intif.request_account_storage(sd); } - if( HPMHooks.count.HP_intif_saveregistry_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_saveregistry_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_intif_saveregistry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd); + if (HPMHooks.count.HP_intif_request_account_storage_post > 0) { + void (*postHookFunc) (const struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_account_storage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_request_account_storage_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } -int HP_intif_request_registry(struct map_session_data *sd, int flag) { +void HP_intif_send_account_storage(struct map_session_data *sd) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_intif_request_registry_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *flag); + if (HPMHooks.count.HP_intif_send_account_storage_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_account_storage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_send_account_storage_pre[hIndex].func; + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.intif.request_registry(sd, flag); + HPMHooks.source.intif.send_account_storage(sd); } - 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); + if (HPMHooks.count.HP_intif_send_account_storage_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_account_storage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_send_account_storage_post[hIndex].func; + postHookFunc(sd); } } - return retVal___; + return; } int HP_intif_request_guild_storage(int account_id, int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_request_guild_storage_pre ) { + if (HPMHooks.count.HP_intif_request_guild_storage_pre > 0) { int (*preHookFunc) (int *account_id, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_guild_storage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30898,11 +37800,11 @@ int HP_intif_request_guild_storage(int account_id, int guild_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_request_guild_storage_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, guild_id); } } return retVal___; @@ -30910,14 +37812,14 @@ int HP_intif_request_guild_storage(int account_id, int guild_id) { int HP_intif_send_guild_storage(int account_id, struct guild_storage *gstor) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_send_guild_storage_pre ) { - int (*preHookFunc) (int *account_id, struct guild_storage *gstor); + if (HPMHooks.count.HP_intif_send_guild_storage_pre > 0) { + int (*preHookFunc) (int *account_id, struct guild_storage **gstor); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_send_guild_storage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&account_id, &gstor); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30925,11 +37827,11 @@ int HP_intif_send_guild_storage(int account_id, struct guild_storage *gstor) { { 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++ ) { + if (HPMHooks.count.HP_intif_send_guild_storage_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, gstor); } } return retVal___; @@ -30937,14 +37839,14 @@ int HP_intif_send_guild_storage(int account_id, struct guild_storage *gstor) { int HP_intif_create_party(struct party_member *member, const char *name, int item, int item2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_create_party_pre ) { - int (*preHookFunc) (struct party_member *member, const char *name, int *item, int *item2); + if (HPMHooks.count.HP_intif_create_party_pre > 0) { + int (*preHookFunc) (struct party_member **member, const char **name, int *item, int *item2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_party_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&member, &name, &item, &item2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30952,11 +37854,11 @@ int HP_intif_create_party(struct party_member *member, const char *name, int ite { 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, const char *name, int *item, int *item2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_party_post; hIndex++ ) { + if (HPMHooks.count.HP_intif_create_party_post > 0) { + int (*postHookFunc) (int retVal___, struct party_member *member, const 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); + retVal___ = postHookFunc(retVal___, member, name, item, item2); } } return retVal___; @@ -30964,14 +37866,14 @@ int HP_intif_create_party(struct party_member *member, const char *name, int ite int HP_intif_request_partyinfo(int party_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_request_partyinfo_pre ) { + if (HPMHooks.count.HP_intif_request_partyinfo_pre > 0) { int (*preHookFunc) (int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_partyinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -30979,11 +37881,11 @@ int HP_intif_request_partyinfo(int party_id, int char_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_request_partyinfo_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id, char_id); } } return retVal___; @@ -30991,14 +37893,14 @@ int HP_intif_request_partyinfo(int party_id, int char_id) { int HP_intif_party_addmember(int party_id, struct party_member *member) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_party_addmember_pre ) { - int (*preHookFunc) (int *party_id, struct party_member *member); + if (HPMHooks.count.HP_intif_party_addmember_pre > 0) { + int (*preHookFunc) (int *party_id, struct party_member **member); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_addmember_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&party_id, &member); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31006,11 +37908,11 @@ int HP_intif_party_addmember(int party_id, struct party_member *member) { { 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++ ) { + if (HPMHooks.count.HP_intif_party_addmember_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id, member); } } return retVal___; @@ -31018,14 +37920,14 @@ int HP_intif_party_addmember(int party_id, struct party_member *member) { int HP_intif_party_changeoption(int party_id, int account_id, int exp, int item) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_party_changeoption_pre ) { + if (HPMHooks.count.HP_intif_party_changeoption_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changeoption_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31033,11 +37935,11 @@ int HP_intif_party_changeoption(int party_id, int account_id, int exp, int item) { 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++ ) { + if (HPMHooks.count.HP_intif_party_changeoption_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id, account_id, exp, item); } } return retVal___; @@ -31045,14 +37947,14 @@ int HP_intif_party_changeoption(int party_id, int account_id, int exp, int item) int HP_intif_party_leave(int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_party_leave_pre ) { + if (HPMHooks.count.HP_intif_party_leave_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31060,11 +37962,11 @@ int HP_intif_party_leave(int party_id, int account_id, int char_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_party_leave_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id, account_id, char_id); } } return retVal___; @@ -31072,14 +37974,14 @@ int HP_intif_party_leave(int party_id, int account_id, int char_id) { int HP_intif_party_changemap(struct map_session_data *sd, int online) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_party_changemap_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *online); + if (HPMHooks.count.HP_intif_party_changemap_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *online); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_changemap_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &online); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31087,11 +37989,11 @@ int HP_intif_party_changemap(struct map_session_data *sd, int online) { { 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++ ) { + if (HPMHooks.count.HP_intif_party_changemap_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, online); } } return retVal___; @@ -31099,14 +38001,14 @@ int HP_intif_party_changemap(struct map_session_data *sd, int online) { int HP_intif_break_party(int party_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_break_party_pre ) { + if (HPMHooks.count.HP_intif_break_party_pre > 0) { int (*preHookFunc) (int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_break_party_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31114,38 +38016,11 @@ int HP_intif_break_party(int party_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_break_party_post > 0) { + 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___ = 0; - if( HPMHooks.count.HP_intif_party_message_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, const char *mes, int *len); - *HPMforce_return = false; - 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); + retVal___ = postHookFunc(retVal___, party_id); } } return retVal___; @@ -31153,14 +38028,14 @@ int HP_intif_party_message(int party_id, int account_id, const char *mes, int le int HP_intif_party_leaderchange(int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_party_leaderchange_pre ) { + if (HPMHooks.count.HP_intif_party_leaderchange_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_party_leaderchange_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31168,11 +38043,11 @@ int HP_intif_party_leaderchange(int party_id, int account_id, int char_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_party_leaderchange_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id, account_id, char_id); } } return retVal___; @@ -31180,14 +38055,14 @@ int HP_intif_party_leaderchange(int party_id, int account_id, int char_id) { int HP_intif_guild_create(const char *name, const struct guild_member *master) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_create_pre ) { - int (*preHookFunc) (const char *name, const struct guild_member *master); + if (HPMHooks.count.HP_intif_guild_create_pre > 0) { + int (*preHookFunc) (const char **name, const struct guild_member **master); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_create_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name, &master); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31195,9 +38070,9 @@ int HP_intif_guild_create(const char *name, const struct guild_member *master) { { retVal___ = HPMHooks.source.intif.guild_create(name, master); } - if( HPMHooks.count.HP_intif_guild_create_post ) { + if (HPMHooks.count.HP_intif_guild_create_post > 0) { int (*postHookFunc) (int retVal___, const char *name, const struct guild_member *master); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_create_post; hIndex++ ) { + 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); } @@ -31207,14 +38082,14 @@ int HP_intif_guild_create(const char *name, const struct guild_member *master) { int HP_intif_guild_request_info(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_request_info_pre ) { + if (HPMHooks.count.HP_intif_guild_request_info_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_request_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31222,11 +38097,11 @@ int HP_intif_guild_request_info(int guild_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_guild_request_info_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id); } } return retVal___; @@ -31234,14 +38109,14 @@ int HP_intif_guild_request_info(int guild_id) { int HP_intif_guild_addmember(int guild_id, struct guild_member *m) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_addmember_pre ) { - int (*preHookFunc) (int *guild_id, struct guild_member *m); + if (HPMHooks.count.HP_intif_guild_addmember_pre > 0) { + int (*preHookFunc) (int *guild_id, struct guild_member **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_addmember_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31249,11 +38124,11 @@ int HP_intif_guild_addmember(int guild_id, struct guild_member *m) { { 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++ ) { + if (HPMHooks.count.HP_intif_guild_addmember_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, m); } } return retVal___; @@ -31261,14 +38136,14 @@ int HP_intif_guild_addmember(int guild_id, struct guild_member *m) { int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_leave_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char *mes); + if (HPMHooks.count.HP_intif_guild_leave_pre > 0) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_leave_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &flag, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31276,38 +38151,38 @@ int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, co { 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++ ) { + if (HPMHooks.count.HP_intif_guild_leave_post > 0) { + 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); + 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 HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class) { int hIndex = 0; int retVal___ = 0; - 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_); + if (HPMHooks.count.HP_intif_guild_memberinfoshort_pre > 0) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &online, &lv, &class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.intif.guild_memberinfoshort(guild_id, account_id, char_id, online, lv, class_); + 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++ ) { + if (HPMHooks.count.HP_intif_guild_memberinfoshort_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class); } } return retVal___; @@ -31315,14 +38190,14 @@ int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, in int HP_intif_guild_break(int guild_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_break_pre ) { + if (HPMHooks.count.HP_intif_guild_break_pre > 0) { int (*preHookFunc) (int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_break_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31330,53 +38205,26 @@ int HP_intif_guild_break(int guild_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_guild_break_post > 0) { + 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___ = 0; - if( HPMHooks.count.HP_intif_guild_message_pre ) { - int (*preHookFunc) (int *guild_id, int *account_id, const char *mes, int *len); - *HPMforce_return = false; - 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); + retVal___ = postHookFunc(retVal___, guild_id); } } return retVal___; } -int HP_intif_guild_change_gm(int guild_id, const char *name, size_t len) { +int HP_intif_guild_change_gm(int guild_id, const char *name, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_change_gm_pre ) { - int (*preHookFunc) (int *guild_id, const char *name, size_t *len); + if (HPMHooks.count.HP_intif_guild_change_gm_pre > 0) { + int (*preHookFunc) (int *guild_id, const char **name, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_gm_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &name, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31384,11 +38232,11 @@ int HP_intif_guild_change_gm(int guild_id, const char *name, size_t len) { { 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, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_gm_post; hIndex++ ) { + if (HPMHooks.count.HP_intif_guild_change_gm_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, name, len); } } return retVal___; @@ -31396,14 +38244,14 @@ int HP_intif_guild_change_gm(int guild_id, const char *name, size_t len) { int HP_intif_guild_change_basicinfo(int guild_id, int type, const void *data, int len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_change_basicinfo_pre ) { - int (*preHookFunc) (int *guild_id, int *type, const void *data, int *len); + if (HPMHooks.count.HP_intif_guild_change_basicinfo_pre > 0) { + int (*preHookFunc) (int *guild_id, int *type, const void **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_basicinfo_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &type, &data, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31411,11 +38259,11 @@ int HP_intif_guild_change_basicinfo(int guild_id, int type, const void *data, in { 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++ ) { + if (HPMHooks.count.HP_intif_guild_change_basicinfo_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, type, data, len); } } return retVal___; @@ -31423,14 +38271,14 @@ int HP_intif_guild_change_basicinfo(int guild_id, int type, const void *data, in 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___ = 0; - 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); + if (HPMHooks.count.HP_intif_guild_change_memberinfo_pre > 0) { + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *type, const void **data, int *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_change_memberinfo_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &account_id, &char_id, &type, &data, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31438,11 +38286,11 @@ int HP_intif_guild_change_memberinfo(int guild_id, int account_id, int char_id, { 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++ ) { + if (HPMHooks.count.HP_intif_guild_change_memberinfo_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, type, data, len); } } return retVal___; @@ -31450,14 +38298,14 @@ int HP_intif_guild_change_memberinfo(int guild_id, int account_id, int char_id, int HP_intif_guild_position(int guild_id, int idx, struct guild_position *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_position_pre ) { - int (*preHookFunc) (int *guild_id, int *idx, struct guild_position *p); + if (HPMHooks.count.HP_intif_guild_position_pre > 0) { + int (*preHookFunc) (int *guild_id, int *idx, struct guild_position **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_position_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &idx, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31465,11 +38313,11 @@ int HP_intif_guild_position(int guild_id, int idx, struct guild_position *p) { { 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++ ) { + if (HPMHooks.count.HP_intif_guild_position_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, idx, p); } } return retVal___; @@ -31477,14 +38325,14 @@ int HP_intif_guild_position(int guild_id, int idx, struct guild_position *p) { int HP_intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_skillup_pre ) { + if (HPMHooks.count.HP_intif_guild_skillup_pre > 0) { int (*preHookFunc) (int *guild_id, uint16 *skill_id, int *account_id, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_skillup_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31492,11 +38340,11 @@ int HP_intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int ma { 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++ ) { + if (HPMHooks.count.HP_intif_guild_skillup_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, skill_id, account_id, max); } } return retVal___; @@ -31504,14 +38352,14 @@ int HP_intif_guild_skillup(int guild_id, uint16 skill_id, int account_id, int ma int HP_intif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int account_id2, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_alliance_pre ) { + if (HPMHooks.count.HP_intif_guild_alliance_pre > 0) { int (*preHookFunc) (int *guild_id1, int *guild_id2, int *account_id1, int *account_id2, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_alliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31519,11 +38367,11 @@ int HP_intif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int a { 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++ ) { + if (HPMHooks.count.HP_intif_guild_alliance_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id1, guild_id2, account_id1, account_id2, flag); } } return retVal___; @@ -31531,14 +38379,14 @@ int HP_intif_guild_alliance(int guild_id1, int guild_id2, int account_id1, int a int HP_intif_guild_notice(int guild_id, const char *mes1, const char *mes2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_notice_pre ) { - int (*preHookFunc) (int *guild_id, const char *mes1, const char *mes2); + if (HPMHooks.count.HP_intif_guild_notice_pre > 0) { + int (*preHookFunc) (int *guild_id, const char **mes1, const char **mes2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_notice_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &mes1, &mes2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31546,11 +38394,11 @@ int HP_intif_guild_notice(int guild_id, const char *mes1, const char *mes2) { { 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++ ) { + if (HPMHooks.count.HP_intif_guild_notice_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, mes1, mes2); } } return retVal___; @@ -31558,14 +38406,14 @@ int HP_intif_guild_notice(int guild_id, const char *mes1, const char *mes2) { int HP_intif_guild_emblem(int guild_id, int len, const char *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_emblem_pre ) { - int (*preHookFunc) (int *guild_id, int *len, const char *data); + if (HPMHooks.count.HP_intif_guild_emblem_pre > 0) { + int (*preHookFunc) (int *guild_id, int *len, const char **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_emblem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&guild_id, &len, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31573,11 +38421,11 @@ int HP_intif_guild_emblem(int guild_id, int len, const char *data) { { 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++ ) { + if (HPMHooks.count.HP_intif_guild_emblem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, guild_id, len, data); } } return retVal___; @@ -31585,14 +38433,14 @@ int HP_intif_guild_emblem(int guild_id, int len, const char *data) { int HP_intif_guild_castle_dataload(int num, int *castle_ids) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_castle_dataload_pre ) { - int (*preHookFunc) (int *num, int *castle_ids); + if (HPMHooks.count.HP_intif_guild_castle_dataload_pre > 0) { + int (*preHookFunc) (int *num, int **castle_ids); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_dataload_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&num, &castle_ids); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31600,11 +38448,11 @@ int HP_intif_guild_castle_dataload(int num, int *castle_ids) { { 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++ ) { + if (HPMHooks.count.HP_intif_guild_castle_dataload_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, num, castle_ids); } } return retVal___; @@ -31612,14 +38460,14 @@ int HP_intif_guild_castle_dataload(int num, int *castle_ids) { int HP_intif_guild_castle_datasave(int castle_id, int index, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_guild_castle_datasave_pre ) { + if (HPMHooks.count.HP_intif_guild_castle_datasave_pre > 0) { int (*preHookFunc) (int *castle_id, int *index, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_castle_datasave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31627,25 +38475,25 @@ int HP_intif_guild_castle_datasave(int castle_id, int index, int value) { { 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++ ) { + if (HPMHooks.count.HP_intif_guild_castle_datasave_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, castle_id, index, value); } } return retVal___; } void HP_intif_itembound_req(int char_id, int aid, int guild_id) { int hIndex = 0; - if( HPMHooks.count.HP_intif_itembound_req_pre ) { + if (HPMHooks.count.HP_intif_itembound_req_pre > 0) { void (*preHookFunc) (int *char_id, int *aid, int *guild_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_itembound_req_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_itembound_req_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_itembound_req_pre[hIndex].func; preHookFunc(&char_id, &aid, &guild_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -31653,11 +38501,11 @@ void HP_intif_itembound_req(int char_id, int aid, int guild_id) { { HPMHooks.source.intif.itembound_req(char_id, aid, guild_id); } - if( HPMHooks.count.HP_intif_itembound_req_post ) { - void (*postHookFunc) (int *char_id, int *aid, int *guild_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_itembound_req_post; hIndex++ ) { + if (HPMHooks.count.HP_intif_itembound_req_post > 0) { + void (*postHookFunc) (int char_id, int aid, int guild_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_itembound_req_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_itembound_req_post[hIndex].func; - postHookFunc(&char_id, &aid, &guild_id); + postHookFunc(char_id, aid, guild_id); } } return; @@ -31665,14 +38513,14 @@ void HP_intif_itembound_req(int char_id, int aid, int guild_id) { int HP_intif_request_petdata(int account_id, int char_id, int pet_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_request_petdata_pre ) { + if (HPMHooks.count.HP_intif_request_petdata_pre > 0) { int (*preHookFunc) (int *account_id, int *char_id, int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_petdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31680,11 +38528,11 @@ int HP_intif_request_petdata(int account_id, int char_id, int pet_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_request_petdata_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, char_id, pet_id); } } return retVal___; @@ -31692,14 +38540,14 @@ int HP_intif_request_petdata(int account_id, int char_id, int pet_id) { int HP_intif_save_petdata(int account_id, struct s_pet *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_save_petdata_pre ) { - int (*preHookFunc) (int *account_id, struct s_pet *p); + if (HPMHooks.count.HP_intif_save_petdata_pre > 0) { + int (*preHookFunc) (int *account_id, struct s_pet **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_save_petdata_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&account_id, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31707,11 +38555,11 @@ int HP_intif_save_petdata(int account_id, struct s_pet *p) { { 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++ ) { + if (HPMHooks.count.HP_intif_save_petdata_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, p); } } return retVal___; @@ -31719,14 +38567,14 @@ int HP_intif_save_petdata(int account_id, struct s_pet *p) { int HP_intif_delete_petdata(int pet_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_delete_petdata_pre ) { + if (HPMHooks.count.HP_intif_delete_petdata_pre > 0) { int (*preHookFunc) (int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_delete_petdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31734,11 +38582,11 @@ int HP_intif_delete_petdata(int pet_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_delete_petdata_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, pet_id); } } return retVal___; @@ -31746,14 +38594,14 @@ int HP_intif_delete_petdata(int pet_id) { int HP_intif_rename(struct map_session_data *sd, int type, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_rename_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, const char *name); + if (HPMHooks.count.HP_intif_rename_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_rename_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31761,11 +38609,11 @@ int HP_intif_rename(struct map_session_data *sd, int type, const char *name) { { 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, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_rename_post; hIndex++ ) { + if (HPMHooks.count.HP_intif_rename_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type, const 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); + retVal___ = postHookFunc(retVal___, sd, type, name); } } return retVal___; @@ -31773,14 +38621,14 @@ int HP_intif_rename(struct map_session_data *sd, int type, const char *name) { int HP_intif_homunculus_create(int account_id, struct s_homunculus *sh) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_homunculus_create_pre ) { - int (*preHookFunc) (int *account_id, struct s_homunculus *sh); + if (HPMHooks.count.HP_intif_homunculus_create_pre > 0) { + int (*preHookFunc) (int *account_id, struct s_homunculus **sh); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_create_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&account_id, &sh); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31788,11 +38636,11 @@ int HP_intif_homunculus_create(int account_id, struct s_homunculus *sh) { { 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++ ) { + if (HPMHooks.count.HP_intif_homunculus_create_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, sh); } } return retVal___; @@ -31800,14 +38648,14 @@ int HP_intif_homunculus_create(int account_id, struct s_homunculus *sh) { bool HP_intif_homunculus_requestload(int account_id, int homun_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_intif_homunculus_requestload_pre ) { + if (HPMHooks.count.HP_intif_homunculus_requestload_pre > 0) { bool (*preHookFunc) (int *account_id, int *homun_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestload_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31815,11 +38663,11 @@ bool HP_intif_homunculus_requestload(int account_id, int homun_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_homunculus_requestload_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, homun_id); } } return retVal___; @@ -31827,14 +38675,14 @@ bool HP_intif_homunculus_requestload(int account_id, int homun_id) { int HP_intif_homunculus_requestsave(int account_id, struct s_homunculus *sh) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_homunculus_requestsave_pre ) { - int (*preHookFunc) (int *account_id, struct s_homunculus *sh); + if (HPMHooks.count.HP_intif_homunculus_requestsave_pre > 0) { + int (*preHookFunc) (int *account_id, struct s_homunculus **sh); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestsave_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&account_id, &sh); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31842,11 +38690,11 @@ int HP_intif_homunculus_requestsave(int account_id, struct s_homunculus *sh) { { 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++ ) { + if (HPMHooks.count.HP_intif_homunculus_requestsave_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, sh); } } return retVal___; @@ -31854,14 +38702,14 @@ int HP_intif_homunculus_requestsave(int account_id, struct s_homunculus *sh) { int HP_intif_homunculus_requestdelete(int homun_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_homunculus_requestdelete_pre ) { + if (HPMHooks.count.HP_intif_homunculus_requestdelete_pre > 0) { int (*preHookFunc) (int *homun_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_homunculus_requestdelete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31869,25 +38717,25 @@ int HP_intif_homunculus_requestdelete(int homun_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_homunculus_requestdelete_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, homun_id); } } return retVal___; } void HP_intif_request_questlog(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_request_questlog_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_intif_request_questlog_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_request_questlog_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -31895,9 +38743,9 @@ void HP_intif_request_questlog(struct map_session_data *sd) { { HPMHooks.source.intif.request_questlog(sd); } - if( HPMHooks.count.HP_intif_request_questlog_post ) { + if (HPMHooks.count.HP_intif_request_questlog_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_request_questlog_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_request_questlog_post[hIndex].func; postHookFunc(sd); } @@ -31907,14 +38755,14 @@ void HP_intif_request_questlog(struct map_session_data *sd) { int HP_intif_quest_save(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_quest_save_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_intif_quest_save_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_quest_save_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31922,9 +38770,9 @@ int HP_intif_quest_save(struct map_session_data *sd) { { retVal___ = HPMHooks.source.intif.quest_save(sd); } - if( HPMHooks.count.HP_intif_quest_save_post ) { + if (HPMHooks.count.HP_intif_quest_save_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_quest_save_post; hIndex++ ) { + 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); } @@ -31934,14 +38782,14 @@ int HP_intif_quest_save(struct map_session_data *sd) { int HP_intif_mercenary_create(struct s_mercenary *merc) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_mercenary_create_pre ) { - int (*preHookFunc) (struct s_mercenary *merc); + if (HPMHooks.count.HP_intif_mercenary_create_pre > 0) { + int (*preHookFunc) (struct s_mercenary **merc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_create_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&merc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31949,9 +38797,9 @@ int HP_intif_mercenary_create(struct s_mercenary *merc) { { retVal___ = HPMHooks.source.intif.mercenary_create(merc); } - if( HPMHooks.count.HP_intif_mercenary_create_post ) { + if (HPMHooks.count.HP_intif_mercenary_create_post > 0) { int (*postHookFunc) (int retVal___, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_create_post; hIndex++ ) { + 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); } @@ -31961,14 +38809,14 @@ int HP_intif_mercenary_create(struct s_mercenary *merc) { int HP_intif_mercenary_request(int merc_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_mercenary_request_pre ) { + if (HPMHooks.count.HP_intif_mercenary_request_pre > 0) { int (*preHookFunc) (int *merc_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_request_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -31976,11 +38824,11 @@ int HP_intif_mercenary_request(int merc_id, int char_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_mercenary_request_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, merc_id, char_id); } } return retVal___; @@ -31988,14 +38836,14 @@ int HP_intif_mercenary_request(int merc_id, int char_id) { int HP_intif_mercenary_delete(int merc_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_mercenary_delete_pre ) { + if (HPMHooks.count.HP_intif_mercenary_delete_pre > 0) { int (*preHookFunc) (int *merc_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32003,11 +38851,11 @@ int HP_intif_mercenary_delete(int merc_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_mercenary_delete_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, merc_id); } } return retVal___; @@ -32015,14 +38863,14 @@ int HP_intif_mercenary_delete(int merc_id) { int HP_intif_mercenary_save(struct s_mercenary *merc) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_mercenary_save_pre ) { - int (*preHookFunc) (struct s_mercenary *merc); + if (HPMHooks.count.HP_intif_mercenary_save_pre > 0) { + int (*preHookFunc) (struct s_mercenary **merc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_save_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&merc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32030,9 +38878,9 @@ int HP_intif_mercenary_save(struct s_mercenary *merc) { { retVal___ = HPMHooks.source.intif.mercenary_save(merc); } - if( HPMHooks.count.HP_intif_mercenary_save_post ) { + if (HPMHooks.count.HP_intif_mercenary_save_post > 0) { int (*postHookFunc) (int retVal___, struct s_mercenary *merc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_mercenary_save_post; hIndex++ ) { + 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); } @@ -32042,14 +38890,14 @@ int HP_intif_mercenary_save(struct s_mercenary *merc) { int HP_intif_Mail_requestinbox(int char_id, unsigned char flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_requestinbox_pre ) { + if (HPMHooks.count.HP_intif_Mail_requestinbox_pre > 0) { int (*preHookFunc) (int *char_id, unsigned char *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_requestinbox_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32057,11 +38905,11 @@ int HP_intif_Mail_requestinbox(int char_id, unsigned char flag) { { 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++ ) { + if (HPMHooks.count.HP_intif_Mail_requestinbox_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, char_id, flag); } } return retVal___; @@ -32069,14 +38917,14 @@ int HP_intif_Mail_requestinbox(int char_id, unsigned char flag) { int HP_intif_Mail_read(int mail_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_read_pre ) { + if (HPMHooks.count.HP_intif_Mail_read_pre > 0) { int (*preHookFunc) (int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_read_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32084,11 +38932,11 @@ int HP_intif_Mail_read(int mail_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_Mail_read_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, mail_id); } } return retVal___; @@ -32096,14 +38944,14 @@ int HP_intif_Mail_read(int mail_id) { int HP_intif_Mail_getattach(int char_id, int mail_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_getattach_pre ) { + if (HPMHooks.count.HP_intif_Mail_getattach_pre > 0) { int (*preHookFunc) (int *char_id, int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_getattach_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32111,11 +38959,11 @@ int HP_intif_Mail_getattach(int char_id, int mail_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_Mail_getattach_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, char_id, mail_id); } } return retVal___; @@ -32123,14 +38971,14 @@ int HP_intif_Mail_getattach(int char_id, int mail_id) { int HP_intif_Mail_delete(int char_id, int mail_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_delete_pre ) { + if (HPMHooks.count.HP_intif_Mail_delete_pre > 0) { int (*preHookFunc) (int *char_id, int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32138,11 +38986,11 @@ int HP_intif_Mail_delete(int char_id, int mail_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_Mail_delete_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, char_id, mail_id); } } return retVal___; @@ -32150,14 +38998,14 @@ int HP_intif_Mail_delete(int char_id, int mail_id) { int HP_intif_Mail_return(int char_id, int mail_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_return_pre ) { + if (HPMHooks.count.HP_intif_Mail_return_pre > 0) { int (*preHookFunc) (int *char_id, int *mail_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_return_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32165,11 +39013,11 @@ int HP_intif_Mail_return(int char_id, int mail_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_Mail_return_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, char_id, mail_id); } } return retVal___; @@ -32177,14 +39025,14 @@ int HP_intif_Mail_return(int char_id, int mail_id) { int HP_intif_Mail_send(int account_id, struct mail_message *msg) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Mail_send_pre ) { - int (*preHookFunc) (int *account_id, struct mail_message *msg); + if (HPMHooks.count.HP_intif_Mail_send_pre > 0) { + int (*preHookFunc) (int *account_id, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Mail_send_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&account_id, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32192,11 +39040,11 @@ int HP_intif_Mail_send(int account_id, struct mail_message *msg) { { 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++ ) { + if (HPMHooks.count.HP_intif_Mail_send_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, msg); } } return retVal___; @@ -32204,14 +39052,14 @@ int HP_intif_Mail_send(int account_id, struct mail_message *msg) { int HP_intif_Auction_requestlist(int char_id, short type, int price, const char *searchtext, short page) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Auction_requestlist_pre ) { - int (*preHookFunc) (int *char_id, short *type, int *price, const char *searchtext, short *page); + if (HPMHooks.count.HP_intif_Auction_requestlist_pre > 0) { + int (*preHookFunc) (int *char_id, short *type, int *price, const char **searchtext, short *page); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_requestlist_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&char_id, &type, &price, &searchtext, &page); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32219,11 +39067,11 @@ int HP_intif_Auction_requestlist(int char_id, short type, int price, const char { 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++ ) { + if (HPMHooks.count.HP_intif_Auction_requestlist_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, char_id, type, price, searchtext, page); } } return retVal___; @@ -32231,14 +39079,14 @@ int HP_intif_Auction_requestlist(int char_id, short type, int price, const char int HP_intif_Auction_register(struct auction_data *auction) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Auction_register_pre ) { - int (*preHookFunc) (struct auction_data *auction); + if (HPMHooks.count.HP_intif_Auction_register_pre > 0) { + int (*preHookFunc) (struct auction_data **auction); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_register_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&auction); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32246,9 +39094,9 @@ int HP_intif_Auction_register(struct auction_data *auction) { { retVal___ = HPMHooks.source.intif.Auction_register(auction); } - if( HPMHooks.count.HP_intif_Auction_register_post ) { + if (HPMHooks.count.HP_intif_Auction_register_post > 0) { int (*postHookFunc) (int retVal___, struct auction_data *auction); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_register_post; hIndex++ ) { + 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); } @@ -32258,14 +39106,14 @@ int HP_intif_Auction_register(struct auction_data *auction) { int HP_intif_Auction_cancel(int char_id, unsigned int auction_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Auction_cancel_pre ) { + if (HPMHooks.count.HP_intif_Auction_cancel_pre > 0) { int (*preHookFunc) (int *char_id, unsigned int *auction_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_cancel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32273,11 +39121,11 @@ int HP_intif_Auction_cancel(int char_id, unsigned int auction_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_Auction_cancel_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, char_id, auction_id); } } return retVal___; @@ -32285,14 +39133,14 @@ int HP_intif_Auction_cancel(int char_id, unsigned int auction_id) { int HP_intif_Auction_close(int char_id, unsigned int auction_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Auction_close_pre ) { + if (HPMHooks.count.HP_intif_Auction_close_pre > 0) { int (*preHookFunc) (int *char_id, unsigned int *auction_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32300,11 +39148,11 @@ int HP_intif_Auction_close(int char_id, unsigned int auction_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_Auction_close_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, char_id, auction_id); } } return retVal___; @@ -32312,14 +39160,14 @@ int HP_intif_Auction_close(int char_id, unsigned int auction_id) { int HP_intif_Auction_bid(int char_id, const char *name, unsigned int auction_id, int bid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_Auction_bid_pre ) { - int (*preHookFunc) (int *char_id, const char *name, unsigned int *auction_id, int *bid); + if (HPMHooks.count.HP_intif_Auction_bid_pre > 0) { + int (*preHookFunc) (int *char_id, const char **name, unsigned int *auction_id, int *bid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_Auction_bid_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&char_id, &name, &auction_id, &bid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32327,11 +39175,11 @@ int HP_intif_Auction_bid(int char_id, const char *name, unsigned int auction_id, { 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++ ) { + if (HPMHooks.count.HP_intif_Auction_bid_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, char_id, name, auction_id, bid); } } return retVal___; @@ -32339,14 +39187,14 @@ int HP_intif_Auction_bid(int char_id, const char *name, unsigned int auction_id, int HP_intif_elemental_create(struct s_elemental *ele) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_elemental_create_pre ) { - int (*preHookFunc) (struct s_elemental *ele); + if (HPMHooks.count.HP_intif_elemental_create_pre > 0) { + int (*preHookFunc) (struct s_elemental **ele); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_create_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&ele); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32354,9 +39202,9 @@ int HP_intif_elemental_create(struct s_elemental *ele) { { retVal___ = HPMHooks.source.intif.elemental_create(ele); } - if( HPMHooks.count.HP_intif_elemental_create_post ) { + if (HPMHooks.count.HP_intif_elemental_create_post > 0) { int (*postHookFunc) (int retVal___, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_create_post; hIndex++ ) { + 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); } @@ -32366,14 +39214,14 @@ int HP_intif_elemental_create(struct s_elemental *ele) { int HP_intif_elemental_request(int ele_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_elemental_request_pre ) { + if (HPMHooks.count.HP_intif_elemental_request_pre > 0) { int (*preHookFunc) (int *ele_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_request_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32381,11 +39229,11 @@ int HP_intif_elemental_request(int ele_id, int char_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_elemental_request_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, ele_id, char_id); } } return retVal___; @@ -32393,14 +39241,14 @@ int HP_intif_elemental_request(int ele_id, int char_id) { int HP_intif_elemental_delete(int ele_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_elemental_delete_pre ) { + if (HPMHooks.count.HP_intif_elemental_delete_pre > 0) { int (*preHookFunc) (int *ele_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32408,11 +39256,11 @@ int HP_intif_elemental_delete(int ele_id) { { 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++ ) { + if (HPMHooks.count.HP_intif_elemental_delete_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, ele_id); } } return retVal___; @@ -32420,14 +39268,14 @@ int HP_intif_elemental_delete(int ele_id) { int HP_intif_elemental_save(struct s_elemental *ele) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_elemental_save_pre ) { - int (*preHookFunc) (struct s_elemental *ele); + if (HPMHooks.count.HP_intif_elemental_save_pre > 0) { + int (*preHookFunc) (struct s_elemental **ele); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_save_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&ele); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -32435,189 +39283,371 @@ int HP_intif_elemental_save(struct s_elemental *ele) { { retVal___ = HPMHooks.source.intif.elemental_save(ele); } - if( HPMHooks.count.HP_intif_elemental_save_post ) { + if (HPMHooks.count.HP_intif_elemental_save_post > 0) { int (*postHookFunc) (int retVal___, struct s_elemental *ele); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_elemental_save_post; hIndex++ ) { + 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 HP_intif_rodex_requestinbox(int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id) { int hIndex = 0; - if( HPMHooks.count.HP_intif_request_accinfo_pre ) { - void (*preHookFunc) (int *u_fd, int *aid, int *group_lv, char *query); + int retVal___ = 0; + if (HPMHooks.count.HP_intif_rodex_requestinbox_pre > 0) { + int (*preHookFunc) (int *char_id, int *account_id, int8 *flag, int8 *opentype, int64 *mail_id); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_requestinbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_rodex_requestinbox_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &account_id, &flag, &opentype, &mail_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.intif.request_accinfo(u_fd, aid, group_lv, query); + retVal___ = HPMHooks.source.intif.rodex_requestinbox(char_id, account_id, flag, opentype, mail_id); } - 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); + if (HPMHooks.count.HP_intif_rodex_requestinbox_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, int account_id, int8 flag, int8 opentype, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_requestinbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_rodex_requestinbox_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, account_id, flag, opentype, mail_id); } } - return; + return retVal___; } -int HP_intif_CheckForCharServer(void) { +int HP_intif_rodex_checkhasnew(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_CheckForCharServer_pre ) { - int (*preHookFunc) (void); + if (HPMHooks.count.HP_intif_rodex_checkhasnew_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_CheckForCharServer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_intif_CheckForCharServer_pre[hIndex].func; - retVal___ = preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_checkhasnew_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_rodex_checkhasnew_pre[hIndex].func; + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.intif.CheckForCharServer(); + retVal___ = HPMHooks.source.intif.rodex_checkhasnew(sd); } - 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___); + if (HPMHooks.count.HP_intif_rodex_checkhasnew_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_checkhasnew_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_rodex_checkhasnew_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_intif_rodex_updatemail(struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_intif_rodex_updatemail_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, uint8 *opentype, int8 *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &mail_id, &opentype, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.rodex_updatemail(sd, mail_id, opentype, flag); + } + if (HPMHooks.count.HP_intif_rodex_updatemail_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 mail_id, uint8 opentype, int8 flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_updatemail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_rodex_updatemail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, mail_id, opentype, flag); } } return retVal___; } -void HP_intif_pWisMessage(int fd) { +int HP_intif_rodex_sendmail(struct rodex_message *msg) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pWisMessage_pre ) { + int retVal___ = 0; + if (HPMHooks.count.HP_intif_rodex_sendmail_pre > 0) { + int (*preHookFunc) (struct rodex_message **msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_sendmail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_rodex_sendmail_pre[hIndex].func; + retVal___ = preHookFunc(&msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.rodex_sendmail(msg); + } + if (HPMHooks.count.HP_intif_rodex_sendmail_post > 0) { + int (*postHookFunc) (int retVal___, struct rodex_message *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_sendmail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_rodex_sendmail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, msg); + } + } + return retVal___; +} +int HP_intif_rodex_checkname(struct map_session_data *sd, const char *name) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_intif_rodex_checkname_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **name); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_checkname_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_rodex_checkname_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &name); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.rodex_checkname(sd, name); + } + if (HPMHooks.count.HP_intif_rodex_checkname_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_rodex_checkname_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_rodex_checkname_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, name); + } + } + return retVal___; +} +void HP_intif_pGetZenyAck(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pGetZenyAck_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisMessage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_intif_pWisMessage_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetZenyAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pGetZenyAck_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.intif.pWisMessage(fd); + HPMHooks.source.intif.pGetZenyAck(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); + if (HPMHooks.count.HP_intif_pGetZenyAck_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetZenyAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pGetZenyAck_post[hIndex].func; + postHookFunc(fd); } } return; } -void HP_intif_pWisEnd(int fd) { +void HP_intif_pGetItemsAck(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pWisEnd_pre ) { + if (HPMHooks.count.HP_intif_pGetItemsAck_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisEnd_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_intif_pWisEnd_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetItemsAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pGetItemsAck_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.intif.pWisEnd(fd); + HPMHooks.source.intif.pGetItemsAck(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); + if (HPMHooks.count.HP_intif_pGetItemsAck_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGetItemsAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pGetItemsAck_post[hIndex].func; + postHookFunc(fd); } } return; } -int HP_intif_pWisToGM_sub(struct map_session_data *sd, va_list va) { +int HP_intif_clan_kickoffline(int clan_id, int kick_interval) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_intif_pWisToGM_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list va); + if (HPMHooks.count.HP_intif_clan_kickoffline_pre > 0) { + int (*preHookFunc) (int *clan_id, int *kick_interval); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_clan_kickoffline_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_clan_kickoffline_pre[hIndex].func; + retVal___ = preHookFunc(&clan_id, &kick_interval); } - if( *HPMforce_return ) { + 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); + retVal___ = HPMHooks.source.intif.clan_kickoffline(clan_id, kick_interval); } - 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); + if (HPMHooks.count.HP_intif_clan_kickoffline_post > 0) { + int (*postHookFunc) (int retVal___, int clan_id, int kick_interval); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_clan_kickoffline_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_clan_kickoffline_post[hIndex].func; + retVal___ = postHookFunc(retVal___, clan_id, kick_interval); } } return retVal___; } -void HP_intif_pWisToGM(int fd) { +int HP_intif_clan_membercount(int clan_id, int kick_interval) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pWisToGM_pre ) { - void (*preHookFunc) (int *fd); + int retVal___ = 0; + if (HPMHooks.count.HP_intif_clan_membercount_pre > 0) { + int (*preHookFunc) (int *clan_id, int *kick_interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pWisToGM_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_intif_pWisToGM_pre[hIndex].func; - preHookFunc(&fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_clan_membercount_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_clan_membercount_pre[hIndex].func; + retVal___ = preHookFunc(&clan_id, &kick_interval); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.intif.clan_membercount(clan_id, kick_interval); + } + if (HPMHooks.count.HP_intif_clan_membercount_post > 0) { + int (*postHookFunc) (int retVal___, int clan_id, int kick_interval); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_clan_membercount_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_clan_membercount_post[hIndex].func; + retVal___ = postHookFunc(retVal___, clan_id, kick_interval); + } + } + 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 > 0) { + void (*preHookFunc) (int *u_fd, int *aid, int *group_lv, char **query); + *HPMforce_return = false; + 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 > 0) { + 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___ = 0; + if (HPMHooks.count.HP_intif_CheckForCharServer_pre > 0) { + int (*preHookFunc) (void); + *HPMforce_return = false; + 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 > 0) { + 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_achievements_request(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_achievements_request_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_achievements_request_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_achievements_request_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.achievements_request(sd); + } + if (HPMHooks.count.HP_intif_achievements_request_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_achievements_request_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_achievements_request_post[hIndex].func; + postHookFunc(sd); } - if( *HPMforce_return ) { + } + return; +} +void HP_intif_achievements_save(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_achievements_save_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_achievements_save_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_achievements_save_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.intif.pWisToGM(fd); + HPMHooks.source.intif.achievements_save(sd); } - 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); + if (HPMHooks.count.HP_intif_achievements_save_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_achievements_save_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_achievements_save_post[hIndex].func; + postHookFunc(sd); } } return; } void HP_intif_pRegisters(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pRegisters_pre ) { + if (HPMHooks.count.HP_intif_pRegisters_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRegisters_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32625,25 +39655,51 @@ void HP_intif_pRegisters(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pRegisters_post > 0) { + 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); + postHookFunc(fd); + } + } + return; +} +void HP_intif_pAccountStorage(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pAccountStorage_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorage_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pAccountStorage_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pAccountStorage(fd); + } + if (HPMHooks.count.HP_intif_pAccountStorage_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorage_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pAccountStorage_post[hIndex].func; + postHookFunc(fd); } } return; } void HP_intif_pChangeNameOk(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pChangeNameOk_pre ) { + if (HPMHooks.count.HP_intif_pChangeNameOk_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pChangeNameOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32651,25 +39707,25 @@ void HP_intif_pChangeNameOk(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pChangeNameOk_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pMessageToFD(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMessageToFD_pre ) { + if (HPMHooks.count.HP_intif_pMessageToFD_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMessageToFD_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32677,25 +39733,51 @@ void HP_intif_pMessageToFD(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pMessageToFD_post > 0) { + 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); + postHookFunc(fd); + } + } + return; +} +void HP_intif_pAccountStorageSaveAck(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pAccountStorageSaveAck_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorageSaveAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pAccountStorageSaveAck_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pAccountStorageSaveAck(fd); + } + if (HPMHooks.count.HP_intif_pAccountStorageSaveAck_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAccountStorageSaveAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pAccountStorageSaveAck_post[hIndex].func; + postHookFunc(fd); } } return; } void HP_intif_pLoadGuildStorage(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pLoadGuildStorage_pre ) { + if (HPMHooks.count.HP_intif_pLoadGuildStorage_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pLoadGuildStorage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32703,25 +39785,25 @@ void HP_intif_pLoadGuildStorage(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pLoadGuildStorage_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pSaveGuildStorage(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pSaveGuildStorage_pre ) { + if (HPMHooks.count.HP_intif_pSaveGuildStorage_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveGuildStorage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32729,25 +39811,25 @@ void HP_intif_pSaveGuildStorage(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pSaveGuildStorage_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pPartyCreated(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyCreated_pre ) { + if (HPMHooks.count.HP_intif_pPartyCreated_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyCreated_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32755,25 +39837,25 @@ void HP_intif_pPartyCreated(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pPartyCreated_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pPartyInfo(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyInfo_pre ) { + if (HPMHooks.count.HP_intif_pPartyInfo_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32781,25 +39863,25 @@ void HP_intif_pPartyInfo(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pPartyInfo_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pPartyMemberAdded(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyMemberAdded_pre ) { + if (HPMHooks.count.HP_intif_pPartyMemberAdded_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberAdded_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32807,25 +39889,25 @@ void HP_intif_pPartyMemberAdded(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pPartyMemberAdded_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pPartyOptionChanged(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyOptionChanged_pre ) { + if (HPMHooks.count.HP_intif_pPartyOptionChanged_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyOptionChanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32833,25 +39915,25 @@ void HP_intif_pPartyOptionChanged(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pPartyOptionChanged_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pPartyMemberWithdraw(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre ) { + if (HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMemberWithdraw_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32859,25 +39941,25 @@ void HP_intif_pPartyMemberWithdraw(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pPartyMemberWithdraw_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pPartyMove(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyMove_pre ) { + if (HPMHooks.count.HP_intif_pPartyMove_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyMove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32885,25 +39967,25 @@ void HP_intif_pPartyMove(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pPartyMove_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pPartyBroken(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pPartyBroken_pre ) { + if (HPMHooks.count.HP_intif_pPartyBroken_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pPartyBroken_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32911,51 +39993,25 @@ void HP_intif_pPartyBroken(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pPartyBroken_post > 0) { + 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); - *HPMforce_return = false; - 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildCreated(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildCreated_pre ) { + if (HPMHooks.count.HP_intif_pGuildCreated_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCreated_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32963,25 +40019,25 @@ void HP_intif_pGuildCreated(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildCreated_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildInfo(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildInfo_pre ) { + if (HPMHooks.count.HP_intif_pGuildInfo_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildInfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -32989,25 +40045,25 @@ void HP_intif_pGuildInfo(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildInfo_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildMemberAdded(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildMemberAdded_pre ) { + if (HPMHooks.count.HP_intif_pGuildMemberAdded_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberAdded_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33015,25 +40071,25 @@ void HP_intif_pGuildMemberAdded(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildMemberAdded_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildMemberWithdraw(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre ) { + if (HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberWithdraw_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33041,25 +40097,25 @@ void HP_intif_pGuildMemberWithdraw(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildMemberWithdraw_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildMemberInfoShort(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre ) { + if (HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoShort_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33067,25 +40123,25 @@ void HP_intif_pGuildMemberInfoShort(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildMemberInfoShort_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildBroken(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildBroken_pre ) { + if (HPMHooks.count.HP_intif_pGuildBroken_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBroken_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33093,51 +40149,25 @@ void HP_intif_pGuildBroken(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildBroken_post > 0) { + 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); - *HPMforce_return = false; - 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildBasicInfoChanged(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre ) { + if (HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildBasicInfoChanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33145,25 +40175,25 @@ void HP_intif_pGuildBasicInfoChanged(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildBasicInfoChanged_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildMemberInfoChanged(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre ) { + if (HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMemberInfoChanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33171,25 +40201,25 @@ void HP_intif_pGuildMemberInfoChanged(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildMemberInfoChanged_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildPosition(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildPosition_pre ) { + if (HPMHooks.count.HP_intif_pGuildPosition_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildPosition_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33197,25 +40227,25 @@ void HP_intif_pGuildPosition(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildPosition_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildSkillUp(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildSkillUp_pre ) { + if (HPMHooks.count.HP_intif_pGuildSkillUp_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildSkillUp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33223,25 +40253,25 @@ void HP_intif_pGuildSkillUp(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildSkillUp_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildAlliance(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildAlliance_pre ) { + if (HPMHooks.count.HP_intif_pGuildAlliance_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildAlliance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33249,25 +40279,25 @@ void HP_intif_pGuildAlliance(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildAlliance_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildNotice(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildNotice_pre ) { + if (HPMHooks.count.HP_intif_pGuildNotice_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildNotice_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33275,25 +40305,25 @@ void HP_intif_pGuildNotice(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildNotice_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildEmblem(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildEmblem_pre ) { + if (HPMHooks.count.HP_intif_pGuildEmblem_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildEmblem_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33301,25 +40331,25 @@ void HP_intif_pGuildEmblem(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildEmblem_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildCastleDataLoad(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre ) { + if (HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildCastleDataLoad_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33327,25 +40357,25 @@ void HP_intif_pGuildCastleDataLoad(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildCastleDataLoad_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pGuildMasterChanged(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pGuildMasterChanged_pre ) { + if (HPMHooks.count.HP_intif_pGuildMasterChanged_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pGuildMasterChanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33353,25 +40383,25 @@ void HP_intif_pGuildMasterChanged(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pGuildMasterChanged_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pQuestLog(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pQuestLog_pre ) { + if (HPMHooks.count.HP_intif_pQuestLog_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestLog_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33379,25 +40409,25 @@ void HP_intif_pQuestLog(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pQuestLog_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pQuestSave(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pQuestSave_pre ) { + if (HPMHooks.count.HP_intif_pQuestSave_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pQuestSave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33405,25 +40435,25 @@ void HP_intif_pQuestSave(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pQuestSave_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pMailInboxReceived(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailInboxReceived_pre ) { + if (HPMHooks.count.HP_intif_pMailInboxReceived_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailInboxReceived_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33431,25 +40461,25 @@ void HP_intif_pMailInboxReceived(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pMailInboxReceived_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pMailNew(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailNew_pre ) { + if (HPMHooks.count.HP_intif_pMailNew_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailNew_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33457,25 +40487,25 @@ void HP_intif_pMailNew(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pMailNew_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pMailGetAttach(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailGetAttach_pre ) { + if (HPMHooks.count.HP_intif_pMailGetAttach_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailGetAttach_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33483,25 +40513,25 @@ void HP_intif_pMailGetAttach(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pMailGetAttach_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pMailDelete(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailDelete_pre ) { + if (HPMHooks.count.HP_intif_pMailDelete_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailDelete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33509,25 +40539,25 @@ void HP_intif_pMailDelete(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pMailDelete_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pMailReturn(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailReturn_pre ) { + if (HPMHooks.count.HP_intif_pMailReturn_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailReturn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33535,25 +40565,25 @@ void HP_intif_pMailReturn(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pMailReturn_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pMailSend(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMailSend_pre ) { + if (HPMHooks.count.HP_intif_pMailSend_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMailSend_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33561,25 +40591,25 @@ void HP_intif_pMailSend(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pMailSend_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pAuctionResults(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionResults_pre ) { + if (HPMHooks.count.HP_intif_pAuctionResults_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionResults_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33587,25 +40617,25 @@ void HP_intif_pAuctionResults(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pAuctionResults_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pAuctionRegister(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionRegister_pre ) { + if (HPMHooks.count.HP_intif_pAuctionRegister_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionRegister_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33613,25 +40643,25 @@ void HP_intif_pAuctionRegister(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pAuctionRegister_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pAuctionCancel(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionCancel_pre ) { + if (HPMHooks.count.HP_intif_pAuctionCancel_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionCancel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33639,25 +40669,25 @@ void HP_intif_pAuctionCancel(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pAuctionCancel_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pAuctionClose(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionClose_pre ) { + if (HPMHooks.count.HP_intif_pAuctionClose_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionClose_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33665,25 +40695,25 @@ void HP_intif_pAuctionClose(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pAuctionClose_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pAuctionMessage(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionMessage_pre ) { + if (HPMHooks.count.HP_intif_pAuctionMessage_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionMessage_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33691,25 +40721,25 @@ void HP_intif_pAuctionMessage(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pAuctionMessage_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pAuctionBid(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pAuctionBid_pre ) { + if (HPMHooks.count.HP_intif_pAuctionBid_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAuctionBid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33717,25 +40747,25 @@ void HP_intif_pAuctionBid(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pAuctionBid_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pItembound_ack(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pItembound_ack_pre ) { + if (HPMHooks.count.HP_intif_pItembound_ack_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pItembound_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pItembound_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_pItembound_ack_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33743,25 +40773,25 @@ void HP_intif_pItembound_ack(int fd) { { HPMHooks.source.intif.pItembound_ack(fd); } - if( HPMHooks.count.HP_intif_pItembound_ack_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pItembound_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_intif_pItembound_ack_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pItembound_ack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_pItembound_ack_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_intif_pMercenaryReceived(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMercenaryReceived_pre ) { + if (HPMHooks.count.HP_intif_pMercenaryReceived_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryReceived_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33769,25 +40799,25 @@ void HP_intif_pMercenaryReceived(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pMercenaryReceived_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pMercenaryDeleted(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMercenaryDeleted_pre ) { + if (HPMHooks.count.HP_intif_pMercenaryDeleted_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenaryDeleted_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33795,25 +40825,25 @@ void HP_intif_pMercenaryDeleted(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pMercenaryDeleted_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pMercenarySaved(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pMercenarySaved_pre ) { + if (HPMHooks.count.HP_intif_pMercenarySaved_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pMercenarySaved_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33821,25 +40851,25 @@ void HP_intif_pMercenarySaved(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pMercenarySaved_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pElementalReceived(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pElementalReceived_pre ) { + if (HPMHooks.count.HP_intif_pElementalReceived_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalReceived_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33847,25 +40877,25 @@ void HP_intif_pElementalReceived(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pElementalReceived_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pElementalDeleted(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pElementalDeleted_pre ) { + if (HPMHooks.count.HP_intif_pElementalDeleted_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalDeleted_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33873,25 +40903,25 @@ void HP_intif_pElementalDeleted(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pElementalDeleted_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pElementalSaved(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pElementalSaved_pre ) { + if (HPMHooks.count.HP_intif_pElementalSaved_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pElementalSaved_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33899,25 +40929,25 @@ void HP_intif_pElementalSaved(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pElementalSaved_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pCreatePet(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pCreatePet_pre ) { + if (HPMHooks.count.HP_intif_pCreatePet_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreatePet_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33925,25 +40955,25 @@ void HP_intif_pCreatePet(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pCreatePet_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pRecvPetData(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pRecvPetData_pre ) { + if (HPMHooks.count.HP_intif_pRecvPetData_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvPetData_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33951,25 +40981,25 @@ void HP_intif_pRecvPetData(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pRecvPetData_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pSavePetOk(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pSavePetOk_pre ) { + if (HPMHooks.count.HP_intif_pSavePetOk_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSavePetOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -33977,25 +41007,25 @@ void HP_intif_pSavePetOk(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pSavePetOk_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pDeletePetOk(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pDeletePetOk_pre ) { + if (HPMHooks.count.HP_intif_pDeletePetOk_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeletePetOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34003,25 +41033,25 @@ void HP_intif_pDeletePetOk(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pDeletePetOk_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pCreateHomunculus(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pCreateHomunculus_pre ) { + if (HPMHooks.count.HP_intif_pCreateHomunculus_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pCreateHomunculus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34029,25 +41059,25 @@ void HP_intif_pCreateHomunculus(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pCreateHomunculus_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pRecvHomunculusData(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pRecvHomunculusData_pre ) { + if (HPMHooks.count.HP_intif_pRecvHomunculusData_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvHomunculusData_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34055,25 +41085,25 @@ void HP_intif_pRecvHomunculusData(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pRecvHomunculusData_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pSaveHomunculusOk(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pSaveHomunculusOk_pre ) { + if (HPMHooks.count.HP_intif_pSaveHomunculusOk_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pSaveHomunculusOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34081,25 +41111,25 @@ void HP_intif_pSaveHomunculusOk(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pSaveHomunculusOk_post > 0) { + 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); + postHookFunc(fd); } } return; } void HP_intif_pDeleteHomunculusOk(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre ) { + if (HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_intif_pDeleteHomunculusOk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34107,26 +41137,182 @@ void HP_intif_pDeleteHomunculusOk(int fd) { { 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++ ) { + if (HPMHooks.count.HP_intif_pDeleteHomunculusOk_post > 0) { + 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); + postHookFunc(fd); + } + } + return; +} +void HP_intif_pRequestRodexOpenInbox(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pRequestRodexOpenInbox_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRequestRodexOpenInbox_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pRequestRodexOpenInbox_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRequestRodexOpenInbox(fd); + } + if (HPMHooks.count.HP_intif_pRequestRodexOpenInbox_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRequestRodexOpenInbox_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pRequestRodexOpenInbox_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_intif_pRodexHasNew(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pRodexHasNew_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexHasNew_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pRodexHasNew_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRodexHasNew(fd); + } + if (HPMHooks.count.HP_intif_pRodexHasNew_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexHasNew_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pRodexHasNew_post[hIndex].func; + postHookFunc(fd); } } return; } -/* ircbot */ +void HP_intif_pRodexSendMail(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pRodexSendMail_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexSendMail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pRodexSendMail_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRodexSendMail(fd); + } + if (HPMHooks.count.HP_intif_pRodexSendMail_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexSendMail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pRodexSendMail_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_intif_pRodexCheckName(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pRodexCheckName_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexCheckName_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pRodexCheckName_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRodexCheckName(fd); + } + if (HPMHooks.count.HP_intif_pRodexCheckName_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRodexCheckName_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pRodexCheckName_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_intif_pRecvClanMemberAction(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pRecvClanMemberAction_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvClanMemberAction_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pRecvClanMemberAction_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pRecvClanMemberAction(fd); + } + if (HPMHooks.count.HP_intif_pRecvClanMemberAction_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pRecvClanMemberAction_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pRecvClanMemberAction_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +void HP_intif_pAchievementsLoad(int fd) { + int hIndex = 0; + if (HPMHooks.count.HP_intif_pAchievementsLoad_pre > 0) { + void (*preHookFunc) (int *fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAchievementsLoad_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_intif_pAchievementsLoad_pre[hIndex].func; + preHookFunc(&fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.intif.pAchievementsLoad(fd); + } + if (HPMHooks.count.HP_intif_pAchievementsLoad_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_pAchievementsLoad_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_intif_pAchievementsLoad_post[hIndex].func; + postHookFunc(fd); + } + } + return; +} +/* irc_bot_interface */ void HP_ircbot_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_init_pre ) { + if (HPMHooks.count.HP_ircbot_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_ircbot_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34134,25 +41320,25 @@ void HP_ircbot_init(bool minimal) { { HPMHooks.source.ircbot.init(minimal); } - if( HPMHooks.count.HP_ircbot_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_post; hIndex++ ) { + if (HPMHooks.count.HP_ircbot_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_ircbot_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_ircbot_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_final_pre ) { + if (HPMHooks.count.HP_ircbot_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_ircbot_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34160,9 +41346,9 @@ void HP_ircbot_final(void) { { HPMHooks.source.ircbot.final(); } - if( HPMHooks.count.HP_ircbot_final_post ) { + if (HPMHooks.count.HP_ircbot_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_ircbot_final_post[hIndex].func; postHookFunc(); } @@ -34172,14 +41358,14 @@ void HP_ircbot_final(void) { int HP_ircbot_parse(int fd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_ircbot_parse_pre ) { + if (HPMHooks.count.HP_ircbot_parse_pre > 0) { int (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34187,25 +41373,25 @@ int HP_ircbot_parse(int fd) { { 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++ ) { + if (HPMHooks.count.HP_ircbot_parse_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_ircbot_parse_sub_pre > 0) { + void (*preHookFunc) (int *fd, char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_sub_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34213,25 +41399,25 @@ void HP_ircbot_parse_sub(int fd, char *str) { { 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++ ) { + if (HPMHooks.count.HP_ircbot_parse_sub_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_ircbot_parse_source_pre > 0) { + void (*preHookFunc) (char **source, char **nick, char **ident, char **host); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_source_pre; hIndex++ ) { + 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); + preHookFunc(&source, &nick, &ident, &host); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34239,9 +41425,9 @@ void HP_ircbot_parse_source(char *source, char *nick, char *ident, char *host) { { HPMHooks.source.ircbot.parse_source(source, nick, ident, host); } - if( HPMHooks.count.HP_ircbot_parse_source_post ) { + if (HPMHooks.count.HP_ircbot_parse_source_post > 0) { void (*postHookFunc) (char *source, char *nick, char *ident, char *host); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_parse_source_post; hIndex++ ) { + 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); } @@ -34251,14 +41437,14 @@ void HP_ircbot_parse_source(char *source, char *nick, char *ident, char *host) { 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); + if (HPMHooks.count.HP_ircbot_func_search_pre > 0) { + struct irc_func* (*preHookFunc) (char **function_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_func_search_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&function_name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34266,9 +41452,9 @@ struct irc_func* HP_ircbot_func_search(char *function_name) { { retVal___ = HPMHooks.source.ircbot.func_search(function_name); } - if( HPMHooks.count.HP_ircbot_func_search_post ) { + if (HPMHooks.count.HP_ircbot_func_search_post > 0) { struct irc_func* (*postHookFunc) (struct irc_func* retVal___, char *function_name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_func_search_post; hIndex++ ) { + 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); } @@ -34278,14 +41464,14 @@ struct irc_func* HP_ircbot_func_search(char *function_name) { int HP_ircbot_connect_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_ircbot_connect_timer_pre ) { + if (HPMHooks.count.HP_ircbot_connect_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_connect_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34293,11 +41479,11 @@ int HP_ircbot_connect_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.ircbot.connect_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_ircbot_connect_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_connect_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_ircbot_connect_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -34305,14 +41491,14 @@ int HP_ircbot_connect_timer(int tid, int64 tick, int id, intptr_t data) { int HP_ircbot_identify_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_ircbot_identify_timer_pre ) { + if (HPMHooks.count.HP_ircbot_identify_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_identify_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34320,11 +41506,11 @@ int HP_ircbot_identify_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.ircbot.identify_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_ircbot_identify_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_identify_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_ircbot_identify_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -34332,14 +41518,14 @@ int HP_ircbot_identify_timer(int tid, int64 tick, int id, intptr_t data) { int HP_ircbot_join_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_ircbot_join_timer_pre ) { + if (HPMHooks.count.HP_ircbot_join_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_join_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34347,51 +41533,104 @@ int HP_ircbot_join_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.ircbot.join_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_ircbot_join_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_join_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_ircbot_join_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } -void HP_ircbot_send(char *str) { +int HP_ircbot_queue_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_send_pre ) { - void (*preHookFunc) (char *str); + int retVal___ = 0; + if (HPMHooks.count.HP_ircbot_queue_timer_pre > 0) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_ircbot_send_pre[hIndex].func; - preHookFunc(str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_timer_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ircbot_queue_timer_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.ircbot.queue_timer(tid, tick, id, data); + } + if (HPMHooks.count.HP_ircbot_queue_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_timer_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ircbot_queue_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); + } + } + return retVal___; +} +void HP_ircbot_queue(char *str) { + int hIndex = 0; + if (HPMHooks.count.HP_ircbot_queue_pre > 0) { + void (*preHookFunc) (char **str); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ircbot_queue_pre[hIndex].func; + preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.ircbot.send(str); + HPMHooks.source.ircbot.queue(str); } - if( HPMHooks.count.HP_ircbot_send_post ) { + if (HPMHooks.count.HP_ircbot_queue_post > 0) { void (*postHookFunc) (char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_ircbot_send_post[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_queue_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ircbot_queue_post[hIndex].func; postHookFunc(str); } } return; } +void HP_ircbot_send(char *str, bool force) { + int hIndex = 0; + if (HPMHooks.count.HP_ircbot_send_pre > 0) { + void (*preHookFunc) (char **str, bool *force); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ircbot_send_pre[hIndex].func; + preHookFunc(&str, &force); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.send(str, force); + } + if (HPMHooks.count.HP_ircbot_send_post > 0) { + void (*postHookFunc) (char *str, bool force); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_send_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ircbot_send_post[hIndex].func; + postHookFunc(str, force); + } + } + return; +} void HP_ircbot_relay(const char *name, const char *msg) { int hIndex = 0; - if( HPMHooks.count.HP_ircbot_relay_pre ) { - void (*preHookFunc) (const char *name, const char *msg); + if (HPMHooks.count.HP_ircbot_relay_pre > 0) { + void (*preHookFunc) (const char **name, const char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_ircbot_relay_pre[hIndex].func; - preHookFunc(name, msg); + preHookFunc(&name, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34399,9 +41638,9 @@ void HP_ircbot_relay(const char *name, const char *msg) { { HPMHooks.source.ircbot.relay(name, msg); } - if( HPMHooks.count.HP_ircbot_relay_post ) { + if (HPMHooks.count.HP_ircbot_relay_post > 0) { void (*postHookFunc) (const char *name, const char *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_relay_post; hIndex++) { postHookFunc = HPMHooks.list.HP_ircbot_relay_post[hIndex].func; postHookFunc(name, msg); } @@ -34410,14 +41649,14 @@ void HP_ircbot_relay(const char *name, const char *msg) { } 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); + if (HPMHooks.count.HP_ircbot_pong_pre > 0) { + void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_pong_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &cmd, &source, &target, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34425,25 +41664,25 @@ void HP_ircbot_pong(int fd, char *cmd, char *source, char *target, char *msg) { { 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++ ) { + if (HPMHooks.count.HP_ircbot_pong_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_ircbot_privmsg_pre > 0) { + void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &cmd, &source, &target, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34451,25 +41690,51 @@ void HP_ircbot_privmsg(int fd, char *cmd, char *source, char *target, char *msg) { 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++ ) { + if (HPMHooks.count.HP_ircbot_privmsg_post > 0) { + 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); + postHookFunc(fd, cmd, source, target, msg); + } + } + return; +} +void HP_ircbot_privmsg_ctcp(int fd, char *cmd, char *source, char *target, char *msg) { + int hIndex = 0; + if (HPMHooks.count.HP_ircbot_privmsg_ctcp_pre > 0) { + void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_ctcp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_ircbot_privmsg_ctcp_pre[hIndex].func; + preHookFunc(&fd, &cmd, &source, &target, &msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.ircbot.privmsg_ctcp(fd, cmd, source, target, msg); + } + if (HPMHooks.count.HP_ircbot_privmsg_ctcp_post > 0) { + void (*postHookFunc) (int fd, char *cmd, char *source, char *target, char *msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_privmsg_ctcp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_ircbot_privmsg_ctcp_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); + if (HPMHooks.count.HP_ircbot_userjoin_pre > 0) { + void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userjoin_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &cmd, &source, &target, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34477,25 +41742,25 @@ void HP_ircbot_userjoin(int fd, char *cmd, char *source, char *target, char *msg { 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++ ) { + if (HPMHooks.count.HP_ircbot_userjoin_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_ircbot_userleave_pre > 0) { + void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_userleave_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &cmd, &source, &target, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34503,25 +41768,25 @@ void HP_ircbot_userleave(int fd, char *cmd, char *source, char *target, char *ms { 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++ ) { + if (HPMHooks.count.HP_ircbot_userleave_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_ircbot_usernick_pre > 0) { + void (*preHookFunc) (int *fd, char **cmd, char **source, char **target, char **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_ircbot_usernick_pre; hIndex++ ) { + 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); + preHookFunc(&fd, &cmd, &source, &target, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34529,26 +41794,26 @@ void HP_ircbot_usernick(int fd, char *cmd, char *source, char *target, char *msg { 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++ ) { + if (HPMHooks.count.HP_ircbot_usernick_post > 0) { + 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); + postHookFunc(fd, cmd, source, target, msg); } } return; } -/* itemdb */ +/* itemdb_interface */ void HP_itemdb_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_init_pre ) { + if (HPMHooks.count.HP_itemdb_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34556,25 +41821,25 @@ void HP_itemdb_init(bool minimal) { { HPMHooks.source.itemdb.init(minimal); } - if( HPMHooks.count.HP_itemdb_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_itemdb_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_final_pre ) { + if (HPMHooks.count.HP_itemdb_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34582,9 +41847,9 @@ void HP_itemdb_final(void) { { HPMHooks.source.itemdb.final(); } - if( HPMHooks.count.HP_itemdb_final_post ) { + if (HPMHooks.count.HP_itemdb_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_final_post[hIndex].func; postHookFunc(); } @@ -34593,14 +41858,14 @@ void HP_itemdb_final(void) { } void HP_itemdb_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_reload_pre ) { + if (HPMHooks.count.HP_itemdb_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34608,9 +41873,9 @@ void HP_itemdb_reload(void) { { HPMHooks.source.itemdb.reload(); } - if( HPMHooks.count.HP_itemdb_reload_post ) { + if (HPMHooks.count.HP_itemdb_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_reload_post[hIndex].func; postHookFunc(); } @@ -34619,14 +41884,14 @@ void HP_itemdb_reload(void) { } void HP_itemdb_name_constants(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_name_constants_pre ) { + if (HPMHooks.count.HP_itemdb_name_constants_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name_constants_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34634,9 +41899,9 @@ void HP_itemdb_name_constants(void) { { HPMHooks.source.itemdb.name_constants(); } - if( HPMHooks.count.HP_itemdb_name_constants_post ) { + if (HPMHooks.count.HP_itemdb_name_constants_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name_constants_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name_constants_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_name_constants_post[hIndex].func; postHookFunc(); } @@ -34645,14 +41910,14 @@ void HP_itemdb_name_constants(void) { } void HP_itemdb_read_groups(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_read_groups_pre ) { + if (HPMHooks.count.HP_itemdb_read_groups_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_groups_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34660,9 +41925,9 @@ void HP_itemdb_read_groups(void) { { HPMHooks.source.itemdb.read_groups(); } - if( HPMHooks.count.HP_itemdb_read_groups_post ) { + if (HPMHooks.count.HP_itemdb_read_groups_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_groups_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_groups_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_read_groups_post[hIndex].func; postHookFunc(); } @@ -34671,14 +41936,14 @@ void HP_itemdb_read_groups(void) { } void HP_itemdb_read_chains(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_read_chains_pre ) { + if (HPMHooks.count.HP_itemdb_read_chains_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_chains_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34686,9 +41951,9 @@ void HP_itemdb_read_chains(void) { { HPMHooks.source.itemdb.read_chains(); } - if( HPMHooks.count.HP_itemdb_read_chains_post ) { + if (HPMHooks.count.HP_itemdb_read_chains_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_chains_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_chains_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_read_chains_post[hIndex].func; postHookFunc(); } @@ -34697,14 +41962,14 @@ void HP_itemdb_read_chains(void) { } void HP_itemdb_read_packages(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_read_packages_pre ) { + if (HPMHooks.count.HP_itemdb_read_packages_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_packages_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34712,25 +41977,51 @@ void HP_itemdb_read_packages(void) { { HPMHooks.source.itemdb.read_packages(); } - if( HPMHooks.count.HP_itemdb_read_packages_post ) { + if (HPMHooks.count.HP_itemdb_read_packages_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_packages_post; hIndex++ ) { + 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_read_options(void) { + int hIndex = 0; + if (HPMHooks.count.HP_itemdb_read_options_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_options_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_options_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.read_options(); + } + if (HPMHooks.count.HP_itemdb_read_options_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_options_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_options_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); + if (HPMHooks.count.HP_itemdb_write_cached_packages_pre > 0) { + void (*preHookFunc) (const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_write_cached_packages_pre; hIndex++ ) { + 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); + preHookFunc(&config_filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -34738,9 +42029,9 @@ void HP_itemdb_write_cached_packages(const char *config_filename) { { HPMHooks.source.itemdb.write_cached_packages(config_filename); } - if( HPMHooks.count.HP_itemdb_write_cached_packages_post ) { + if (HPMHooks.count.HP_itemdb_write_cached_packages_post > 0) { void (*postHookFunc) (const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_write_cached_packages_post; hIndex++ ) { + 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); } @@ -34750,14 +42041,14 @@ void HP_itemdb_write_cached_packages(const char *config_filename) { bool HP_itemdb_read_cached_packages(const char *config_filename) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_itemdb_read_cached_packages_pre ) { - bool (*preHookFunc) (const char *config_filename); + if (HPMHooks.count.HP_itemdb_read_cached_packages_pre > 0) { + bool (*preHookFunc) (const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_cached_packages_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&config_filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34765,9 +42056,9 @@ bool HP_itemdb_read_cached_packages(const char *config_filename) { { retVal___ = HPMHooks.source.itemdb.read_cached_packages(config_filename); } - if( HPMHooks.count.HP_itemdb_read_cached_packages_post ) { + if (HPMHooks.count.HP_itemdb_read_cached_packages_post > 0) { bool (*postHookFunc) (bool retVal___, const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_cached_packages_post; hIndex++ ) { + 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); } @@ -34777,14 +42068,14 @@ bool HP_itemdb_read_cached_packages(const char *config_filename) { 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); + if (HPMHooks.count.HP_itemdb_name2id_pre > 0) { + struct item_data* (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_name2id_pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34792,9 +42083,9 @@ struct item_data* HP_itemdb_name2id(const char *str) { { retVal___ = HPMHooks.source.itemdb.name2id(str); } - if( HPMHooks.count.HP_itemdb_name2id_post ) { + if (HPMHooks.count.HP_itemdb_name2id_post > 0) { struct item_data* (*postHookFunc) (struct item_data* retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_name2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_name2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -34804,14 +42095,14 @@ struct item_data* HP_itemdb_name2id(const char *str) { 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); + if (HPMHooks.count.HP_itemdb_search_name_pre > 0) { + struct item_data* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34819,26 +42110,26 @@ struct item_data* HP_itemdb_search_name(const char *name) { { retVal___ = HPMHooks.source.itemdb.search_name(name); } - if( HPMHooks.count.HP_itemdb_search_name_post ) { + if (HPMHooks.count.HP_itemdb_search_name_post > 0) { struct item_data* (*postHookFunc) (struct item_data* retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_post; hIndex++ ) { + 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 HP_itemdb_search_name_array(struct item_data **data, const int size, const char *str, enum item_name_search_flag flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_search_name_array_pre ) { - int (*preHookFunc) (struct item_data **data, int *size, const char *str, int *flag); + if (HPMHooks.count.HP_itemdb_search_name_array_pre > 0) { + int (*preHookFunc) (struct item_data ***data, const int *size, const char **str, enum item_name_search_flag *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_name_array_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&data, &size, &str, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34846,11 +42137,11 @@ int HP_itemdb_search_name_array(struct item_data **data, int size, const char *s { 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++ ) { + if (HPMHooks.count.HP_itemdb_search_name_array_post > 0) { + int (*postHookFunc) (int retVal___, struct item_data **data, const int size, const char *str, enum item_name_search_flag 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); + retVal___ = postHookFunc(retVal___, data, size, str, flag); } } return retVal___; @@ -34858,14 +42149,14 @@ int HP_itemdb_search_name_array(struct item_data **data, int size, const char *s struct item_data* HP_itemdb_load(int nameid) { int hIndex = 0; struct item_data* retVal___ = NULL; - if( HPMHooks.count.HP_itemdb_load_pre ) { + if (HPMHooks.count.HP_itemdb_load_pre > 0) { struct item_data* (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_load_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34873,11 +42164,11 @@ struct item_data* HP_itemdb_load(int nameid) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_load_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, nameid); } } return retVal___; @@ -34885,14 +42176,14 @@ struct item_data* HP_itemdb_load(int nameid) { struct item_data* HP_itemdb_search(int nameid) { int hIndex = 0; struct item_data* retVal___ = NULL; - if( HPMHooks.count.HP_itemdb_search_pre ) { + if (HPMHooks.count.HP_itemdb_search_pre > 0) { struct item_data* (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34900,11 +42191,11 @@ struct item_data* HP_itemdb_search(int nameid) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_search_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, nameid); } } return retVal___; @@ -34912,14 +42203,14 @@ struct item_data* HP_itemdb_search(int nameid) { struct item_data* HP_itemdb_exists(int nameid) { int hIndex = 0; struct item_data* retVal___ = NULL; - if( HPMHooks.count.HP_itemdb_exists_pre ) { + if (HPMHooks.count.HP_itemdb_exists_pre > 0) { struct item_data* (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_exists_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34927,11 +42218,38 @@ struct item_data* HP_itemdb_exists(int nameid) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_exists_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, nameid); + } + } + return retVal___; +} +struct itemdb_option* HP_itemdb_option_exists(int idx) { + int hIndex = 0; + struct itemdb_option* retVal___ = NULL; + if (HPMHooks.count.HP_itemdb_option_exists_pre > 0) { + struct itemdb_option* (*preHookFunc) (int *idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_option_exists_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_option_exists_pre[hIndex].func; + retVal___ = preHookFunc(&idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.option_exists(idx); + } + if (HPMHooks.count.HP_itemdb_option_exists_post > 0) { + struct itemdb_option* (*postHookFunc) (struct itemdb_option* retVal___, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_option_exists_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_option_exists_post[hIndex].func; + retVal___ = postHookFunc(retVal___, idx); } } return retVal___; @@ -34939,14 +42257,14 @@ struct item_data* HP_itemdb_exists(int nameid) { bool HP_itemdb_in_group(struct item_group *group, int nameid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_itemdb_in_group_pre ) { - bool (*preHookFunc) (struct item_group *group, int *nameid); + if (HPMHooks.count.HP_itemdb_in_group_pre > 0) { + bool (*preHookFunc) (struct item_group **group, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_in_group_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&group, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34954,11 +42272,11 @@ bool HP_itemdb_in_group(struct item_group *group, int nameid) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_in_group_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, group, nameid); } } return retVal___; @@ -34966,14 +42284,14 @@ bool HP_itemdb_in_group(struct item_group *group, int nameid) { int HP_itemdb_group_item(struct item_group *group) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_group_item_pre ) { - int (*preHookFunc) (struct item_group *group); + if (HPMHooks.count.HP_itemdb_group_item_pre > 0) { + int (*preHookFunc) (struct item_group **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_group_item_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -34981,9 +42299,9 @@ int HP_itemdb_group_item(struct item_group *group) { { retVal___ = HPMHooks.source.itemdb.group_item(group); } - if( HPMHooks.count.HP_itemdb_group_item_post ) { + if (HPMHooks.count.HP_itemdb_group_item_post > 0) { int (*postHookFunc) (int retVal___, struct item_group *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_group_item_post; hIndex++ ) { + 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); } @@ -34993,14 +42311,14 @@ int HP_itemdb_group_item(struct item_group *group) { int HP_itemdb_chain_item(unsigned short chain_id, int *rate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_chain_item_pre ) { - int (*preHookFunc) (unsigned short *chain_id, int *rate); + if (HPMHooks.count.HP_itemdb_chain_item_pre > 0) { + int (*preHookFunc) (unsigned short *chain_id, int **rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_chain_item_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&chain_id, &rate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35008,25 +42326,25 @@ int HP_itemdb_chain_item(unsigned short chain_id, int *rate) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_chain_item_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_itemdb_package_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item_package **package); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_package_item_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &package); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35034,9 +42352,9 @@ void HP_itemdb_package_item(struct map_session_data *sd, struct item_package *pa { HPMHooks.source.itemdb.package_item(sd, package); } - if( HPMHooks.count.HP_itemdb_package_item_post ) { + if (HPMHooks.count.HP_itemdb_package_item_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct item_package *package); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_package_item_post; hIndex++ ) { + 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); } @@ -35046,16 +42364,16 @@ void HP_itemdb_package_item(struct map_session_data *sd, struct item_package *pa int HP_itemdb_searchname_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_searchname_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_itemdb_searchname_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35065,12 +42383,12 @@ int HP_itemdb_searchname_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_searchname_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -35079,16 +42397,16 @@ int HP_itemdb_searchname_sub(union DBKey key, struct DBData *data, va_list ap) { int HP_itemdb_searchname_array_sub(union DBKey key, struct DBData data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_searchname_array_sub_pre ) { + if (HPMHooks.count.HP_itemdb_searchname_array_sub_pre > 0) { int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_array_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35098,12 +42416,12 @@ int HP_itemdb_searchname_array_sub(union DBKey key, struct DBData data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchname_array_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_searchname_array_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -35112,14 +42430,14 @@ int HP_itemdb_searchname_array_sub(union DBKey key, struct DBData data, va_list int HP_itemdb_searchrandomid(struct item_group *group) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_searchrandomid_pre ) { - int (*preHookFunc) (struct item_group *group); + if (HPMHooks.count.HP_itemdb_searchrandomid_pre > 0) { + int (*preHookFunc) (struct item_group **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_searchrandomid_pre[hIndex].func; - retVal___ = preHookFunc(group); + retVal___ = preHookFunc(&group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35127,9 +42445,9 @@ int HP_itemdb_searchrandomid(struct item_group *group) { { retVal___ = HPMHooks.source.itemdb.searchrandomid(group); } - if( HPMHooks.count.HP_itemdb_searchrandomid_post ) { + if (HPMHooks.count.HP_itemdb_searchrandomid_post > 0) { int (*postHookFunc) (int retVal___, struct item_group *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_searchrandomid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_searchrandomid_post[hIndex].func; retVal___ = postHookFunc(retVal___, group); } @@ -35139,14 +42457,14 @@ int HP_itemdb_searchrandomid(struct item_group *group) { const char* HP_itemdb_typename(int type) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_itemdb_typename_pre ) { + if (HPMHooks.count.HP_itemdb_typename_pre > 0) { const char* (*preHookFunc) (int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_typename_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35154,25 +42472,25 @@ const char* HP_itemdb_typename(int type) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_typename_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, type); } } return retVal___; } void HP_itemdb_jobmask2mapid(uint64 *bclass, uint64 jobmask) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_jobmask2mapid_pre ) { - void (*preHookFunc) (uint64 *bclass, uint64 *jobmask); + if (HPMHooks.count.HP_itemdb_jobmask2mapid_pre > 0) { + void (*preHookFunc) (uint64 **bclass, uint64 *jobmask); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobmask2mapid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobmask2mapid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_jobmask2mapid_pre[hIndex].func; - preHookFunc(bclass, &jobmask); + preHookFunc(&bclass, &jobmask); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35180,51 +42498,51 @@ void HP_itemdb_jobmask2mapid(uint64 *bclass, uint64 jobmask) { { HPMHooks.source.itemdb.jobmask2mapid(bclass, jobmask); } - if( HPMHooks.count.HP_itemdb_jobmask2mapid_post ) { - void (*postHookFunc) (uint64 *bclass, uint64 *jobmask); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobmask2mapid_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_jobmask2mapid_post > 0) { + void (*postHookFunc) (uint64 *bclass, uint64 jobmask); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobmask2mapid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_jobmask2mapid_post[hIndex].func; - postHookFunc(bclass, &jobmask); + postHookFunc(bclass, jobmask); } } return; } -void HP_itemdb_jobid2mapid(uint64 *bclass, int job_id, bool enable) { +void HP_itemdb_jobid2mapid(uint64 *bclass, int job_class, bool enable) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_jobid2mapid_pre ) { - void (*preHookFunc) (uint64 *bclass, int *job_id, bool *enable); + if (HPMHooks.count.HP_itemdb_jobid2mapid_pre > 0) { + void (*preHookFunc) (uint64 **bclass, int *job_class, bool *enable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_jobid2mapid_pre[hIndex].func; - preHookFunc(bclass, &job_id, &enable); + preHookFunc(&bclass, &job_class, &enable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.itemdb.jobid2mapid(bclass, job_id, enable); + HPMHooks.source.itemdb.jobid2mapid(bclass, job_class, enable); } - if( HPMHooks.count.HP_itemdb_jobid2mapid_post ) { - void (*postHookFunc) (uint64 *bclass, int *job_id, bool *enable); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_jobid2mapid_post > 0) { + void (*postHookFunc) (uint64 *bclass, int job_class, bool enable); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_jobid2mapid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_jobid2mapid_post[hIndex].func; - postHookFunc(bclass, &job_id, &enable); + postHookFunc(bclass, job_class, enable); } } return; } void HP_itemdb_create_dummy_data(void) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_create_dummy_data_pre ) { + if (HPMHooks.count.HP_itemdb_create_dummy_data_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_dummy_data_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35232,9 +42550,9 @@ void HP_itemdb_create_dummy_data(void) { { HPMHooks.source.itemdb.create_dummy_data(); } - if( HPMHooks.count.HP_itemdb_create_dummy_data_post ) { + if (HPMHooks.count.HP_itemdb_create_dummy_data_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_dummy_data_post; hIndex++ ) { + 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(); } @@ -35244,14 +42562,14 @@ void HP_itemdb_create_dummy_data(void) { 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 ) { + if (HPMHooks.count.HP_itemdb_create_item_data_pre > 0) { struct item_data* (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_create_item_data_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35259,11 +42577,11 @@ struct item_data* HP_itemdb_create_item_data(int nameid) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_create_item_data_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, nameid); } } return retVal___; @@ -35271,14 +42589,14 @@ struct item_data* HP_itemdb_create_item_data(int nameid) { int HP_itemdb_isequip(int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isequip_pre ) { + if (HPMHooks.count.HP_itemdb_isequip_pre > 0) { int (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35286,11 +42604,11 @@ int HP_itemdb_isequip(int nameid) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_isequip_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, nameid); } } return retVal___; @@ -35298,14 +42616,14 @@ int HP_itemdb_isequip(int nameid) { int HP_itemdb_isequip2(struct item_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isequip2_pre ) { - int (*preHookFunc) (struct item_data *data); + if (HPMHooks.count.HP_itemdb_isequip2_pre > 0) { + int (*preHookFunc) (struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_isequip2_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35313,9 +42631,9 @@ int HP_itemdb_isequip2(struct item_data *data) { { retVal___ = HPMHooks.source.itemdb.isequip2(data); } - if( HPMHooks.count.HP_itemdb_isequip2_post ) { + if (HPMHooks.count.HP_itemdb_isequip2_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isequip2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_isequip2_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -35325,14 +42643,14 @@ int HP_itemdb_isequip2(struct item_data *data) { int HP_itemdb_isstackable(int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isstackable_pre ) { + if (HPMHooks.count.HP_itemdb_isstackable_pre > 0) { int (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35340,11 +42658,11 @@ int HP_itemdb_isstackable(int nameid) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_isstackable_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, nameid); } } return retVal___; @@ -35352,14 +42670,14 @@ int HP_itemdb_isstackable(int nameid) { int HP_itemdb_isstackable2(struct item_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isstackable2_pre ) { - int (*preHookFunc) (struct item_data *data); + if (HPMHooks.count.HP_itemdb_isstackable2_pre > 0) { + int (*preHookFunc) (struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_isstackable2_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35367,9 +42685,9 @@ int HP_itemdb_isstackable2(struct item_data *data) { { retVal___ = HPMHooks.source.itemdb.isstackable2(data); } - if( HPMHooks.count.HP_itemdb_isstackable2_post ) { + if (HPMHooks.count.HP_itemdb_isstackable2_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isstackable2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_isstackable2_post[hIndex].func; retVal___ = postHookFunc(retVal___, data); } @@ -35379,14 +42697,14 @@ int HP_itemdb_isstackable2(struct item_data *data) { int HP_itemdb_isdropable_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isdropable_sub_pre ) { - int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + if (HPMHooks.count.HP_itemdb_isdropable_sub_pre > 0) { + int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isdropable_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&item, &gmlv, &unused); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35394,11 +42712,11 @@ int HP_itemdb_isdropable_sub(struct item_data *item, int gmlv, int unused) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_isdropable_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, item, gmlv, unused); } } return retVal___; @@ -35406,14 +42724,14 @@ int HP_itemdb_isdropable_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_cantrade_sub(struct item_data *item, int gmlv, int gmlv2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_cantrade_sub_pre ) { - int (*preHookFunc) (struct item_data *item, int *gmlv, int *gmlv2); + if (HPMHooks.count.HP_itemdb_cantrade_sub_pre > 0) { + int (*preHookFunc) (struct item_data **item, int *gmlv, int *gmlv2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cantrade_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&item, &gmlv, &gmlv2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35421,11 +42739,11 @@ int HP_itemdb_cantrade_sub(struct item_data *item, int gmlv, int gmlv2) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_cantrade_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, item, gmlv, gmlv2); } } return retVal___; @@ -35433,14 +42751,14 @@ int HP_itemdb_cantrade_sub(struct item_data *item, int gmlv, int gmlv2) { int HP_itemdb_canpartnertrade_sub(struct item_data *item, int gmlv, int gmlv2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre ) { - int (*preHookFunc) (struct item_data *item, int *gmlv, int *gmlv2); + if (HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre > 0) { + int (*preHookFunc) (struct item_data **item, int *gmlv, int *gmlv2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canpartnertrade_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&item, &gmlv, &gmlv2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35448,11 +42766,11 @@ int HP_itemdb_canpartnertrade_sub(struct item_data *item, int gmlv, int gmlv2) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_canpartnertrade_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, item, gmlv, gmlv2); } } return retVal___; @@ -35460,14 +42778,14 @@ int HP_itemdb_canpartnertrade_sub(struct item_data *item, int gmlv, int gmlv2) { int HP_itemdb_cansell_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_cansell_sub_pre ) { - int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + if (HPMHooks.count.HP_itemdb_cansell_sub_pre > 0) { + int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cansell_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&item, &gmlv, &unused); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35475,11 +42793,11 @@ int HP_itemdb_cansell_sub(struct item_data *item, int gmlv, int unused) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_cansell_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, item, gmlv, unused); } } return retVal___; @@ -35487,14 +42805,14 @@ int HP_itemdb_cansell_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_cancartstore_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_cancartstore_sub_pre ) { - int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + if (HPMHooks.count.HP_itemdb_cancartstore_sub_pre > 0) { + int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_cancartstore_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&item, &gmlv, &unused); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35502,11 +42820,11 @@ int HP_itemdb_cancartstore_sub(struct item_data *item, int gmlv, int unused) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_cancartstore_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, item, gmlv, unused); } } return retVal___; @@ -35514,14 +42832,14 @@ int HP_itemdb_cancartstore_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_canstore_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_canstore_sub_pre ) { - int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + if (HPMHooks.count.HP_itemdb_canstore_sub_pre > 0) { + int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canstore_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&item, &gmlv, &unused); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35529,11 +42847,11 @@ int HP_itemdb_canstore_sub(struct item_data *item, int gmlv, int unused) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_canstore_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, item, gmlv, unused); } } return retVal___; @@ -35541,14 +42859,14 @@ int HP_itemdb_canstore_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_canguildstore_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_canguildstore_sub_pre ) { - int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + if (HPMHooks.count.HP_itemdb_canguildstore_sub_pre > 0) { + int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canguildstore_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&item, &gmlv, &unused); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35556,11 +42874,11 @@ int HP_itemdb_canguildstore_sub(struct item_data *item, int gmlv, int unused) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_canguildstore_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, item, gmlv, unused); } } return retVal___; @@ -35568,14 +42886,14 @@ int HP_itemdb_canguildstore_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_canmail_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_canmail_sub_pre ) { - int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + if (HPMHooks.count.HP_itemdb_canmail_sub_pre > 0) { + int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canmail_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&item, &gmlv, &unused); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35583,11 +42901,11 @@ int HP_itemdb_canmail_sub(struct item_data *item, int gmlv, int unused) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_canmail_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, item, gmlv, unused); } } return retVal___; @@ -35595,14 +42913,14 @@ int HP_itemdb_canmail_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_canauction_sub(struct item_data *item, int gmlv, int unused) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_canauction_sub_pre ) { - int (*preHookFunc) (struct item_data *item, int *gmlv, int *unused); + if (HPMHooks.count.HP_itemdb_canauction_sub_pre > 0) { + int (*preHookFunc) (struct item_data **item, int *gmlv, int *unused); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_canauction_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&item, &gmlv, &unused); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35610,11 +42928,11 @@ int HP_itemdb_canauction_sub(struct item_data *item, int gmlv, int unused) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_canauction_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, item, gmlv, unused); } } return retVal___; @@ -35622,14 +42940,14 @@ int HP_itemdb_canauction_sub(struct item_data *item, int gmlv, int unused) { int HP_itemdb_isrestricted(struct item *item, int gmlv, int gmlv2, int ( *func ) (struct item_data *, int, int)) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isrestricted_pre ) { - int (*preHookFunc) (struct item *item, int *gmlv, int *gmlv2, int ( *func ) (struct item_data *, int, int)); + if (HPMHooks.count.HP_itemdb_isrestricted_pre > 0) { + int (*preHookFunc) (struct item **item, int *gmlv, int *gmlv2, int ( **func ) (struct item_data *, int, int)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isrestricted_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&item, &gmlv, &gmlv2, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35637,11 +42955,11 @@ int HP_itemdb_isrestricted(struct item *item, int gmlv, int gmlv2, int ( *func ) { 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++ ) { + if (HPMHooks.count.HP_itemdb_isrestricted_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, item, gmlv, gmlv2, func); } } return retVal___; @@ -35649,14 +42967,14 @@ int HP_itemdb_isrestricted(struct item *item, int gmlv, int gmlv2, int ( *func ) int HP_itemdb_isidentified(int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isidentified_pre ) { + if (HPMHooks.count.HP_itemdb_isidentified_pre > 0) { int (*preHookFunc) (int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35664,11 +42982,11 @@ int HP_itemdb_isidentified(int nameid) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_isidentified_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, nameid); } } return retVal___; @@ -35676,14 +42994,14 @@ int HP_itemdb_isidentified(int nameid) { int HP_itemdb_isidentified2(struct item_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_isidentified2_pre ) { - int (*preHookFunc) (struct item_data *data); + if (HPMHooks.count.HP_itemdb_isidentified2_pre > 0) { + int (*preHookFunc) (struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_isidentified2_pre[hIndex].func; - retVal___ = preHookFunc(data); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35691,79 +43009,80 @@ int HP_itemdb_isidentified2(struct item_data *data) { { retVal___ = HPMHooks.source.itemdb.isidentified2(data); } - if( HPMHooks.count.HP_itemdb_isidentified2_post ) { + if (HPMHooks.count.HP_itemdb_isidentified2_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_isidentified2_post; hIndex++ ) { + 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___; } -int HP_itemdb_combo_split_atoi(char *str, int *val) { +bool HP_itemdb_read_combodb_libconfig(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_combo_split_atoi_pre ) { - int (*preHookFunc) (char *str, int *val); + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_combodb_libconfig_pre > 0) { + bool (*preHookFunc) (void); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combodb_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_combodb_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.itemdb.combo_split_atoi(str, val); + retVal___ = HPMHooks.source.itemdb.read_combodb_libconfig(); } - 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); + if (HPMHooks.count.HP_itemdb_read_combodb_libconfig_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combodb_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_combodb_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_itemdb_read_combos(void) { +bool HP_itemdb_read_combodb_libconfig_sub(struct config_setting_t *it, int idx, const char *source) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_read_combos_pre ) { - void (*preHookFunc) (void); + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_combodb_libconfig_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *idx, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combos_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_itemdb_read_combos_pre[hIndex].func; - preHookFunc(); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combodb_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_combodb_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &idx, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.itemdb.read_combos(); + retVal___ = HPMHooks.source.itemdb.read_combodb_libconfig_sub(it, idx, source); } - 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(); + if (HPMHooks.count.HP_itemdb_read_combodb_libconfig_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int idx, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_combodb_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_combodb_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, idx, source); } } - return; + return retVal___; } int HP_itemdb_gendercheck(struct item_data *id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_gendercheck_pre ) { - int (*preHookFunc) (struct item_data *id); + if (HPMHooks.count.HP_itemdb_gendercheck_pre > 0) { + int (*preHookFunc) (struct item_data **id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_gendercheck_pre[hIndex].func; - retVal___ = preHookFunc(id); + retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35771,9 +43090,9 @@ int HP_itemdb_gendercheck(struct item_data *id) { { retVal___ = HPMHooks.source.itemdb.gendercheck(id); } - if( HPMHooks.count.HP_itemdb_gendercheck_post ) { + if (HPMHooks.count.HP_itemdb_gendercheck_post > 0) { int (*postHookFunc) (int retVal___, struct item_data *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_gendercheck_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_gendercheck_post[hIndex].func; retVal___ = postHookFunc(retVal___, id); } @@ -35783,14 +43102,14 @@ int HP_itemdb_gendercheck(struct item_data *id) { int HP_itemdb_validate_entry(struct item_data *entry, int n, const char *source) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_validate_entry_pre ) { - int (*preHookFunc) (struct item_data *entry, int *n, const char *source); + if (HPMHooks.count.HP_itemdb_validate_entry_pre > 0) { + int (*preHookFunc) (struct item_data **entry, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_validate_entry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_validate_entry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_validate_entry_pre[hIndex].func; - retVal___ = preHookFunc(entry, &n, source); + retVal___ = preHookFunc(&entry, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35798,25 +43117,51 @@ int HP_itemdb_validate_entry(struct item_data *entry, int n, const char *source) { retVal___ = HPMHooks.source.itemdb.validate_entry(entry, n, source); } - if( HPMHooks.count.HP_itemdb_validate_entry_post ) { - int (*postHookFunc) (int retVal___, struct item_data *entry, int *n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_validate_entry_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_validate_entry_post > 0) { + int (*postHookFunc) (int retVal___, struct item_data *entry, int n, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_validate_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_validate_entry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, entry, &n, source); + retVal___ = postHookFunc(retVal___, entry, n, source); } } return retVal___; } +void HP_itemdb_readdb_options_additional_fields(struct itemdb_option *ito, struct config_setting_t *t, const char *source) { + int hIndex = 0; + if (HPMHooks.count.HP_itemdb_readdb_options_additional_fields_pre > 0) { + void (*preHookFunc) (struct itemdb_option **ito, struct config_setting_t **t, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_options_additional_fields_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_readdb_options_additional_fields_pre[hIndex].func; + preHookFunc(&ito, &t, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.itemdb.readdb_options_additional_fields(ito, t, source); + } + if (HPMHooks.count.HP_itemdb_readdb_options_additional_fields_post > 0) { + void (*postHookFunc) (struct itemdb_option *ito, struct config_setting_t *t, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_options_additional_fields_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_readdb_options_additional_fields_post[hIndex].func; + postHookFunc(ito, t, source); + } + } + return; +} void HP_itemdb_readdb_additional_fields(int itemid, struct config_setting_t *it, int n, const char *source) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_readdb_additional_fields_pre ) { - void (*preHookFunc) (int *itemid, struct config_setting_t *it, int *n, const char *source); + if (HPMHooks.count.HP_itemdb_readdb_additional_fields_pre > 0) { + void (*preHookFunc) (int *itemid, struct config_setting_t **it, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_additional_fields_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_additional_fields_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_readdb_additional_fields_pre[hIndex].func; - preHookFunc(&itemid, it, &n, source); + preHookFunc(&itemid, &it, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35824,25 +43169,25 @@ void HP_itemdb_readdb_additional_fields(int itemid, struct config_setting_t *it, { HPMHooks.source.itemdb.readdb_additional_fields(itemid, it, n, source); } - if( HPMHooks.count.HP_itemdb_readdb_additional_fields_post ) { - void (*postHookFunc) (int *itemid, struct config_setting_t *it, int *n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_additional_fields_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_readdb_additional_fields_post > 0) { + void (*postHookFunc) (int itemid, struct config_setting_t *it, int n, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_additional_fields_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_readdb_additional_fields_post[hIndex].func; - postHookFunc(&itemid, it, &n, source); + postHookFunc(itemid, it, n, source); } } return; } void HP_itemdb_readdb_job_sub(struct item_data *id, struct config_setting_t *t) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_readdb_job_sub_pre ) { - void (*preHookFunc) (struct item_data *id, struct config_setting_t *t); + if (HPMHooks.count.HP_itemdb_readdb_job_sub_pre > 0) { + void (*preHookFunc) (struct item_data **id, struct config_setting_t **t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_job_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_job_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_readdb_job_sub_pre[hIndex].func; - preHookFunc(id, t); + preHookFunc(&id, &t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35850,9 +43195,9 @@ void HP_itemdb_readdb_job_sub(struct item_data *id, struct config_setting_t *t) { HPMHooks.source.itemdb.readdb_job_sub(id, t); } - if( HPMHooks.count.HP_itemdb_readdb_job_sub_post ) { + if (HPMHooks.count.HP_itemdb_readdb_job_sub_post > 0) { void (*postHookFunc) (struct item_data *id, struct config_setting_t *t); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_job_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_job_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_readdb_job_sub_post[hIndex].func; postHookFunc(id, t); } @@ -35862,14 +43207,14 @@ void HP_itemdb_readdb_job_sub(struct item_data *id, struct config_setting_t *t) int HP_itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const char *source) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_readdb_libconfig_sub_pre ) { - int (*preHookFunc) (struct config_setting_t *it, int *n, const char *source); + if (HPMHooks.count.HP_itemdb_readdb_libconfig_sub_pre > 0) { + int (*preHookFunc) (struct config_setting_t **it, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_sub_pre[hIndex].func; - retVal___ = preHookFunc(it, &n, source); + retVal___ = preHookFunc(&it, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35877,11 +43222,11 @@ int HP_itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const cha { retVal___ = HPMHooks.source.itemdb.readdb_libconfig_sub(it, n, source); } - if( HPMHooks.count.HP_itemdb_readdb_libconfig_sub_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *it, int *n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_readdb_libconfig_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *it, int n, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, it, &n, source); + retVal___ = postHookFunc(retVal___, it, n, source); } } return retVal___; @@ -35889,14 +43234,14 @@ int HP_itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const cha int HP_itemdb_readdb_libconfig(const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_readdb_libconfig_pre ) { - int (*preHookFunc) (const char *filename); + if (HPMHooks.count.HP_itemdb_readdb_libconfig_pre > 0) { + int (*preHookFunc) (const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_pre[hIndex].func; - retVal___ = preHookFunc(filename); + retVal___ = preHookFunc(&filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35904,9 +43249,9 @@ int HP_itemdb_readdb_libconfig(const char *filename) { { retVal___ = HPMHooks.source.itemdb.readdb_libconfig(filename); } - if( HPMHooks.count.HP_itemdb_readdb_libconfig_post ) { + if (HPMHooks.count.HP_itemdb_readdb_libconfig_post > 0) { int (*postHookFunc) (int retVal___, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_readdb_libconfig_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_readdb_libconfig_post[hIndex].func; retVal___ = postHookFunc(retVal___, filename); } @@ -35916,14 +43261,14 @@ int HP_itemdb_readdb_libconfig(const char *filename) { uint64 HP_itemdb_unique_id(struct map_session_data *sd) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_itemdb_unique_id_pre ) { - uint64 (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_itemdb_unique_id_pre > 0) { + uint64 (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_unique_id_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -35931,9 +43276,9 @@ uint64 HP_itemdb_unique_id(struct map_session_data *sd) { { retVal___ = HPMHooks.source.itemdb.unique_id(sd); } - if( HPMHooks.count.HP_itemdb_unique_id_post ) { + if (HPMHooks.count.HP_itemdb_unique_id_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_unique_id_post; hIndex++ ) { + 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___, sd); } @@ -35942,14 +43287,14 @@ uint64 HP_itemdb_unique_id(struct map_session_data *sd) { } void HP_itemdb_read(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_read_pre ) { + if (HPMHooks.count.HP_itemdb_read_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_read_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35957,25 +43302,25 @@ void HP_itemdb_read(bool minimal) { { HPMHooks.source.itemdb.read(minimal); } - if( HPMHooks.count.HP_itemdb_read_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_read_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_read_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } 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); + if (HPMHooks.count.HP_itemdb_destroy_item_data_pre > 0) { + void (*preHookFunc) (struct item_data **self, int *free_self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_destroy_item_data_pre; hIndex++ ) { + 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); + preHookFunc(&self, &free_self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -35983,11 +43328,11 @@ void HP_itemdb_destroy_item_data(struct item_data *self, int free_self) { { 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++ ) { + if (HPMHooks.count.HP_itemdb_destroy_item_data_post > 0) { + 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); + postHookFunc(self, free_self); } } return; @@ -35995,16 +43340,16 @@ void HP_itemdb_destroy_item_data(struct item_data *self, int free_self) { int HP_itemdb_final_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_itemdb_final_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_itemdb_final_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36014,12 +43359,45 @@ int HP_itemdb_final_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_final_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_final_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_itemdb_options_final_sub(union DBKey key, struct DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_itemdb_options_final_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_options_final_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_itemdb_options_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.options_final_sub(key, data, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_itemdb_options_final_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_options_final_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_itemdb_options_final_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -36027,14 +43405,14 @@ int HP_itemdb_final_sub(union DBKey key, struct DBData *data, va_list ap) { } void HP_itemdb_clear(bool total) { int hIndex = 0; - if( HPMHooks.count.HP_itemdb_clear_pre ) { + if (HPMHooks.count.HP_itemdb_clear_pre > 0) { void (*preHookFunc) (bool *total); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_clear_pre[hIndex].func; preHookFunc(&total); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36042,26 +43420,26 @@ void HP_itemdb_clear(bool total) { { HPMHooks.source.itemdb.clear(total); } - if( HPMHooks.count.HP_itemdb_clear_post ) { - void (*postHookFunc) (bool *total); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_clear_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_clear_post > 0) { + void (*postHookFunc) (bool total); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_clear_post[hIndex].func; - postHookFunc(&total); + postHookFunc(total); } } return; } -struct item_combo* HP_itemdb_id2combo(unsigned short id) { +struct item_combo* HP_itemdb_id2combo(int id) { int hIndex = 0; struct item_combo* retVal___ = NULL; - if( HPMHooks.count.HP_itemdb_id2combo_pre ) { - struct item_combo* (*preHookFunc) (unsigned short *id); + if (HPMHooks.count.HP_itemdb_id2combo_pre > 0) { + struct item_combo* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_id2combo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_id2combo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_id2combo_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36069,11 +43447,11 @@ struct item_combo* HP_itemdb_id2combo(unsigned short id) { { retVal___ = HPMHooks.source.itemdb.id2combo(id); } - if( HPMHooks.count.HP_itemdb_id2combo_post ) { - struct item_combo* (*postHookFunc) (struct item_combo* retVal___, unsigned short *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_id2combo_post; hIndex++ ) { + if (HPMHooks.count.HP_itemdb_id2combo_post > 0) { + struct item_combo* (*postHookFunc) (struct item_combo* retVal___, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_id2combo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_id2combo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -36081,14 +43459,14 @@ struct item_combo* HP_itemdb_id2combo(unsigned short id) { bool HP_itemdb_is_item_usable(struct item_data *item) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_itemdb_is_item_usable_pre ) { - bool (*preHookFunc) (struct item_data *item); + if (HPMHooks.count.HP_itemdb_is_item_usable_pre > 0) { + bool (*preHookFunc) (struct item_data **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_is_item_usable_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_is_item_usable_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_is_item_usable_pre[hIndex].func; - retVal___ = preHookFunc(item); + retVal___ = preHookFunc(&item); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36096,9 +43474,9 @@ bool HP_itemdb_is_item_usable(struct item_data *item) { { retVal___ = HPMHooks.source.itemdb.is_item_usable(item); } - if( HPMHooks.count.HP_itemdb_is_item_usable_post ) { + if (HPMHooks.count.HP_itemdb_is_item_usable_post > 0) { bool (*postHookFunc) (bool retVal___, struct item_data *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_is_item_usable_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_is_item_usable_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_is_item_usable_post[hIndex].func; retVal___ = postHookFunc(retVal___, item); } @@ -36108,14 +43486,14 @@ bool HP_itemdb_is_item_usable(struct item_data *item) { bool HP_itemdb_lookup_const(const struct config_setting_t *it, const char *name, int *value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_itemdb_lookup_const_pre ) { - bool (*preHookFunc) (const struct config_setting_t *it, const char *name, int *value); + if (HPMHooks.count.HP_itemdb_lookup_const_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **it, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_itemdb_lookup_const_pre[hIndex].func; - retVal___ = preHookFunc(it, name, value); + retVal___ = preHookFunc(&it, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36123,27 +43501,220 @@ bool HP_itemdb_lookup_const(const struct config_setting_t *it, const char *name, { retVal___ = HPMHooks.source.itemdb.lookup_const(it, name, value); } - if( HPMHooks.count.HP_itemdb_lookup_const_post ) { + if (HPMHooks.count.HP_itemdb_lookup_const_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_post; hIndex++) { postHookFunc = HPMHooks.list.HP_itemdb_lookup_const_post[hIndex].func; retVal___ = postHookFunc(retVal___, it, name, value); } } return retVal___; } -/* libconfig */ +bool HP_itemdb_lookup_const_mask(const struct config_setting_t *it, const char *name, int *value) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_lookup_const_mask_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **it, const char **name, int **value); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_mask_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_lookup_const_mask_pre[hIndex].func; + retVal___ = preHookFunc(&it, &name, &value); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.lookup_const_mask(it, name, value); + } + if (HPMHooks.count.HP_itemdb_lookup_const_mask_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_lookup_const_mask_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_lookup_const_mask_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, name, value); + } + } + return retVal___; +} +int HP_itemdb_addname_sub(union DBKey key, struct DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_itemdb_addname_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_addname_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_itemdb_addname_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.addname_sub(key, data, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_itemdb_addname_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_addname_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_itemdb_addname_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +bool HP_itemdb_read_libconfig_lapineddukddak(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_lapineddukddak(); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_itemdb_read_libconfig_lapineddukddak_sub(struct config_setting_t *it, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_lapineddukddak_sub(it, source); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, source); + } + } + return retVal___; +} +bool HP_itemdb_read_libconfig_lapineddukddak_sub_sources(struct config_setting_t *sources, struct item_data *data) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **sources, struct item_data **data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_pre[hIndex].func; + retVal___ = preHookFunc(&sources, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.itemdb.read_libconfig_lapineddukddak_sub_sources(sources, data); + } + if (HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *sources, struct item_data *data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_itemdb_read_libconfig_lapineddukddak_sub_sources_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sources, data); + } + } + return retVal___; +} +/* libconfig_interface */ +void HP_libconfig_set_db_path(const char *db_path) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_set_db_path_pre > 0) { + void (*preHookFunc) (const char **db_path); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_set_db_path_pre[hIndex].func; + preHookFunc(&db_path); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.set_db_path(db_path); + } + if (HPMHooks.count.HP_libconfig_set_db_path_post > 0) { + void (*postHookFunc) (const char *db_path); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_set_db_path_post[hIndex].func; + postHookFunc(db_path); + } + } + return; +} +void HP_libconfig_format_db_path(const char *filename, char *path_buf, int buffer_len) { + int hIndex = 0; + if (HPMHooks.count.HP_libconfig_format_db_path_pre > 0) { + void (*preHookFunc) (const char **filename, char **path_buf, int *buffer_len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_libconfig_format_db_path_pre[hIndex].func; + preHookFunc(&filename, &path_buf, &buffer_len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.libconfig.format_db_path(filename, path_buf, buffer_len); + } + if (HPMHooks.count.HP_libconfig_format_db_path_post > 0) { + void (*postHookFunc) (const char *filename, char *path_buf, int buffer_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_format_db_path_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_libconfig_format_db_path_post[hIndex].func; + postHookFunc(filename, path_buf, buffer_len); + } + } + return; +} int HP_libconfig_read(struct config_t *config, FILE *stream) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_pre ) { - int (*preHookFunc) (struct config_t *config, FILE *stream); + if (HPMHooks.count.HP_libconfig_read_pre > 0) { + int (*preHookFunc) (struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func; - retVal___ = preHookFunc(config, stream); + retVal___ = preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36151,9 +43722,9 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { { retVal___ = HPMHooks.source.libconfig.read(config, stream); } - if( HPMHooks.count.HP_libconfig_read_post ) { + if (HPMHooks.count.HP_libconfig_read_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, stream); } @@ -36162,14 +43733,14 @@ int HP_libconfig_read(struct config_t *config, FILE *stream) { } void HP_libconfig_write(const struct config_t *config, FILE *stream) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_write_pre ) { - void (*preHookFunc) (const struct config_t *config, FILE *stream); + if (HPMHooks.count.HP_libconfig_write_pre > 0) { + void (*preHookFunc) (const struct config_t **config, FILE **stream); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func; - preHookFunc(config, stream); + preHookFunc(&config, &stream); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36177,9 +43748,9 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { { HPMHooks.source.libconfig.write(config, stream); } - if( HPMHooks.count.HP_libconfig_write_post ) { + if (HPMHooks.count.HP_libconfig_write_post > 0) { void (*postHookFunc) (const struct config_t *config, FILE *stream); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func; postHookFunc(config, stream); } @@ -36188,14 +43759,14 @@ void HP_libconfig_write(const struct config_t *config, FILE *stream) { } void HP_libconfig_set_options(struct config_t *config, int options) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_options_pre ) { - void (*preHookFunc) (struct config_t *config, int *options); + if (HPMHooks.count.HP_libconfig_set_options_pre > 0) { + void (*preHookFunc) (struct config_t **config, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_options_pre[hIndex].func; - preHookFunc(config, &options); + preHookFunc(&config, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36203,11 +43774,11 @@ void HP_libconfig_set_options(struct config_t *config, int options) { { HPMHooks.source.libconfig.set_options(config, options); } - if( HPMHooks.count.HP_libconfig_set_options_post ) { - void (*postHookFunc) (struct config_t *config, int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_set_options_post > 0) { + void (*postHookFunc) (struct config_t *config, int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_options_post[hIndex].func; - postHookFunc(config, &options); + postHookFunc(config, options); } } return; @@ -36215,14 +43786,14 @@ void HP_libconfig_set_options(struct config_t *config, int options) { int HP_libconfig_get_options(const struct config_t *config) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_get_options_pre ) { - int (*preHookFunc) (const struct config_t *config); + if (HPMHooks.count.HP_libconfig_get_options_pre > 0) { + int (*preHookFunc) (const struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_get_options_pre[hIndex].func; - retVal___ = preHookFunc(config); + retVal___ = preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36230,9 +43801,9 @@ int HP_libconfig_get_options(const struct config_t *config) { { retVal___ = HPMHooks.source.libconfig.get_options(config); } - if( HPMHooks.count.HP_libconfig_get_options_post ) { + if (HPMHooks.count.HP_libconfig_get_options_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_options_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_get_options_post[hIndex].func; retVal___ = postHookFunc(retVal___, config); } @@ -36242,14 +43813,14 @@ int HP_libconfig_get_options(const struct config_t *config) { int HP_libconfig_read_string(struct config_t *config, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_string_pre ) { - int (*preHookFunc) (struct config_t *config, const char *str); + if (HPMHooks.count.HP_libconfig_read_string_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func; - retVal___ = preHookFunc(config, str); + retVal___ = preHookFunc(&config, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36257,9 +43828,9 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { { retVal___ = HPMHooks.source.libconfig.read_string(config, str); } - if( HPMHooks.count.HP_libconfig_read_string_post ) { + if (HPMHooks.count.HP_libconfig_read_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, str); } @@ -36269,14 +43840,14 @@ int HP_libconfig_read_string(struct config_t *config, const char *str) { int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_read_file_src_pre ) { - int (*preHookFunc) (struct config_t *config, const char *filename); + if (HPMHooks.count.HP_libconfig_read_file_src_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func; - retVal___ = preHookFunc(config, filename); + retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36284,9 +43855,9 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename); } - if( HPMHooks.count.HP_libconfig_read_file_src_post ) { + if (HPMHooks.count.HP_libconfig_read_file_src_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -36296,14 +43867,14 @@ int HP_libconfig_read_file_src(struct config_t *config, const char *filename) { int HP_libconfig_write_file(struct config_t *config, const char *filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_write_file_pre ) { - int (*preHookFunc) (struct config_t *config, const char *filename); + if (HPMHooks.count.HP_libconfig_write_file_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func; - retVal___ = preHookFunc(config, filename); + retVal___ = preHookFunc(&config, &filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36311,9 +43882,9 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { { retVal___ = HPMHooks.source.libconfig.write_file(config, filename); } - if( HPMHooks.count.HP_libconfig_write_file_post ) { + if (HPMHooks.count.HP_libconfig_write_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filename); } @@ -36322,14 +43893,14 @@ int HP_libconfig_write_file(struct config_t *config, const char *filename) { } void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) (void *)) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_destructor_pre ) { - void (*preHookFunc) (struct config_t *config, void ( *destructor ) (void *)); + if (HPMHooks.count.HP_libconfig_set_destructor_pre > 0) { + void (*preHookFunc) (struct config_t **config, void ( **destructor ) (void *)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func; - preHookFunc(config, destructor); + preHookFunc(&config, &destructor); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36337,9 +43908,9 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( { HPMHooks.source.libconfig.set_destructor(config, destructor); } - if( HPMHooks.count.HP_libconfig_set_destructor_post ) { + if (HPMHooks.count.HP_libconfig_set_destructor_post > 0) { void (*postHookFunc) (struct config_t *config, void ( *destructor ) (void *)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func; postHookFunc(config, destructor); } @@ -36348,14 +43919,14 @@ void HP_libconfig_set_destructor(struct config_t *config, void ( *destructor ) ( } void HP_libconfig_set_include_dir(struct config_t *config, const char *include_dir) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) { - void (*preHookFunc) (struct config_t *config, const char *include_dir); + if (HPMHooks.count.HP_libconfig_set_include_dir_pre > 0) { + void (*preHookFunc) (struct config_t **config, const char **include_dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func; - preHookFunc(config, include_dir); + preHookFunc(&config, &include_dir); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36363,9 +43934,9 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d { HPMHooks.source.libconfig.set_include_dir(config, include_dir); } - if( HPMHooks.count.HP_libconfig_set_include_dir_post ) { + if (HPMHooks.count.HP_libconfig_set_include_dir_post > 0) { void (*postHookFunc) (struct config_t *config, const char *include_dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func; postHookFunc(config, include_dir); } @@ -36374,14 +43945,14 @@ void HP_libconfig_set_include_dir(struct config_t *config, const char *include_d } void HP_libconfig_init(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_init_pre ) { - void (*preHookFunc) (struct config_t *config); + if (HPMHooks.count.HP_libconfig_init_pre > 0) { + void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func; - preHookFunc(config); + preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36389,9 +43960,9 @@ void HP_libconfig_init(struct config_t *config) { { HPMHooks.source.libconfig.init(config); } - if( HPMHooks.count.HP_libconfig_init_post ) { + if (HPMHooks.count.HP_libconfig_init_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func; postHookFunc(config); } @@ -36400,14 +43971,14 @@ void HP_libconfig_init(struct config_t *config) { } void HP_libconfig_destroy(struct config_t *config) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_destroy_pre ) { - void (*preHookFunc) (struct config_t *config); + if (HPMHooks.count.HP_libconfig_destroy_pre > 0) { + void (*preHookFunc) (struct config_t **config); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func; - preHookFunc(config); + preHookFunc(&config); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -36415,9 +43986,9 @@ void HP_libconfig_destroy(struct config_t *config) { { HPMHooks.source.libconfig.destroy(config); } - if( HPMHooks.count.HP_libconfig_destroy_post ) { + if (HPMHooks.count.HP_libconfig_destroy_post > 0) { void (*postHookFunc) (struct config_t *config); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func; postHookFunc(config); } @@ -36427,14 +43998,14 @@ void HP_libconfig_destroy(struct config_t *config) { int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_int_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36442,26 +44013,26 @@ int HP_libconfig_setting_get_int(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } } return retVal___; } -long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { +int64 HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) { - long long (*preHookFunc) (const struct config_setting_t *setting); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36469,9 +44040,9 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -36481,14 +44052,14 @@ long long HP_libconfig_setting_get_int64(const struct config_setting_t *setting) double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) { - double (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_float_pre > 0) { + double (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36496,9 +44067,9 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_float(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_post > 0) { double (*postHookFunc) (double retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -36508,14 +44079,14 @@ double HP_libconfig_setting_get_float(const struct config_setting_t *setting) { int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_bool_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36523,9 +44094,9 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -36535,14 +44106,14 @@ int HP_libconfig_setting_get_bool(const struct config_setting_t *setting) { const char* HP_libconfig_setting_get_string(const struct config_setting_t *setting) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) { - const char* (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_string_pre > 0) { + const char* (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36550,9 +44121,9 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti { retVal___ = HPMHooks.source.libconfig.setting_get_string(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -36562,14 +44133,14 @@ const char* HP_libconfig_setting_get_string(const struct config_setting_t *setti struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_lookup_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, const char *name); + if (HPMHooks.count.HP_libconfig_setting_lookup_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_pre[hIndex].func; - retVal___ = preHookFunc(setting, name); + retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36577,9 +44148,9 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_lookup_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -36589,14 +44160,14 @@ struct config_setting_t* HP_libconfig_setting_lookup(struct config_setting_t *se int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, int *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36604,26 +44175,26 @@ int HP_libconfig_setting_lookup_int(const struct config_setting_t *setting, cons { retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } } return retVal___; } -int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, long long *value) { +int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, const char *name, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, long long *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36631,9 +44202,9 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -36643,14 +44214,14 @@ int HP_libconfig_setting_lookup_int64(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, const char *name, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, double *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_float_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36658,9 +44229,9 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -36670,14 +44241,14 @@ int HP_libconfig_setting_lookup_float(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, const char *name, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, int *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36685,9 +44256,9 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -36697,14 +44268,14 @@ int HP_libconfig_setting_lookup_bool(const struct config_setting_t *setting, con int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, const char *name, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, const char **value); + if (HPMHooks.count.HP_libconfig_setting_lookup_string_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36712,9 +44283,9 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -36724,14 +44295,14 @@ int HP_libconfig_setting_lookup_string(const struct config_setting_t *setting, c int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_int_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36739,26 +44310,26 @@ int HP_libconfig_setting_set_int(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; } -int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long value) { +int HP_libconfig_setting_set_int64(struct config_setting_t *setting, int64 value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36766,11 +44337,11 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v { retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; @@ -36778,14 +44349,14 @@ int HP_libconfig_setting_set_int64(struct config_setting_t *setting, long long v int HP_libconfig_setting_set_float(struct config_setting_t *setting, double value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, double *value); + if (HPMHooks.count.HP_libconfig_setting_set_float_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36793,11 +44364,11 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu { retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, double value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; @@ -36805,14 +44376,14 @@ int HP_libconfig_setting_set_float(struct config_setting_t *setting, double valu int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_bool_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func; - retVal___ = preHookFunc(setting, &value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36820,11 +44391,11 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { { retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &value); + retVal___ = postHookFunc(retVal___, setting, value); } } return retVal___; @@ -36832,14 +44403,14 @@ int HP_libconfig_setting_set_bool(struct config_setting_t *setting, int value) { int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, const char *value); + if (HPMHooks.count.HP_libconfig_setting_set_string_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func; - retVal___ = preHookFunc(setting, value); + retVal___ = preHookFunc(&setting, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36847,9 +44418,9 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char { retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *setting, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, value); } @@ -36859,14 +44430,14 @@ int HP_libconfig_setting_set_string(struct config_setting_t *setting, const char int HP_libconfig_setting_set_format(struct config_setting_t *setting, short format) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) { - int (*preHookFunc) (struct config_setting_t *setting, short *format); + if (HPMHooks.count.HP_libconfig_setting_set_format_pre > 0) { + int (*preHookFunc) (struct config_setting_t **setting, short *format); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func; - retVal___ = preHookFunc(setting, &format); + retVal___ = preHookFunc(&setting, &format); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36874,11 +44445,11 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form { retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format); } - if( HPMHooks.count.HP_libconfig_setting_set_format_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *setting, short *format); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_format_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *setting, short format); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &format); + retVal___ = postHookFunc(retVal___, setting, format); } } return retVal___; @@ -36886,14 +44457,14 @@ int HP_libconfig_setting_set_format(struct config_setting_t *setting, short form short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) { - short (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_format_pre > 0) { + short (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36901,9 +44472,9 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_format(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_format_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_format_post > 0) { short (*postHookFunc) (short retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -36913,14 +44484,14 @@ short HP_libconfig_setting_get_format(const struct config_setting_t *setting) { int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36928,26 +44499,26 @@ int HP_libconfig_setting_get_int_elem(const struct config_setting_t *setting, in { retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int_elem_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; } -long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { +int64 HP_libconfig_setting_get_int64_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; - long long retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) { - long long (*preHookFunc) (const struct config_setting_t *setting, int *idx); + int64 retVal___ = 0; + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre > 0) { + int64 (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36955,11 +44526,11 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set { retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) { - long long (*postHookFunc) (long long retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_int64_elem_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -36967,14 +44538,14 @@ long long HP_libconfig_setting_get_int64_elem(const struct config_setting_t *set double HP_libconfig_setting_get_float_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; double retVal___ = 0.; - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) { - double (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_pre > 0) { + double (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -36982,11 +44553,11 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin { retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) { - double (*postHookFunc) (double retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_float_elem_post > 0) { + double (*postHookFunc) (double retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -36994,14 +44565,14 @@ double HP_libconfig_setting_get_float_elem(const struct config_setting_t *settin int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37009,11 +44580,11 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i { retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_elem_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -37021,14 +44592,14 @@ int HP_libconfig_setting_get_bool_elem(const struct config_setting_t *setting, i const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t *setting, int idx) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) { - const char* (*preHookFunc) (const struct config_setting_t *setting, int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_pre > 0) { + const char* (*preHookFunc) (const struct config_setting_t **setting, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37036,11 +44607,11 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * { retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) { - const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_string_elem_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const struct config_setting_t *setting, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -37048,14 +44619,14 @@ const char* HP_libconfig_setting_get_string_elem(const struct config_setting_t * struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37063,26 +44634,26 @@ struct config_setting_t* HP_libconfig_setting_set_int_elem(struct config_setting { retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; } -struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, long long value) { +struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setting_t *setting, int idx, int64 value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, long long *value); + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int64 *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37090,11 +44661,11 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_int64_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int64 value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -37102,14 +44673,14 @@ struct config_setting_t* HP_libconfig_setting_set_int64_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setting_t *setting, int idx, double value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, double *value); + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, double *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37117,11 +44688,11 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_float_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, double value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -37129,14 +44700,14 @@ struct config_setting_t* HP_libconfig_setting_set_float_elem(struct config_setti struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_setting_t *setting, int idx, int value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, int *value); + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, &value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37144,11 +44715,11 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin { retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_bool_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, &value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -37156,14 +44727,14 @@ struct config_setting_t* HP_libconfig_setting_set_bool_elem(struct config_settin struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_setting_t *setting, int idx, const char *value) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *setting, int *idx, const char *value); + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **setting, int *idx, const char **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx, value); + retVal___ = preHookFunc(&setting, &idx, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37171,11 +44742,11 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett { retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value); } - if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int *idx, const char *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_set_string_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *setting, int idx, const char *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx, value); + retVal___ = postHookFunc(retVal___, setting, idx, value); } } return retVal___; @@ -37183,14 +44754,14 @@ struct config_setting_t* HP_libconfig_setting_set_string_elem(struct config_sett int HP_libconfig_setting_index(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_index_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_index_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37198,9 +44769,9 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_index(setting); } - if( HPMHooks.count.HP_libconfig_setting_index_post ) { + if (HPMHooks.count.HP_libconfig_setting_index_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37210,14 +44781,14 @@ int HP_libconfig_setting_index(const struct config_setting_t *setting) { int HP_libconfig_setting_length(const struct config_setting_t *setting) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_length_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_length_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37225,9 +44796,9 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_length(setting); } - if( HPMHooks.count.HP_libconfig_setting_length_post ) { + if (HPMHooks.count.HP_libconfig_setting_length_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37237,14 +44808,14 @@ int HP_libconfig_setting_length(const struct config_setting_t *setting) { struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setting_t *setting, unsigned int idx) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) { - struct config_setting_t* (*preHookFunc) (const struct config_setting_t *setting, unsigned int *idx); + if (HPMHooks.count.HP_libconfig_setting_get_elem_pre > 0) { + struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func; - retVal___ = preHookFunc(setting, &idx); + retVal___ = preHookFunc(&setting, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37252,11 +44823,11 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti { retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx); } - if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, unsigned int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_get_elem_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, unsigned int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, &idx); + retVal___ = postHookFunc(retVal___, setting, idx); } } return retVal___; @@ -37264,14 +44835,14 @@ struct config_setting_t* HP_libconfig_setting_get_elem(const struct config_setti struct config_setting_t* HP_libconfig_setting_get_member(const struct config_setting_t *setting, const char *name) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) { - struct config_setting_t* (*preHookFunc) (const struct config_setting_t *setting, const char *name); + if (HPMHooks.count.HP_libconfig_setting_get_member_pre > 0) { + struct config_setting_t* (*preHookFunc) (const struct config_setting_t **setting, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func; - retVal___ = preHookFunc(setting, name); + retVal___ = preHookFunc(&setting, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37279,9 +44850,9 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set { retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name); } - if( HPMHooks.count.HP_libconfig_setting_get_member_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_member_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_setting_t *setting, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name); } @@ -37291,14 +44862,14 @@ struct config_setting_t* HP_libconfig_setting_get_member(const struct config_set struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *parent, const char *name, int type) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_setting_add_pre ) { - struct config_setting_t* (*preHookFunc) (struct config_setting_t *parent, const char *name, int *type); + if (HPMHooks.count.HP_libconfig_setting_add_pre > 0) { + struct config_setting_t* (*preHookFunc) (struct config_setting_t **parent, const char **name, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func; - retVal___ = preHookFunc(parent, name, &type); + retVal___ = preHookFunc(&parent, &name, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37306,11 +44877,11 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren { retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type); } - if( HPMHooks.count.HP_libconfig_setting_add_post ) { - struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *parent, const char *name, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_add_post > 0) { + struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, struct config_setting_t *parent, const char *name, int type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, parent, name, &type); + retVal___ = postHookFunc(retVal___, parent, name, type); } } return retVal___; @@ -37318,14 +44889,14 @@ struct config_setting_t* HP_libconfig_setting_add(struct config_setting_t *paren int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_pre ) { - int (*preHookFunc) (struct config_setting_t *parent, const char *name); + if (HPMHooks.count.HP_libconfig_setting_remove_pre > 0) { + int (*preHookFunc) (struct config_setting_t **parent, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func; - retVal___ = preHookFunc(parent, name); + retVal___ = preHookFunc(&parent, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37333,9 +44904,9 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam { retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name); } - if( HPMHooks.count.HP_libconfig_setting_remove_post ) { + if (HPMHooks.count.HP_libconfig_setting_remove_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, name); } @@ -37345,14 +44916,14 @@ int HP_libconfig_setting_remove(struct config_setting_t *parent, const char *nam int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned int idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) { - int (*preHookFunc) (struct config_setting_t *parent, unsigned int *idx); + if (HPMHooks.count.HP_libconfig_setting_remove_elem_pre > 0) { + int (*preHookFunc) (struct config_setting_t **parent, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func; - retVal___ = preHookFunc(parent, &idx); + retVal___ = preHookFunc(&parent, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37360,25 +44931,25 @@ int HP_libconfig_setting_remove_elem(struct config_setting_t *parent, unsigned i { retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx); } - if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *parent, unsigned int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_remove_elem_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *parent, unsigned int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, parent, &idx); + retVal___ = postHookFunc(retVal___, parent, idx); } } return retVal___; } void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) { - void (*preHookFunc) (struct config_setting_t *setting, void *hook); + if (HPMHooks.count.HP_libconfig_setting_set_hook_pre > 0) { + void (*preHookFunc) (struct config_setting_t **setting, void **hook); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func; - preHookFunc(setting, hook); + preHookFunc(&setting, &hook); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -37386,9 +44957,9 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) { HPMHooks.source.libconfig.setting_set_hook(setting, hook); } - if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) { + if (HPMHooks.count.HP_libconfig_setting_set_hook_post > 0) { void (*postHookFunc) (struct config_setting_t *setting, void *hook); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func; postHookFunc(setting, hook); } @@ -37398,14 +44969,14 @@ void HP_libconfig_setting_set_hook(struct config_setting_t *setting, void *hook) struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, const char *filepath) { int hIndex = 0; struct config_setting_t* retVal___ = NULL; - if( HPMHooks.count.HP_libconfig_lookup_pre ) { - struct config_setting_t* (*preHookFunc) (const struct config_t *config, const char *filepath); + if (HPMHooks.count.HP_libconfig_lookup_pre > 0) { + struct config_setting_t* (*preHookFunc) (const struct config_t **config, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath); + retVal___ = preHookFunc(&config, &filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37413,9 +44984,9 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons { retVal___ = HPMHooks.source.libconfig.lookup(config, filepath); } - if( HPMHooks.count.HP_libconfig_lookup_post ) { + if (HPMHooks.count.HP_libconfig_lookup_post > 0) { struct config_setting_t* (*postHookFunc) (struct config_setting_t* retVal___, const struct config_t *config, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath); } @@ -37425,14 +44996,14 @@ struct config_setting_t* HP_libconfig_lookup(const struct config_t *config, cons int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, int *value); + if (HPMHooks.count.HP_libconfig_lookup_int_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37440,26 +45011,26 @@ int HP_libconfig_lookup_int(const struct config_t *config, const char *filepath, { retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int_post ) { + if (HPMHooks.count.HP_libconfig_lookup_int_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } } return retVal___; } -int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, long long *value) { +int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepath, int64 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, long long *value); + if (HPMHooks.count.HP_libconfig_lookup_int64_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int64 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37467,9 +45038,9 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_int64_post ) { - int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, long long *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_lookup_int64_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int64 *value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -37479,14 +45050,14 @@ int HP_libconfig_lookup_int64(const struct config_t *config, const char *filepat int HP_libconfig_lookup_float(const struct config_t *config, const char *filepath, double *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_float_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, double *value); + if (HPMHooks.count.HP_libconfig_lookup_float_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, double **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37494,9 +45065,9 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat { retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_float_post ) { + if (HPMHooks.count.HP_libconfig_lookup_float_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, double *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -37506,14 +45077,14 @@ int HP_libconfig_lookup_float(const struct config_t *config, const char *filepat int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath, int *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, int *value); + if (HPMHooks.count.HP_libconfig_lookup_bool_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37521,9 +45092,9 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath { retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_bool_post ) { + if (HPMHooks.count.HP_libconfig_lookup_bool_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -37533,14 +45104,14 @@ int HP_libconfig_lookup_bool(const struct config_t *config, const char *filepath int HP_libconfig_lookup_string(const struct config_t *config, const char *filepath, const char **value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_string_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *filepath, const char **value); + if (HPMHooks.count.HP_libconfig_lookup_string_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **filepath, const char ***value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func; - retVal___ = preHookFunc(config, filepath, value); + retVal___ = preHookFunc(&config, &filepath, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37548,9 +45119,9 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa { retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value); } - if( HPMHooks.count.HP_libconfig_lookup_string_post ) { + if (HPMHooks.count.HP_libconfig_lookup_string_post > 0) { int (*postHookFunc) (int retVal___, const struct config_t *config, const char *filepath, const char **value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, filepath, value); } @@ -37560,14 +45131,14 @@ int HP_libconfig_lookup_string(const struct config_t *config, const char *filepa int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_load_file_pre ) { - int (*preHookFunc) (struct config_t *config, const char *config_filename); + if (HPMHooks.count.HP_libconfig_load_file_pre > 0) { + int (*preHookFunc) (struct config_t **config, const char **config_filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_load_file_pre[hIndex].func; - retVal___ = preHookFunc(config, config_filename); + retVal___ = preHookFunc(&config, &config_filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37575,9 +45146,9 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) { retVal___ = HPMHooks.source.libconfig.load_file(config, config_filename); } - if( HPMHooks.count.HP_libconfig_load_file_post ) { + if (HPMHooks.count.HP_libconfig_load_file_post > 0) { int (*postHookFunc) (int retVal___, struct config_t *config, const char *config_filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_load_file_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_load_file_post[hIndex].func; retVal___ = postHookFunc(retVal___, config, config_filename); } @@ -37586,14 +45157,14 @@ int HP_libconfig_load_file(struct config_t *config, const char *config_filename) } void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) { - void (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_simple_pre > 0) { + void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func; - preHookFunc(parent, src); + preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -37601,9 +45172,9 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str { HPMHooks.source.libconfig.setting_copy_simple(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_simple_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func; postHookFunc(parent, src); } @@ -37612,14 +45183,14 @@ void HP_libconfig_setting_copy_simple(struct config_setting_t *parent, const str } void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) { - void (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_elem_pre > 0) { + void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func; - preHookFunc(parent, src); + preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -37627,9 +45198,9 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc { HPMHooks.source.libconfig.setting_copy_elem(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_elem_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func; postHookFunc(parent, src); } @@ -37638,14 +45209,14 @@ void HP_libconfig_setting_copy_elem(struct config_setting_t *parent, const struc } void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) { - void (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre > 0) { + void (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func; - preHookFunc(parent, src); + preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -37653,9 +45224,9 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const { HPMHooks.source.libconfig.setting_copy_aggregate(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_aggregate_post > 0) { void (*postHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func; postHookFunc(parent, src); } @@ -37665,14 +45236,14 @@ void HP_libconfig_setting_copy_aggregate(struct config_setting_t *parent, const int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct config_setting_t *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_copy_pre ) { - int (*preHookFunc) (struct config_setting_t *parent, const struct config_setting_t *src); + if (HPMHooks.count.HP_libconfig_setting_copy_pre > 0) { + int (*preHookFunc) (struct config_setting_t **parent, const struct config_setting_t **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func; - retVal___ = preHookFunc(parent, src); + retVal___ = preHookFunc(&parent, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37680,9 +45251,9 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf { retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src); } - if( HPMHooks.count.HP_libconfig_setting_copy_post ) { + if (HPMHooks.count.HP_libconfig_setting_copy_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *parent, const struct config_setting_t *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func; retVal___ = postHookFunc(retVal___, parent, src); } @@ -37692,14 +45263,14 @@ int HP_libconfig_setting_copy(struct config_setting_t *parent, const struct conf bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_pre ) { - bool (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37707,9 +45278,9 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) { retVal___ = HPMHooks.source.libconfig.setting_get_bool_real(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_bool_real_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37719,14 +45290,14 @@ bool HP_libconfig_setting_get_bool_real(const struct config_setting_t *setting) uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint32_pre ) { - uint32 (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_uint32_pre > 0) { + uint32 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37734,9 +45305,9 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint32(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint32_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37746,14 +45317,14 @@ uint32 HP_libconfig_setting_get_uint32(const struct config_setting_t *setting) { uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_uint16_pre ) { - uint16 (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_uint16_pre > 0) { + uint16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37761,9 +45332,9 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_uint16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_uint16_post > 0) { uint16 (*postHookFunc) (uint16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37773,14 +45344,14 @@ uint16 HP_libconfig_setting_get_uint16(const struct config_setting_t *setting) { int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int hIndex = 0; int16 retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_get_int16_pre ) { - int16 (*preHookFunc) (const struct config_setting_t *setting); + if (HPMHooks.count.HP_libconfig_setting_get_int16_pre > 0) { + int16 (*preHookFunc) (const struct config_setting_t **setting); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_pre[hIndex].func; - retVal___ = preHookFunc(setting); + retVal___ = preHookFunc(&setting); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37788,9 +45359,9 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { { retVal___ = HPMHooks.source.libconfig.setting_get_int16(setting); } - if( HPMHooks.count.HP_libconfig_setting_get_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_get_int16_post > 0) { int16 (*postHookFunc) (int16 retVal___, const struct config_setting_t *setting); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting); } @@ -37800,14 +45371,14 @@ int16 HP_libconfig_setting_get_int16(const struct config_setting_t *setting) { int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting, const char *name, bool *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, bool *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, bool **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37815,9 +45386,9 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting { retVal___ = HPMHooks.source.libconfig.setting_lookup_bool_real(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, bool *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_real_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_real_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -37827,14 +45398,14 @@ int HP_libconfig_setting_lookup_bool_real(const struct config_setting_t *setting int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, const char *name, uint32 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, uint32 *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint32 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37842,9 +45413,9 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint32(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint32_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint32_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint32 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint32_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint32_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -37854,14 +45425,14 @@ int HP_libconfig_setting_lookup_uint32(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, const char *name, uint16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, uint16 *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, uint16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37869,9 +45440,9 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c { retVal___ = HPMHooks.source.libconfig.setting_lookup_uint16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_uint16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_uint16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, uint16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_uint16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_uint16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -37881,14 +45452,14 @@ int HP_libconfig_setting_lookup_uint16(const struct config_setting_t *setting, c int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, const char *name, int16 *value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, int16 *value); + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, int16 **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, value); + retVal___ = preHookFunc(&setting, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37896,9 +45467,9 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co { retVal___ = HPMHooks.source.libconfig.setting_lookup_int16(setting, name, value); } - if( HPMHooks.count.HP_libconfig_setting_lookup_int16_post ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_int16_post > 0) { int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, int16 *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int16_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int16_post[hIndex].func; retVal___ = postHookFunc(retVal___, setting, name, value); } @@ -37908,14 +45479,14 @@ int HP_libconfig_setting_lookup_int16(const struct config_setting_t *setting, co int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *setting, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre ) { - int (*preHookFunc) (const struct config_setting_t *setting, const char *name, char *out, size_t *out_size); + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **setting, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_pre[hIndex].func; - retVal___ = preHookFunc(setting, name, out, &out_size); + retVal___ = preHookFunc(&setting, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37923,11 +45494,11 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se { retVal___ = HPMHooks.source.libconfig.setting_lookup_mutable_string(setting, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post ) { - int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, char *out, size_t *out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *setting, const char *name, char *out, size_t out_size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_mutable_string_post[hIndex].func; - retVal___ = postHookFunc(retVal___, setting, name, out, &out_size); + retVal___ = postHookFunc(retVal___, setting, name, out, out_size); } } return retVal___; @@ -37935,14 +45506,14 @@ int HP_libconfig_setting_lookup_mutable_string(const struct config_setting_t *se int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char *name, char *out, size_t out_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_pre ) { - int (*preHookFunc) (const struct config_t *config, const char *name, char *out, size_t *out_size); + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_pre > 0) { + int (*preHookFunc) (const struct config_t **config, const char **name, char **out, size_t *out_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_pre[hIndex].func; - retVal___ = preHookFunc(config, name, out, &out_size); + retVal___ = preHookFunc(&config, &name, &out, &out_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -37950,26 +45521,26 @@ int HP_libconfig_lookup_mutable_string(const struct config_t *config, const char { retVal___ = HPMHooks.source.libconfig.lookup_mutable_string(config, name, out, out_size); } - if( HPMHooks.count.HP_libconfig_lookup_mutable_string_post ) { - int (*postHookFunc) (int retVal___, const struct config_t *config, const char *name, char *out, size_t *out_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++ ) { + if (HPMHooks.count.HP_libconfig_lookup_mutable_string_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_t *config, const char *name, char *out, size_t out_size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_mutable_string_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libconfig_lookup_mutable_string_post[hIndex].func; - retVal___ = postHookFunc(retVal___, config, name, out, &out_size); + retVal___ = postHookFunc(retVal___, config, name, out, out_size); } } return retVal___; } -/* logs */ +/* log_interface */ 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); + if (HPMHooks.count.HP_logs_pick_pc_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, e_log_pick_type *type, int *amount, struct item **itm, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_pc_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type, &amount, &itm, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -37977,25 +45548,25 @@ void HP_logs_pick_pc(struct map_session_data *sd, e_log_pick_type type, int amou { 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++ ) { + if (HPMHooks.count.HP_logs_pick_pc_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_logs_pick_mob_pre > 0) { + void (*preHookFunc) (struct mob_data **md, e_log_pick_type *type, int *amount, struct item **itm, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_mob_pre; hIndex++ ) { + 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); + preHookFunc(&md, &type, &amount, &itm, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38003,25 +45574,25 @@ void HP_logs_pick_mob(struct mob_data *md, e_log_pick_type type, int amount, str { 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++ ) { + if (HPMHooks.count.HP_logs_pick_mob_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_logs_zeny_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, e_log_pick_type *type, struct map_session_data **src_sd, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type, &src_sd, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38029,25 +45600,25 @@ void HP_logs_zeny(struct map_session_data *sd, e_log_pick_type type, struct map_ { 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++ ) { + if (HPMHooks.count.HP_logs_zeny_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_logs_npc_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_logs_npc_pre[hIndex].func; - preHookFunc(sd, message); + preHookFunc(&sd, &message); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38055,9 +45626,9 @@ void HP_logs_npc(struct map_session_data *sd, const char *message) { { HPMHooks.source.logs.npc(sd, message); } - if( HPMHooks.count.HP_logs_npc_post ) { + if (HPMHooks.count.HP_logs_npc_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_npc_post[hIndex].func; postHookFunc(sd, message); } @@ -38066,14 +45637,14 @@ void HP_logs_npc(struct map_session_data *sd, const char *message) { } 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); + if (HPMHooks.count.HP_logs_chat_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_pre; hIndex++ ) { + 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); + preHookFunc(&type, &type_id, &src_charid, &src_accid, &mapname, &x, &y, &dst_charname, &message); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38081,25 +45652,25 @@ void HP_logs_chat(e_log_chat_type type, int type_id, int src_charid, int src_acc { 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++ ) { + if (HPMHooks.count.HP_logs_chat_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_logs_atcommand_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_logs_atcommand_pre[hIndex].func; - preHookFunc(sd, message); + preHookFunc(&sd, &message); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38107,9 +45678,9 @@ void HP_logs_atcommand(struct map_session_data *sd, const char *message) { { HPMHooks.source.logs.atcommand(sd, message); } - if( HPMHooks.count.HP_logs_atcommand_post ) { + if (HPMHooks.count.HP_logs_atcommand_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_atcommand_post[hIndex].func; postHookFunc(sd, message); } @@ -38118,14 +45689,14 @@ void HP_logs_atcommand(struct map_session_data *sd, const char *message) { } 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); + if (HPMHooks.count.HP_logs_branch_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_logs_branch_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38133,9 +45704,9 @@ void HP_logs_branch(struct map_session_data *sd) { { HPMHooks.source.logs.branch(sd); } - if( HPMHooks.count.HP_logs_branch_post ) { + if (HPMHooks.count.HP_logs_branch_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_branch_post[hIndex].func; postHookFunc(sd); } @@ -38144,14 +45715,14 @@ void HP_logs_branch(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_logs_mvpdrop_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *monster_id, int **log_mvp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &monster_id, &log_mvp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38159,25 +45730,25 @@ void HP_logs_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp) { 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++ ) { + if (HPMHooks.count.HP_logs_mvpdrop_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_logs_pick_sub_pre > 0) { + void (*preHookFunc) (int *id, int16 *m, e_log_pick_type *type, int *amount, struct item **itm, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_pick_sub_pre; hIndex++ ) { + 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); + preHookFunc(&id, &m, &type, &amount, &itm, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38185,25 +45756,25 @@ void HP_logs_pick_sub(int id, int16 m, e_log_pick_type type, int amount, struct { 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++ ) { + if (HPMHooks.count.HP_logs_pick_sub_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_logs_zeny_sub_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, e_log_pick_type *type, struct map_session_data **src_sd, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_zeny_sub_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type, &src_sd, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38211,25 +45782,25 @@ void HP_logs_zeny_sub(struct map_session_data *sd, e_log_pick_type type, struct { 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++ ) { + if (HPMHooks.count.HP_logs_zeny_sub_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_logs_npc_sub_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &message); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38237,9 +45808,9 @@ void HP_logs_npc_sub(struct map_session_data *sd, const char *message) { { HPMHooks.source.logs.npc_sub(sd, message); } - if( HPMHooks.count.HP_logs_npc_sub_post ) { + if (HPMHooks.count.HP_logs_npc_sub_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_npc_sub_post; hIndex++ ) { + 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); } @@ -38248,14 +45819,14 @@ void HP_logs_npc_sub(struct map_session_data *sd, const char *message) { } 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); + if (HPMHooks.count.HP_logs_chat_sub_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chat_sub_pre; hIndex++ ) { + 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); + preHookFunc(&type, &type_id, &src_charid, &src_accid, &mapname, &x, &y, &dst_charname, &message); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38263,25 +45834,25 @@ void HP_logs_chat_sub(e_log_chat_type type, int type_id, int src_charid, int src { 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++ ) { + if (HPMHooks.count.HP_logs_chat_sub_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_logs_atcommand_sub_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **message); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &message); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38289,9 +45860,9 @@ void HP_logs_atcommand_sub(struct map_session_data *sd, const char *message) { { HPMHooks.source.logs.atcommand_sub(sd, message); } - if( HPMHooks.count.HP_logs_atcommand_sub_post ) { + if (HPMHooks.count.HP_logs_atcommand_sub_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *message); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_atcommand_sub_post; hIndex++ ) { + 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); } @@ -38300,14 +45871,14 @@ void HP_logs_atcommand_sub(struct map_session_data *sd, const char *message) { } 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); + if (HPMHooks.count.HP_logs_branch_sub_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_logs_branch_sub_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38315,9 +45886,9 @@ void HP_logs_branch_sub(struct map_session_data *sd) { { HPMHooks.source.logs.branch_sub(sd); } - if( HPMHooks.count.HP_logs_branch_sub_post ) { + if (HPMHooks.count.HP_logs_branch_sub_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_branch_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_branch_sub_post[hIndex].func; postHookFunc(sd); } @@ -38326,14 +45897,14 @@ void HP_logs_branch_sub(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_logs_mvpdrop_sub_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *monster_id, int **log_mvp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_mvpdrop_sub_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &monster_id, &log_mvp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38341,52 +45912,52 @@ void HP_logs_mvpdrop_sub(struct map_session_data *sd, int monster_id, int *log_m { 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++ ) { + if (HPMHooks.count.HP_logs_mvpdrop_sub_post > 0) { + 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); + postHookFunc(sd, monster_id, log_mvp); } } return; } -int HP_logs_config_read(const char *cfgName) { +bool HP_logs_config_read(const char *filename, bool imported) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_logs_config_read_pre ) { - int (*preHookFunc) (const char *cfgName); + bool retVal___ = false; + if (HPMHooks.count.HP_logs_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_read_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.logs.config_read(cfgName); + retVal___ = HPMHooks.source.logs.config_read(filename, imported); } - 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++ ) { + if (HPMHooks.count.HP_logs_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); + 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); + retVal___ = postHookFunc(retVal___, filename, imported); } } return retVal___; } void HP_logs_config_done(void) { int hIndex = 0; - if( HPMHooks.count.HP_logs_config_done_pre ) { + if (HPMHooks.count.HP_logs_config_done_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38394,9 +45965,9 @@ void HP_logs_config_done(void) { { HPMHooks.source.logs.config_done(); } - if( HPMHooks.count.HP_logs_config_done_post ) { + if (HPMHooks.count.HP_logs_config_done_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_config_done_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_config_done_post[hIndex].func; postHookFunc(); } @@ -38405,14 +45976,14 @@ void HP_logs_config_done(void) { } void HP_logs_sql_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_logs_sql_init_pre ) { + if (HPMHooks.count.HP_logs_sql_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38420,9 +45991,9 @@ void HP_logs_sql_init(void) { { HPMHooks.source.logs.sql_init(); } - if( HPMHooks.count.HP_logs_sql_init_post ) { + if (HPMHooks.count.HP_logs_sql_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_sql_init_post[hIndex].func; postHookFunc(); } @@ -38431,14 +46002,14 @@ void HP_logs_sql_init(void) { } void HP_logs_sql_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_logs_sql_final_pre ) { + if (HPMHooks.count.HP_logs_sql_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38446,9 +46017,9 @@ void HP_logs_sql_final(void) { { HPMHooks.source.logs.sql_final(); } - if( HPMHooks.count.HP_logs_sql_final_post ) { + if (HPMHooks.count.HP_logs_sql_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_logs_sql_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_logs_sql_final_post[hIndex].func; postHookFunc(); } @@ -38458,14 +46029,14 @@ void HP_logs_sql_final(void) { char HP_logs_picktype2char(e_log_pick_type type) { int hIndex = 0; char retVal___ = 0; - if( HPMHooks.count.HP_logs_picktype2char_pre ) { + if (HPMHooks.count.HP_logs_picktype2char_pre > 0) { char (*preHookFunc) (e_log_pick_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_picktype2char_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38473,11 +46044,11 @@ char HP_logs_picktype2char(e_log_pick_type type) { { 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++ ) { + if (HPMHooks.count.HP_logs_picktype2char_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, type); } } return retVal___; @@ -38485,14 +46056,14 @@ char HP_logs_picktype2char(e_log_pick_type type) { char HP_logs_chattype2char(e_log_chat_type type) { int hIndex = 0; char retVal___ = 0; - if( HPMHooks.count.HP_logs_chattype2char_pre ) { + if (HPMHooks.count.HP_logs_chattype2char_pre > 0) { char (*preHookFunc) (e_log_chat_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_chattype2char_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38500,53 +46071,53 @@ char HP_logs_chattype2char(e_log_chat_type type) { { 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++ ) { + if (HPMHooks.count.HP_logs_chattype2char_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, type); } } return retVal___; } -bool HP_logs_should_log_item(int nameid, int amount, int refine, struct item_data *id) { +bool HP_logs_should_log_item(int nameid, int amount, int refine_level, struct item_data *id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_logs_should_log_item_pre ) { - bool (*preHookFunc) (int *nameid, int *amount, int *refine, struct item_data *id); + if (HPMHooks.count.HP_logs_should_log_item_pre > 0) { + bool (*preHookFunc) (int *nameid, int *amount, int *refine_level, struct item_data **id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_logs_should_log_item_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nameid, &amount, &refine_level, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine, id); + retVal___ = HPMHooks.source.logs.should_log_item(nameid, amount, refine_level, 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++ ) { + if (HPMHooks.count.HP_logs_should_log_item_post > 0) { + bool (*postHookFunc) (bool retVal___, int nameid, int amount, int refine_level, 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); + retVal___ = postHookFunc(retVal___, nameid, amount, refine_level, id); } } return retVal___; } -/* mail */ +/* mail_interface */ 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); + if (HPMHooks.count.HP_mail_clear_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mail_clear_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38554,9 +46125,9 @@ void HP_mail_clear(struct map_session_data *sd) { { HPMHooks.source.mail.clear(sd); } - if( HPMHooks.count.HP_mail_clear_post ) { + if (HPMHooks.count.HP_mail_clear_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mail_clear_post[hIndex].func; postHookFunc(sd); } @@ -38566,14 +46137,14 @@ void HP_mail_clear(struct map_session_data *sd) { int HP_mail_removeitem(struct map_session_data *sd, short flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mail_removeitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, short *flag); + if (HPMHooks.count.HP_mail_removeitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_removeitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mail_removeitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &flag); + retVal___ = preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38581,11 +46152,11 @@ int HP_mail_removeitem(struct map_session_data *sd, short flag) { { 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++ ) { + if (HPMHooks.count.HP_mail_removeitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, flag); } } return retVal___; @@ -38593,14 +46164,14 @@ int HP_mail_removeitem(struct map_session_data *sd, short flag) { int HP_mail_removezeny(struct map_session_data *sd, short flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mail_removezeny_pre ) { - int (*preHookFunc) (struct map_session_data *sd, short *flag); + if (HPMHooks.count.HP_mail_removezeny_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_removezeny_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mail_removezeny_pre[hIndex].func; - retVal___ = preHookFunc(sd, &flag); + retVal___ = preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38608,11 +46179,11 @@ int HP_mail_removezeny(struct map_session_data *sd, short flag) { { 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++ ) { + if (HPMHooks.count.HP_mail_removezeny_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, flag); } } return retVal___; @@ -38620,14 +46191,14 @@ int HP_mail_removezeny(struct map_session_data *sd, short flag) { unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount) { int hIndex = 0; unsigned char retVal___ = 0; - if( HPMHooks.count.HP_mail_setitem_pre ) { - unsigned char (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + if (HPMHooks.count.HP_mail_setitem_pre > 0) { + unsigned char (*preHookFunc) (struct map_session_data **sd, int *idx, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setitem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &idx, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38635,11 +46206,11 @@ unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount) { 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++ ) { + if (HPMHooks.count.HP_mail_setitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, idx, amount); } } return retVal___; @@ -38647,14 +46218,14 @@ unsigned char HP_mail_setitem(struct map_session_data *sd, int idx, int amount) bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mail_setattachment_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, struct mail_message *msg); + if (HPMHooks.count.HP_mail_setattachment_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mail_setattachment_pre[hIndex].func; - retVal___ = preHookFunc(sd, msg); + retVal___ = preHookFunc(&sd, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38662,9 +46233,9 @@ bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg { retVal___ = HPMHooks.source.mail.setattachment(sd, msg); } - if( HPMHooks.count.HP_mail_setattachment_post ) { + if (HPMHooks.count.HP_mail_setattachment_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_setattachment_post; hIndex++ ) { + 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); } @@ -38673,14 +46244,14 @@ bool HP_mail_setattachment(struct map_session_data *sd, struct mail_message *msg } 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); + if (HPMHooks.count.HP_mail_getattachment_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *zeny, struct item **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_getattachment_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mail_getattachment_pre[hIndex].func; - preHookFunc(sd, &zeny, item); + preHookFunc(&sd, &zeny, &item); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38688,11 +46259,11 @@ void HP_mail_getattachment(struct map_session_data *sd, int zeny, struct item *i { 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++ ) { + if (HPMHooks.count.HP_mail_getattachment_post > 0) { + 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); + postHookFunc(sd, zeny, item); } } return; @@ -38700,14 +46271,14 @@ void HP_mail_getattachment(struct map_session_data *sd, int zeny, struct item *i int HP_mail_openmail(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mail_openmail_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_mail_openmail_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mail_openmail_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38715,9 +46286,9 @@ int HP_mail_openmail(struct map_session_data *sd) { { retVal___ = HPMHooks.source.mail.openmail(sd); } - if( HPMHooks.count.HP_mail_openmail_post ) { + if (HPMHooks.count.HP_mail_openmail_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_openmail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mail_openmail_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -38726,14 +46297,14 @@ int HP_mail_openmail(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_mail_deliveryfail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct mail_message **msg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mail_deliveryfail_pre[hIndex].func; - preHookFunc(sd, msg); + preHookFunc(&sd, &msg); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -38741,9 +46312,9 @@ void HP_mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) { HPMHooks.source.mail.deliveryfail(sd, msg); } - if( HPMHooks.count.HP_mail_deliveryfail_post ) { + if (HPMHooks.count.HP_mail_deliveryfail_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct mail_message *msg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mail_deliveryfail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mail_deliveryfail_post[hIndex].func; postHookFunc(sd, msg); } @@ -38753,14 +46324,14 @@ void HP_mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) bool HP_mail_invalid_operation(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mail_invalid_operation_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_mail_invalid_operation_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -38768,530 +46339,209 @@ bool HP_mail_invalid_operation(struct map_session_data *sd) { { retVal___ = HPMHooks.source.mail.invalid_operation(sd); } - if( HPMHooks.count.HP_mail_invalid_operation_post ) { + if (HPMHooks.count.HP_mail_invalid_operation_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mail_invalid_operation_post; hIndex++ ) { + 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___; } -/* iMalloc */ -void HP_iMalloc_init(void) { +/* map_interface */ +void HP_map_zone_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_pre ) { + if (HPMHooks.count.HP_map_zone_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func; + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.init(); + HPMHooks.source.map.zone_init(); } - if( HPMHooks.count.HP_iMalloc_init_post ) { + if (HPMHooks.count.HP_map_zone_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func; + 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_iMalloc_final(void) { +void HP_map_zone_remove(int m) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_final_pre ) { - void (*preHookFunc) (void); + if (HPMHooks.count.HP_map_zone_remove_pre > 0) { + void (*preHookFunc) (int *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func; - preHookFunc(); + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.final(); + HPMHooks.source.map.zone_remove(m); } - if( HPMHooks.count.HP_iMalloc_final_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_map_zone_remove_post > 0) { + 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_iMalloc_malloc(size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_malloc_pre ) { - void* (*preHookFunc) (size_t *size, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func; - retVal___ = preHookFunc(&size, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_malloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &size, file, &line, func); - } - } - return retVal___; -} -void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_calloc_pre ) { - void* (*preHookFunc) (size_t *num, size_t *size, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func; - retVal___ = preHookFunc(&num, &size, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_calloc_post ) { - void* (*postHookFunc) (void* retVal___, size_t *num, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &num, &size, file, &line, func); - } - } - return retVal___; -} -void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_realloc_pre ) { - void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func; - retVal___ = preHookFunc(p, &size, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_realloc_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); - } - } - return retVal___; -} -void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) { - int hIndex = 0; - void* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_reallocz_pre ) { - void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func; - retVal___ = preHookFunc(p, &size, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_reallocz_post ) { - void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); - } - } - return retVal___; -} -char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) { - int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrdup_pre ) { - char* (*preHookFunc) (const char *p, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func; - retVal___ = preHookFunc(p, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_astrdup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, file, &line, func); - } - } - return retVal___; -} -char* HP_iMalloc_astrndup(const char *p, size_t size, const char *file, int line, const char *func) { +void HP_map_zone_remove_all(int m) { int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_iMalloc_astrndup_pre ) { - char* (*preHookFunc) (const char *p, size_t *size, const char *file, int *line, const char *func); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_astrndup_pre[hIndex].func; - retVal___ = preHookFunc(p, &size, file, &line, func); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.astrndup(p, size, file, line, func); - } - if( HPMHooks.count.HP_iMalloc_astrndup_post ) { - char* (*postHookFunc) (char* retVal___, const char *p, size_t *size, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrndup_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_astrndup_post[hIndex].func; - retVal___ = postHookFunc(retVal___, p, &size, file, &line, func); - } - } - return retVal___; -} -void HP_iMalloc_free(void *p, const char *file, int line, const char *func) { - int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_free_pre ) { - void (*preHookFunc) (void *p, const char *file, int *line, const char *func); + if (HPMHooks.count.HP_map_zone_remove_all_pre > 0) { + void (*preHookFunc) (int *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func; - preHookFunc(p, file, &line, func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_all_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_map_zone_remove_all_pre[hIndex].func; + preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.free(p, file, line, func); + HPMHooks.source.map.zone_remove_all(m); } - if( HPMHooks.count.HP_iMalloc_free_post ) { - void (*postHookFunc) (void *p, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func; - postHookFunc(p, file, &line, func); + if (HPMHooks.count.HP_map_zone_remove_all_post > 0) { + void (*postHookFunc) (int m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_remove_all_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_map_zone_remove_all_post[hIndex].func; + postHookFunc(m); } } return; } -void HP_iMalloc_memory_check(void) { +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_iMalloc_memory_check_pre ) { - void (*preHookFunc) (void); + if (HPMHooks.count.HP_map_zone_apply_pre > 0) { + void (*preHookFunc) (int *m, struct map_zone_data **zone, const char **start, const char **buffer, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func; - preHookFunc(); + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.memory_check(); + HPMHooks.source.map.zone_apply(m, zone, start, buffer, filepath); } - if( HPMHooks.count.HP_iMalloc_memory_check_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_map_zone_apply_post > 0) { + 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; } -bool HP_iMalloc_verify_ptr(void *ptr) { - int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) { - bool (*preHookFunc) (void *ptr); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func; - retVal___ = preHookFunc(ptr); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr); - } - if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) { - bool (*postHookFunc) (bool retVal___, void *ptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ptr); - } - } - return retVal___; -} -size_t HP_iMalloc_usage(void) { - int hIndex = 0; - size_t retVal___ = 0; - if( HPMHooks.count.HP_iMalloc_usage_pre ) { - size_t (*preHookFunc) (void); - *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func; - retVal___ = preHookFunc(); - } - if( *HPMforce_return ) { - *HPMforce_return = false; - return retVal___; - } - } - { - retVal___ = HPMHooks.source.iMalloc.usage(); - } - if( HPMHooks.count.HP_iMalloc_usage_post ) { - size_t (*postHookFunc) (size_t retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func; - retVal___ = postHookFunc(retVal___); - } - } - return retVal___; -} -void HP_iMalloc_post_shutdown(void) { +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_iMalloc_post_shutdown_pre ) { - void (*preHookFunc) (void); + if (HPMHooks.count.HP_map_zone_change_pre > 0) { + void (*preHookFunc) (int *m, struct map_zone_data **zone, const char **start, const char **buffer, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func; - preHookFunc(); + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.post_shutdown(); + HPMHooks.source.map.zone_change(m, zone, start, buffer, filepath); } - if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_map_zone_change_post > 0) { + 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_iMalloc_init_messages(void) { +void HP_map_zone_change2(int m, struct map_zone_data *zone) { int hIndex = 0; - if( HPMHooks.count.HP_iMalloc_init_messages_pre ) { - void (*preHookFunc) (void); + if (HPMHooks.count.HP_map_zone_change2_pre > 0) { + void (*preHookFunc) (int *m, struct map_zone_data **zone); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func; - preHookFunc(); + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.iMalloc.init_messages(); + HPMHooks.source.map.zone_change2(m, zone); } - if( HPMHooks.count.HP_iMalloc_init_messages_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func; - postHookFunc(); + if (HPMHooks.count.HP_map_zone_change2_post > 0) { + 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; } -/* map */ -void HP_map_zone_init(void) { +void HP_map_zone_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_init_pre ) { + if (HPMHooks.count.HP_map_zone_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_init_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_zone_init_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_reload_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_map_zone_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.map.zone_init(); + HPMHooks.source.map.zone_reload(); } - if( HPMHooks.count.HP_map_zone_init_post ) { + if (HPMHooks.count.HP_map_zone_reload_post > 0) { 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; + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_reload_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_map_zone_reload_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); - *HPMforce_return = false; - 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); - *HPMforce_return = false; - 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); - *HPMforce_return = false; - 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); - *HPMforce_return = false; - 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, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_getcell_pre ) { - int (*preHookFunc) (int16 *m, const struct block_list *bl, int16 *x, int16 *y, cell_chk *cellchk); + if (HPMHooks.count.HP_map_getcell_pre > 0) { + int (*preHookFunc) (int16 *m, const struct block_list **bl, int16 *x, int16 *y, cell_chk *cellchk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_getcell_pre[hIndex].func; - retVal___ = preHookFunc(&m, bl, &x, &y, &cellchk); + retVal___ = preHookFunc(&m, &bl, &x, &y, &cellchk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39299,25 +46549,25 @@ int HP_map_getcell(int16 m, const struct block_list *bl, int16 x, int16 y, cell_ { retVal___ = HPMHooks.source.map.getcell(m, bl, x, y, cellchk); } - if( HPMHooks.count.HP_map_getcell_post ) { - int (*postHookFunc) (int retVal___, int16 *m, const struct block_list *bl, int16 *x, int16 *y, cell_chk *cellchk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcell_post; hIndex++ ) { + if (HPMHooks.count.HP_map_getcell_post > 0) { + int (*postHookFunc) (int retVal___, int16 m, const struct block_list *bl, 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, bl, &x, &y, &cellchk); + retVal___ = postHookFunc(retVal___, m, bl, 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 ) { + if (HPMHooks.count.HP_map_setgatcell_pre > 0) { void (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *gat); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setgatcell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39325,25 +46575,25 @@ void HP_map_setgatcell(int16 m, int16 x, int16 y, int gat) { { 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++ ) { + if (HPMHooks.count.HP_map_setgatcell_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_map_cellfromcache_pre > 0) { + void (*preHookFunc) (struct map_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_cellfromcache_pre[hIndex].func; - preHookFunc(m); + preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39351,9 +46601,9 @@ void HP_map_cellfromcache(struct map_data *m) { { HPMHooks.source.map.cellfromcache(m); } - if( HPMHooks.count.HP_map_cellfromcache_post ) { + if (HPMHooks.count.HP_map_cellfromcache_post > 0) { void (*postHookFunc) (struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_cellfromcache_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_cellfromcache_post[hIndex].func; postHookFunc(m); } @@ -39362,14 +46612,14 @@ void HP_map_cellfromcache(struct map_data *m) { } void HP_map_setusers(int p1) { int hIndex = 0; - if( HPMHooks.count.HP_map_setusers_pre ) { + if (HPMHooks.count.HP_map_setusers_pre > 0) { void (*preHookFunc) (int *p1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setusers_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39377,11 +46627,11 @@ void HP_map_setusers(int p1) { { 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++ ) { + if (HPMHooks.count.HP_map_setusers_post > 0) { + 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); + postHookFunc(p1); } } return; @@ -39389,14 +46639,14 @@ void HP_map_setusers(int p1) { int HP_map_getusers(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_getusers_pre ) { + if (HPMHooks.count.HP_map_getusers_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39404,9 +46654,9 @@ int HP_map_getusers(void) { { retVal___ = HPMHooks.source.map.getusers(); } - if( HPMHooks.count.HP_map_getusers_post ) { + if (HPMHooks.count.HP_map_getusers_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_getusers_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_getusers_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -39416,14 +46666,14 @@ int HP_map_getusers(void) { int HP_map_usercount(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_usercount_pre ) { + if (HPMHooks.count.HP_map_usercount_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39431,9 +46681,9 @@ int HP_map_usercount(void) { { retVal___ = HPMHooks.source.map.usercount(); } - if( HPMHooks.count.HP_map_usercount_post ) { + if (HPMHooks.count.HP_map_usercount_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_usercount_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_usercount_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -39443,14 +46693,14 @@ int HP_map_usercount(void) { int HP_map_freeblock(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_map_freeblock_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_freeblock_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39458,9 +46708,9 @@ int HP_map_freeblock(struct block_list *bl) { { retVal___ = HPMHooks.source.map.freeblock(bl); } - if( HPMHooks.count.HP_map_freeblock_post ) { + if (HPMHooks.count.HP_map_freeblock_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_freeblock_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -39470,14 +46720,14 @@ int HP_map_freeblock(struct block_list *bl) { int HP_map_freeblock_lock(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_lock_pre ) { + if (HPMHooks.count.HP_map_freeblock_lock_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39485,9 +46735,9 @@ int HP_map_freeblock_lock(void) { { retVal___ = HPMHooks.source.map.freeblock_lock(); } - if( HPMHooks.count.HP_map_freeblock_lock_post ) { + if (HPMHooks.count.HP_map_freeblock_lock_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_lock_post; hIndex++ ) { + 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___); } @@ -39497,14 +46747,14 @@ int HP_map_freeblock_lock(void) { int HP_map_freeblock_unlock(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_unlock_pre ) { + if (HPMHooks.count.HP_map_freeblock_unlock_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39512,9 +46762,9 @@ int HP_map_freeblock_unlock(void) { { retVal___ = HPMHooks.source.map.freeblock_unlock(); } - if( HPMHooks.count.HP_map_freeblock_unlock_post ) { + if (HPMHooks.count.HP_map_freeblock_unlock_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_unlock_post; hIndex++ ) { + 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___); } @@ -39524,14 +46774,14 @@ int HP_map_freeblock_unlock(void) { int HP_map_addblock(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_addblock_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_map_addblock_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_addblock_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39539,9 +46789,9 @@ int HP_map_addblock(struct block_list *bl) { { retVal___ = HPMHooks.source.map.addblock(bl); } - if( HPMHooks.count.HP_map_addblock_post ) { + if (HPMHooks.count.HP_map_addblock_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_addblock_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -39551,14 +46801,14 @@ int HP_map_addblock(struct block_list *bl) { int HP_map_delblock(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_delblock_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_map_delblock_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_delblock_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39566,9 +46816,9 @@ int HP_map_delblock(struct block_list *bl) { { retVal___ = HPMHooks.source.map.delblock(bl); } - if( HPMHooks.count.HP_map_delblock_post ) { + if (HPMHooks.count.HP_map_delblock_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_delblock_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_delblock_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -39578,14 +46828,14 @@ int HP_map_delblock(struct block_list *bl) { int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_moveblock_pre ) { - int (*preHookFunc) (struct block_list *bl, int *x1, int *y1, int64 *tick); + if (HPMHooks.count.HP_map_moveblock_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *x1, int *y1, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &x1, &y1, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39593,11 +46843,11 @@ int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_moveblock_post; hIndex++ ) { + if (HPMHooks.count.HP_map_moveblock_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int x1, int y1, int64 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); + retVal___ = postHookFunc(retVal___, bl, x1, y1, tick); } } return retVal___; @@ -39605,14 +46855,14 @@ int HP_map_moveblock(struct block_list *bl, int x1, int y1, int64 tick) { int HP_map_count_oncell(int16 m, int16 x, int16 y, int type, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_count_oncell_pre ) { + if (HPMHooks.count.HP_map_count_oncell_pre > 0) { int (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_oncell_pre; hIndex++ ) { + 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, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39620,11 +46870,11 @@ int HP_map_count_oncell(int16 m, int16 x, int16 y, int type, int flag) { { retVal___ = HPMHooks.source.map.count_oncell(m, x, y, type, flag); } - if( HPMHooks.count.HP_map_count_oncell_post ) { - int (*postHookFunc) (int retVal___, int16 *m, int16 *x, int16 *y, int *type, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_oncell_post; hIndex++ ) { + if (HPMHooks.count.HP_map_count_oncell_post > 0) { + int (*postHookFunc) (int retVal___, int16 m, int16 x, int16 y, int type, int flag); + 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, &flag); + retVal___ = postHookFunc(retVal___, m, x, y, type, flag); } } return retVal___; @@ -39632,14 +46882,14 @@ int HP_map_count_oncell(int16 m, int16 x, int16 y, int type, int flag) { 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); + if (HPMHooks.count.HP_map_find_skill_unit_oncell_pre > 0) { + struct skill_unit* (*preHookFunc) (struct block_list **target, int16 *x, int16 *y, uint16 *skill_id, struct skill_unit **out_unit, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_find_skill_unit_oncell_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&target, &x, &y, &skill_id, &out_unit, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39647,11 +46897,11 @@ struct skill_unit* HP_map_find_skill_unit_oncell(struct block_list *target, int1 { 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++ ) { + if (HPMHooks.count.HP_map_find_skill_unit_oncell_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, target, x, y, skill_id, out_unit, flag); } } return retVal___; @@ -39659,14 +46909,14 @@ struct skill_unit* HP_map_find_skill_unit_oncell(struct block_list *target, int1 int HP_map_get_new_object_id(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_get_new_object_id_pre ) { + if (HPMHooks.count.HP_map_get_new_object_id_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39674,9 +46924,9 @@ int HP_map_get_new_object_id(void) { { retVal___ = HPMHooks.source.map.get_new_object_id(); } - if( HPMHooks.count.HP_map_get_new_object_id_post ) { + if (HPMHooks.count.HP_map_get_new_object_id_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_object_id_post; hIndex++ ) { + 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___); } @@ -39686,14 +46936,14 @@ int HP_map_get_new_object_id(void) { 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___ = 0; - 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); + if (HPMHooks.count.HP_map_search_freecell_pre > 0) { + int (*preHookFunc) (struct block_list **src, int16 *m, int16 **x, int16 **y, int16 *rx, int16 *ry, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_search_freecell_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &m, &x, &y, &rx, &ry, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39701,11 +46951,11 @@ int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, { 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++ ) { + if (HPMHooks.count.HP_map_search_freecell_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, m, x, y, rx, ry, flag); } } return retVal___; @@ -39713,14 +46963,14 @@ int HP_map_search_freecell(struct block_list *src, int16 m, int16 *x, int16 *y, bool HP_map_closest_freecell(int16 m, const struct block_list *bl, int16 *x, int16 *y, int type, int flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_closest_freecell_pre ) { - bool (*preHookFunc) (int16 *m, const struct block_list *bl, int16 *x, int16 *y, int *type, int *flag); + if (HPMHooks.count.HP_map_closest_freecell_pre > 0) { + bool (*preHookFunc) (int16 *m, const struct block_list **bl, int16 **x, int16 **y, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_closest_freecell_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_closest_freecell_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_closest_freecell_pre[hIndex].func; - retVal___ = preHookFunc(&m, bl, x, y, &type, &flag); + retVal___ = preHookFunc(&m, &bl, &x, &y, &type, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39728,11 +46978,11 @@ bool HP_map_closest_freecell(int16 m, const struct block_list *bl, int16 *x, int { retVal___ = HPMHooks.source.map.closest_freecell(m, bl, x, y, type, flag); } - if( HPMHooks.count.HP_map_closest_freecell_post ) { - bool (*postHookFunc) (bool retVal___, int16 *m, const struct block_list *bl, int16 *x, int16 *y, int *type, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_closest_freecell_post; hIndex++ ) { + if (HPMHooks.count.HP_map_closest_freecell_post > 0) { + bool (*postHookFunc) (bool retVal___, int16 m, const struct block_list *bl, int16 *x, int16 *y, int type, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_closest_freecell_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_closest_freecell_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, bl, x, y, &type, &flag); + retVal___ = postHookFunc(retVal___, m, bl, x, y, type, flag); } } return retVal___; @@ -39740,14 +46990,14 @@ bool HP_map_closest_freecell(int16 m, const struct block_list *bl, int16 *x, int int HP_map_quit(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_quit_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_map_quit_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_quit_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39755,9 +47005,9 @@ int HP_map_quit(struct map_session_data *sd) { { retVal___ = HPMHooks.source.map.quit(sd); } - if( HPMHooks.count.HP_map_quit_post ) { + if (HPMHooks.count.HP_map_quit_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_quit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_quit_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -39767,14 +47017,14 @@ int HP_map_quit(struct map_session_data *sd) { bool HP_map_addnpc(int16 m, struct npc_data *nd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_addnpc_pre ) { - bool (*preHookFunc) (int16 *m, struct npc_data *nd); + if (HPMHooks.count.HP_map_addnpc_pre > 0) { + bool (*preHookFunc) (int16 *m, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addnpc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_addnpc_pre[hIndex].func; - retVal___ = preHookFunc(&m, nd); + retVal___ = preHookFunc(&m, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39782,11 +47032,11 @@ bool HP_map_addnpc(int16 m, struct npc_data *nd) { { 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++ ) { + if (HPMHooks.count.HP_map_addnpc_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, m, nd); } } return retVal___; @@ -39794,14 +47044,14 @@ bool HP_map_addnpc(int16 m, struct npc_data *nd) { int HP_map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_clearflooritem_timer_pre ) { + if (HPMHooks.count.HP_map_clearflooritem_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39809,11 +47059,11 @@ int HP_map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.map.clearflooritem_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_map_clearflooritem_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_map_clearflooritem_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -39821,14 +47071,14 @@ int HP_map_clearflooritem_timer(int tid, int64 tick, int id, intptr_t data) { int HP_map_removemobs_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_removemobs_timer_pre ) { + if (HPMHooks.count.HP_map_removemobs_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39836,25 +47086,25 @@ int HP_map_removemobs_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.map.removemobs_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_map_removemobs_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_map_removemobs_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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); + if (HPMHooks.count.HP_map_clearflooritem_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_clearflooritem_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39862,52 +47112,52 @@ void HP_map_clearflooritem(struct block_list *bl) { { HPMHooks.source.map.clearflooritem(bl); } - if( HPMHooks.count.HP_map_clearflooritem_post ) { + if (HPMHooks.count.HP_map_clearflooritem_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clearflooritem_post; hIndex++ ) { + 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(const struct block_list *bl, struct item *item_data, int amount, int16 m, int16 x, int16 y, int first_charid, int second_charid, int third_charid, int flags) { +int HP_map_addflooritem(const struct block_list *bl, struct item *item_data, int amount, int16 m, int16 x, int16 y, int first_charid, int second_charid, int third_charid, int flags, bool showdropeffect) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_addflooritem_pre ) { - int (*preHookFunc) (const struct block_list *bl, struct item *item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags); + if (HPMHooks.count.HP_map_addflooritem_pre > 0) { + int (*preHookFunc) (const struct block_list **bl, struct item **item_data, int *amount, int16 *m, int16 *x, int16 *y, int *first_charid, int *second_charid, int *third_charid, int *flags, bool *showdropeffect); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_addflooritem_pre[hIndex].func; - retVal___ = preHookFunc(bl, item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags); + retVal___ = preHookFunc(&bl, &item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags, &showdropeffect); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.map.addflooritem(bl, item_data, amount, m, x, y, first_charid, second_charid, third_charid, flags); + retVal___ = HPMHooks.source.map.addflooritem(bl, item_data, amount, m, x, y, first_charid, second_charid, third_charid, flags, showdropeffect); } - if( HPMHooks.count.HP_map_addflooritem_post ) { - int (*postHookFunc) (int retVal___, const struct block_list *bl, 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++ ) { + if (HPMHooks.count.HP_map_addflooritem_post > 0) { + int (*postHookFunc) (int retVal___, const struct block_list *bl, struct item *item_data, int amount, int16 m, int16 x, int16 y, int first_charid, int second_charid, int third_charid, int flags, bool showdropeffect); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addflooritem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_addflooritem_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, item_data, &amount, &m, &x, &y, &first_charid, &second_charid, &third_charid, &flags); + retVal___ = postHookFunc(retVal___, bl, item_data, amount, m, x, y, first_charid, second_charid, third_charid, flags, showdropeffect); } } 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); + if (HPMHooks.count.HP_map_addnickdb_pre > 0) { + void (*preHookFunc) (int *charid, const char **nick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addnickdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_addnickdb_pre[hIndex].func; - preHookFunc(&charid, nick); + preHookFunc(&charid, &nick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39915,25 +47165,25 @@ void HP_map_addnickdb(int charid, const char *nick) { { 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++ ) { + if (HPMHooks.count.HP_map_addnickdb_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_map_delnickdb_pre > 0) { + void (*preHookFunc) (int *charid, const char **nick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_delnickdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_delnickdb_pre[hIndex].func; - preHookFunc(&charid, nick); + preHookFunc(&charid, &nick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39941,25 +47191,25 @@ void HP_map_delnickdb(int charid, const char *nick) { { 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++ ) { + if (HPMHooks.count.HP_map_delnickdb_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_map_reqnickdb_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *charid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_reqnickdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_reqnickdb_pre[hIndex].func; - preHookFunc(sd, &charid); + preHookFunc(&sd, &charid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -39967,11 +47217,11 @@ void HP_map_reqnickdb(struct map_session_data *sd, int charid) { { 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++ ) { + if (HPMHooks.count.HP_map_reqnickdb_post > 0) { + 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); + postHookFunc(sd, charid); } } return; @@ -39979,14 +47229,14 @@ void HP_map_reqnickdb(struct map_session_data *sd, int charid) { const char* HP_map_charid2nick(int charid) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_map_charid2nick_pre ) { + if (HPMHooks.count.HP_map_charid2nick_pre > 0) { const char* (*preHookFunc) (int *charid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2nick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -39994,11 +47244,11 @@ const char* HP_map_charid2nick(int charid) { { 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++ ) { + if (HPMHooks.count.HP_map_charid2nick_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, charid); } } return retVal___; @@ -40006,14 +47256,14 @@ const char* HP_map_charid2nick(int charid) { 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 ) { + if (HPMHooks.count.HP_map_charid2sd_pre > 0) { struct map_session_data* (*preHookFunc) (int *charid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_charid2sd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40021,27 +47271,27 @@ struct map_session_data* HP_map_charid2sd(int charid) { { 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++ ) { + if (HPMHooks.count.HP_map_charid2sd_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_map_vforeachpc_pre > 0) { + void (*preHookFunc) (int ( **func ) (struct map_session_data *sd, va_list args), va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachpc_pre; hIndex++ ) { + 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); + preHookFunc(&func, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40051,9 +47301,9 @@ void HP_map_vforeachpc(int ( *func ) (struct map_session_data *sd, va_list args) HPMHooks.source.map.vforeachpc(func, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_vforeachpc_post ) { + if (HPMHooks.count.HP_map_vforeachpc_post > 0) { 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++ ) { + 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); @@ -40064,16 +47314,16 @@ void HP_map_vforeachpc(int ( *func ) (struct map_session_data *sd, va_list args) } 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); + if (HPMHooks.count.HP_map_vforeachmob_pre > 0) { + void (*preHookFunc) (int ( **func ) (struct mob_data *md, va_list args), va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachmob_pre; hIndex++ ) { + 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); + preHookFunc(&func, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40083,9 +47333,9 @@ void HP_map_vforeachmob(int ( *func ) (struct mob_data *md, va_list args), va_li HPMHooks.source.map.vforeachmob(func, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_vforeachmob_post ) { + if (HPMHooks.count.HP_map_vforeachmob_post > 0) { 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++ ) { + 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); @@ -40096,16 +47346,16 @@ void HP_map_vforeachmob(int ( *func ) (struct mob_data *md, va_list args), va_li } 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); + if (HPMHooks.count.HP_map_vforeachnpc_pre > 0) { + void (*preHookFunc) (int ( **func ) (struct npc_data *nd, va_list args), va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachnpc_pre; hIndex++ ) { + 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); + preHookFunc(&func, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40115,9 +47365,9 @@ void HP_map_vforeachnpc(int ( *func ) (struct npc_data *nd, va_list args), va_li HPMHooks.source.map.vforeachnpc(func, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_vforeachnpc_post ) { + if (HPMHooks.count.HP_map_vforeachnpc_post > 0) { 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++ ) { + 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); @@ -40128,16 +47378,16 @@ void HP_map_vforeachnpc(int ( *func ) (struct npc_data *nd, va_list args), va_li } 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); + if (HPMHooks.count.HP_map_vforeachregen_pre > 0) { + void (*preHookFunc) (int ( **func ) (struct block_list *bl, va_list args), va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachregen_pre; hIndex++ ) { + 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); + preHookFunc(&func, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40147,9 +47397,9 @@ void HP_map_vforeachregen(int ( *func ) (struct block_list *bl, va_list args), v HPMHooks.source.map.vforeachregen(func, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_vforeachregen_post ) { + if (HPMHooks.count.HP_map_vforeachregen_post > 0) { 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++ ) { + 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); @@ -40160,16 +47410,16 @@ void HP_map_vforeachregen(int ( *func ) (struct block_list *bl, va_list args), v } 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); + if (HPMHooks.count.HP_map_vforeachiddb_pre > 0) { + void (*preHookFunc) (int ( **func ) (struct block_list *bl, va_list args), va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachiddb_pre; hIndex++ ) { + 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); + preHookFunc(&func, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -40179,9 +47429,9 @@ void HP_map_vforeachiddb(int ( *func ) (struct block_list *bl, va_list args), va HPMHooks.source.map.vforeachiddb(func, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_vforeachiddb_post ) { + if (HPMHooks.count.HP_map_vforeachiddb_post > 0) { 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++ ) { + 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); @@ -40193,16 +47443,16 @@ void HP_map_vforeachiddb(int ( *func ) (struct block_list *bl, va_list args), va 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___ = 0; - 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); + if (HPMHooks.count.HP_map_vforeachinrange_pre > 0) { + int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinrange_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&func, ¢er, &range, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40212,12 +47462,12 @@ int HP_map_vforeachinrange(int ( *func ) (struct block_list *, va_list), struct 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++ ) { + if (HPMHooks.count.HP_map_vforeachinrange_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, func, center, range, type, ap___copy); va_end(ap___copy); } } @@ -40226,16 +47476,16 @@ int HP_map_vforeachinrange(int ( *func ) (struct block_list *, va_list), struct 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___ = 0; - 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); + if (HPMHooks.count.HP_map_vforeachinshootrange_pre > 0) { + int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinshootrange_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&func, ¢er, &range, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40245,12 +47495,12 @@ int HP_map_vforeachinshootrange(int ( *func ) (struct block_list *, va_list), st 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++ ) { + if (HPMHooks.count.HP_map_vforeachinshootrange_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, func, center, range, type, ap___copy); va_end(ap___copy); } } @@ -40259,16 +47509,16 @@ int HP_map_vforeachinshootrange(int ( *func ) (struct block_list *, va_list), st 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___ = 0; - 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); + if (HPMHooks.count.HP_map_vforeachinarea_pre > 0) { + int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinarea_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&func, &m, &x0, &y0, &x1, &y1, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40278,12 +47528,12 @@ int HP_map_vforeachinarea(int ( *func ) (struct block_list *, va_list), int16 m, 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++ ) { + if (HPMHooks.count.HP_map_vforeachinarea_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, func, m, x0, y0, x1, y1, type, ap___copy); va_end(ap___copy); } } @@ -40292,16 +47542,16 @@ int HP_map_vforeachinarea(int ( *func ) (struct block_list *, va_list), int16 m, 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___ = 0; - 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); + if (HPMHooks.count.HP_map_vforcountinrange_pre > 0) { + int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int *count, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinrange_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&func, ¢er, &range, &count, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40311,12 +47561,12 @@ int HP_map_vforcountinrange(int ( *func ) (struct block_list *, va_list), struct 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++ ) { + if (HPMHooks.count.HP_map_vforcountinrange_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, func, center, range, count, type, ap___copy); va_end(ap___copy); } } @@ -40325,16 +47575,16 @@ int HP_map_vforcountinrange(int ( *func ) (struct block_list *, va_list), struct 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___ = 0; - 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); + if (HPMHooks.count.HP_map_vforcountinarea_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforcountinarea_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&func, &m, &x0, &y0, &x1, &y1, &count, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40344,12 +47594,12 @@ int HP_map_vforcountinarea(int ( *func ) (struct block_list *, va_list), int16 m 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++ ) { + if (HPMHooks.count.HP_map_vforcountinarea_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, func, m, x0, y0, x1, y1, count, type, ap___copy); va_end(ap___copy); } } @@ -40358,16 +47608,16 @@ int HP_map_vforcountinarea(int ( *func ) (struct block_list *, va_list), int16 m 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___ = 0; - 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); + if (HPMHooks.count.HP_map_vforeachinmovearea_pre > 0) { + int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), struct block_list **center, int16 *range, int16 *dx, int16 *dy, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmovearea_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&func, ¢er, &range, &dx, &dy, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40377,12 +47627,12 @@ int HP_map_vforeachinmovearea(int ( *func ) (struct block_list *, va_list), stru 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++ ) { + if (HPMHooks.count.HP_map_vforeachinmovearea_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, func, center, range, dx, dy, type, ap___copy); va_end(ap___copy); } } @@ -40391,16 +47641,16 @@ int HP_map_vforeachinmovearea(int ( *func ) (struct block_list *, va_list), stru 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___ = 0; - 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); + if (HPMHooks.count.HP_map_vforeachincell_pre > 0) { + int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), int16 *m, int16 *x, int16 *y, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachincell_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&func, &m, &x, &y, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40410,12 +47660,12 @@ int HP_map_vforeachincell(int ( *func ) (struct block_list *, va_list), int16 m, 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++ ) { + if (HPMHooks.count.HP_map_vforeachincell_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, func, m, x, y, type, ap___copy); va_end(ap___copy); } } @@ -40424,16 +47674,16 @@ int HP_map_vforeachincell(int ( *func ) (struct block_list *, va_list), int16 m, 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___ = 0; - 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); + if (HPMHooks.count.HP_map_vforeachinpath_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinpath_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&func, &m, &x0, &y0, &x1, &y1, &range, &length, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40443,12 +47693,12 @@ int HP_map_vforeachinpath(int ( *func ) (struct block_list *, va_list), int16 m, 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++ ) { + if (HPMHooks.count.HP_map_vforeachinpath_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, func, m, x0, y0, x1, y1, range, length, type, ap___copy); va_end(ap___copy); } } @@ -40457,16 +47707,16 @@ int HP_map_vforeachinpath(int ( *func ) (struct block_list *, va_list), int16 m, int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m, int type, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachinmap_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *m, int *type, va_list args); + if (HPMHooks.count.HP_map_vforeachinmap_pre > 0) { + int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), int16 *m, int *type, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachinmap_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&func, &m, &type, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40476,12 +47726,12 @@ int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m, 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++ ) { + if (HPMHooks.count.HP_map_vforeachinmap_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, func, m, type, args___copy); va_end(args___copy); } } @@ -40490,16 +47740,16 @@ int HP_map_vforeachinmap(int ( *func ) (struct block_list *, va_list), int16 m, int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int16 instance_id, int type, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_vforeachininstance_pre ) { - int (*preHookFunc) (int ( *func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap); + if (HPMHooks.count.HP_map_vforeachininstance_pre > 0) { + int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), int16 *instance_id, int *type, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_vforeachininstance_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&func, &instance_id, &type, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40509,12 +47759,12 @@ int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int1 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++ ) { + if (HPMHooks.count.HP_map_vforeachininstance_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, func, instance_id, type, ap___copy); va_end(ap___copy); } } @@ -40523,14 +47773,14 @@ int HP_map_vforeachininstance(int ( *func ) (struct block_list *, va_list), int1 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 ) { + if (HPMHooks.count.HP_map_id2sd_pre > 0) { struct map_session_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2sd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40538,11 +47788,11 @@ struct map_session_data* HP_map_id2sd(int id) { { 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++ ) { + if (HPMHooks.count.HP_map_id2sd_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40550,14 +47800,14 @@ struct map_session_data* HP_map_id2sd(int id) { struct npc_data* HP_map_id2nd(int id) { int hIndex = 0; struct npc_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2nd_pre ) { + if (HPMHooks.count.HP_map_id2nd_pre > 0) { struct npc_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2nd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40565,11 +47815,11 @@ struct npc_data* HP_map_id2nd(int id) { { 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++ ) { + if (HPMHooks.count.HP_map_id2nd_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40577,14 +47827,14 @@ struct npc_data* HP_map_id2nd(int id) { struct mob_data* HP_map_id2md(int id) { int hIndex = 0; struct mob_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2md_pre ) { + if (HPMHooks.count.HP_map_id2md_pre > 0) { struct mob_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2md_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40592,11 +47842,11 @@ struct mob_data* HP_map_id2md(int id) { { 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++ ) { + if (HPMHooks.count.HP_map_id2md_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40604,14 +47854,14 @@ struct mob_data* HP_map_id2md(int id) { struct flooritem_data* HP_map_id2fi(int id) { int hIndex = 0; struct flooritem_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2fi_pre ) { + if (HPMHooks.count.HP_map_id2fi_pre > 0) { struct flooritem_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2fi_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2fi_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_id2fi_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40619,11 +47869,11 @@ struct flooritem_data* HP_map_id2fi(int id) { { retVal___ = HPMHooks.source.map.id2fi(id); } - if( HPMHooks.count.HP_map_id2fi_post ) { - struct flooritem_data* (*postHookFunc) (struct flooritem_data* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2fi_post; hIndex++ ) { + if (HPMHooks.count.HP_map_id2fi_post > 0) { + struct flooritem_data* (*postHookFunc) (struct flooritem_data* retVal___, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2fi_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2fi_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40631,14 +47881,14 @@ struct flooritem_data* HP_map_id2fi(int id) { struct chat_data* HP_map_id2cd(int id) { int hIndex = 0; struct chat_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2cd_pre ) { + if (HPMHooks.count.HP_map_id2cd_pre > 0) { struct chat_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2cd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40646,11 +47896,11 @@ struct chat_data* HP_map_id2cd(int id) { { 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++ ) { + if (HPMHooks.count.HP_map_id2cd_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40658,14 +47908,14 @@ struct chat_data* HP_map_id2cd(int id) { struct skill_unit* HP_map_id2su(int id) { int hIndex = 0; struct skill_unit* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2su_pre ) { + if (HPMHooks.count.HP_map_id2su_pre > 0) { struct skill_unit* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2su_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2su_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_id2su_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40673,11 +47923,11 @@ struct skill_unit* HP_map_id2su(int id) { { retVal___ = HPMHooks.source.map.id2su(id); } - if( HPMHooks.count.HP_map_id2su_post ) { - struct skill_unit* (*postHookFunc) (struct skill_unit* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2su_post; hIndex++ ) { + if (HPMHooks.count.HP_map_id2su_post > 0) { + struct skill_unit* (*postHookFunc) (struct skill_unit* retVal___, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2su_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2su_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40685,14 +47935,14 @@ struct skill_unit* HP_map_id2su(int id) { struct pet_data* HP_map_id2pd(int id) { int hIndex = 0; struct pet_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2pd_pre ) { + if (HPMHooks.count.HP_map_id2pd_pre > 0) { struct pet_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2pd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2pd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_id2pd_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40700,11 +47950,11 @@ struct pet_data* HP_map_id2pd(int id) { { retVal___ = HPMHooks.source.map.id2pd(id); } - if( HPMHooks.count.HP_map_id2pd_post ) { - struct pet_data* (*postHookFunc) (struct pet_data* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2pd_post; hIndex++ ) { + if (HPMHooks.count.HP_map_id2pd_post > 0) { + struct pet_data* (*postHookFunc) (struct pet_data* retVal___, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2pd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2pd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40712,14 +47962,14 @@ struct pet_data* HP_map_id2pd(int id) { struct homun_data* HP_map_id2hd(int id) { int hIndex = 0; struct homun_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2hd_pre ) { + if (HPMHooks.count.HP_map_id2hd_pre > 0) { struct homun_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2hd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40727,11 +47977,11 @@ struct homun_data* HP_map_id2hd(int id) { { 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++ ) { + if (HPMHooks.count.HP_map_id2hd_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40739,14 +47989,14 @@ struct homun_data* HP_map_id2hd(int id) { struct mercenary_data* HP_map_id2mc(int id) { int hIndex = 0; struct mercenary_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2mc_pre ) { + if (HPMHooks.count.HP_map_id2mc_pre > 0) { struct mercenary_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2mc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40754,11 +48004,11 @@ struct mercenary_data* HP_map_id2mc(int id) { { 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++ ) { + if (HPMHooks.count.HP_map_id2mc_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40766,14 +48016,14 @@ struct mercenary_data* HP_map_id2mc(int id) { struct elemental_data* HP_map_id2ed(int id) { int hIndex = 0; struct elemental_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2ed_pre ) { + if (HPMHooks.count.HP_map_id2ed_pre > 0) { struct elemental_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2ed_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2ed_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_id2ed_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40781,11 +48031,11 @@ struct elemental_data* HP_map_id2ed(int id) { { retVal___ = HPMHooks.source.map.id2ed(id); } - if( HPMHooks.count.HP_map_id2ed_post ) { - struct elemental_data* (*postHookFunc) (struct elemental_data* retVal___, int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2ed_post; hIndex++ ) { + if (HPMHooks.count.HP_map_id2ed_post > 0) { + struct elemental_data* (*postHookFunc) (struct elemental_data* retVal___, int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_id2ed_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_id2ed_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40793,14 +48043,14 @@ struct elemental_data* HP_map_id2ed(int id) { struct block_list* HP_map_id2bl(int id) { int hIndex = 0; struct block_list* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2bl_pre ) { + if (HPMHooks.count.HP_map_id2bl_pre > 0) { struct block_list* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2bl_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40808,11 +48058,11 @@ struct block_list* HP_map_id2bl(int id) { { 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++ ) { + if (HPMHooks.count.HP_map_id2bl_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40820,14 +48070,14 @@ struct block_list* HP_map_id2bl(int id) { bool HP_map_blid_exists(int id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_blid_exists_pre ) { + if (HPMHooks.count.HP_map_blid_exists_pre > 0) { bool (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_blid_exists_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40835,11 +48085,11 @@ bool HP_map_blid_exists(int id) { { 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++ ) { + if (HPMHooks.count.HP_map_blid_exists_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -40847,14 +48097,14 @@ bool HP_map_blid_exists(int id) { int16 HP_map_mapindex2mapid(unsigned short map_index) { int hIndex = 0; int16 retVal___ = 0; - if( HPMHooks.count.HP_map_mapindex2mapid_pre ) { + if (HPMHooks.count.HP_map_mapindex2mapid_pre > 0) { int16 (*preHookFunc) (unsigned short *map_index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_mapindex2mapid_pre[hIndex].func; retVal___ = preHookFunc(&map_index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40862,11 +48112,11 @@ int16 HP_map_mapindex2mapid(unsigned short map_index) { { retVal___ = HPMHooks.source.map.mapindex2mapid(map_index); } - if( HPMHooks.count.HP_map_mapindex2mapid_post ) { - int16 (*postHookFunc) (int16 retVal___, unsigned short *map_index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_post; hIndex++ ) { + if (HPMHooks.count.HP_map_mapindex2mapid_post > 0) { + int16 (*postHookFunc) (int16 retVal___, unsigned short map_index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_mapindex2mapid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_mapindex2mapid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &map_index); + retVal___ = postHookFunc(retVal___, map_index); } } return retVal___; @@ -40874,14 +48124,14 @@ int16 HP_map_mapindex2mapid(unsigned short map_index) { int16 HP_map_mapname2mapid(const char *name) { int hIndex = 0; int16 retVal___ = 0; - if( HPMHooks.count.HP_map_mapname2mapid_pre ) { - int16 (*preHookFunc) (const char *name); + if (HPMHooks.count.HP_map_mapname2mapid_pre > 0) { + int16 (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_mapname2mapid_pre[hIndex].func; - retVal___ = preHookFunc(name); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40889,9 +48139,9 @@ int16 HP_map_mapname2mapid(const char *name) { { retVal___ = HPMHooks.source.map.mapname2mapid(name); } - if( HPMHooks.count.HP_map_mapname2mapid_post ) { + if (HPMHooks.count.HP_map_mapname2mapid_post > 0) { int16 (*postHookFunc) (int16 retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2mapid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_mapname2mapid_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -40901,14 +48151,14 @@ int16 HP_map_mapname2mapid(const char *name) { int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_mapname2ipport_pre ) { - int (*preHookFunc) (unsigned short *name, uint32 *ip, uint16 *port); + if (HPMHooks.count.HP_map_mapname2ipport_pre > 0) { + int (*preHookFunc) (unsigned short *name, uint32 **ip, uint16 **port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_mapname2ipport_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name, &ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40916,11 +48166,11 @@ int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) { { 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++ ) { + if (HPMHooks.count.HP_map_mapname2ipport_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, name, ip, port); } } return retVal___; @@ -40928,14 +48178,14 @@ int HP_map_mapname2ipport(unsigned short name, uint32 *ip, uint16 *port) { int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_setipport_pre ) { + if (HPMHooks.count.HP_map_setipport_pre > 0) { int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_setipport_pre[hIndex].func; retVal___ = preHookFunc(&map_index, &ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40943,11 +48193,11 @@ int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.map.setipport(map_index, ip, port); } - if( HPMHooks.count.HP_map_setipport_post ) { - int (*postHookFunc) (int retVal___, unsigned short *map_index, uint32 *ip, uint16 *port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setipport_post; hIndex++ ) { + if (HPMHooks.count.HP_map_setipport_post > 0) { + int (*postHookFunc) (int retVal___, unsigned short map_index, 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___, &map_index, &ip, &port); + retVal___ = postHookFunc(retVal___, map_index, ip, port); } } return retVal___; @@ -40955,14 +48205,14 @@ int HP_map_setipport(unsigned short map_index, uint32 ip, uint16 port) { int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_eraseipport_pre ) { + if (HPMHooks.count.HP_map_eraseipport_pre > 0) { int (*preHookFunc) (unsigned short *map_index, uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_eraseipport_pre[hIndex].func; retVal___ = preHookFunc(&map_index, &ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40970,11 +48220,11 @@ int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.map.eraseipport(map_index, ip, port); } - if( HPMHooks.count.HP_map_eraseipport_post ) { - int (*postHookFunc) (int retVal___, unsigned short *map_index, uint32 *ip, uint16 *port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseipport_post; hIndex++ ) { + if (HPMHooks.count.HP_map_eraseipport_post > 0) { + int (*postHookFunc) (int retVal___, unsigned short map_index, 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___, &map_index, &ip, &port); + retVal___ = postHookFunc(retVal___, map_index, ip, port); } } return retVal___; @@ -40982,14 +48232,14 @@ int HP_map_eraseipport(unsigned short map_index, uint32 ip, uint16 port) { int HP_map_eraseallipport(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_eraseallipport_pre ) { + if (HPMHooks.count.HP_map_eraseallipport_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -40997,9 +48247,9 @@ int HP_map_eraseallipport(void) { { retVal___ = HPMHooks.source.map.eraseallipport(); } - if( HPMHooks.count.HP_map_eraseallipport_post ) { + if (HPMHooks.count.HP_map_eraseallipport_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_eraseallipport_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -41008,14 +48258,14 @@ int HP_map_eraseallipport(void) { } void HP_map_addiddb(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_map_addiddb_pre ) { - void (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_map_addiddb_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_addiddb_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41023,9 +48273,9 @@ void HP_map_addiddb(struct block_list *bl) { { HPMHooks.source.map.addiddb(bl); } - if( HPMHooks.count.HP_map_addiddb_post ) { + if (HPMHooks.count.HP_map_addiddb_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addiddb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_addiddb_post[hIndex].func; postHookFunc(bl); } @@ -41034,14 +48284,14 @@ void HP_map_addiddb(struct block_list *bl) { } void HP_map_deliddb(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_map_deliddb_pre ) { - void (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_map_deliddb_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_deliddb_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41049,38 +48299,38 @@ void HP_map_deliddb(struct block_list *bl) { { HPMHooks.source.map.deliddb(bl); } - if( HPMHooks.count.HP_map_deliddb_post ) { + if (HPMHooks.count.HP_map_deliddb_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_deliddb_post; hIndex++ ) { + 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) { +struct map_session_data* HP_map_nick2sd(const char *nick, bool allow_partial) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_nick2sd_pre ) { - struct map_session_data* (*preHookFunc) (const char *nick); + if (HPMHooks.count.HP_map_nick2sd_pre > 0) { + struct map_session_data* (*preHookFunc) (const char **nick, bool *allow_partial); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_nick2sd_pre[hIndex].func; - retVal___ = preHookFunc(nick); + retVal___ = preHookFunc(&nick, &allow_partial); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.map.nick2sd(nick); + retVal___ = HPMHooks.source.map.nick2sd(nick, allow_partial); } - 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++ ) { + if (HPMHooks.count.HP_map_nick2sd_post > 0) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, const char *nick, bool allow_partial); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_nick2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_nick2sd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nick); + retVal___ = postHookFunc(retVal___, nick, allow_partial); } } return retVal___; @@ -41088,14 +48338,14 @@ struct map_session_data* HP_map_nick2sd(const char *nick) { 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 ) { + if (HPMHooks.count.HP_map_getmob_boss_pre > 0) { struct mob_data* (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getmob_boss_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41103,11 +48353,11 @@ struct mob_data* HP_map_getmob_boss(int16 m) { { 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++ ) { + if (HPMHooks.count.HP_map_getmob_boss_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, m); } } return retVal___; @@ -41115,14 +48365,14 @@ struct mob_data* HP_map_getmob_boss(int16 m) { struct mob_data* HP_map_id2boss(int id) { int hIndex = 0; struct mob_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_id2boss_pre ) { + if (HPMHooks.count.HP_map_id2boss_pre > 0) { struct mob_data* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_id2boss_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41130,11 +48380,11 @@ struct mob_data* HP_map_id2boss(int id) { { 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++ ) { + if (HPMHooks.count.HP_map_id2boss_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -41142,14 +48392,14 @@ struct mob_data* HP_map_id2boss(int id) { uint32 HP_map_race_id2mask(int race) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_map_race_id2mask_pre ) { + if (HPMHooks.count.HP_map_race_id2mask_pre > 0) { uint32 (*preHookFunc) (int *race); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_race_id2mask_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_race_id2mask_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_race_id2mask_pre[hIndex].func; retVal___ = preHookFunc(&race); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41157,25 +48407,25 @@ uint32 HP_map_race_id2mask(int race) { { retVal___ = HPMHooks.source.map.race_id2mask(race); } - if( HPMHooks.count.HP_map_race_id2mask_post ) { - uint32 (*postHookFunc) (uint32 retVal___, int *race); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_race_id2mask_post; hIndex++ ) { + if (HPMHooks.count.HP_map_race_id2mask_post > 0) { + uint32 (*postHookFunc) (uint32 retVal___, int race); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_race_id2mask_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_race_id2mask_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &race); + retVal___ = postHookFunc(retVal___, race); } } return retVal___; } void HP_map_reloadnpc(bool clear) { int hIndex = 0; - if( HPMHooks.count.HP_map_reloadnpc_pre ) { + if (HPMHooks.count.HP_map_reloadnpc_pre > 0) { void (*preHookFunc) (bool *clear); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41183,26 +48433,26 @@ void HP_map_reloadnpc(bool clear) { { 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++ ) { + if (HPMHooks.count.HP_map_reloadnpc_post > 0) { + 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); + postHookFunc(clear); } } return; } -int HP_map_check_dir(int s_dir, int t_dir) { +int HP_map_check_dir(enum unit_dir s_dir, enum unit_dir t_dir) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_check_dir_pre ) { - int (*preHookFunc) (int *s_dir, int *t_dir); + if (HPMHooks.count.HP_map_check_dir_pre > 0) { + int (*preHookFunc) (enum unit_dir *s_dir, enum unit_dir *t_dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_check_dir_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41210,26 +48460,26 @@ int HP_map_check_dir(int s_dir, int t_dir) { { 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++ ) { + if (HPMHooks.count.HP_map_check_dir_post > 0) { + int (*postHookFunc) (int retVal___, enum unit_dir s_dir, enum unit_dir 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); + retVal___ = postHookFunc(retVal___, s_dir, t_dir); } } return retVal___; } -uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { +enum unit_dir HP_map_calc_dir(const struct block_list *src, int16 x, int16 y) { int hIndex = 0; - uint8 retVal___ = 0; - if( HPMHooks.count.HP_map_calc_dir_pre ) { - uint8 (*preHookFunc) (struct block_list *src, int16 *x, int16 *y); + enum unit_dir retVal___ = UNIT_DIR_UNDEFINED; + if (HPMHooks.count.HP_map_calc_dir_pre > 0) { + enum unit_dir (*preHookFunc) (const struct block_list **src, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_calc_dir_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41237,11 +48487,11 @@ uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { { 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++ ) { + if (HPMHooks.count.HP_map_calc_dir_post > 0) { + enum unit_dir (*postHookFunc) (enum unit_dir retVal___, const 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); + retVal___ = postHookFunc(retVal___, src, x, y); } } return retVal___; @@ -41249,14 +48499,14 @@ uint8 HP_map_calc_dir(struct block_list *src, int16 x, int16 y) { int HP_map_random_dir(struct block_list *bl, short *x, short *y) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_random_dir_pre ) { - int (*preHookFunc) (struct block_list *bl, short *x, short *y); + if (HPMHooks.count.HP_map_random_dir_pre > 0) { + int (*preHookFunc) (struct block_list **bl, short **x, short **y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41264,9 +48514,9 @@ int HP_map_random_dir(struct block_list *bl, short *x, short *y) { { retVal___ = HPMHooks.source.map.random_dir(bl, x, y); } - if( HPMHooks.count.HP_map_random_dir_post ) { + if (HPMHooks.count.HP_map_random_dir_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, short *x, short *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_random_dir_post; hIndex++ ) { + 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); } @@ -41276,16 +48526,16 @@ int HP_map_random_dir(struct block_list *bl, short *x, short *y) { int HP_map_cleanup_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_cleanup_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_map_cleanup_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41295,9 +48545,9 @@ int HP_map_cleanup_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.map.cleanup_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_cleanup_sub_post ) { + if (HPMHooks.count.HP_map_cleanup_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_sub_post; hIndex++ ) { + 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); @@ -41306,17 +48556,17 @@ int HP_map_cleanup_sub(struct block_list *bl, va_list ap) { } return retVal___; } -int HP_map_delmap(char *mapname) { +int HP_map_delmap(const char *mapname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_delmap_pre ) { - int (*preHookFunc) (char *mapname); + if (HPMHooks.count.HP_map_delmap_pre > 0) { + int (*preHookFunc) (const char **mapname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_delmap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_delmap_pre[hIndex].func; - retVal___ = preHookFunc(mapname); + retVal___ = preHookFunc(&mapname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41324,9 +48574,9 @@ int HP_map_delmap(char *mapname) { { 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++ ) { + if (HPMHooks.count.HP_map_delmap_post > 0) { + int (*postHookFunc) (int retVal___, const 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); } @@ -41335,14 +48585,14 @@ int HP_map_delmap(char *mapname) { } void HP_map_flags_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_flags_init_pre ) { + if (HPMHooks.count.HP_map_flags_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41350,9 +48600,9 @@ void HP_map_flags_init(void) { { HPMHooks.source.map.flags_init(); } - if( HPMHooks.count.HP_map_flags_init_post ) { + if (HPMHooks.count.HP_map_flags_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_flags_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_flags_init_post[hIndex].func; postHookFunc(); } @@ -41362,14 +48612,14 @@ void HP_map_flags_init(void) { 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___ = false; - 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); + if (HPMHooks.count.HP_map_iwall_set_pre > 0) { + bool (*preHookFunc) (int16 *m, int16 *x, int16 *y, int *size, int8 *dir, bool *shootable, const char **wall_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_set_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&m, &x, &y, &size, &dir, &shootable, &wall_name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41377,25 +48627,25 @@ bool HP_map_iwall_set(int16 m, int16 x, int16 y, int size, int8 dir, bool shoota { 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++ ) { + if (HPMHooks.count.HP_map_iwall_set_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_map_iwall_get_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_iwall_get_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41403,52 +48653,53 @@ void HP_map_iwall_get(struct map_session_data *sd) { { HPMHooks.source.map.iwall_get(sd); } - if( HPMHooks.count.HP_map_iwall_get_post ) { + if (HPMHooks.count.HP_map_iwall_get_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_get_post; hIndex++ ) { + 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) { +bool 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); + bool retVal___ = false; + if (HPMHooks.count.HP_map_iwall_remove_pre > 0) { + bool (*preHookFunc) (const char **wall_name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_remove_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&wall_name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.iwall_remove(wall_name); + retVal___ = 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++ ) { + if (HPMHooks.count.HP_map_iwall_remove_post > 0) { + bool (*postHookFunc) (bool retVal___, 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); + retVal___ = postHookFunc(retVal___, wall_name); } } - return; + return retVal___; } int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_addmobtolist_pre ) { - int (*preHookFunc) (unsigned short *m, struct spawn_data *spawn); + if (HPMHooks.count.HP_map_addmobtolist_pre > 0) { + int (*preHookFunc) (unsigned short *m, struct spawn_data **spawn); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addmobtolist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_addmobtolist_pre[hIndex].func; - retVal___ = preHookFunc(&m, spawn); + retVal___ = preHookFunc(&m, &spawn); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41456,25 +48707,25 @@ int HP_map_addmobtolist(unsigned short m, struct spawn_data *spawn) { { 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++ ) { + if (HPMHooks.count.HP_map_addmobtolist_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, m, spawn); } } return retVal___; } void HP_map_spawnmobs(int16 m) { int hIndex = 0; - if( HPMHooks.count.HP_map_spawnmobs_pre ) { + if (HPMHooks.count.HP_map_spawnmobs_pre > 0) { void (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_spawnmobs_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41482,25 +48733,25 @@ void HP_map_spawnmobs(int16 m) { { 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++ ) { + if (HPMHooks.count.HP_map_spawnmobs_post > 0) { + 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); + postHookFunc(m); } } return; } void HP_map_removemobs(int16 m) { int hIndex = 0; - if( HPMHooks.count.HP_map_removemobs_pre ) { + if (HPMHooks.count.HP_map_removemobs_pre > 0) { void (*preHookFunc) (int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41508,25 +48759,25 @@ void HP_map_removemobs(int16 m) { { 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++ ) { + if (HPMHooks.count.HP_map_removemobs_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_map_addmap2db_pre > 0) { + void (*preHookFunc) (struct map_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_addmap2db_pre[hIndex].func; - preHookFunc(m); + preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41534,9 +48785,9 @@ void HP_map_addmap2db(struct map_data *m) { { HPMHooks.source.map.addmap2db(m); } - if( HPMHooks.count.HP_map_addmap2db_post ) { + if (HPMHooks.count.HP_map_addmap2db_post > 0) { void (*postHookFunc) (struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap2db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_addmap2db_post[hIndex].func; postHookFunc(m); } @@ -41545,14 +48796,14 @@ void HP_map_addmap2db(struct map_data *m) { } void HP_map_removemapdb(struct map_data *m) { int hIndex = 0; - if( HPMHooks.count.HP_map_removemapdb_pre ) { - void (*preHookFunc) (struct map_data *m); + if (HPMHooks.count.HP_map_removemapdb_pre > 0) { + void (*preHookFunc) (struct map_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_removemapdb_pre[hIndex].func; - preHookFunc(m); + preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41560,9 +48811,9 @@ void HP_map_removemapdb(struct map_data *m) { { HPMHooks.source.map.removemapdb(m); } - if( HPMHooks.count.HP_map_removemapdb_post ) { + if (HPMHooks.count.HP_map_removemapdb_post > 0) { void (*postHookFunc) (struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_removemapdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_removemapdb_post[hIndex].func; postHookFunc(m); } @@ -41571,14 +48822,14 @@ void HP_map_removemapdb(struct map_data *m) { } void HP_map_clean(int i) { int hIndex = 0; - if( HPMHooks.count.HP_map_clean_pre ) { + if (HPMHooks.count.HP_map_clean_pre > 0) { void (*preHookFunc) (int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_clean_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41586,25 +48837,25 @@ void HP_map_clean(int i) { { 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++ ) { + if (HPMHooks.count.HP_map_clean_post > 0) { + 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); + postHookFunc(i); } } return; } void HP_map_do_shutdown(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_do_shutdown_pre ) { + if (HPMHooks.count.HP_map_do_shutdown_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41612,9 +48863,9 @@ void HP_map_do_shutdown(void) { { HPMHooks.source.map.do_shutdown(); } - if( HPMHooks.count.HP_map_do_shutdown_post ) { + if (HPMHooks.count.HP_map_do_shutdown_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_do_shutdown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_do_shutdown_post[hIndex].func; postHookFunc(); } @@ -41624,14 +48875,14 @@ void HP_map_do_shutdown(void) { int HP_map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_freeblock_timer_pre ) { + if (HPMHooks.count.HP_map_freeblock_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41639,11 +48890,11 @@ int HP_map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.map.freeblock_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_map_freeblock_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_freeblock_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_map_freeblock_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -41651,14 +48902,14 @@ int HP_map_freeblock_timer(int tid, int64 tick, int id, intptr_t data) { int HP_map_searchrandfreecell(int16 m, const struct block_list *bl, int16 *x, int16 *y, int stack) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_searchrandfreecell_pre ) { - int (*preHookFunc) (int16 *m, const struct block_list *bl, int16 *x, int16 *y, int *stack); + if (HPMHooks.count.HP_map_searchrandfreecell_pre > 0) { + int (*preHookFunc) (int16 *m, const struct block_list **bl, int16 **x, int16 **y, int *stack); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_searchrandfreecell_pre[hIndex].func; - retVal___ = preHookFunc(&m, bl, x, y, &stack); + retVal___ = preHookFunc(&m, &bl, &x, &y, &stack); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41666,11 +48917,11 @@ int HP_map_searchrandfreecell(int16 m, const struct block_list *bl, int16 *x, in { retVal___ = HPMHooks.source.map.searchrandfreecell(m, bl, x, y, stack); } - if( HPMHooks.count.HP_map_searchrandfreecell_post ) { - int (*postHookFunc) (int retVal___, int16 *m, const struct block_list *bl, int16 *x, int16 *y, int *stack); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_searchrandfreecell_post; hIndex++ ) { + if (HPMHooks.count.HP_map_searchrandfreecell_post > 0) { + int (*postHookFunc) (int retVal___, int16 m, const struct block_list *bl, 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, bl, x, y, &stack); + retVal___ = postHookFunc(retVal___, m, bl, x, y, stack); } } return retVal___; @@ -41678,16 +48929,16 @@ int HP_map_searchrandfreecell(int16 m, const struct block_list *bl, int16 *x, in int HP_map_count_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_count_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_map_count_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41697,9 +48948,9 @@ int HP_map_count_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.map.count_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_count_sub_post ) { + if (HPMHooks.count.HP_map_count_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_count_sub_post; hIndex++ ) { + 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); @@ -41710,18 +48961,17 @@ int HP_map_count_sub(struct block_list *bl, va_list ap) { } struct DBData HP_map_create_charid2nick(union DBKey key, va_list args) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_map_create_charid2nick_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_map_create_charid2nick_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41731,12 +48981,12 @@ struct DBData HP_map_create_charid2nick(union DBKey key, va_list args) { retVal___ = HPMHooks.source.map.create_charid2nick(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_map_create_charid2nick_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_charid2nick_post; hIndex++ ) { + if (HPMHooks.count.HP_map_create_charid2nick_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, union 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); + retVal___ = postHookFunc(retVal___, key, args___copy); va_end(args___copy); } } @@ -41745,16 +48995,16 @@ struct DBData HP_map_create_charid2nick(union DBKey key, va_list args) { int HP_map_removemobs_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_removemobs_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_map_removemobs_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41764,9 +49014,9 @@ int HP_map_removemobs_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.map.removemobs_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_removemobs_sub_post ) { + if (HPMHooks.count.HP_map_removemobs_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_removemobs_sub_post; hIndex++ ) { + 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); @@ -41777,16 +49027,15 @@ int HP_map_removemobs_sub(struct block_list *bl, va_list ap) { } 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 retVal___ = { 0 }; + if (HPMHooks.count.HP_map_gat2cell_pre > 0) { struct mapcell (*preHookFunc) (int *gat); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_gat2cell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41794,11 +49043,11 @@ struct mapcell HP_map_gat2cell(int gat) { { 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++ ) { + if (HPMHooks.count.HP_map_gat2cell_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, gat); } } return retVal___; @@ -41806,14 +49055,14 @@ struct mapcell HP_map_gat2cell(int gat) { int HP_map_cell2gat(struct mapcell cell) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_cell2gat_pre ) { + if (HPMHooks.count.HP_map_cell2gat_pre > 0) { int (*preHookFunc) (struct mapcell *cell); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cell2gat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41821,11 +49070,11 @@ int HP_map_cell2gat(struct mapcell cell) { { 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++ ) { + if (HPMHooks.count.HP_map_cell2gat_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, cell); } } return retVal___; @@ -41833,14 +49082,14 @@ int HP_map_cell2gat(struct mapcell cell) { int HP_map_getcellp(struct map_data *m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_getcellp_pre ) { - int (*preHookFunc) (struct map_data *m, const struct block_list *bl, int16 *x, int16 *y, cell_chk *cellchk); + if (HPMHooks.count.HP_map_getcellp_pre > 0) { + int (*preHookFunc) (struct map_data **m, const struct block_list **bl, int16 *x, int16 *y, cell_chk *cellchk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_getcellp_pre[hIndex].func; - retVal___ = preHookFunc(m, bl, &x, &y, &cellchk); + retVal___ = preHookFunc(&m, &bl, &x, &y, &cellchk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41848,25 +49097,25 @@ int HP_map_getcellp(struct map_data *m, const struct block_list *bl, int16 x, in { retVal___ = HPMHooks.source.map.getcellp(m, bl, x, y, cellchk); } - if( HPMHooks.count.HP_map_getcellp_post ) { - int (*postHookFunc) (int retVal___, struct map_data *m, const struct block_list *bl, int16 *x, int16 *y, cell_chk *cellchk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_getcellp_post; hIndex++ ) { + if (HPMHooks.count.HP_map_getcellp_post > 0) { + int (*postHookFunc) (int retVal___, struct map_data *m, const struct block_list *bl, 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, bl, &x, &y, &cellchk); + retVal___ = postHookFunc(retVal___, m, bl, 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 ) { + if (HPMHooks.count.HP_map_setcell_pre > 0) { void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_setcell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41874,11 +49123,11 @@ void HP_map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { { 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++ ) { + if (HPMHooks.count.HP_map_setcell_post > 0) { + 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); + postHookFunc(m, x, y, cell, flag); } } return; @@ -41886,14 +49135,14 @@ void HP_map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { int HP_map_sub_getcellp(struct map_data *m, const struct block_list *bl, int16 x, int16 y, cell_chk cellchk) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_sub_getcellp_pre ) { - int (*preHookFunc) (struct map_data *m, const struct block_list *bl, int16 *x, int16 *y, cell_chk *cellchk); + if (HPMHooks.count.HP_map_sub_getcellp_pre > 0) { + int (*preHookFunc) (struct map_data **m, const struct block_list **bl, int16 *x, int16 *y, cell_chk *cellchk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_pre; hIndex++ ) { + 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, bl, &x, &y, &cellchk); + retVal___ = preHookFunc(&m, &bl, &x, &y, &cellchk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41901,25 +49150,25 @@ int HP_map_sub_getcellp(struct map_data *m, const struct block_list *bl, int16 x { retVal___ = HPMHooks.source.map.sub_getcellp(m, bl, x, y, cellchk); } - if( HPMHooks.count.HP_map_sub_getcellp_post ) { - int (*postHookFunc) (int retVal___, struct map_data *m, const struct block_list *bl, int16 *x, int16 *y, cell_chk *cellchk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_getcellp_post; hIndex++ ) { + if (HPMHooks.count.HP_map_sub_getcellp_post > 0) { + int (*postHookFunc) (int retVal___, struct map_data *m, const struct block_list *bl, 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, bl, &x, &y, &cellchk); + retVal___ = postHookFunc(retVal___, m, bl, 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 ) { + if (HPMHooks.count.HP_map_sub_setcell_pre > 0) { void (*preHookFunc) (int16 *m, int16 *x, int16 *y, cell_t *cell, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sub_setcell_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41927,25 +49176,25 @@ void HP_map_sub_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag) { { 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++ ) { + if (HPMHooks.count.HP_map_sub_setcell_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_map_iwall_nextxy_pre > 0) { + void (*preHookFunc) (int16 *x, int16 *y, int8 *dir, int *pos, int16 **x1, int16 **y1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_iwall_nextxy_pre; hIndex++ ) { + 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); + preHookFunc(&x, &y, &dir, &pos, &x1, &y1); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -41953,29 +49202,28 @@ void HP_map_iwall_nextxy(int16 x, int16 y, int8 dir, int pos, int16 *x1, int16 * { 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++ ) { + if (HPMHooks.count.HP_map_iwall_nextxy_post > 0) { + 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); + postHookFunc(x, y, dir, pos, x1, y1); } } return; } struct DBData HP_map_create_map_data_other_server(union DBKey key, va_list args) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_map_create_map_data_other_server_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_map_create_map_data_other_server_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -41985,12 +49233,12 @@ struct DBData HP_map_create_map_data_other_server(union DBKey key, va_list 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 ) { - struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_create_map_data_other_server_post; hIndex++ ) { + if (HPMHooks.count.HP_map_create_map_data_other_server_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, union 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); + retVal___ = postHookFunc(retVal___, key, args___copy); va_end(args___copy); } } @@ -41999,16 +49247,16 @@ struct DBData HP_map_create_map_data_other_server(union DBKey key, va_list args) int HP_map_eraseallipport_sub(union DBKey key, struct DBData *data, va_list va) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_eraseallipport_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list va); + if (HPMHooks.count.HP_map_eraseallipport_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list va); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, va___copy); va_end(va___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42018,67 +49266,67 @@ int HP_map_eraseallipport_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list va); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_eraseallipport_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_map_eraseallipport_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, va___copy); va_end(va___copy); } } return retVal___; } -char* HP_map_init_mapcache(FILE *fp) { +bool HP_map_readfromcache(struct map_data *m) { int hIndex = 0; - char* retVal___ = NULL; - if( HPMHooks.count.HP_map_init_mapcache_pre ) { - char* (*preHookFunc) (FILE *fp); + bool retVal___ = false; + if (HPMHooks.count.HP_map_readfromcache_pre > 0) { + bool (*preHookFunc) (struct map_data **m); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_map_readfromcache_pre[hIndex].func; + retVal___ = preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.map.init_mapcache(fp); + retVal___ = HPMHooks.source.map.readfromcache(m); } - 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); + if (HPMHooks.count.HP_map_readfromcache_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_map_readfromcache_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m); } } return retVal___; } -int HP_map_readfromcache(struct map_data *m, char *buffer) { +bool HP_map_readfromcache_v1(FILE *fp, struct map_data *m, unsigned int file_size) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_readfromcache_pre ) { - int (*preHookFunc) (struct map_data *m, char *buffer); + bool retVal___ = false; + if (HPMHooks.count.HP_map_readfromcache_v1_pre > 0) { + bool (*preHookFunc) (FILE **fp, struct map_data **m, unsigned int *file_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_readfromcache_pre[hIndex].func; - retVal___ = preHookFunc(m, buffer); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_v1_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_map_readfromcache_v1_pre[hIndex].func; + retVal___ = preHookFunc(&fp, &m, &file_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.map.readfromcache(m, buffer); + retVal___ = HPMHooks.source.map.readfromcache_v1(fp, m, file_size); } - 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); + if (HPMHooks.count.HP_map_readfromcache_v1_post > 0) { + bool (*postHookFunc) (bool retVal___, FILE *fp, struct map_data *m, unsigned int file_size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_readfromcache_v1_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_map_readfromcache_v1_post[hIndex].func; + retVal___ = postHookFunc(retVal___, fp, m, file_size); } } return retVal___; @@ -42086,14 +49334,14 @@ int HP_map_readfromcache(struct map_data *m, char *buffer) { int HP_map_addmap(const char *mapname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_addmap_pre ) { - int (*preHookFunc) (const char *mapname); + if (HPMHooks.count.HP_map_addmap_pre > 0) { + int (*preHookFunc) (const char **mapname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_addmap_pre[hIndex].func; - retVal___ = preHookFunc(mapname); + retVal___ = preHookFunc(&mapname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42101,9 +49349,9 @@ int HP_map_addmap(const char *mapname) { { retVal___ = HPMHooks.source.map.addmap(mapname); } - if( HPMHooks.count.HP_map_addmap_post ) { + if (HPMHooks.count.HP_map_addmap_post > 0) { int (*postHookFunc) (int retVal___, const char *mapname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_addmap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_addmap_post[hIndex].func; retVal___ = postHookFunc(retVal___, mapname); } @@ -42112,14 +49360,14 @@ int HP_map_addmap(const char *mapname) { } void HP_map_delmapid(int id) { int hIndex = 0; - if( HPMHooks.count.HP_map_delmapid_pre ) { + if (HPMHooks.count.HP_map_delmapid_pre > 0) { void (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_delmapid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42127,25 +49375,25 @@ void HP_map_delmapid(int id) { { 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++ ) { + if (HPMHooks.count.HP_map_delmapid_post > 0) { + 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); + postHookFunc(id); } } return; } void HP_map_zone_db_clear(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_db_clear_pre ) { + if (HPMHooks.count.HP_map_zone_db_clear_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42153,9 +49401,9 @@ void HP_map_zone_db_clear(void) { { HPMHooks.source.map.zone_db_clear(); } - if( HPMHooks.count.HP_map_zone_db_clear_post ) { + if (HPMHooks.count.HP_map_zone_db_clear_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_db_clear_post; hIndex++ ) { + 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(); } @@ -42164,14 +49412,14 @@ void HP_map_zone_db_clear(void) { } void HP_map_list_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_list_final_pre ) { + if (HPMHooks.count.HP_map_list_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42179,9 +49427,9 @@ void HP_map_list_final(void) { { HPMHooks.source.map.list_final(); } - if( HPMHooks.count.HP_map_list_final_post ) { + if (HPMHooks.count.HP_map_list_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_list_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_list_final_post[hIndex].func; postHookFunc(); } @@ -42191,14 +49439,14 @@ void HP_map_list_final(void) { int HP_map_waterheight(char *mapname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_waterheight_pre ) { - int (*preHookFunc) (char *mapname); + if (HPMHooks.count.HP_map_waterheight_pre > 0) { + int (*preHookFunc) (char **mapname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_waterheight_pre[hIndex].func; - retVal___ = preHookFunc(mapname); + retVal___ = preHookFunc(&mapname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42206,9 +49454,9 @@ int HP_map_waterheight(char *mapname) { { retVal___ = HPMHooks.source.map.waterheight(mapname); } - if( HPMHooks.count.HP_map_waterheight_post ) { + if (HPMHooks.count.HP_map_waterheight_post > 0) { int (*postHookFunc) (int retVal___, char *mapname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_waterheight_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_waterheight_post[hIndex].func; retVal___ = postHookFunc(retVal___, mapname); } @@ -42218,14 +49466,14 @@ int HP_map_waterheight(char *mapname) { int HP_map_readgat(struct map_data *m) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_readgat_pre ) { - int (*preHookFunc) (struct map_data *m); + if (HPMHooks.count.HP_map_readgat_pre > 0) { + int (*preHookFunc) (struct map_data **m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_readgat_pre[hIndex].func; - retVal___ = preHookFunc(m); + retVal___ = preHookFunc(&m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42233,9 +49481,9 @@ int HP_map_readgat(struct map_data *m) { { retVal___ = HPMHooks.source.map.readgat(m); } - if( HPMHooks.count.HP_map_readgat_post ) { + if (HPMHooks.count.HP_map_readgat_post > 0) { int (*postHookFunc) (int retVal___, struct map_data *m); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_readgat_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_readgat_post[hIndex].func; retVal___ = postHookFunc(retVal___, m); } @@ -42245,14 +49493,14 @@ int HP_map_readgat(struct map_data *m) { int HP_map_readallmaps(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_readallmaps_pre ) { + if (HPMHooks.count.HP_map_readallmaps_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42260,118 +49508,146 @@ int HP_map_readallmaps(void) { { retVal___ = HPMHooks.source.map.readallmaps(); } - if( HPMHooks.count.HP_map_readallmaps_post ) { + if (HPMHooks.count.HP_map_readallmaps_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_readallmaps_post; hIndex++ ) { + 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) { +bool HP_map_config_read(const char *filename, bool imported) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_config_read_pre ) { - int (*preHookFunc) (char *cfgName); + bool retVal___ = false; + if (HPMHooks.count.HP_map_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_config_read_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.map.config_read(cfgName); + retVal___ = HPMHooks.source.map.config_read(filename, imported); } - 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++ ) { + if (HPMHooks.count.HP_map_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); + 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); + retVal___ = postHookFunc(retVal___, filename, imported); } } return retVal___; } -int HP_map_config_read_sub(char *cfgName) { +bool HP_map_read_npclist(const char *filename, bool imported) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_config_read_sub_pre ) { - int (*preHookFunc) (char *cfgName); + bool retVal___ = false; + if (HPMHooks.count.HP_map_read_npclist_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *imported); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_read_npclist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_map_read_npclist_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &imported); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.map.read_npclist(filename, imported); + } + if (HPMHooks.count.HP_map_read_npclist_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_read_npclist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_map_read_npclist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, imported); + } + } + return retVal___; +} +bool HP_map_inter_config_read(const char *filename, bool imported) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_map_inter_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - 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); + 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(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.map.config_read_sub(cfgName); + retVal___ = HPMHooks.source.map.inter_config_read(filename, imported); } - 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); + if (HPMHooks.count.HP_map_inter_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); + 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___, filename, imported); } } return retVal___; } -void HP_map_reloadnpc_sub(char *cfgName) { +bool HP_map_inter_config_read_database_names(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; - if( HPMHooks.count.HP_map_reloadnpc_sub_pre ) { - void (*preHookFunc) (char *cfgName); + bool retVal___ = false; + if (HPMHooks.count.HP_map_inter_config_read_database_names_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_reloadnpc_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_map_reloadnpc_sub_pre[hIndex].func; - preHookFunc(cfgName); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_database_names_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_map_inter_config_read_database_names_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.reloadnpc_sub(cfgName); + retVal___ = HPMHooks.source.map.inter_config_read_database_names(filename, config, imported); } - 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); + if (HPMHooks.count.HP_map_inter_config_read_database_names_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_database_names_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_map_inter_config_read_database_names_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } - return; + return retVal___; } -int HP_map_inter_config_read(char *cfgName) { +bool HP_map_inter_config_read_connection(const char *filename, const struct config_t *config, bool imported) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_map_inter_config_read_pre ) { - int (*preHookFunc) (char *cfgName); + bool retVal___ = false; + if (HPMHooks.count.HP_map_inter_config_read_connection_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config, bool *imported); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_connection_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_map_inter_config_read_connection_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.map.inter_config_read(cfgName); + retVal___ = HPMHooks.source.map.inter_config_read_connection(filename, config, imported); } - 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); + if (HPMHooks.count.HP_map_inter_config_read_connection_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config, bool imported); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_inter_config_read_connection_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_map_inter_config_read_connection_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; @@ -42379,14 +49655,14 @@ int HP_map_inter_config_read(char *cfgName) { int HP_map_sql_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_sql_init_pre ) { + if (HPMHooks.count.HP_map_sql_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42394,9 +49670,9 @@ int HP_map_sql_init(void) { { retVal___ = HPMHooks.source.map.sql_init(); } - if( HPMHooks.count.HP_map_sql_init_post ) { + if (HPMHooks.count.HP_map_sql_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_init_post; hIndex++ ) { + 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___); } @@ -42406,14 +49682,14 @@ int HP_map_sql_init(void) { int HP_map_sql_close(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_sql_close_pre ) { + if (HPMHooks.count.HP_map_sql_close_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42421,9 +49697,9 @@ int HP_map_sql_close(void) { { retVal___ = HPMHooks.source.map.sql_close(); } - if( HPMHooks.count.HP_map_sql_close_post ) { + if (HPMHooks.count.HP_map_sql_close_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_sql_close_post; hIndex++ ) { + 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___); } @@ -42433,14 +49709,14 @@ int HP_map_sql_close(void) { bool HP_map_zone_mf_cache(int m, char *flag, char *params) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_zone_mf_cache_pre ) { - bool (*preHookFunc) (int *m, char *flag, char *params); + if (HPMHooks.count.HP_map_zone_mf_cache_pre > 0) { + bool (*preHookFunc) (int *m, char **flag, char **params); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_mf_cache_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&m, &flag, ¶ms); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42448,26 +49724,26 @@ bool HP_map_zone_mf_cache(int m, char *flag, char *params) { { 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++ ) { + if (HPMHooks.count.HP_map_zone_mf_cache_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, m, flag, params); } } return retVal___; } -unsigned short HP_map_zone_str2itemid(const char *name) { +int HP_map_zone_str2itemid(const char *name) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_map_zone_str2itemid_pre ) { - unsigned short (*preHookFunc) (const char *name); + int retVal___ = 0; + if (HPMHooks.count.HP_map_zone_str2itemid_pre > 0) { + int (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2itemid_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42475,9 +49751,9 @@ unsigned short HP_map_zone_str2itemid(const char *name) { { 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++ ) { + if (HPMHooks.count.HP_map_zone_str2itemid_post > 0) { + int (*postHookFunc) (int 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); } @@ -42487,14 +49763,14 @@ unsigned short HP_map_zone_str2itemid(const char *name) { unsigned short HP_map_zone_str2skillid(const char *name) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_map_zone_str2skillid_pre ) { - unsigned short (*preHookFunc) (const char *name); + if (HPMHooks.count.HP_map_zone_str2skillid_pre > 0) { + unsigned short (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42502,9 +49778,9 @@ unsigned short HP_map_zone_str2skillid(const char *name) { { retVal___ = HPMHooks.source.map.zone_str2skillid(name); } - if( HPMHooks.count.HP_map_zone_str2skillid_post ) { + if (HPMHooks.count.HP_map_zone_str2skillid_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_str2skillid_post; hIndex++ ) { + 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); } @@ -42514,14 +49790,14 @@ unsigned short HP_map_zone_str2skillid(const char *name) { enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype *subtype) { int hIndex = 0; enum bl_type retVal___ = BL_NUL; - if( HPMHooks.count.HP_map_zone_bl_type_pre ) { - enum bl_type (*preHookFunc) (const char *entry, enum map_zone_skill_subtype *subtype); + if (HPMHooks.count.HP_map_zone_bl_type_pre > 0) { + enum bl_type (*preHookFunc) (const char **entry, enum map_zone_skill_subtype **subtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_bl_type_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&entry, &subtype); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42529,9 +49805,9 @@ enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype { retVal___ = HPMHooks.source.map.zone_bl_type(entry, subtype); } - if( HPMHooks.count.HP_map_zone_bl_type_post ) { + if (HPMHooks.count.HP_map_zone_bl_type_post > 0) { 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++ ) { + 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); } @@ -42540,14 +49816,14 @@ enum bl_type HP_map_zone_bl_type(const char *entry, enum map_zone_skill_subtype } void HP_map_read_zone_db(void) { int hIndex = 0; - if( HPMHooks.count.HP_map_read_zone_db_pre ) { + if (HPMHooks.count.HP_map_read_zone_db_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42555,9 +49831,9 @@ void HP_map_read_zone_db(void) { { HPMHooks.source.map.read_zone_db(); } - if( HPMHooks.count.HP_map_read_zone_db_post ) { + if (HPMHooks.count.HP_map_read_zone_db_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_read_zone_db_post; hIndex++ ) { + 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(); } @@ -42567,16 +49843,16 @@ void HP_map_read_zone_db(void) { int HP_map_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_db_final_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_map_db_final_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42586,12 +49862,12 @@ int HP_map_db_final(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_db_final_post; hIndex++ ) { + if (HPMHooks.count.HP_map_db_final_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -42600,16 +49876,16 @@ int HP_map_db_final(union DBKey key, struct DBData *data, va_list ap) { int HP_map_nick_db_final(union DBKey key, struct DBData *data, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_nick_db_final_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list args); + if (HPMHooks.count.HP_map_nick_db_final_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42619,12 +49895,12 @@ int HP_map_nick_db_final(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_nick_db_final_post; hIndex++ ) { + if (HPMHooks.count.HP_map_nick_db_final_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, args___copy); va_end(args___copy); } } @@ -42633,16 +49909,16 @@ int HP_map_nick_db_final(union DBKey key, struct DBData *data, va_list args) { int HP_map_cleanup_db_sub(union DBKey key, struct DBData *data, va_list va) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_cleanup_db_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list va); + if (HPMHooks.count.HP_map_cleanup_db_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list va); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, va___copy); va_end(va___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42652,12 +49928,12 @@ int HP_map_cleanup_db_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list va); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_cleanup_db_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_map_cleanup_db_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, va___copy); va_end(va___copy); } } @@ -42666,16 +49942,16 @@ int HP_map_cleanup_db_sub(union DBKey key, struct DBData *data, va_list va) { int HP_map_abort_sub(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_abort_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + if (HPMHooks.count.HP_map_abort_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42685,9 +49961,9 @@ int HP_map_abort_sub(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.map.abort_sub(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_map_abort_sub_post ) { + if (HPMHooks.count.HP_map_abort_sub_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_abort_sub_post; hIndex++ ) { + 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); @@ -42698,14 +49974,14 @@ int HP_map_abort_sub(struct map_session_data *sd, va_list ap) { } void HP_map_update_cell_bl(struct block_list *bl, bool increase) { int hIndex = 0; - if( HPMHooks.count.HP_map_update_cell_bl_pre ) { - void (*preHookFunc) (struct block_list *bl, bool *increase); + if (HPMHooks.count.HP_map_update_cell_bl_pre > 0) { + void (*preHookFunc) (struct block_list **bl, bool *increase); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_update_cell_bl_pre[hIndex].func; - preHookFunc(bl, &increase); + preHookFunc(&bl, &increase); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42713,11 +49989,11 @@ void HP_map_update_cell_bl(struct block_list *bl, bool increase) { { HPMHooks.source.map.update_cell_bl(bl, increase); } - if( HPMHooks.count.HP_map_update_cell_bl_post ) { - void (*postHookFunc) (struct block_list *bl, bool *increase); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_post; hIndex++ ) { + if (HPMHooks.count.HP_map_update_cell_bl_post > 0) { + void (*postHookFunc) (struct block_list *bl, bool increase); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_update_cell_bl_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_update_cell_bl_post[hIndex].func; - postHookFunc(bl, &increase); + postHookFunc(bl, increase); } } return; @@ -42725,14 +50001,14 @@ void HP_map_update_cell_bl(struct block_list *bl, bool increase) { int HP_map_get_new_bonus_id(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_map_get_new_bonus_id_pre ) { + if (HPMHooks.count.HP_map_get_new_bonus_id_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_get_new_bonus_id_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42740,52 +50016,53 @@ int HP_map_get_new_bonus_id(void) { { retVal___ = HPMHooks.source.map.get_new_bonus_id(); } - if( HPMHooks.count.HP_map_get_new_bonus_id_post ) { + if (HPMHooks.count.HP_map_get_new_bonus_id_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_get_new_bonus_id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_get_new_bonus_id_post[hIndex].func; retVal___ = postHookFunc(retVal___); } } return retVal___; } -void HP_map_add_questinfo(int m, struct questinfo *qi) { +bool HP_map_add_questinfo(int m, struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_map_add_questinfo_pre ) { - void (*preHookFunc) (int *m, struct questinfo *qi); + bool retVal___ = false; + if (HPMHooks.count.HP_map_add_questinfo_pre > 0) { + bool (*preHookFunc) (int *m, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_add_questinfo_pre[hIndex].func; - preHookFunc(&m, qi); + retVal___ = preHookFunc(&m, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.map.add_questinfo(m, qi); + retVal___ = HPMHooks.source.map.add_questinfo(m, nd); } - if( HPMHooks.count.HP_map_add_questinfo_post ) { - void (*postHookFunc) (int *m, struct questinfo *qi); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_post; hIndex++ ) { + if (HPMHooks.count.HP_map_add_questinfo_post > 0) { + bool (*postHookFunc) (bool retVal___, int m, struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_add_questinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_add_questinfo_post[hIndex].func; - postHookFunc(&m, qi); + retVal___ = postHookFunc(retVal___, m, nd); } } - return; + return retVal___; } bool HP_map_remove_questinfo(int m, struct npc_data *nd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_map_remove_questinfo_pre ) { - bool (*preHookFunc) (int *m, struct npc_data *nd); + if (HPMHooks.count.HP_map_remove_questinfo_pre > 0) { + bool (*preHookFunc) (int *m, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_remove_questinfo_pre[hIndex].func; - retVal___ = preHookFunc(&m, nd); + retVal___ = preHookFunc(&m, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42793,11 +50070,11 @@ bool HP_map_remove_questinfo(int m, struct npc_data *nd) { { retVal___ = HPMHooks.source.map.remove_questinfo(m, nd); } - if( HPMHooks.count.HP_map_remove_questinfo_post ) { - bool (*postHookFunc) (bool retVal___, int *m, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_post; hIndex++ ) { + if (HPMHooks.count.HP_map_remove_questinfo_post > 0) { + bool (*postHookFunc) (bool retVal___, int m, struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_remove_questinfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_remove_questinfo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &m, nd); + retVal___ = postHookFunc(retVal___, m, nd); } } return retVal___; @@ -42805,14 +50082,14 @@ bool HP_map_remove_questinfo(int m, struct npc_data *nd) { struct map_zone_data* HP_map_merge_zone(struct map_zone_data *main, struct map_zone_data *other) { int hIndex = 0; struct map_zone_data* retVal___ = NULL; - if( HPMHooks.count.HP_map_merge_zone_pre ) { - struct map_zone_data* (*preHookFunc) (struct map_zone_data *main, struct map_zone_data *other); + if (HPMHooks.count.HP_map_merge_zone_pre > 0) { + struct map_zone_data* (*preHookFunc) (struct map_zone_data **main, struct map_zone_data **other); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_merge_zone_pre[hIndex].func; - retVal___ = preHookFunc(main, other); + retVal___ = preHookFunc(&main, &other); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42820,9 +50097,9 @@ struct map_zone_data* HP_map_merge_zone(struct map_zone_data *main, struct map_z { retVal___ = HPMHooks.source.map.merge_zone(main, other); } - if( HPMHooks.count.HP_map_merge_zone_post ) { + if (HPMHooks.count.HP_map_merge_zone_post > 0) { struct map_zone_data* (*postHookFunc) (struct map_zone_data* retVal___, struct map_zone_data *main, struct map_zone_data *other); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_merge_zone_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_merge_zone_post[hIndex].func; retVal___ = postHookFunc(retVal___, main, other); } @@ -42831,14 +50108,14 @@ struct map_zone_data* HP_map_merge_zone(struct map_zone_data *main, struct map_z } void HP_map_zone_clear_single(struct map_zone_data *zone) { int hIndex = 0; - if( HPMHooks.count.HP_map_zone_clear_single_pre ) { - void (*preHookFunc) (struct map_zone_data *zone); + if (HPMHooks.count.HP_map_zone_clear_single_pre > 0) { + void (*preHookFunc) (struct map_zone_data **zone); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_map_zone_clear_single_pre[hIndex].func; - preHookFunc(zone); + preHookFunc(&zone); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42846,27 +50123,81 @@ void HP_map_zone_clear_single(struct map_zone_data *zone) { { HPMHooks.source.map.zone_clear_single(zone); } - if( HPMHooks.count.HP_map_zone_clear_single_post ) { + if (HPMHooks.count.HP_map_zone_clear_single_post > 0) { void (*postHookFunc) (struct map_zone_data *zone); - for(hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_map_zone_clear_single_post; hIndex++) { postHookFunc = HPMHooks.list.HP_map_zone_clear_single_post[hIndex].func; postHookFunc(zone); } } return; } -/* mapindex */ +/* mapindex_interface */ +bool HP_mapindex_config_read_dbpath(const char *filename, const struct config_t *config) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mapindex_config_read_dbpath_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_t **config); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_dbpath_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapindex_config_read_dbpath_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &config); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.config_read_dbpath(filename, config); + } + if (HPMHooks.count.HP_mapindex_config_read_dbpath_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_t *config); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_dbpath_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapindex_config_read_dbpath_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, config); + } + } + return retVal___; +} +bool HP_mapindex_config_read(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mapindex_config_read_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mapindex_config_read_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mapindex.config_read(); + } + if (HPMHooks.count.HP_mapindex_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_config_read_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mapindex_config_read_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} int HP_mapindex_init(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapindex_init_pre ) { + if (HPMHooks.count.HP_mapindex_init_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_init_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42874,9 +50205,9 @@ int HP_mapindex_init(void) { { retVal___ = HPMHooks.source.mapindex.init(); } - if( HPMHooks.count.HP_mapindex_init_post ) { + if (HPMHooks.count.HP_mapindex_init_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_init_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -42885,14 +50216,14 @@ int HP_mapindex_init(void) { } void HP_mapindex_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapindex_final_pre ) { + if (HPMHooks.count.HP_mapindex_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42900,9 +50231,9 @@ void HP_mapindex_final(void) { { HPMHooks.source.mapindex.final(); } - if( HPMHooks.count.HP_mapindex_final_post ) { + if (HPMHooks.count.HP_mapindex_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_final_post[hIndex].func; postHookFunc(); } @@ -42912,14 +50243,14 @@ void HP_mapindex_final(void) { int HP_mapindex_addmap(int index, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapindex_addmap_pre ) { - int (*preHookFunc) (int *index, const char *name); + if (HPMHooks.count.HP_mapindex_addmap_pre > 0) { + int (*preHookFunc) (int *index, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_addmap_pre[hIndex].func; - retVal___ = preHookFunc(&index, name); + retVal___ = preHookFunc(&index, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42927,25 +50258,25 @@ int HP_mapindex_addmap(int index, const char *name) { { retVal___ = HPMHooks.source.mapindex.addmap(index, name); } - if( HPMHooks.count.HP_mapindex_addmap_post ) { - int (*postHookFunc) (int retVal___, int *index, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++ ) { + if (HPMHooks.count.HP_mapindex_addmap_post > 0) { + int (*postHookFunc) (int retVal___, int index, const char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_addmap_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &index, name); + retVal___ = postHookFunc(retVal___, index, name); } } return retVal___; } void HP_mapindex_removemap(int index) { int hIndex = 0; - if( HPMHooks.count.HP_mapindex_removemap_pre ) { + if (HPMHooks.count.HP_mapindex_removemap_pre > 0) { void (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_removemap_pre[hIndex].func; preHookFunc(&index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -42953,11 +50284,11 @@ void HP_mapindex_removemap(int index) { { HPMHooks.source.mapindex.removemap(index); } - if( HPMHooks.count.HP_mapindex_removemap_post ) { - void (*postHookFunc) (int *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++ ) { + if (HPMHooks.count.HP_mapindex_removemap_post > 0) { + void (*postHookFunc) (int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_removemap_post[hIndex].func; - postHookFunc(&index); + postHookFunc(index); } } return; @@ -42965,14 +50296,14 @@ void HP_mapindex_removemap(int index) { const char* HP_mapindex_getmapname(const char *string, char *output) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_getmapname_pre ) { - const char* (*preHookFunc) (const char *string, char *output); + if (HPMHooks.count.HP_mapindex_getmapname_pre > 0) { + const char* (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_getmapname_pre[hIndex].func; - retVal___ = preHookFunc(string, output); + retVal___ = preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -42980,9 +50311,9 @@ const char* HP_mapindex_getmapname(const char *string, char *output) { { retVal___ = HPMHooks.source.mapindex.getmapname(string, output); } - if( HPMHooks.count.HP_mapindex_getmapname_post ) { + if (HPMHooks.count.HP_mapindex_getmapname_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_getmapname_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, output); } @@ -42992,14 +50323,14 @@ const char* HP_mapindex_getmapname(const char *string, char *output) { const char* HP_mapindex_getmapname_ext(const char *string, char *output) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_getmapname_ext_pre ) { - const char* (*preHookFunc) (const char *string, char *output); + if (HPMHooks.count.HP_mapindex_getmapname_ext_pre > 0) { + const char* (*preHookFunc) (const char **string, char **output); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_pre[hIndex].func; - retVal___ = preHookFunc(string, output); + retVal___ = preHookFunc(&string, &output); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43007,9 +50338,9 @@ const char* HP_mapindex_getmapname_ext(const char *string, char *output) { { retVal___ = HPMHooks.source.mapindex.getmapname_ext(string, output); } - if( HPMHooks.count.HP_mapindex_getmapname_ext_post ) { + if (HPMHooks.count.HP_mapindex_getmapname_ext_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *string, char *output); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, output); } @@ -43019,14 +50350,14 @@ const char* HP_mapindex_getmapname_ext(const char *string, char *output) { unsigned short HP_mapindex_name2id(const char *p1) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_mapindex_name2id_pre ) { - unsigned short (*preHookFunc) (const char *p1); + if (HPMHooks.count.HP_mapindex_name2id_pre > 0) { + unsigned short (*preHookFunc) (const char **p1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_name2id_pre[hIndex].func; - retVal___ = preHookFunc(p1); + retVal___ = preHookFunc(&p1); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43034,9 +50365,9 @@ unsigned short HP_mapindex_name2id(const char *p1) { { retVal___ = HPMHooks.source.mapindex.name2id(p1); } - if( HPMHooks.count.HP_mapindex_name2id_post ) { + if (HPMHooks.count.HP_mapindex_name2id_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, const char *p1); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_name2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, p1); } @@ -43046,14 +50377,14 @@ unsigned short HP_mapindex_name2id(const char *p1) { const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const char *func) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_mapindex_id2name_pre ) { - const char* (*preHookFunc) (uint16 *id, const char *file, int *line, const char *func); + if (HPMHooks.count.HP_mapindex_id2name_pre > 0) { + const char* (*preHookFunc) (uint16 *id, const char **file, int *line, const char **func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_id2name_pre[hIndex].func; - retVal___ = preHookFunc(&id, file, &line, func); + retVal___ = preHookFunc(&id, &file, &line, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43061,11 +50392,11 @@ const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const cha { retVal___ = HPMHooks.source.mapindex.id2name(id, file, line, func); } - if( HPMHooks.count.HP_mapindex_id2name_post ) { - const char* (*postHookFunc) (const char* retVal___, uint16 *id, const char *file, int *line, const char *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++ ) { + if (HPMHooks.count.HP_mapindex_id2name_post > 0) { + const char* (*postHookFunc) (const char* retVal___, uint16 id, const char *file, int line, const char *func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_id2name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id, file, &line, func); + retVal___ = postHookFunc(retVal___, id, file, line, func); } } return retVal___; @@ -43073,14 +50404,14 @@ const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const cha bool HP_mapindex_check_default(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapindex_check_default_pre ) { + if (HPMHooks.count.HP_mapindex_check_default_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapindex_check_default_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43088,27 +50419,27 @@ bool HP_mapindex_check_default(void) { { retVal___ = HPMHooks.source.mapindex.check_default(); } - if( HPMHooks.count.HP_mapindex_check_default_post ) { + if (HPMHooks.count.HP_mapindex_check_default_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapindex_check_default_post[hIndex].func; retVal___ = postHookFunc(retVal___); } } return retVal___; } -/* mapit */ +/* mapit_interface */ 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 ) { + if (HPMHooks.count.HP_mapit_alloc_pre > 0) { struct s_mapiterator* (*preHookFunc) (enum e_mapitflags *flags, enum bl_type *types); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_alloc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43116,25 +50447,25 @@ struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types { 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++ ) { + if (HPMHooks.count.HP_mapit_alloc_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_mapit_free_pre > 0) { + void (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapit_free_pre[hIndex].func; - preHookFunc(iter); + preHookFunc(&iter); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43142,9 +50473,9 @@ void HP_mapit_free(struct s_mapiterator *iter) { { HPMHooks.source.mapit.free(iter); } - if( HPMHooks.count.HP_mapit_free_post ) { + if (HPMHooks.count.HP_mapit_free_post > 0) { void (*postHookFunc) (struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapit_free_post[hIndex].func; postHookFunc(iter); } @@ -43154,14 +50485,14 @@ void HP_mapit_free(struct s_mapiterator *iter) { 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); + if (HPMHooks.count.HP_mapit_first_pre > 0) { + struct block_list* (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapit_first_pre[hIndex].func; - retVal___ = preHookFunc(iter); + retVal___ = preHookFunc(&iter); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43169,9 +50500,9 @@ struct block_list* HP_mapit_first(struct s_mapiterator *iter) { { retVal___ = HPMHooks.source.mapit.first(iter); } - if( HPMHooks.count.HP_mapit_first_post ) { + if (HPMHooks.count.HP_mapit_first_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_first_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapit_first_post[hIndex].func; retVal___ = postHookFunc(retVal___, iter); } @@ -43181,14 +50512,14 @@ struct block_list* HP_mapit_first(struct s_mapiterator *iter) { 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); + if (HPMHooks.count.HP_mapit_last_pre > 0) { + struct block_list* (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapit_last_pre[hIndex].func; - retVal___ = preHookFunc(iter); + retVal___ = preHookFunc(&iter); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43196,9 +50527,9 @@ struct block_list* HP_mapit_last(struct s_mapiterator *iter) { { retVal___ = HPMHooks.source.mapit.last(iter); } - if( HPMHooks.count.HP_mapit_last_post ) { + if (HPMHooks.count.HP_mapit_last_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_last_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapit_last_post[hIndex].func; retVal___ = postHookFunc(retVal___, iter); } @@ -43208,14 +50539,14 @@ struct block_list* HP_mapit_last(struct s_mapiterator *iter) { 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); + if (HPMHooks.count.HP_mapit_next_pre > 0) { + struct block_list* (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapit_next_pre[hIndex].func; - retVal___ = preHookFunc(iter); + retVal___ = preHookFunc(&iter); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43223,9 +50554,9 @@ struct block_list* HP_mapit_next(struct s_mapiterator *iter) { { retVal___ = HPMHooks.source.mapit.next(iter); } - if( HPMHooks.count.HP_mapit_next_post ) { + if (HPMHooks.count.HP_mapit_next_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_next_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapit_next_post[hIndex].func; retVal___ = postHookFunc(retVal___, iter); } @@ -43235,14 +50566,14 @@ struct block_list* HP_mapit_next(struct s_mapiterator *iter) { 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); + if (HPMHooks.count.HP_mapit_prev_pre > 0) { + struct block_list* (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapit_prev_pre[hIndex].func; - retVal___ = preHookFunc(iter); + retVal___ = preHookFunc(&iter); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43250,9 +50581,9 @@ struct block_list* HP_mapit_prev(struct s_mapiterator *iter) { { retVal___ = HPMHooks.source.mapit.prev(iter); } - if( HPMHooks.count.HP_mapit_prev_post ) { + if (HPMHooks.count.HP_mapit_prev_post > 0) { struct block_list* (*postHookFunc) (struct block_list* retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_prev_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapit_prev_post[hIndex].func; retVal___ = postHookFunc(retVal___, iter); } @@ -43262,14 +50593,14 @@ struct block_list* HP_mapit_prev(struct s_mapiterator *iter) { bool HP_mapit_exists(struct s_mapiterator *iter) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapit_exists_pre ) { - bool (*preHookFunc) (struct s_mapiterator *iter); + if (HPMHooks.count.HP_mapit_exists_pre > 0) { + bool (*preHookFunc) (struct s_mapiterator **iter); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapit_exists_pre[hIndex].func; - retVal___ = preHookFunc(iter); + retVal___ = preHookFunc(&iter); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43277,26 +50608,26 @@ bool HP_mapit_exists(struct s_mapiterator *iter) { { retVal___ = HPMHooks.source.mapit.exists(iter); } - if( HPMHooks.count.HP_mapit_exists_post ) { + if (HPMHooks.count.HP_mapit_exists_post > 0) { bool (*postHookFunc) (bool retVal___, struct s_mapiterator *iter); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapit_exists_post; hIndex++ ) { + 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 */ +/* mapreg_interface */ void HP_mapreg_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_init_pre ) { + if (HPMHooks.count.HP_mapreg_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43304,9 +50635,9 @@ void HP_mapreg_init(void) { { HPMHooks.source.mapreg.init(); } - if( HPMHooks.count.HP_mapreg_init_post ) { + if (HPMHooks.count.HP_mapreg_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapreg_init_post[hIndex].func; postHookFunc(); } @@ -43315,14 +50646,14 @@ void HP_mapreg_init(void) { } void HP_mapreg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_final_pre ) { + if (HPMHooks.count.HP_mapreg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43330,9 +50661,9 @@ void HP_mapreg_final(void) { { HPMHooks.source.mapreg.final(); } - if( HPMHooks.count.HP_mapreg_final_post ) { + if (HPMHooks.count.HP_mapreg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapreg_final_post[hIndex].func; postHookFunc(); } @@ -43342,14 +50673,14 @@ void HP_mapreg_final(void) { int HP_mapreg_readreg(int64 uid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapreg_readreg_pre ) { + if (HPMHooks.count.HP_mapreg_readreg_pre > 0) { int (*preHookFunc) (int64 *uid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43357,11 +50688,11 @@ int HP_mapreg_readreg(int64 uid) { { retVal___ = HPMHooks.source.mapreg.readreg(uid); } - if( HPMHooks.count.HP_mapreg_readreg_post ) { - int (*postHookFunc) (int retVal___, int64 *uid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readreg_post; hIndex++ ) { + if (HPMHooks.count.HP_mapreg_readreg_post > 0) { + int (*postHookFunc) (int retVal___, int64 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); + retVal___ = postHookFunc(retVal___, uid); } } return retVal___; @@ -43369,14 +50700,14 @@ int HP_mapreg_readreg(int64 uid) { char* HP_mapreg_readregstr(int64 uid) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_mapreg_readregstr_pre ) { + if (HPMHooks.count.HP_mapreg_readregstr_pre > 0) { char* (*preHookFunc) (int64 *uid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43384,11 +50715,11 @@ char* HP_mapreg_readregstr(int64 uid) { { retVal___ = HPMHooks.source.mapreg.readregstr(uid); } - if( HPMHooks.count.HP_mapreg_readregstr_post ) { - char* (*postHookFunc) (char* retVal___, int64 *uid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_readregstr_post; hIndex++ ) { + if (HPMHooks.count.HP_mapreg_readregstr_post > 0) { + char* (*postHookFunc) (char* retVal___, int64 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); + retVal___ = postHookFunc(retVal___, uid); } } return retVal___; @@ -43396,14 +50727,14 @@ char* HP_mapreg_readregstr(int64 uid) { bool HP_mapreg_setreg(int64 uid, int val) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapreg_setreg_pre ) { + if (HPMHooks.count.HP_mapreg_setreg_pre > 0) { bool (*preHookFunc) (int64 *uid, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43411,11 +50742,11 @@ bool HP_mapreg_setreg(int64 uid, int val) { { retVal___ = HPMHooks.source.mapreg.setreg(uid, val); } - if( HPMHooks.count.HP_mapreg_setreg_post ) { - bool (*postHookFunc) (bool retVal___, int64 *uid, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setreg_post; hIndex++ ) { + if (HPMHooks.count.HP_mapreg_setreg_post > 0) { + bool (*postHookFunc) (bool retVal___, int64 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); + retVal___ = postHookFunc(retVal___, uid, val); } } return retVal___; @@ -43423,14 +50754,14 @@ bool HP_mapreg_setreg(int64 uid, int val) { bool HP_mapreg_setregstr(int64 uid, const char *str) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapreg_setregstr_pre ) { - bool (*preHookFunc) (int64 *uid, const char *str); + if (HPMHooks.count.HP_mapreg_setregstr_pre > 0) { + bool (*preHookFunc) (int64 *uid, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_setregstr_pre[hIndex].func; - retVal___ = preHookFunc(&uid, str); + retVal___ = preHookFunc(&uid, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43438,25 +50769,25 @@ bool HP_mapreg_setregstr(int64 uid, const char *str) { { retVal___ = HPMHooks.source.mapreg.setregstr(uid, str); } - if( HPMHooks.count.HP_mapreg_setregstr_post ) { - bool (*postHookFunc) (bool retVal___, int64 *uid, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_setregstr_post; hIndex++ ) { + if (HPMHooks.count.HP_mapreg_setregstr_post > 0) { + bool (*postHookFunc) (bool retVal___, int64 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); + retVal___ = postHookFunc(retVal___, uid, str); } } return retVal___; } void HP_mapreg_load(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_load_pre ) { + if (HPMHooks.count.HP_mapreg_load_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_load_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43464,9 +50795,9 @@ void HP_mapreg_load(void) { { HPMHooks.source.mapreg.load(); } - if( HPMHooks.count.HP_mapreg_load_post ) { + if (HPMHooks.count.HP_mapreg_load_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapreg_load_post[hIndex].func; postHookFunc(); } @@ -43475,14 +50806,14 @@ void HP_mapreg_load(void) { } void HP_mapreg_save(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_save_pre ) { + if (HPMHooks.count.HP_mapreg_save_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_save_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43490,9 +50821,9 @@ void HP_mapreg_save(void) { { HPMHooks.source.mapreg.save(); } - if( HPMHooks.count.HP_mapreg_save_post ) { + if (HPMHooks.count.HP_mapreg_save_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapreg_save_post[hIndex].func; postHookFunc(); } @@ -43502,14 +50833,14 @@ void HP_mapreg_save(void) { int HP_mapreg_save_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapreg_save_timer_pre ) { + if (HPMHooks.count.HP_mapreg_save_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43517,11 +50848,11 @@ int HP_mapreg_save_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mapreg.save_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_mapreg_save_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_save_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_mapreg_save_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -43529,16 +50860,16 @@ int HP_mapreg_save_timer(int tid, int64 tick, int id, intptr_t data) { int HP_mapreg_destroyreg(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mapreg_destroyreg_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_mapreg_destroyreg_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_mapreg_destroyreg_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43548,12 +50879,12 @@ int HP_mapreg_destroyreg(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.mapreg.destroyreg(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mapreg_destroyreg_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_post; hIndex++ ) { + if (HPMHooks.count.HP_mapreg_destroyreg_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_destroyreg_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_mapreg_destroyreg_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -43561,14 +50892,14 @@ int HP_mapreg_destroyreg(union DBKey key, struct DBData *data, va_list ap) { } void HP_mapreg_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_mapreg_reload_pre ) { + if (HPMHooks.count.HP_mapreg_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapreg_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43576,53 +50907,132 @@ void HP_mapreg_reload(void) { { HPMHooks.source.mapreg.reload(); } - if( HPMHooks.count.HP_mapreg_reload_post ) { + if (HPMHooks.count.HP_mapreg_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_reload_post; hIndex++ ) { + 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) { +bool HP_mapreg_config_read(const char *filename, const struct config_setting_t *config, bool imported) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mapreg_config_read_pre ) { - bool (*preHookFunc) (const char *w1, const char *w2); + if (HPMHooks.count.HP_mapreg_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, const struct config_setting_t **config, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mapreg_config_read_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&filename, &config, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mapreg.config_read(w1, w2); + retVal___ = HPMHooks.source.mapreg.config_read(filename, config, imported); } - 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++ ) { + if (HPMHooks.count.HP_mapreg_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, const struct config_setting_t *config, bool imported); + 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); + retVal___ = postHookFunc(retVal___, filename, config, imported); } } return retVal___; } -/* mercenary */ +/* md5_interface */ +void HP_md5_string(const char *string, char *output) { + int hIndex = 0; + if (HPMHooks.count.HP_md5_string_pre > 0) { + void (*preHookFunc) (const char **string, char **output); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_md5_string_pre[hIndex].func; + preHookFunc(&string, &output); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.md5.string(string, output); + } + if (HPMHooks.count.HP_md5_string_post > 0) { + void (*postHookFunc) (const char *string, char *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_string_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_md5_string_post[hIndex].func; + postHookFunc(string, output); + } + } + return; +} +void HP_md5_binary(const uint8 *buf, const int buf_size, uint8 *output) { + int hIndex = 0; + if (HPMHooks.count.HP_md5_binary_pre > 0) { + void (*preHookFunc) (const uint8 **buf, const int *buf_size, uint8 **output); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_md5_binary_pre[hIndex].func; + preHookFunc(&buf, &buf_size, &output); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.md5.binary(buf, buf_size, output); + } + if (HPMHooks.count.HP_md5_binary_post > 0) { + void (*postHookFunc) (const uint8 *buf, const int buf_size, uint8 *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_binary_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_md5_binary_post[hIndex].func; + postHookFunc(buf, buf_size, output); + } + } + return; +} +void HP_md5_salt(int len, char *output) { + int hIndex = 0; + if (HPMHooks.count.HP_md5_salt_pre > 0) { + void (*preHookFunc) (int *len, char **output); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_md5_salt_pre[hIndex].func; + preHookFunc(&len, &output); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.md5.salt(len, output); + } + if (HPMHooks.count.HP_md5_salt_post > 0) { + void (*postHookFunc) (int len, char *output); + for (hIndex = 0; hIndex < HPMHooks.count.HP_md5_salt_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_md5_salt_post[hIndex].func; + postHookFunc(len, output); + } + } + return; +} +/* mercenary_interface */ void HP_mercenary_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_mercenary_init_pre ) { + if (HPMHooks.count.HP_mercenary_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mercenary_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43630,11 +51040,11 @@ void HP_mercenary_init(bool minimal) { { HPMHooks.source.mercenary.init(minimal); } - if( HPMHooks.count.HP_mercenary_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_post; hIndex++ ) { + if (HPMHooks.count.HP_mercenary_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; @@ -43642,14 +51052,14 @@ void HP_mercenary_init(bool minimal) { bool HP_mercenary_class(int class_) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mercenary_class_pre ) { + if (HPMHooks.count.HP_mercenary_class_pre > 0) { bool (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_class_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43657,11 +51067,11 @@ bool HP_mercenary_class(int class_) { { 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++ ) { + if (HPMHooks.count.HP_mercenary_class_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, class_); } } return retVal___; @@ -43669,14 +51079,14 @@ bool HP_mercenary_class(int class_) { 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 ) { + if (HPMHooks.count.HP_mercenary_get_viewdata_pre > 0) { struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43684,11 +51094,11 @@ struct view_data* HP_mercenary_get_viewdata(int class_) { { 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++ ) { + if (HPMHooks.count.HP_mercenary_get_viewdata_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, class_); } } return retVal___; @@ -43696,14 +51106,14 @@ struct view_data* HP_mercenary_get_viewdata(int class_) { int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int lifetime) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_create_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *class_, unsigned int *lifetime); + if (HPMHooks.count.HP_mercenary_create_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *class_, unsigned int *lifetime); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_create_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &class_, &lifetime); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43711,11 +51121,11 @@ int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int li { 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++ ) { + if (HPMHooks.count.HP_mercenary_create_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, class_, lifetime); } } return retVal___; @@ -43723,14 +51133,14 @@ int HP_mercenary_create(struct map_session_data *sd, int class_, unsigned int li int HP_mercenary_data_received(const struct s_mercenary *merc, bool flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_data_received_pre ) { - int (*preHookFunc) (const struct s_mercenary *merc, bool *flag); + if (HPMHooks.count.HP_mercenary_data_received_pre > 0) { + int (*preHookFunc) (const struct s_mercenary **merc, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&merc, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43738,11 +51148,11 @@ int HP_mercenary_data_received(const struct s_mercenary *merc, bool flag) { { retVal___ = HPMHooks.source.mercenary.data_received(merc, flag); } - if( HPMHooks.count.HP_mercenary_data_received_post ) { - int (*postHookFunc) (int retVal___, const struct s_mercenary *merc, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_data_received_post; hIndex++ ) { + if (HPMHooks.count.HP_mercenary_data_received_post > 0) { + int (*postHookFunc) (int retVal___, const 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); + retVal___ = postHookFunc(retVal___, merc, flag); } } return retVal___; @@ -43750,14 +51160,14 @@ int HP_mercenary_data_received(const struct s_mercenary *merc, bool flag) { int HP_mercenary_save(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_save_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if (HPMHooks.count.HP_mercenary_save_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mercenary_save_pre[hIndex].func; - retVal___ = preHookFunc(md); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43765,9 +51175,9 @@ int HP_mercenary_save(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.save(md); } - if( HPMHooks.count.HP_mercenary_save_post ) { + if (HPMHooks.count.HP_mercenary_save_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_save_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -43776,14 +51186,14 @@ int HP_mercenary_save(struct mercenary_data *md) { } 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); + if (HPMHooks.count.HP_mercenary_heal_pre > 0) { + void (*preHookFunc) (struct mercenary_data **md, int *hp, int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_heal_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mercenary_heal_pre[hIndex].func; - preHookFunc(md, &hp, &sp); + preHookFunc(&md, &hp, &sp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43791,11 +51201,11 @@ void HP_mercenary_heal(struct mercenary_data *md, int hp, int sp) { { 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++ ) { + if (HPMHooks.count.HP_mercenary_heal_post > 0) { + 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); + postHookFunc(md, hp, sp); } } return; @@ -43803,14 +51213,14 @@ void HP_mercenary_heal(struct mercenary_data *md, int hp, int sp) { int HP_mercenary_dead(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_dead_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if (HPMHooks.count.HP_mercenary_dead_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mercenary_dead_pre[hIndex].func; - retVal___ = preHookFunc(md); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43818,9 +51228,9 @@ int HP_mercenary_dead(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.dead(md); } - if( HPMHooks.count.HP_mercenary_dead_post ) { + if (HPMHooks.count.HP_mercenary_dead_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_dead_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_dead_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -43830,14 +51240,14 @@ int HP_mercenary_dead(struct mercenary_data *md) { int HP_mercenary_delete(struct mercenary_data *md, int reply) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_delete_pre ) { - int (*preHookFunc) (struct mercenary_data *md, int *reply); + if (HPMHooks.count.HP_mercenary_delete_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md, int *reply); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mercenary_delete_pre[hIndex].func; - retVal___ = preHookFunc(md, &reply); + retVal___ = preHookFunc(&md, &reply); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43845,25 +51255,25 @@ int HP_mercenary_delete(struct mercenary_data *md, int reply) { { 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++ ) { + if (HPMHooks.count.HP_mercenary_delete_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_mercenary_contract_stop_pre > 0) { + void (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mercenary_contract_stop_pre[hIndex].func; - preHookFunc(md); + preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -43871,9 +51281,9 @@ void HP_mercenary_contract_stop(struct mercenary_data *md) { { HPMHooks.source.mercenary.contract_stop(md); } - if( HPMHooks.count.HP_mercenary_contract_stop_post ) { + if (HPMHooks.count.HP_mercenary_contract_stop_post > 0) { void (*postHookFunc) (struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_stop_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_contract_stop_post[hIndex].func; postHookFunc(md); } @@ -43883,14 +51293,14 @@ void HP_mercenary_contract_stop(struct mercenary_data *md) { int HP_mercenary_get_lifetime(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_lifetime_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if (HPMHooks.count.HP_mercenary_get_lifetime_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43898,9 +51308,9 @@ int HP_mercenary_get_lifetime(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.get_lifetime(md); } - if( HPMHooks.count.HP_mercenary_get_lifetime_post ) { + if (HPMHooks.count.HP_mercenary_get_lifetime_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_lifetime_post; hIndex++ ) { + 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); } @@ -43910,14 +51320,14 @@ int HP_mercenary_get_lifetime(struct mercenary_data *md) { int HP_mercenary_get_guild(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_guild_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if (HPMHooks.count.HP_mercenary_get_guild_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43925,9 +51335,9 @@ int HP_mercenary_get_guild(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.get_guild(md); } - if( HPMHooks.count.HP_mercenary_get_guild_post ) { + if (HPMHooks.count.HP_mercenary_get_guild_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_guild_post; hIndex++ ) { + 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); } @@ -43937,14 +51347,14 @@ int HP_mercenary_get_guild(struct mercenary_data *md) { int HP_mercenary_get_faith(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_faith_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if (HPMHooks.count.HP_mercenary_get_faith_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43952,9 +51362,9 @@ int HP_mercenary_get_faith(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.get_faith(md); } - if( HPMHooks.count.HP_mercenary_get_faith_post ) { + if (HPMHooks.count.HP_mercenary_get_faith_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_faith_post; hIndex++ ) { + 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); } @@ -43964,14 +51374,14 @@ int HP_mercenary_get_faith(struct mercenary_data *md) { int HP_mercenary_set_faith(struct mercenary_data *md, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_set_faith_pre ) { - int (*preHookFunc) (struct mercenary_data *md, int *value); + if (HPMHooks.count.HP_mercenary_set_faith_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_faith_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -43979,11 +51389,11 @@ int HP_mercenary_set_faith(struct mercenary_data *md, int value) { { 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++ ) { + if (HPMHooks.count.HP_mercenary_set_faith_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, md, value); } } return retVal___; @@ -43991,14 +51401,14 @@ int HP_mercenary_set_faith(struct mercenary_data *md, int value) { int HP_mercenary_get_calls(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_get_calls_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if (HPMHooks.count.HP_mercenary_get_calls_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44006,9 +51416,9 @@ int HP_mercenary_get_calls(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.get_calls(md); } - if( HPMHooks.count.HP_mercenary_get_calls_post ) { + if (HPMHooks.count.HP_mercenary_get_calls_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_get_calls_post; hIndex++ ) { + 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); } @@ -44018,14 +51428,14 @@ int HP_mercenary_get_calls(struct mercenary_data *md) { int HP_mercenary_set_calls(struct mercenary_data *md, int value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_set_calls_pre ) { - int (*preHookFunc) (struct mercenary_data *md, int *value); + if (HPMHooks.count.HP_mercenary_set_calls_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_set_calls_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44033,11 +51443,11 @@ int HP_mercenary_set_calls(struct mercenary_data *md, int value) { { 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++ ) { + if (HPMHooks.count.HP_mercenary_set_calls_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, md, value); } } return retVal___; @@ -44045,14 +51455,14 @@ int HP_mercenary_set_calls(struct mercenary_data *md, int value) { int HP_mercenary_kills(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_kills_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if (HPMHooks.count.HP_mercenary_kills_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mercenary_kills_pre[hIndex].func; - retVal___ = preHookFunc(md); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44060,9 +51470,9 @@ int HP_mercenary_kills(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.kills(md); } - if( HPMHooks.count.HP_mercenary_kills_post ) { + if (HPMHooks.count.HP_mercenary_kills_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_kills_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_kills_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -44072,14 +51482,14 @@ int HP_mercenary_kills(struct mercenary_data *md) { int HP_mercenary_checkskill(struct mercenary_data *md, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_checkskill_pre ) { - int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id); + if (HPMHooks.count.HP_mercenary_checkskill_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_checkskill_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44087,11 +51497,11 @@ int HP_mercenary_checkskill(struct mercenary_data *md, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_mercenary_checkskill_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, md, skill_id); } } return retVal___; @@ -44099,14 +51509,14 @@ int HP_mercenary_checkskill(struct mercenary_data *md, uint16 skill_id) { int HP_mercenary_read_db(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_read_db_pre ) { + if (HPMHooks.count.HP_mercenary_read_db_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44114,9 +51524,9 @@ int HP_mercenary_read_db(void) { { retVal___ = HPMHooks.source.mercenary.read_db(); } - if( HPMHooks.count.HP_mercenary_read_db_post ) { + if (HPMHooks.count.HP_mercenary_read_db_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_post; hIndex++ ) { + 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___); } @@ -44126,14 +51536,14 @@ int HP_mercenary_read_db(void) { int HP_mercenary_read_skilldb(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_read_skilldb_pre ) { + if (HPMHooks.count.HP_mercenary_read_skilldb_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44141,9 +51551,9 @@ int HP_mercenary_read_skilldb(void) { { retVal___ = HPMHooks.source.mercenary.read_skilldb(); } - if( HPMHooks.count.HP_mercenary_read_skilldb_post ) { + if (HPMHooks.count.HP_mercenary_read_skilldb_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skilldb_post; hIndex++ ) { + 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___); } @@ -44153,14 +51563,14 @@ int HP_mercenary_read_skilldb(void) { int HP_mercenary_killbonus(struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_killbonus_pre ) { - int (*preHookFunc) (struct mercenary_data *md); + if (HPMHooks.count.HP_mercenary_killbonus_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mercenary_killbonus_pre[hIndex].func; - retVal___ = preHookFunc(md); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44168,9 +51578,9 @@ int HP_mercenary_killbonus(struct mercenary_data *md) { { retVal___ = HPMHooks.source.mercenary.killbonus(md); } - if( HPMHooks.count.HP_mercenary_killbonus_post ) { + if (HPMHooks.count.HP_mercenary_killbonus_post > 0) { int (*postHookFunc) (int retVal___, struct mercenary_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_killbonus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mercenary_killbonus_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -44180,14 +51590,14 @@ int HP_mercenary_killbonus(struct mercenary_data *md) { int HP_mercenary_search_index(int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_search_index_pre ) { + if (HPMHooks.count.HP_mercenary_search_index_pre > 0) { int (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_search_index_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44195,11 +51605,11 @@ int HP_mercenary_search_index(int class_) { { 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++ ) { + if (HPMHooks.count.HP_mercenary_search_index_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, class_); } } return retVal___; @@ -44207,14 +51617,14 @@ int HP_mercenary_search_index(int class_) { int HP_mercenary_contract_end_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mercenary_contract_end_timer_pre ) { + if (HPMHooks.count.HP_mercenary_contract_end_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44222,11 +51632,11 @@ int HP_mercenary_contract_end_timer(int tid, int64 tick, int id, intptr_t data) { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_contract_end_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_mercenary_contract_end_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -44234,14 +51644,14 @@ int HP_mercenary_contract_end_timer(int tid, int64 tick, int id, intptr_t data) bool HP_mercenary_read_db_sub(char *str[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mercenary_read_db_sub_pre ) { - bool (*preHookFunc) (char *str[], int *columns, int *current); + if (HPMHooks.count.HP_mercenary_read_db_sub_pre > 0) { + bool (*preHookFunc) (char **str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_db_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&str, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44249,11 +51659,11 @@ bool HP_mercenary_read_db_sub(char *str[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_mercenary_read_db_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, str, columns, current); } } return retVal___; @@ -44261,14 +51671,14 @@ bool HP_mercenary_read_db_sub(char *str[], int columns, int current) { bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mercenary_read_skill_db_sub_pre ) { - bool (*preHookFunc) (char *str[], int *columns, int *current); + if (HPMHooks.count.HP_mercenary_read_skill_db_sub_pre > 0) { + bool (*preHookFunc) (char **str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mercenary_read_skill_db_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&str, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44276,27 +51686,27 @@ bool HP_mercenary_read_skill_db_sub(char *str[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_mercenary_read_skill_db_sub_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, str, columns, current); } } return retVal___; } -/* mob */ +/* mob_interface */ int HP_mob_init(bool mimimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_init_pre ) { + if (HPMHooks.count.HP_mob_init_pre > 0) { int (*preHookFunc) (bool *mimimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_init_pre[hIndex].func; retVal___ = preHookFunc(&mimimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44304,11 +51714,11 @@ int HP_mob_init(bool mimimal) { { retVal___ = HPMHooks.source.mob.init(mimimal); } - if( HPMHooks.count.HP_mob_init_post ) { - int (*postHookFunc) (int retVal___, bool *mimimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_init_post > 0) { + int (*postHookFunc) (int retVal___, bool mimimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &mimimal); + retVal___ = postHookFunc(retVal___, mimimal); } } return retVal___; @@ -44316,14 +51726,14 @@ int HP_mob_init(bool mimimal) { int HP_mob_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_final_pre ) { + if (HPMHooks.count.HP_mob_final_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44331,9 +51741,9 @@ int HP_mob_final(void) { { retVal___ = HPMHooks.source.mob.final(); } - if( HPMHooks.count.HP_mob_final_post ) { + if (HPMHooks.count.HP_mob_final_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_final_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -44342,14 +51752,14 @@ int HP_mob_final(void) { } void HP_mob_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_mob_reload_pre ) { + if (HPMHooks.count.HP_mob_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44357,26 +51767,59 @@ void HP_mob_reload(void) { { HPMHooks.source.mob.reload(); } - if( HPMHooks.count.HP_mob_reload_post ) { + if (HPMHooks.count.HP_mob_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_reload_post[hIndex].func; postHookFunc(); } } return; } +int HP_mob_reload_sub_mob(struct mob_data *md, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mob_reload_sub_mob_pre > 0) { + int (*preHookFunc) (struct mob_data **md, va_list args); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_sub_mob_pre; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_mob_reload_sub_mob_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.reload_sub_mob(md, args___copy); + va_end(args___copy); + } + if (HPMHooks.count.HP_mob_reload_sub_mob_post > 0) { + int (*postHookFunc) (int retVal___, struct mob_data *md, va_list args); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_reload_sub_mob_post; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_mob_reload_sub_mob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, args___copy); + va_end(args___copy); + } + } + return retVal___; +} struct mob_db* HP_mob_db(int index) { int hIndex = 0; struct mob_db* retVal___ = NULL; - if( HPMHooks.count.HP_mob_db_pre ) { + if (HPMHooks.count.HP_mob_db_pre > 0) { struct mob_db* (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44384,11 +51827,11 @@ struct mob_db* HP_mob_db(int index) { { 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++ ) { + if (HPMHooks.count.HP_mob_db_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, index); } } return retVal___; @@ -44396,14 +51839,14 @@ struct mob_db* HP_mob_db(int index) { struct mob_chat* HP_mob_chat(short id) { int hIndex = 0; struct mob_chat* retVal___ = NULL; - if( HPMHooks.count.HP_mob_chat_pre ) { + if (HPMHooks.count.HP_mob_chat_pre > 0) { struct mob_chat* (*preHookFunc) (short *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_chat_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44411,11 +51854,11 @@ struct mob_chat* HP_mob_chat(short id) { { 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++ ) { + if (HPMHooks.count.HP_mob_chat_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -44423,14 +51866,14 @@ struct mob_chat* HP_mob_chat(short id) { int HP_mob_makedummymobdb(int p1) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_makedummymobdb_pre ) { + if (HPMHooks.count.HP_mob_makedummymobdb_pre > 0) { int (*preHookFunc) (int *p1); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_makedummymobdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44438,11 +51881,11 @@ int HP_mob_makedummymobdb(int p1) { { 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++ ) { + if (HPMHooks.count.HP_mob_makedummymobdb_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, p1); } } return retVal___; @@ -44450,14 +51893,14 @@ int HP_mob_makedummymobdb(int p1) { int HP_mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_spawn_guardian_sub_pre ) { + if (HPMHooks.count.HP_mob_spawn_guardian_sub_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44465,11 +51908,11 @@ int HP_mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_spawn_guardian_sub_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -44477,14 +51920,14 @@ int HP_mob_spawn_guardian_sub(int tid, int64 tick, int id, intptr_t data) { int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_skill_id2skill_idx_pre ) { + if (HPMHooks.count.HP_mob_skill_id2skill_idx_pre > 0) { int (*preHookFunc) (int *class_, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_id2skill_idx_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44492,11 +51935,11 @@ int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_mob_skill_id2skill_idx_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, class_, skill_id); } } return retVal___; @@ -44504,14 +51947,14 @@ int HP_mob_skill_id2skill_idx(int class_, uint16 skill_id) { int HP_mob_db_searchname(const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_searchname_pre ) { - int (*preHookFunc) (const char *str); + if (HPMHooks.count.HP_mob_db_searchname_pre > 0) { + int (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44519,9 +51962,9 @@ int HP_mob_db_searchname(const char *str) { { retVal___ = HPMHooks.source.mob.db_searchname(str); } - if( HPMHooks.count.HP_mob_db_searchname_post ) { + if (HPMHooks.count.HP_mob_db_searchname_post > 0) { int (*postHookFunc) (int retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_post; hIndex++ ) { + 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); } @@ -44531,14 +51974,14 @@ int HP_mob_db_searchname(const char *str) { int HP_mob_db_searchname_array_sub(struct mob_db *monster, const char *str, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_searchname_array_sub_pre ) { - int (*preHookFunc) (struct mob_db *monster, const char *str, int *flag); + if (HPMHooks.count.HP_mob_db_searchname_array_sub_pre > 0) { + int (*preHookFunc) (struct mob_db **monster, const char **str, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_pre; hIndex++ ) { + 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(monster, str, &flag); + retVal___ = preHookFunc(&monster, &str, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44546,25 +51989,78 @@ int HP_mob_db_searchname_array_sub(struct mob_db *monster, const char *str, int { retVal___ = HPMHooks.source.mob.db_searchname_array_sub(monster, str, flag); } - if( HPMHooks.count.HP_mob_db_searchname_array_sub_post ) { - int (*postHookFunc) (int retVal___, struct mob_db *monster, const char *str, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_db_searchname_array_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct mob_db *monster, 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___, monster, str, &flag); + retVal___ = postHookFunc(retVal___, monster, str, flag); + } + } + return retVal___; +} +void HP_mob_mvptomb_spawn_delayed(struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_mvptomb_spawn_delayed_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_spawn_delayed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_mvptomb_spawn_delayed_pre[hIndex].func; + preHookFunc(&nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.mvptomb_spawn_delayed(nd); + } + if (HPMHooks.count.HP_mob_mvptomb_spawn_delayed_post > 0) { + void (*postHookFunc) (struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_spawn_delayed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_mvptomb_spawn_delayed_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} +int HP_mob_mvptomb_delayspawn(int tid, int64 tick, int id, intptr_t data) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mob_mvptomb_delayspawn_pre > 0) { + int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_delayspawn_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_mvptomb_delayspawn_pre[hIndex].func; + retVal___ = preHookFunc(&tid, &tick, &id, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.mvptomb_delayspawn(tid, tick, id, data); + } + if (HPMHooks.count.HP_mob_mvptomb_delayspawn_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_delayspawn_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_mvptomb_delayspawn_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } 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); + if (HPMHooks.count.HP_mob_mvptomb_create_pre > 0) { + void (*preHookFunc) (struct mob_data **md, char **killer, time_t *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_create_pre; hIndex++ ) { + 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); + preHookFunc(&md, &killer, &time); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44572,25 +52068,25 @@ void HP_mob_mvptomb_create(struct mob_data *md, char *killer, time_t time) { { 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++ ) { + if (HPMHooks.count.HP_mob_mvptomb_create_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_mob_mvptomb_destroy_pre > 0) { + void (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_pre[hIndex].func; - preHookFunc(md); + preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -44598,9 +52094,9 @@ void HP_mob_mvptomb_destroy(struct mob_data *md) { { HPMHooks.source.mob.mvptomb_destroy(md); } - if( HPMHooks.count.HP_mob_mvptomb_destroy_post ) { + if (HPMHooks.count.HP_mob_mvptomb_destroy_post > 0) { void (*postHookFunc) (struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mvptomb_destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_mvptomb_destroy_post[hIndex].func; postHookFunc(md); } @@ -44610,14 +52106,14 @@ void HP_mob_mvptomb_destroy(struct mob_data *md) { int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_searchname_array_pre ) { - int (*preHookFunc) (struct mob_db **data, int *size, const char *str, int *flag); + if (HPMHooks.count.HP_mob_db_searchname_array_pre > 0) { + int (*preHookFunc) (struct mob_db ***data, int *size, const char **str, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_searchname_array_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&data, &size, &str, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44625,11 +52121,11 @@ int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str, { 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++ ) { + if (HPMHooks.count.HP_mob_db_searchname_array_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, data, size, str, flag); } } return retVal___; @@ -44637,14 +52133,14 @@ int HP_mob_db_searchname_array(struct mob_db **data, int size, const char *str, int HP_mob_db_checkid(const int id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_checkid_pre ) { + if (HPMHooks.count.HP_mob_db_checkid_pre > 0) { int (*preHookFunc) (const int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_checkid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44652,11 +52148,11 @@ int HP_mob_db_checkid(const int id) { { 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++ ) { + if (HPMHooks.count.HP_mob_db_checkid_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -44664,14 +52160,14 @@ int HP_mob_db_checkid(const int id) { 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 ) { + if (HPMHooks.count.HP_mob_get_viewdata_pre > 0) { struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44679,11 +52175,11 @@ struct view_data* HP_mob_get_viewdata(int class_) { { 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++ ) { + if (HPMHooks.count.HP_mob_get_viewdata_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, class_); } } return retVal___; @@ -44691,14 +52187,14 @@ struct view_data* HP_mob_get_viewdata(int class_) { int HP_mob_parse_dataset(struct spawn_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_parse_dataset_pre ) { - int (*preHookFunc) (struct spawn_data *data); + if (HPMHooks.count.HP_mob_parse_dataset_pre > 0) { + int (*preHookFunc) (struct spawn_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44706,38 +52202,38 @@ int HP_mob_parse_dataset(struct spawn_data *data) { { retVal___ = HPMHooks.source.mob.parse_dataset(data); } - if( HPMHooks.count.HP_mob_parse_dataset_post ) { + if (HPMHooks.count.HP_mob_parse_dataset_post > 0) { int (*postHookFunc) (int retVal___, struct spawn_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_dataset_post; hIndex++ ) { + 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) { +struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data, int npc_id) { int hIndex = 0; struct mob_data* retVal___ = NULL; - if( HPMHooks.count.HP_mob_spawn_dataset_pre ) { - struct mob_data* (*preHookFunc) (struct spawn_data *data); + if (HPMHooks.count.HP_mob_spawn_dataset_pre > 0) { + struct mob_data* (*preHookFunc) (struct spawn_data **data, int *npc_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_dataset_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&data, &npc_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mob.spawn_dataset(data); + retVal___ = HPMHooks.source.mob.spawn_dataset(data, npc_id); } - 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++ ) { + if (HPMHooks.count.HP_mob_spawn_dataset_post > 0) { + struct mob_data* (*postHookFunc) (struct mob_data* retVal___, struct spawn_data *data, int npc_id); + 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); + retVal___ = postHookFunc(retVal___, data, npc_id); } } return retVal___; @@ -44745,14 +52241,14 @@ struct mob_data* HP_mob_spawn_dataset(struct spawn_data *data) { int HP_mob_get_random_id(int type, int flag, int lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_get_random_id_pre ) { + if (HPMHooks.count.HP_mob_get_random_id_pre > 0) { int (*preHookFunc) (int *type, int *flag, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_random_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44760,11 +52256,11 @@ int HP_mob_get_random_id(int type, int flag, int lv) { { 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++ ) { + if (HPMHooks.count.HP_mob_get_random_id_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, type, flag, lv); } } return retVal___; @@ -44772,14 +52268,14 @@ int HP_mob_get_random_id(int type, int flag, int lv) { bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_ksprotected_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *target); + if (HPMHooks.count.HP_mob_ksprotected_pre > 0) { + bool (*preHookFunc) (struct block_list **src, struct block_list **target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_ksprotected_pre[hIndex].func; - retVal___ = preHookFunc(src, target); + retVal___ = preHookFunc(&src, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44787,38 +52283,38 @@ bool HP_mob_ksprotected(struct block_list *src, struct block_list *target) { { retVal___ = HPMHooks.source.mob.ksprotected(src, target); } - if( HPMHooks.count.HP_mob_ksprotected_post ) { + if (HPMHooks.count.HP_mob_ksprotected_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ksprotected_post; hIndex++ ) { + 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) { +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 npc_id) { 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); + if (HPMHooks.count.HP_mob_once_spawn_sub_pre > 0) { + 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, int *npc_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &m, &x, &y, &mobname, &class_, &event, &size, &ai, &npc_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mob.once_spawn_sub(bl, m, x, y, mobname, class_, event, size, ai); + retVal___ = HPMHooks.source.mob.once_spawn_sub(bl, m, x, y, mobname, class_, event, size, ai, npc_id); } - 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++ ) { + if (HPMHooks.count.HP_mob_once_spawn_sub_post > 0) { + 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, int npc_id); + 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); + retVal___ = postHookFunc(retVal___, bl, m, x, y, mobname, class_, event, size, ai, npc_id); } } return retVal___; @@ -44826,14 +52322,14 @@ struct mob_data* HP_mob_once_spawn_sub(struct block_list *bl, int16 m, int16 x, 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___ = 0; - 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); + if (HPMHooks.count.HP_mob_once_spawn_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &m, &x, &y, &mobname, &class_, &amount, &event, &size, &ai); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44841,11 +52337,11 @@ int HP_mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, co { 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++ ) { + if (HPMHooks.count.HP_mob_once_spawn_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, m, x, y, mobname, class_, amount, event, size, ai); } } return retVal___; @@ -44853,14 +52349,14 @@ int HP_mob_once_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, co 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___ = 0; - 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); + if (HPMHooks.count.HP_mob_once_spawn_area_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_once_spawn_area_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &m, &x0, &y0, &x1, &y1, &mobname, &class_, &amount, &event, &size, &ai); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44868,65 +52364,65 @@ int HP_mob_once_spawn_area(struct map_session_data *sd, int16 m, int16 x0, int16 { 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++ ) { + if (HPMHooks.count.HP_mob_once_spawn_area_post > 0) { + 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); + 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 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 npc_id) { int hIndex = 0; int retVal___ = 0; - 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); + if (HPMHooks.count.HP_mob_spawn_guardian_pre > 0) { + int (*preHookFunc) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, int *guardian, bool *has_index, int *npc_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_guardian_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&mapname, &x, &y, &mobname, &class_, &event, &guardian, &has_index, &npc_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mob.spawn_guardian(mapname, x, y, mobname, class_, event, guardian, has_index); + retVal___ = HPMHooks.source.mob.spawn_guardian(mapname, x, y, mobname, class_, event, guardian, has_index, npc_id); } - 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++ ) { + if (HPMHooks.count.HP_mob_spawn_guardian_post > 0) { + int (*postHookFunc) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, int guardian, bool has_index, int npc_id); + 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); + retVal___ = postHookFunc(retVal___, mapname, x, y, mobname, class_, event, guardian, has_index, npc_id); } } 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 HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id, int npc_id) { int hIndex = 0; int retVal___ = 0; - 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); + if (HPMHooks.count.HP_mob_spawn_bg_pre > 0) { + int (*preHookFunc) (const char **mapname, short *x, short *y, const char **mobname, int *class_, const char **event, unsigned int *bg_id, int *npc_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_bg_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&mapname, &x, &y, &mobname, &class_, &event, &bg_id, &npc_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mob.spawn_bg(mapname, x, y, mobname, class_, event, bg_id); + retVal___ = HPMHooks.source.mob.spawn_bg(mapname, x, y, mobname, class_, event, bg_id, npc_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++ ) { + if (HPMHooks.count.HP_mob_spawn_bg_post > 0) { + int (*postHookFunc) (int retVal___, const char *mapname, short x, short y, const char *mobname, int class_, const char *event, unsigned int bg_id, int npc_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); + retVal___ = postHookFunc(retVal___, mapname, x, y, mobname, class_, event, bg_id, npc_id); } } return retVal___; @@ -44934,14 +52430,14 @@ int HP_mob_spawn_bg(const char *mapname, short x, short y, const char *mobname, int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int state) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_can_reach_pre ) { - int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *range, int *state); + if (HPMHooks.count.HP_mob_can_reach_pre > 0) { + int (*preHookFunc) (struct mob_data **md, struct block_list **bl, int *range, int *state); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_reach_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &bl, &range, &state); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44949,11 +52445,11 @@ int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int { 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++ ) { + if (HPMHooks.count.HP_mob_can_reach_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, md, bl, range, state); } } return retVal___; @@ -44961,16 +52457,16 @@ int HP_mob_can_reach(struct mob_data *md, struct block_list *bl, int range, int int HP_mob_linksearch(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_linksearch_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_linksearch_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -44980,9 +52476,9 @@ int HP_mob_linksearch(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.linksearch(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_linksearch_post ) { + if (HPMHooks.count.HP_mob_linksearch_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_linksearch_post; hIndex++ ) { + 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); @@ -44994,14 +52490,14 @@ int HP_mob_linksearch(struct block_list *bl, va_list ap) { int HP_mob_delayspawn(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_delayspawn_pre ) { + if (HPMHooks.count.HP_mob_delayspawn_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45009,11 +52505,11 @@ int HP_mob_delayspawn(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.delayspawn(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_delayspawn_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delayspawn_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_delayspawn_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -45021,14 +52517,14 @@ int HP_mob_delayspawn(int tid, int64 tick, int id, intptr_t data) { int HP_mob_setdelayspawn(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_setdelayspawn_pre ) { - int (*preHookFunc) (struct mob_data *md); + if (HPMHooks.count.HP_mob_setdelayspawn_pre > 0) { + int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_setdelayspawn_pre[hIndex].func; - retVal___ = preHookFunc(md); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45036,9 +52532,9 @@ int HP_mob_setdelayspawn(struct mob_data *md) { { retVal___ = HPMHooks.source.mob.setdelayspawn(md); } - if( HPMHooks.count.HP_mob_setdelayspawn_post ) { + if (HPMHooks.count.HP_mob_setdelayspawn_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdelayspawn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_setdelayspawn_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -45048,16 +52544,16 @@ int HP_mob_setdelayspawn(struct mob_data *md) { int HP_mob_count_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_count_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_count_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45067,9 +52563,9 @@ int HP_mob_count_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.count_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_count_sub_post ) { + if (HPMHooks.count.HP_mob_count_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_count_sub_post; hIndex++ ) { + 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); @@ -45081,14 +52577,14 @@ int HP_mob_count_sub(struct block_list *bl, va_list ap) { int HP_mob_spawn(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_spawn_pre ) { - int (*preHookFunc) (struct mob_data *md); + if (HPMHooks.count.HP_mob_spawn_pre > 0) { + int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_spawn_pre[hIndex].func; - retVal___ = preHookFunc(md); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45096,9 +52592,9 @@ int HP_mob_spawn(struct mob_data *md) { { retVal___ = HPMHooks.source.mob.spawn(md); } - if( HPMHooks.count.HP_mob_spawn_post ) { + if (HPMHooks.count.HP_mob_spawn_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_spawn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_spawn_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -45108,14 +52604,14 @@ int HP_mob_spawn(struct mob_data *md) { int HP_mob_can_changetarget(const struct mob_data *md, const struct block_list *target, uint32 mode) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_can_changetarget_pre ) { - int (*preHookFunc) (const struct mob_data *md, const struct block_list *target, uint32 *mode); + if (HPMHooks.count.HP_mob_can_changetarget_pre > 0) { + int (*preHookFunc) (const struct mob_data **md, const struct block_list **target, uint32 *mode); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &target, &mode); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45123,11 +52619,11 @@ int HP_mob_can_changetarget(const struct mob_data *md, const struct block_list * { retVal___ = HPMHooks.source.mob.can_changetarget(md, target, mode); } - if( HPMHooks.count.HP_mob_can_changetarget_post ) { - int (*postHookFunc) (int retVal___, const struct mob_data *md, const struct block_list *target, uint32 *mode); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_can_changetarget_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_can_changetarget_post > 0) { + int (*postHookFunc) (int retVal___, const struct mob_data *md, const struct block_list *target, uint32 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); + retVal___ = postHookFunc(retVal___, md, target, mode); } } return retVal___; @@ -45135,14 +52631,14 @@ int HP_mob_can_changetarget(const struct mob_data *md, const struct block_list * int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_target_pre ) { - int (*preHookFunc) (struct mob_data *md, struct block_list *bl, int *dist); + if (HPMHooks.count.HP_mob_target_pre > 0) { + int (*preHookFunc) (struct mob_data **md, struct block_list **bl, int *dist); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_target_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &bl, &dist); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45150,11 +52646,11 @@ int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) { { 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++ ) { + if (HPMHooks.count.HP_mob_target_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, md, bl, dist); } } return retVal___; @@ -45162,16 +52658,16 @@ int HP_mob_target(struct mob_data *md, struct block_list *bl, int dist) { int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_activesearch_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45181,9 +52677,9 @@ int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_activesearch_post > 0) { 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++ ) { + 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); @@ -45195,16 +52691,16 @@ int HP_mob_ai_sub_hard_activesearch(struct block_list *bl, va_list ap) { int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_changechase_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45214,9 +52710,9 @@ int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_changechase_post > 0) { 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++ ) { + 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); @@ -45228,16 +52724,16 @@ int HP_mob_ai_sub_hard_changechase(struct block_list *bl, va_list ap) { int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45247,9 +52743,9 @@ int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_bg_ally_post > 0) { 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++ ) { + 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); @@ -45261,16 +52757,16 @@ int HP_mob_ai_sub_hard_bg_ally(struct block_list *bl, va_list ap) { int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45280,9 +52776,9 @@ int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_lootsearch_post > 0) { 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++ ) { + 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); @@ -45294,16 +52790,16 @@ int HP_mob_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpchase_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_warpchase_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45313,9 +52809,9 @@ int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.warpchase_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_warpchase_sub_post ) { + if (HPMHooks.count.HP_mob_warpchase_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_sub_post; hIndex++ ) { + 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); @@ -45324,17 +52820,44 @@ int HP_mob_warpchase_sub(struct block_list *bl, va_list ap) { } return retVal___; } +bool HP_mob_is_in_battle_state(const struct mob_data *md) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_is_in_battle_state_pre > 0) { + bool (*preHookFunc) (const struct mob_data **md); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_in_battle_state_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_is_in_battle_state_pre[hIndex].func; + retVal___ = preHookFunc(&md); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.is_in_battle_state(md); + } + if (HPMHooks.count.HP_mob_is_in_battle_state_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct mob_data *md); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_in_battle_state_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_is_in_battle_state_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md); + } + } + return retVal___; +} int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre ) { - int (*preHookFunc) (struct mob_data *md, int64 *tick); + if (HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre > 0) { + int (*preHookFunc) (struct mob_data **md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45342,11 +52865,11 @@ int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) { { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_slavemob_post > 0) { + int (*postHookFunc) (int retVal___, struct mob_data *md, int64 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); + retVal___ = postHookFunc(retVal___, md, tick); } } return retVal___; @@ -45354,14 +52877,14 @@ int HP_mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) { int HP_mob_unlocktarget(struct mob_data *md, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_unlocktarget_pre ) { - int (*preHookFunc) (struct mob_data *md, int64 *tick); + if (HPMHooks.count.HP_mob_unlocktarget_pre > 0) { + int (*preHookFunc) (struct mob_data **md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_unlocktarget_pre[hIndex].func; - retVal___ = preHookFunc(md, &tick); + retVal___ = preHookFunc(&md, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45369,11 +52892,11 @@ int HP_mob_unlocktarget(struct mob_data *md, int64 tick) { { retVal___ = HPMHooks.source.mob.unlocktarget(md, tick); } - if( HPMHooks.count.HP_mob_unlocktarget_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_unlocktarget_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_unlocktarget_post > 0) { + int (*postHookFunc) (int retVal___, struct mob_data *md, int64 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); + retVal___ = postHookFunc(retVal___, md, tick); } } return retVal___; @@ -45381,14 +52904,14 @@ int HP_mob_unlocktarget(struct mob_data *md, int64 tick) { int HP_mob_randomwalk(struct mob_data *md, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_randomwalk_pre ) { - int (*preHookFunc) (struct mob_data *md, int64 *tick); + if (HPMHooks.count.HP_mob_randomwalk_pre > 0) { + int (*preHookFunc) (struct mob_data **md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_randomwalk_pre[hIndex].func; - retVal___ = preHookFunc(md, &tick); + retVal___ = preHookFunc(&md, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45396,11 +52919,11 @@ int HP_mob_randomwalk(struct mob_data *md, int64 tick) { { retVal___ = HPMHooks.source.mob.randomwalk(md, tick); } - if( HPMHooks.count.HP_mob_randomwalk_post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_randomwalk_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_randomwalk_post > 0) { + int (*postHookFunc) (int retVal___, struct mob_data *md, int64 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); + retVal___ = postHookFunc(retVal___, md, tick); } } return retVal___; @@ -45408,14 +52931,14 @@ int HP_mob_randomwalk(struct mob_data *md, int64 tick) { int HP_mob_warpchase(struct mob_data *md, struct block_list *target) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpchase_pre ) { - int (*preHookFunc) (struct mob_data *md, struct block_list *target); + if (HPMHooks.count.HP_mob_warpchase_pre > 0) { + int (*preHookFunc) (struct mob_data **md, struct block_list **target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_warpchase_pre[hIndex].func; - retVal___ = preHookFunc(md, target); + retVal___ = preHookFunc(&md, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45423,9 +52946,9 @@ int HP_mob_warpchase(struct mob_data *md, struct block_list *target) { { retVal___ = HPMHooks.source.mob.warpchase(md, target); } - if( HPMHooks.count.HP_mob_warpchase_post ) { + if (HPMHooks.count.HP_mob_warpchase_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpchase_post; hIndex++ ) { + 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); } @@ -45435,14 +52958,14 @@ int HP_mob_warpchase(struct mob_data *md, struct block_list *target) { bool HP_mob_ai_sub_hard(struct mob_data *md, int64 tick) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_ai_sub_hard_pre ) { - bool (*preHookFunc) (struct mob_data *md, int64 *tick); + if (HPMHooks.count.HP_mob_ai_sub_hard_pre > 0) { + bool (*preHookFunc) (struct mob_data **md, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45450,11 +52973,11 @@ bool HP_mob_ai_sub_hard(struct mob_data *md, int64 tick) { { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_post > 0) { + bool (*postHookFunc) (bool retVal___, struct mob_data *md, int64 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); + retVal___ = postHookFunc(retVal___, md, tick); } } return retVal___; @@ -45462,16 +52985,16 @@ bool HP_mob_ai_sub_hard(struct mob_data *md, int64 tick) { int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_hard_timer_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_ai_sub_hard_timer_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_hard_timer_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45481,9 +53004,9 @@ int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_mob_ai_sub_hard_timer_post > 0) { 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++ ) { + 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); @@ -45495,16 +53018,16 @@ int HP_mob_ai_sub_hard_timer(struct block_list *bl, va_list ap) { int HP_mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_foreachclient_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + if (HPMHooks.count.HP_mob_ai_sub_foreachclient_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_foreachclient_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45514,9 +53037,9 @@ int HP_mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.mob.ai_sub_foreachclient(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_ai_sub_foreachclient_post ) { + if (HPMHooks.count.HP_mob_ai_sub_foreachclient_post > 0) { 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++ ) { + 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); @@ -45528,16 +53051,16 @@ int HP_mob_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_sub_lazy_pre ) { - int (*preHookFunc) (struct mob_data *md, va_list args); + if (HPMHooks.count.HP_mob_ai_sub_lazy_pre > 0) { + int (*preHookFunc) (struct mob_data **md, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45547,9 +53070,9 @@ int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) { retVal___ = HPMHooks.source.mob.ai_sub_lazy(md, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_mob_ai_sub_lazy_post ) { + if (HPMHooks.count.HP_mob_ai_sub_lazy_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_sub_lazy_post; hIndex++ ) { + 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); @@ -45561,14 +53084,14 @@ int HP_mob_ai_sub_lazy(struct mob_data *md, va_list args) { int HP_mob_ai_lazy(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_lazy_pre ) { + if (HPMHooks.count.HP_mob_ai_lazy_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45576,11 +53099,11 @@ int HP_mob_ai_lazy(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.ai_lazy(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_ai_lazy_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_lazy_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_ai_lazy_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -45588,14 +53111,14 @@ int HP_mob_ai_lazy(int tid, int64 tick, int id, intptr_t data) { int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_ai_hard_pre ) { + if (HPMHooks.count.HP_mob_ai_hard_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45603,38 +53126,64 @@ int HP_mob_ai_hard(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.ai_hard(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_ai_hard_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_ai_hard_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_ai_hard_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } -struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data) { +void HP_mob_setdropitem_options(struct item *item, struct optdrop_group *options) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_setdropitem_options_pre > 0) { + void (*preHookFunc) (struct item **item, struct optdrop_group **options); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_setdropitem_options_pre[hIndex].func; + preHookFunc(&item, &options); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.setdropitem_options(item, options); + } + if (HPMHooks.count.HP_mob_setdropitem_options_post > 0) { + void (*postHookFunc) (struct item *item, struct optdrop_group *options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_options_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_setdropitem_options_post[hIndex].func; + postHookFunc(item, options); + } + } + return; +} +struct item_drop* HP_mob_setdropitem(int nameid, struct optdrop_group *options, 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); + if (HPMHooks.count.HP_mob_setdropitem_pre > 0) { + struct item_drop* (*preHookFunc) (int *nameid, struct optdrop_group **options, int *qty, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setdropitem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nameid, &options, &qty, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.mob.setdropitem(nameid, qty, data); + retVal___ = HPMHooks.source.mob.setdropitem(nameid, options, 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++ ) { + if (HPMHooks.count.HP_mob_setdropitem_post > 0) { + struct item_drop* (*postHookFunc) (struct item_drop* retVal___, int nameid, struct optdrop_group *options, 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); + retVal___ = postHookFunc(retVal___, nameid, options, qty, data); } } return retVal___; @@ -45642,14 +53191,14 @@ struct item_drop* HP_mob_setdropitem(int nameid, int qty, struct item_data *data 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); + if (HPMHooks.count.HP_mob_setlootitem_pre > 0) { + struct item_drop* (*preHookFunc) (struct item **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_setlootitem_pre[hIndex].func; - retVal___ = preHookFunc(item); + retVal___ = preHookFunc(&item); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45657,9 +53206,9 @@ struct item_drop* HP_mob_setlootitem(struct item *item) { { retVal___ = HPMHooks.source.mob.setlootitem(item); } - if( HPMHooks.count.HP_mob_setlootitem_post ) { + if (HPMHooks.count.HP_mob_setlootitem_post > 0) { struct item_drop* (*postHookFunc) (struct item_drop* retVal___, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_setlootitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_setlootitem_post[hIndex].func; retVal___ = postHookFunc(retVal___, item); } @@ -45669,14 +53218,14 @@ struct item_drop* HP_mob_setlootitem(struct item *item) { int HP_mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_delay_item_drop_pre ) { + if (HPMHooks.count.HP_mob_delay_item_drop_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45684,25 +53233,25 @@ int HP_mob_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_delay_item_drop_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_delay_item_drop_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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); + if (HPMHooks.count.HP_mob_item_drop_pre > 0) { + void (*preHookFunc) (struct mob_data **md, struct item_drop_list **dlist, struct item_drop **ditem, int *loot, int *drop_rate, unsigned short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_drop_pre; hIndex++ ) { + 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); + preHookFunc(&md, &dlist, &ditem, &loot, &drop_rate, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -45710,11 +53259,11 @@ void HP_mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct { 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++ ) { + if (HPMHooks.count.HP_mob_item_drop_post > 0) { + 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); + postHookFunc(md, dlist, ditem, loot, drop_rate, flag); } } return; @@ -45722,14 +53271,14 @@ void HP_mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct int HP_mob_timer_delete(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_timer_delete_pre ) { + if (HPMHooks.count.HP_mob_timer_delete_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45737,11 +53286,11 @@ int HP_mob_timer_delete(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.timer_delete(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_timer_delete_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_timer_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_timer_delete_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -45749,16 +53298,16 @@ int HP_mob_timer_delete(int tid, int64 tick, int id, intptr_t data) { int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_deleteslave_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_deleteslave_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45768,9 +53317,9 @@ int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.deleteslave_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_deleteslave_sub_post ) { + if (HPMHooks.count.HP_mob_deleteslave_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_sub_post; hIndex++ ) { + 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); @@ -45782,14 +53331,14 @@ int HP_mob_deleteslave_sub(struct block_list *bl, va_list ap) { int HP_mob_deleteslave(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_deleteslave_pre ) { - int (*preHookFunc) (struct mob_data *md); + if (HPMHooks.count.HP_mob_deleteslave_pre > 0) { + int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_deleteslave_pre[hIndex].func; - retVal___ = preHookFunc(md); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45797,9 +53346,9 @@ int HP_mob_deleteslave(struct mob_data *md) { { retVal___ = HPMHooks.source.mob.deleteslave(md); } - if( HPMHooks.count.HP_mob_deleteslave_post ) { + if (HPMHooks.count.HP_mob_deleteslave_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_deleteslave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_deleteslave_post[hIndex].func; retVal___ = postHookFunc(retVal___, md); } @@ -45809,14 +53358,14 @@ int HP_mob_deleteslave(struct mob_data *md) { int HP_mob_respawn(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_respawn_pre ) { + if (HPMHooks.count.HP_mob_respawn_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45824,25 +53373,25 @@ int HP_mob_respawn(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.mob.respawn(tid, tick, id, data); } - if( HPMHooks.count.HP_mob_respawn_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_respawn_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_respawn_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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); + if (HPMHooks.count.HP_mob_log_damage_pre > 0) { + void (*preHookFunc) (struct mob_data **md, struct block_list **src, int *damage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_log_damage_pre; hIndex++ ) { + 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); + preHookFunc(&md, &src, &damage); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -45850,25 +53399,25 @@ void HP_mob_log_damage(struct mob_data *md, struct block_list *src, int damage) { 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++ ) { + if (HPMHooks.count.HP_mob_log_damage_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_mob_damage_pre > 0) { + void (*preHookFunc) (struct mob_data **md, struct block_list **src, int *damage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_damage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_damage_pre[hIndex].func; - preHookFunc(md, src, &damage); + preHookFunc(&md, &src, &damage); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -45876,11 +53425,11 @@ void HP_mob_damage(struct mob_data *md, struct block_list *src, int damage) { { 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++ ) { + if (HPMHooks.count.HP_mob_damage_post > 0) { + 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); + postHookFunc(md, src, damage); } } return; @@ -45888,14 +53437,14 @@ void HP_mob_damage(struct mob_data *md, struct block_list *src, int damage) { int HP_mob_dead(struct mob_data *md, struct block_list *src, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_dead_pre ) { - int (*preHookFunc) (struct mob_data *md, struct block_list *src, int *type); + if (HPMHooks.count.HP_mob_dead_pre > 0) { + int (*preHookFunc) (struct mob_data **md, struct block_list **src, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_dead_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &src, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45903,25 +53452,25 @@ int HP_mob_dead(struct mob_data *md, struct block_list *src, int type) { { 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++ ) { + if (HPMHooks.count.HP_mob_dead_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_mob_revive_pre > 0) { + void (*preHookFunc) (struct mob_data **md, unsigned int *hp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_revive_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_revive_pre[hIndex].func; - preHookFunc(md, &hp); + preHookFunc(&md, &hp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -45929,11 +53478,11 @@ void HP_mob_revive(struct mob_data *md, unsigned int hp) { { 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++ ) { + if (HPMHooks.count.HP_mob_revive_post > 0) { + 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); + postHookFunc(md, hp); } } return; @@ -45941,14 +53490,14 @@ void HP_mob_revive(struct mob_data *md, unsigned int hp) { int HP_mob_guardian_guildchange(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_guardian_guildchange_pre ) { - int (*preHookFunc) (struct mob_data *md); + if (HPMHooks.count.HP_mob_guardian_guildchange_pre > 0) { + int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45956,9 +53505,9 @@ int HP_mob_guardian_guildchange(struct mob_data *md) { { retVal___ = HPMHooks.source.mob.guardian_guildchange(md); } - if( HPMHooks.count.HP_mob_guardian_guildchange_post ) { + if (HPMHooks.count.HP_mob_guardian_guildchange_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_guardian_guildchange_post; hIndex++ ) { + 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); } @@ -45968,14 +53517,14 @@ int HP_mob_guardian_guildchange(struct mob_data *md) { int HP_mob_random_class(int *value, size_t count) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_random_class_pre ) { - int (*preHookFunc) (int *value, size_t *count); + if (HPMHooks.count.HP_mob_random_class_pre > 0) { + int (*preHookFunc) (int **value, size_t *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_random_class_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&value, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -45983,11 +53532,11 @@ int HP_mob_random_class(int *value, size_t count) { { 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++ ) { + if (HPMHooks.count.HP_mob_random_class_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, value, count); } } return retVal___; @@ -45995,14 +53544,14 @@ int HP_mob_random_class(int *value, size_t count) { int HP_mob_class_change(struct mob_data *md, int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_class_change_pre ) { - int (*preHookFunc) (struct mob_data *md, int *class_); + if (HPMHooks.count.HP_mob_class_change_pre > 0) { + int (*preHookFunc) (struct mob_data **md, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_class_change_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&md, &class_); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46010,25 +53559,25 @@ int HP_mob_class_change(struct mob_data *md, int class_) { { 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++ ) { + if (HPMHooks.count.HP_mob_class_change_post > 0) { + 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_); + 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); + if (HPMHooks.count.HP_mob_heal_pre > 0) { + void (*preHookFunc) (struct mob_data **md, unsigned int *heal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_heal_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_heal_pre[hIndex].func; - preHookFunc(md, &heal); + preHookFunc(&md, &heal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46036,11 +53585,11 @@ void HP_mob_heal(struct mob_data *md, unsigned int heal) { { 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++ ) { + if (HPMHooks.count.HP_mob_heal_post > 0) { + 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); + postHookFunc(md, heal); } } return; @@ -46048,16 +53597,16 @@ void HP_mob_heal(struct mob_data *md, unsigned int heal) { int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpslave_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_warpslave_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46067,9 +53616,9 @@ int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.warpslave_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_warpslave_sub_post ) { + if (HPMHooks.count.HP_mob_warpslave_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_sub_post; hIndex++ ) { + 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); @@ -46081,14 +53630,14 @@ int HP_mob_warpslave_sub(struct block_list *bl, va_list ap) { int HP_mob_warpslave(struct block_list *bl, int range) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_warpslave_pre ) { - int (*preHookFunc) (struct block_list *bl, int *range); + if (HPMHooks.count.HP_mob_warpslave_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *range); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_warpslave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_warpslave_pre[hIndex].func; - retVal___ = preHookFunc(bl, &range); + retVal___ = preHookFunc(&bl, &range); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46096,11 +53645,11 @@ int HP_mob_warpslave(struct block_list *bl, int range) { { 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++ ) { + if (HPMHooks.count.HP_mob_warpslave_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, range); } } return retVal___; @@ -46108,16 +53657,16 @@ int HP_mob_warpslave(struct block_list *bl, int range) { int HP_mob_countslave_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_countslave_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_countslave_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46127,9 +53676,9 @@ int HP_mob_countslave_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.countslave_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_countslave_sub_post ) { + if (HPMHooks.count.HP_mob_countslave_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_sub_post; hIndex++ ) { + 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); @@ -46141,14 +53690,14 @@ int HP_mob_countslave_sub(struct block_list *bl, va_list ap) { int HP_mob_countslave(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_countslave_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_mob_countslave_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_countslave_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46156,9 +53705,9 @@ int HP_mob_countslave(struct block_list *bl) { { retVal___ = HPMHooks.source.mob.countslave(bl); } - if( HPMHooks.count.HP_mob_countslave_post ) { + if (HPMHooks.count.HP_mob_countslave_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_countslave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_countslave_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -46168,14 +53717,14 @@ int HP_mob_countslave(struct block_list *bl) { int HP_mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_summonslave_pre ) { - int (*preHookFunc) (struct mob_data *md2, int *value, int *amount, uint16 *skill_id); + if (HPMHooks.count.HP_mob_summonslave_pre > 0) { + int (*preHookFunc) (struct mob_data **md2, int **value, int *amount, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_summonslave_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md2, &value, &amount, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46183,11 +53732,11 @@ int HP_mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skil { 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++ ) { + if (HPMHooks.count.HP_mob_summonslave_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, md2, value, amount, skill_id); } } return retVal___; @@ -46195,16 +53744,16 @@ int HP_mob_summonslave(struct mob_data *md2, int *value, int amount, uint16 skil int HP_mob_getfriendhprate_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_getfriendhprate_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_getfriendhprate_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46214,9 +53763,9 @@ int HP_mob_getfriendhprate_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.getfriendhprate_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_getfriendhprate_sub_post ) { + if (HPMHooks.count.HP_mob_getfriendhprate_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_sub_post; hIndex++ ) { + 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); @@ -46228,14 +53777,14 @@ int HP_mob_getfriendhprate_sub(struct block_list *bl, va_list ap) { 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); + if (HPMHooks.count.HP_mob_getfriendhprate_pre > 0) { + struct block_list* (*preHookFunc) (struct mob_data **md, int *min_rate, int *max_rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendhprate_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &min_rate, &max_rate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46243,11 +53792,11 @@ struct block_list* HP_mob_getfriendhprate(struct mob_data *md, int min_rate, int { 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++ ) { + if (HPMHooks.count.HP_mob_getfriendhprate_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, md, min_rate, max_rate); } } return retVal___; @@ -46255,14 +53804,14 @@ struct block_list* HP_mob_getfriendhprate(struct mob_data *md, int min_rate, int 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); + if (HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre > 0) { + struct block_list* (*preHookFunc) (struct mob_data **md, int *rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_getmasterhpltmaxrate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_getmasterhpltmaxrate_pre[hIndex].func; - retVal___ = preHookFunc(md, &rate); + retVal___ = preHookFunc(&md, &rate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46270,11 +53819,11 @@ struct block_list* HP_mob_getmasterhpltmaxrate(struct mob_data *md, int rate) { { 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++ ) { + if (HPMHooks.count.HP_mob_getmasterhpltmaxrate_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, md, rate); } } return retVal___; @@ -46282,16 +53831,16 @@ struct block_list* HP_mob_getmasterhpltmaxrate(struct mob_data *md, int rate) { int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_getfriendstatus_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_mob_getfriendstatus_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46301,9 +53850,9 @@ int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.mob.getfriendstatus_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_mob_getfriendstatus_sub_post ) { + if (HPMHooks.count.HP_mob_getfriendstatus_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_sub_post; hIndex++ ) { + 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); @@ -46312,17 +53861,17 @@ int HP_mob_getfriendstatus_sub(struct block_list *bl, va_list ap) { } return retVal___; } -struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond2) { +struct block_list* 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); + struct block_list* retVal___ = NULL; + if (HPMHooks.count.HP_mob_getfriendstatus_pre > 0) { + struct block_list* (*preHookFunc) (struct mob_data **md, int *cond1, int *cond2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_getfriendstatus_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &cond1, &cond2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46330,11 +53879,11 @@ struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond { 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++ ) { + if (HPMHooks.count.HP_mob_getfriendstatus_post > 0) { + struct block_list* (*postHookFunc) (struct block_list* 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); + retVal___ = postHookFunc(retVal___, md, cond1, cond2); } } return retVal___; @@ -46342,14 +53891,14 @@ struct mob_data* HP_mob_getfriendstatus(struct mob_data *md, int cond1, int cond int HP_mob_skill_use(struct mob_data *md, int64 tick, int event) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_skill_use_pre ) { - int (*preHookFunc) (struct mob_data *md, int64 *tick, int *event); + if (HPMHooks.count.HP_mob_skill_use_pre > 0) { + int (*preHookFunc) (struct mob_data **md, int64 *tick, int *event); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &tick, &event); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46357,11 +53906,11 @@ int HP_mob_skill_use(struct mob_data *md, int64 tick, int event) { { 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, int64 *tick, int *event); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_use_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_skill_use_post > 0) { + int (*postHookFunc) (int retVal___, struct mob_data *md, int64 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); + retVal___ = postHookFunc(retVal___, md, tick, event); } } return retVal___; @@ -46369,14 +53918,14 @@ int HP_mob_skill_use(struct mob_data *md, int64 tick, int event) { int HP_mob_skill_event(struct mob_data *md, struct block_list *src, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_skill_event_pre ) { - int (*preHookFunc) (struct mob_data *md, struct block_list *src, int64 *tick, int *flag); + if (HPMHooks.count.HP_mob_skill_event_pre > 0) { + int (*preHookFunc) (struct mob_data **md, struct block_list **src, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &src, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46384,11 +53933,11 @@ int HP_mob_skill_event(struct mob_data *md, struct block_list *src, int64 tick, { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_event_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_skill_event_post > 0) { + int (*postHookFunc) (int retVal___, struct mob_data *md, struct block_list *src, int64 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); + retVal___ = postHookFunc(retVal___, md, src, tick, flag); } } return retVal___; @@ -46396,14 +53945,14 @@ int HP_mob_skill_event(struct mob_data *md, struct block_list *src, int64 tick, int HP_mob_is_clone(int class_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_is_clone_pre ) { + if (HPMHooks.count.HP_mob_is_clone_pre > 0) { int (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_is_clone_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46411,11 +53960,11 @@ int HP_mob_is_clone(int class_) { { 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++ ) { + if (HPMHooks.count.HP_mob_is_clone_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, class_); } } return retVal___; @@ -46423,14 +53972,14 @@ int HP_mob_is_clone(int class_) { int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, uint32 mode, int flag, unsigned int duration) { int hIndex = 0; int retVal___ = 0; - 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, uint32 *mode, int *flag, unsigned int *duration); + if (HPMHooks.count.HP_mob_clone_spawn_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int16 *m, int16 *x, int16 *y, const char **event, int *master_id, uint32 *mode, int *flag, unsigned int *duration); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &m, &x, &y, &event, &master_id, &mode, &flag, &duration); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46438,11 +53987,11 @@ int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, c { 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, uint32 *mode, int *flag, unsigned int *duration); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_spawn_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_clone_spawn_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 m, int16 x, int16 y, const char *event, int master_id, uint32 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); + retVal___ = postHookFunc(retVal___, sd, m, x, y, event, master_id, mode, flag, duration); } } return retVal___; @@ -46450,14 +53999,14 @@ int HP_mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, c int HP_mob_clone_delete(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_clone_delete_pre ) { - int (*preHookFunc) (struct mob_data *md); + if (HPMHooks.count.HP_mob_clone_delete_pre > 0) { + int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46465,9 +54014,9 @@ int HP_mob_clone_delete(struct mob_data *md) { { retVal___ = HPMHooks.source.mob.clone_delete(md); } - if( HPMHooks.count.HP_mob_clone_delete_post ) { + if (HPMHooks.count.HP_mob_clone_delete_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clone_delete_post; hIndex++ ) { + 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); } @@ -46477,14 +54026,14 @@ int HP_mob_clone_delete(struct mob_data *md) { 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___ = 0; - if( HPMHooks.count.HP_mob_drop_adjust_pre ) { + if (HPMHooks.count.HP_mob_drop_adjust_pre > 0) { unsigned int (*preHookFunc) (int *baserate, int *rate_adjust, unsigned short *rate_min, unsigned short *rate_max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_drop_adjust_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46492,25 +54041,25 @@ unsigned int HP_mob_drop_adjust(int baserate, int rate_adjust, unsigned short ra { 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++ ) { + if (HPMHooks.count.HP_mob_drop_adjust_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_mob_item_dropratio_adjust_pre > 0) { + void (*preHookFunc) (int *nameid, int *mob_id, int **rate_adjust); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_item_dropratio_adjust_pre; hIndex++ ) { + 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); + preHookFunc(&nameid, &mob_id, &rate_adjust); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46518,25 +54067,133 @@ void HP_mob_item_dropratio_adjust(int nameid, int mob_id, int *rate_adjust) { { 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++ ) { + if (HPMHooks.count.HP_mob_item_dropratio_adjust_post > 0) { + 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); + postHookFunc(nameid, mob_id, rate_adjust); } } return; } +bool HP_mob_read_optdrops_option(struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_option_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **option, struct optdrop_group_optslot **entry, int **idx, bool **calc_rate, int *slot, const char **group); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_option_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_option_pre[hIndex].func; + retVal___ = preHookFunc(&option, &entry, &idx, &calc_rate, &slot, &group); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_option(option, entry, idx, calc_rate, slot, group); + } + if (HPMHooks.count.HP_mob_read_optdrops_option_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *option, struct optdrop_group_optslot *entry, int *idx, bool *calc_rate, int slot, const char *group); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_option_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_option_post[hIndex].func; + retVal___ = postHookFunc(retVal___, option, entry, idx, calc_rate, slot, group); + } + } + return retVal___; +} +bool HP_mob_read_optdrops_optslot(struct config_setting_t *optslot, int n, int group_id, const char *group) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_optslot_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **optslot, int *n, int *group_id, const char **group); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_pre[hIndex].func; + retVal___ = preHookFunc(&optslot, &n, &group_id, &group); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_optslot(optslot, n, group_id, group); + } + if (HPMHooks.count.HP_mob_read_optdrops_optslot_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *optslot, int n, int group_id, const char *group); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_optslot_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_optslot_post[hIndex].func; + retVal___ = postHookFunc(retVal___, optslot, n, group_id, group); + } + } + return retVal___; +} +bool HP_mob_read_optdrops_group(struct config_setting_t *group, int n) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_group_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **group, int *n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_pre[hIndex].func; + retVal___ = preHookFunc(&group, &n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_group(group, n); + } + if (HPMHooks.count.HP_mob_read_optdrops_group_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *group, int n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_group_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_group_post[hIndex].func; + retVal___ = postHookFunc(retVal___, group, n); + } + } + return retVal___; +} +bool HP_mob_read_optdrops_db(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_read_optdrops_db_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_optdrops_db(); + } + if (HPMHooks.count.HP_mob_read_optdrops_db_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_optdrops_db_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_optdrops_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} void HP_mob_readdb(void) { int hIndex = 0; - if( HPMHooks.count.HP_mob_readdb_pre ) { + if (HPMHooks.count.HP_mob_readdb_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_readdb_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46544,9 +54201,9 @@ void HP_mob_readdb(void) { { HPMHooks.source.mob.readdb(); } - if( HPMHooks.count.HP_mob_readdb_post ) { + if (HPMHooks.count.HP_mob_readdb_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_readdb_post[hIndex].func; postHookFunc(); } @@ -46556,14 +54213,14 @@ void HP_mob_readdb(void) { bool HP_mob_lookup_const(const struct config_setting_t *it, const char *name, int *value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_lookup_const_pre ) { - bool (*preHookFunc) (const struct config_setting_t *it, const char *name, int *value); + if (HPMHooks.count.HP_mob_lookup_const_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **it, const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_lookup_const_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_lookup_const_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_lookup_const_pre[hIndex].func; - retVal___ = preHookFunc(it, name, value); + retVal___ = preHookFunc(&it, &name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46571,9 +54228,9 @@ bool HP_mob_lookup_const(const struct config_setting_t *it, const char *name, in { retVal___ = HPMHooks.source.mob.lookup_const(it, name, value); } - if( HPMHooks.count.HP_mob_lookup_const_post ) { + if (HPMHooks.count.HP_mob_lookup_const_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *it, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_lookup_const_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_lookup_const_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_lookup_const_post[hIndex].func; retVal___ = postHookFunc(retVal___, it, name, value); } @@ -46583,14 +54240,14 @@ bool HP_mob_lookup_const(const struct config_setting_t *it, const char *name, in bool HP_mob_get_const(const struct config_setting_t *it, int *value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_get_const_pre ) { - bool (*preHookFunc) (const struct config_setting_t *it, int *value); + if (HPMHooks.count.HP_mob_get_const_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **it, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_const_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_const_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_get_const_pre[hIndex].func; - retVal___ = preHookFunc(it, value); + retVal___ = preHookFunc(&it, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46598,9 +54255,9 @@ bool HP_mob_get_const(const struct config_setting_t *it, int *value) { { retVal___ = HPMHooks.source.mob.get_const(it, value); } - if( HPMHooks.count.HP_mob_get_const_post ) { + if (HPMHooks.count.HP_mob_get_const_post > 0) { bool (*postHookFunc) (bool retVal___, const struct config_setting_t *it, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_const_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_const_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_get_const_post[hIndex].func; retVal___ = postHookFunc(retVal___, it, value); } @@ -46610,14 +54267,14 @@ bool HP_mob_get_const(const struct config_setting_t *it, int *value) { int HP_mob_db_validate_entry(struct mob_db *entry, int n, const char *source) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_db_validate_entry_pre ) { - int (*preHookFunc) (struct mob_db *entry, int *n, const char *source); + if (HPMHooks.count.HP_mob_db_validate_entry_pre > 0) { + int (*preHookFunc) (struct mob_db **entry, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_validate_entry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_validate_entry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_db_validate_entry_pre[hIndex].func; - retVal___ = preHookFunc(entry, &n, source); + retVal___ = preHookFunc(&entry, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46625,11 +54282,11 @@ int HP_mob_db_validate_entry(struct mob_db *entry, int n, const char *source) { { retVal___ = HPMHooks.source.mob.db_validate_entry(entry, n, source); } - if( HPMHooks.count.HP_mob_db_validate_entry_post ) { - int (*postHookFunc) (int retVal___, struct mob_db *entry, int *n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_validate_entry_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_db_validate_entry_post > 0) { + int (*postHookFunc) (int retVal___, struct mob_db *entry, int n, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_db_validate_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_db_validate_entry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, entry, &n, source); + retVal___ = postHookFunc(retVal___, entry, n, source); } } return retVal___; @@ -46637,14 +54294,14 @@ int HP_mob_db_validate_entry(struct mob_db *entry, int n, const char *source) { int HP_mob_read_libconfig(const char *filename, bool ignore_missing) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_read_libconfig_pre ) { - int (*preHookFunc) (const char *filename, bool *ignore_missing); + if (HPMHooks.count.HP_mob_read_libconfig_pre > 0) { + int (*preHookFunc) (const char **filename, bool *ignore_missing); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_libconfig_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_libconfig_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_libconfig_pre[hIndex].func; - retVal___ = preHookFunc(filename, &ignore_missing); + retVal___ = preHookFunc(&filename, &ignore_missing); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46652,25 +54309,25 @@ int HP_mob_read_libconfig(const char *filename, bool ignore_missing) { { retVal___ = HPMHooks.source.mob.read_libconfig(filename, ignore_missing); } - if( HPMHooks.count.HP_mob_read_libconfig_post ) { - int (*postHookFunc) (int retVal___, const char *filename, bool *ignore_missing); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_libconfig_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_read_libconfig_post > 0) { + int (*postHookFunc) (int retVal___, const char *filename, bool ignore_missing); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_libconfig_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_libconfig_post[hIndex].func; - retVal___ = postHookFunc(retVal___, filename, &ignore_missing); + retVal___ = postHookFunc(retVal___, filename, ignore_missing); } } return retVal___; } void HP_mob_read_db_additional_fields(struct mob_db *entry, struct config_setting_t *it, int n, const char *source) { int hIndex = 0; - if( HPMHooks.count.HP_mob_read_db_additional_fields_pre ) { - void (*preHookFunc) (struct mob_db *entry, struct config_setting_t *it, int *n, const char *source); + if (HPMHooks.count.HP_mob_read_db_additional_fields_pre > 0) { + void (*preHookFunc) (struct mob_db **entry, struct config_setting_t **it, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_additional_fields_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_additional_fields_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_additional_fields_pre[hIndex].func; - preHookFunc(entry, it, &n, source); + preHookFunc(&entry, &it, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46678,11 +54335,11 @@ void HP_mob_read_db_additional_fields(struct mob_db *entry, struct config_settin { HPMHooks.source.mob.read_db_additional_fields(entry, it, n, source); } - if( HPMHooks.count.HP_mob_read_db_additional_fields_post ) { - void (*postHookFunc) (struct mob_db *entry, struct config_setting_t *it, int *n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_additional_fields_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_read_db_additional_fields_post > 0) { + void (*postHookFunc) (struct mob_db *entry, struct config_setting_t *it, int n, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_additional_fields_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_additional_fields_post[hIndex].func; - postHookFunc(entry, it, &n, source); + postHookFunc(entry, it, n, source); } } return; @@ -46690,14 +54347,14 @@ void HP_mob_read_db_additional_fields(struct mob_db *entry, struct config_settin int HP_mob_read_db_sub(struct config_setting_t *mobt, int id, const char *source) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_read_db_sub_pre ) { - int (*preHookFunc) (struct config_setting_t *mobt, int *id, const char *source); + if (HPMHooks.count.HP_mob_read_db_sub_pre > 0) { + int (*preHookFunc) (struct config_setting_t **mobt, int *id, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_sub_pre[hIndex].func; - retVal___ = preHookFunc(mobt, &id, source); + retVal___ = preHookFunc(&mobt, &id, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46705,25 +54362,25 @@ int HP_mob_read_db_sub(struct config_setting_t *mobt, int id, const char *source { retVal___ = HPMHooks.source.mob.read_db_sub(mobt, id, source); } - if( HPMHooks.count.HP_mob_read_db_sub_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *mobt, int *id, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_read_db_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *mobt, int id, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, mobt, &id, source); + retVal___ = postHookFunc(retVal___, mobt, id, source); } } return retVal___; } void HP_mob_read_db_drops_sub(struct mob_db *entry, struct config_setting_t *t) { int hIndex = 0; - if( HPMHooks.count.HP_mob_read_db_drops_sub_pre ) { - void (*preHookFunc) (struct mob_db *entry, struct config_setting_t *t); + if (HPMHooks.count.HP_mob_read_db_drops_sub_pre > 0) { + void (*preHookFunc) (struct mob_db **entry, struct config_setting_t **t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_drops_sub_pre[hIndex].func; - preHookFunc(entry, t); + preHookFunc(&entry, &t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46731,9 +54388,9 @@ void HP_mob_read_db_drops_sub(struct mob_db *entry, struct config_setting_t *t) { HPMHooks.source.mob.read_db_drops_sub(entry, t); } - if( HPMHooks.count.HP_mob_read_db_drops_sub_post ) { + if (HPMHooks.count.HP_mob_read_db_drops_sub_post > 0) { void (*postHookFunc) (struct mob_db *entry, struct config_setting_t *t); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_drops_sub_post[hIndex].func; postHookFunc(entry, t); } @@ -46742,14 +54399,14 @@ void HP_mob_read_db_drops_sub(struct mob_db *entry, struct config_setting_t *t) } void HP_mob_read_db_mvpdrops_sub(struct mob_db *entry, struct config_setting_t *t) { int hIndex = 0; - if( HPMHooks.count.HP_mob_read_db_mvpdrops_sub_pre ) { - void (*preHookFunc) (struct mob_db *entry, struct config_setting_t *t); + if (HPMHooks.count.HP_mob_read_db_mvpdrops_sub_pre > 0) { + void (*preHookFunc) (struct mob_db **entry, struct config_setting_t **t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mvpdrops_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mvpdrops_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_mvpdrops_sub_pre[hIndex].func; - preHookFunc(entry, t); + preHookFunc(&entry, &t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46757,9 +54414,9 @@ void HP_mob_read_db_mvpdrops_sub(struct mob_db *entry, struct config_setting_t * { HPMHooks.source.mob.read_db_mvpdrops_sub(entry, t); } - if( HPMHooks.count.HP_mob_read_db_mvpdrops_sub_post ) { + if (HPMHooks.count.HP_mob_read_db_mvpdrops_sub_post > 0) { void (*postHookFunc) (struct mob_db *entry, struct config_setting_t *t); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mvpdrops_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mvpdrops_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_mvpdrops_sub_post[hIndex].func; postHookFunc(entry, t); } @@ -46769,14 +54426,14 @@ void HP_mob_read_db_mvpdrops_sub(struct mob_db *entry, struct config_setting_t * uint32 HP_mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t *t) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_mob_read_db_mode_sub_pre ) { - uint32 (*preHookFunc) (struct mob_db *entry, struct config_setting_t *t); + if (HPMHooks.count.HP_mob_read_db_mode_sub_pre > 0) { + uint32 (*preHookFunc) (struct mob_db **entry, struct config_setting_t **t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mode_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mode_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_mode_sub_pre[hIndex].func; - retVal___ = preHookFunc(entry, t); + retVal___ = preHookFunc(&entry, &t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46784,25 +54441,52 @@ uint32 HP_mob_read_db_mode_sub(struct mob_db *entry, struct config_setting_t *t) { retVal___ = HPMHooks.source.mob.read_db_mode_sub(entry, t); } - if( HPMHooks.count.HP_mob_read_db_mode_sub_post ) { + if (HPMHooks.count.HP_mob_read_db_mode_sub_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, struct mob_db *entry, struct config_setting_t *t); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mode_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_mode_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_mode_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, entry, t); } } return retVal___; } +struct optdrop_group* HP_mob_read_db_drops_option(struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate) { + int hIndex = 0; + struct optdrop_group* retVal___ = NULL; + if (HPMHooks.count.HP_mob_read_db_drops_option_pre > 0) { + struct optdrop_group* (*preHookFunc) (struct mob_db **entry, const char **item_name, struct config_setting_t **drop, int **drop_rate); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_pre[hIndex].func; + retVal___ = preHookFunc(&entry, &item_name, &drop, &drop_rate); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.read_db_drops_option(entry, item_name, drop, drop_rate); + } + if (HPMHooks.count.HP_mob_read_db_drops_option_post > 0) { + struct optdrop_group* (*postHookFunc) (struct optdrop_group* retVal___, struct mob_db *entry, const char *item_name, struct config_setting_t *drop, int *drop_rate); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_drops_option_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_db_drops_option_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry, item_name, drop, drop_rate); + } + } + return retVal___; +} void HP_mob_read_db_stats_sub(struct mob_db *entry, struct config_setting_t *t) { int hIndex = 0; - if( HPMHooks.count.HP_mob_read_db_stats_sub_pre ) { - void (*preHookFunc) (struct mob_db *entry, struct config_setting_t *t); + if (HPMHooks.count.HP_mob_read_db_stats_sub_pre > 0) { + void (*preHookFunc) (struct mob_db **entry, struct config_setting_t **t); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_stats_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_stats_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_read_db_stats_sub_pre[hIndex].func; - preHookFunc(entry, t); + preHookFunc(&entry, &t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46810,25 +54494,51 @@ void HP_mob_read_db_stats_sub(struct mob_db *entry, struct config_setting_t *t) { HPMHooks.source.mob.read_db_stats_sub(entry, t); } - if( HPMHooks.count.HP_mob_read_db_stats_sub_post ) { + if (HPMHooks.count.HP_mob_read_db_stats_sub_post > 0) { void (*postHookFunc) (struct mob_db *entry, struct config_setting_t *t); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_stats_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_stats_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_read_db_stats_sub_post[hIndex].func; postHookFunc(entry, t); } } return; } +void HP_mob_read_db_viewdata_sub(struct mob_db *entry, struct config_setting_t *t) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_read_db_viewdata_sub_pre > 0) { + void (*preHookFunc) (struct mob_db **entry, struct config_setting_t **t); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_viewdata_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_read_db_viewdata_sub_pre[hIndex].func; + preHookFunc(&entry, &t); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.read_db_viewdata_sub(entry, t); + } + if (HPMHooks.count.HP_mob_read_db_viewdata_sub_post > 0) { + void (*postHookFunc) (struct mob_db *entry, struct config_setting_t *t); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_db_viewdata_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_read_db_viewdata_sub_post[hIndex].func; + postHookFunc(entry, t); + } + } + return; +} void HP_mob_name_constants(void) { int hIndex = 0; - if( HPMHooks.count.HP_mob_name_constants_pre ) { + if (HPMHooks.count.HP_mob_name_constants_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_name_constants_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46836,53 +54546,52 @@ void HP_mob_name_constants(void) { { HPMHooks.source.mob.name_constants(); } - if( HPMHooks.count.HP_mob_name_constants_post ) { + if (HPMHooks.count.HP_mob_name_constants_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_name_constants_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_name_constants_post[hIndex].func; postHookFunc(); } } return; } -bool HP_mob_readdb_mobavail(char *str[], int columns, int current) { +void HP_mob_mobavail_removal_notice(void) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_mob_readdb_mobavail_pre ) { - bool (*preHookFunc) (char *str[], int *columns, int *current); + if (HPMHooks.count.HP_mob_mobavail_removal_notice_pre > 0) { + void (*preHookFunc) (void); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mobavail_removal_notice_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_mobavail_removal_notice_pre[hIndex].func; + preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.mob.readdb_mobavail(str, columns, current); + HPMHooks.source.mob.mobavail_removal_notice(); } - 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); + if (HPMHooks.count.HP_mob_mobavail_removal_notice_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_mobavail_removal_notice_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_mobavail_removal_notice_post[hIndex].func; + postHookFunc(); } } - return retVal___; + return; } int HP_mob_read_randommonster(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_mob_read_randommonster_pre ) { + if (HPMHooks.count.HP_mob_read_randommonster_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46890,9 +54599,9 @@ int HP_mob_read_randommonster(void) { { retVal___ = HPMHooks.source.mob.read_randommonster(); } - if( HPMHooks.count.HP_mob_read_randommonster_post ) { + if (HPMHooks.count.HP_mob_read_randommonster_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_randommonster_post; hIndex++ ) { + 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___); } @@ -46902,14 +54611,14 @@ int HP_mob_read_randommonster(void) { bool HP_mob_parse_row_chatdb(char **str, const char *source, int line, int *last_msg_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_parse_row_chatdb_pre ) { - bool (*preHookFunc) (char **str, const char *source, int *line, int *last_msg_id); + if (HPMHooks.count.HP_mob_parse_row_chatdb_pre > 0) { + bool (*preHookFunc) (char ***str, const char **source, int *line, int **last_msg_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_parse_row_chatdb_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&str, &source, &line, &last_msg_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -46917,25 +54626,25 @@ bool HP_mob_parse_row_chatdb(char **str, const char *source, int line, int *last { 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++ ) { + if (HPMHooks.count.HP_mob_parse_row_chatdb_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_mob_readchatdb_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_readchatdb_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46943,52 +54652,25 @@ void HP_mob_readchatdb(void) { { HPMHooks.source.mob.readchatdb(); } - if( HPMHooks.count.HP_mob_readchatdb_post ) { + if (HPMHooks.count.HP_mob_readchatdb_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readchatdb_post; hIndex++ ) { + 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___ = false; - if( HPMHooks.count.HP_mob_parse_row_mobskilldb_pre ) { - bool (*preHookFunc) (char **str, int *columns, int *current); - *HPMforce_return = false; - 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 ) { + if (HPMHooks.count.HP_mob_readskilldb_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_readskilldb_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -46996,9 +54678,9 @@ void HP_mob_readskilldb(void) { { HPMHooks.source.mob.readskilldb(); } - if( HPMHooks.count.HP_mob_readskilldb_post ) { + if (HPMHooks.count.HP_mob_readskilldb_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_readskilldb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_readskilldb_post[hIndex].func; postHookFunc(); } @@ -47008,14 +54690,14 @@ void HP_mob_readskilldb(void) { bool HP_mob_readdb_race2(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_readdb_race2_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + if (HPMHooks.count.HP_mob_readdb_race2_pre > 0) { + bool (*preHookFunc) (char **fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_race2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&fields, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47023,11 +54705,11 @@ bool HP_mob_readdb_race2(char *fields[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_mob_readdb_race2_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, fields, columns, current); } } return retVal___; @@ -47035,14 +54717,14 @@ bool HP_mob_readdb_race2(char *fields[], int columns, int current) { bool HP_mob_readdb_itemratio(char *str[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_mob_readdb_itemratio_pre ) { - bool (*preHookFunc) (char *str[], int *columns, int *current); + if (HPMHooks.count.HP_mob_readdb_itemratio_pre > 0) { + bool (*preHookFunc) (char **str[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_readdb_itemratio_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&str, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47050,25 +54732,25 @@ bool HP_mob_readdb_itemratio(char *str[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_mob_readdb_itemratio_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, str, columns, current); } } return retVal___; } void HP_mob_load(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_mob_load_pre ) { + if (HPMHooks.count.HP_mob_load_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_load_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47076,25 +54758,25 @@ void HP_mob_load(bool minimal) { { HPMHooks.source.mob.load(minimal); } - if( HPMHooks.count.HP_mob_load_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_load_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_load_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_mob_clear_spawninfo(void) { int hIndex = 0; - if( HPMHooks.count.HP_mob_clear_spawninfo_pre ) { + if (HPMHooks.count.HP_mob_clear_spawninfo_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47102,25 +54784,111 @@ void HP_mob_clear_spawninfo(void) { { HPMHooks.source.mob.clear_spawninfo(); } - if( HPMHooks.count.HP_mob_clear_spawninfo_post ) { + if (HPMHooks.count.HP_mob_clear_spawninfo_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_clear_spawninfo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_clear_spawninfo_post[hIndex].func; postHookFunc(); } } return; } +struct item_drop_ratio* HP_mob_get_item_drop_ratio(int nameid) { + int hIndex = 0; + struct item_drop_ratio* retVal___ = NULL; + if (HPMHooks.count.HP_mob_get_item_drop_ratio_pre > 0) { + struct item_drop_ratio* (*preHookFunc) (int *nameid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_item_drop_ratio_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_get_item_drop_ratio_pre[hIndex].func; + retVal___ = preHookFunc(&nameid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.get_item_drop_ratio(nameid); + } + if (HPMHooks.count.HP_mob_get_item_drop_ratio_post > 0) { + struct item_drop_ratio* (*postHookFunc) (struct item_drop_ratio* retVal___, int nameid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_get_item_drop_ratio_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_get_item_drop_ratio_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nameid); + } + } + return retVal___; +} +void HP_mob_set_item_drop_ratio(int nameid, struct item_drop_ratio *ratio) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_set_item_drop_ratio_pre > 0) { + void (*preHookFunc) (int *nameid, struct item_drop_ratio **ratio); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_set_item_drop_ratio_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_set_item_drop_ratio_pre[hIndex].func; + preHookFunc(&nameid, &ratio); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.set_item_drop_ratio(nameid, ratio); + } + if (HPMHooks.count.HP_mob_set_item_drop_ratio_post > 0) { + void (*postHookFunc) (int nameid, struct item_drop_ratio *ratio); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_set_item_drop_ratio_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_set_item_drop_ratio_post[hIndex].func; + postHookFunc(nameid, ratio); + } + } + return; +} +int HP_mob_final_ratio_sub(union DBKey key, struct DBData *data, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_mob_final_ratio_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_ratio_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_mob_final_ratio_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.mob.final_ratio_sub(key, data, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_mob_final_ratio_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_final_ratio_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_mob_final_ratio_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, key, data, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} void HP_mob_destroy_mob_db(int index) { int hIndex = 0; - if( HPMHooks.count.HP_mob_destroy_mob_db_pre ) { + if (HPMHooks.count.HP_mob_destroy_mob_db_pre > 0) { void (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mob_destroy_mob_db_pre[hIndex].func; preHookFunc(&index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47128,29 +54896,400 @@ void HP_mob_destroy_mob_db(int index) { { HPMHooks.source.mob.destroy_mob_db(index); } - if( HPMHooks.count.HP_mob_destroy_mob_db_post ) { - void (*postHookFunc) (int *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_post; hIndex++ ) { + if (HPMHooks.count.HP_mob_destroy_mob_db_post > 0) { + void (*postHookFunc) (int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_mob_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mob_destroy_mob_db_post[hIndex].func; - postHookFunc(&index); + postHookFunc(index); + } + } + return; +} +void HP_mob_destroy_drop_groups(void) { + int hIndex = 0; + if (HPMHooks.count.HP_mob_destroy_drop_groups_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mob.destroy_drop_groups(); + } + if (HPMHooks.count.HP_mob_destroy_drop_groups_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_destroy_drop_groups_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_destroy_drop_groups_post[hIndex].func; + postHookFunc(); } } return; } -/* npc_chat */ +bool HP_mob_skill_db_libconfig(const char *filename, bool ignore_missing) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_skill_db_libconfig_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *ignore_missing); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &ignore_missing); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.skill_db_libconfig(filename, ignore_missing); + } + if (HPMHooks.count.HP_mob_skill_db_libconfig_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool ignore_missing); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, ignore_missing); + } + } + return retVal___; +} +bool HP_mob_skill_db_libconfig_sub(struct config_setting_t *it, int n) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_skill_db_libconfig_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.skill_db_libconfig_sub(it, n); + } + if (HPMHooks.count.HP_mob_skill_db_libconfig_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, n); + } + } + return retVal___; +} +bool HP_mob_skill_db_libconfig_sub_skill(struct config_setting_t *it, int n, int mob_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mob_skill_db_libconfig_sub_skill_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *n, int *mob_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_sub_skill_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_sub_skill_pre[hIndex].func; + retVal___ = preHookFunc(&it, &n, &mob_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mob.skill_db_libconfig_sub_skill(it, n, mob_id); + } + if (HPMHooks.count.HP_mob_skill_db_libconfig_sub_skill_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int n, int mob_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mob_skill_db_libconfig_sub_skill_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mob_skill_db_libconfig_sub_skill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, n, mob_id); + } + } + return retVal___; +} +/* mutex_interface */ +struct mutex_data* HP_mutex_create(void) { + int hIndex = 0; + struct mutex_data* retVal___ = NULL; + if (HPMHooks.count.HP_mutex_create_pre > 0) { + struct mutex_data* (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_create_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mutex.create(); + } + if (HPMHooks.count.HP_mutex_create_post > 0) { + struct mutex_data* (*postHookFunc) (struct mutex_data* retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_mutex_destroy(struct mutex_data *m) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_destroy_pre > 0) { + void (*preHookFunc) (struct mutex_data **m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_destroy_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.destroy(m); + } + if (HPMHooks.count.HP_mutex_destroy_post > 0) { + void (*postHookFunc) (struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_destroy_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +void HP_mutex_lock(struct mutex_data *m) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_lock_pre > 0) { + void (*preHookFunc) (struct mutex_data **m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_lock_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.lock(m); + } + if (HPMHooks.count.HP_mutex_lock_post > 0) { + void (*postHookFunc) (struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_lock_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_lock_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +bool HP_mutex_trylock(struct mutex_data *m) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_mutex_trylock_pre > 0) { + bool (*preHookFunc) (struct mutex_data **m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_trylock_pre[hIndex].func; + retVal___ = preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mutex.trylock(m); + } + if (HPMHooks.count.HP_mutex_trylock_post > 0) { + bool (*postHookFunc) (bool retVal___, struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_trylock_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_trylock_post[hIndex].func; + retVal___ = postHookFunc(retVal___, m); + } + } + return retVal___; +} +void HP_mutex_unlock(struct mutex_data *m) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_unlock_pre > 0) { + void (*preHookFunc) (struct mutex_data **m); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_unlock_pre[hIndex].func; + preHookFunc(&m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.unlock(m); + } + if (HPMHooks.count.HP_mutex_unlock_post > 0) { + void (*postHookFunc) (struct mutex_data *m); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_unlock_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_unlock_post[hIndex].func; + postHookFunc(m); + } + } + return; +} +struct cond_data* HP_mutex_cond_create(void) { + int hIndex = 0; + struct cond_data* retVal___ = NULL; + if (HPMHooks.count.HP_mutex_cond_create_pre > 0) { + struct cond_data* (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_create_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.mutex.cond_create(); + } + if (HPMHooks.count.HP_mutex_cond_create_post > 0) { + struct cond_data* (*postHookFunc) (struct cond_data* retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_mutex_cond_destroy(struct cond_data *c) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_destroy_pre > 0) { + void (*preHookFunc) (struct cond_data **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_destroy_pre[hIndex].func; + preHookFunc(&c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_destroy(c); + } + if (HPMHooks.count.HP_mutex_cond_destroy_post > 0) { + void (*postHookFunc) (struct cond_data *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_destroy_post[hIndex].func; + postHookFunc(c); + } + } + return; +} +void HP_mutex_cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeout_ticks) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_wait_pre > 0) { + void (*preHookFunc) (struct cond_data **c, struct mutex_data **m, sysint *timeout_ticks); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_wait_pre[hIndex].func; + preHookFunc(&c, &m, &timeout_ticks); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_wait(c, m, timeout_ticks); + } + if (HPMHooks.count.HP_mutex_cond_wait_post > 0) { + void (*postHookFunc) (struct cond_data *c, struct mutex_data *m, sysint timeout_ticks); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_wait_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_wait_post[hIndex].func; + postHookFunc(c, m, timeout_ticks); + } + } + return; +} +void HP_mutex_cond_signal(struct cond_data *c) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_signal_pre > 0) { + void (*preHookFunc) (struct cond_data **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_signal_pre[hIndex].func; + preHookFunc(&c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_signal(c); + } + if (HPMHooks.count.HP_mutex_cond_signal_post > 0) { + void (*postHookFunc) (struct cond_data *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_signal_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_signal_post[hIndex].func; + postHookFunc(c); + } + } + return; +} +void HP_mutex_cond_broadcast(struct cond_data *c) { + int hIndex = 0; + if (HPMHooks.count.HP_mutex_cond_broadcast_pre > 0) { + void (*preHookFunc) (struct cond_data **c); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_pre[hIndex].func; + preHookFunc(&c); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.mutex.cond_broadcast(c); + } + if (HPMHooks.count.HP_mutex_cond_broadcast_post > 0) { + void (*postHookFunc) (struct cond_data *c); + for (hIndex = 0; hIndex < HPMHooks.count.HP_mutex_cond_broadcast_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_mutex_cond_broadcast_post[hIndex].func; + postHookFunc(c); + } + } + return; +} +/* npc_chat_interface */ int HP_npc_chat_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_chat_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_npc_chat_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_sub_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_npc_chat_sub_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47160,9 +55299,9 @@ int HP_npc_chat_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.npc_chat.sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_chat_sub_post ) { + if (HPMHooks.count.HP_npc_chat_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_sub_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_npc_chat_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); @@ -47173,14 +55312,14 @@ int HP_npc_chat_sub(struct block_list *bl, va_list ap) { } void HP_npc_chat_finalize(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_finalize_pre ) { - void (*preHookFunc) (struct npc_data *nd); + if (HPMHooks.count.HP_npc_chat_finalize_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_finalize_pre[hIndex].func; - preHookFunc(nd); + preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47188,9 +55327,9 @@ void HP_npc_chat_finalize(struct npc_data *nd) { { HPMHooks.source.npc_chat.finalize(nd); } - if( HPMHooks.count.HP_npc_chat_finalize_post ) { + if (HPMHooks.count.HP_npc_chat_finalize_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_finalize_post[hIndex].func; postHookFunc(nd); } @@ -47199,14 +55338,14 @@ void HP_npc_chat_finalize(struct npc_data *nd) { } void HP_npc_chat_def_pattern(struct npc_data *nd, int setid, const char *pattern, const char *label) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_def_pattern_pre ) { - void (*preHookFunc) (struct npc_data *nd, int *setid, const char *pattern, const char *label); + if (HPMHooks.count.HP_npc_chat_def_pattern_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *setid, const char **pattern, const char **label); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_def_pattern_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_def_pattern_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_def_pattern_pre[hIndex].func; - preHookFunc(nd, &setid, pattern, label); + preHookFunc(&nd, &setid, &pattern, &label); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47214,11 +55353,11 @@ void HP_npc_chat_def_pattern(struct npc_data *nd, int setid, const char *pattern { HPMHooks.source.npc_chat.def_pattern(nd, setid, pattern, label); } - if( HPMHooks.count.HP_npc_chat_def_pattern_post ) { - void (*postHookFunc) (struct npc_data *nd, int *setid, const char *pattern, const char *label); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_def_pattern_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_chat_def_pattern_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int setid, const char *pattern, const char *label); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_def_pattern_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_def_pattern_post[hIndex].func; - postHookFunc(nd, &setid, pattern, label); + postHookFunc(nd, setid, pattern, label); } } return; @@ -47226,14 +55365,14 @@ void HP_npc_chat_def_pattern(struct npc_data *nd, int setid, const char *pattern struct pcrematch_entry* HP_npc_chat_create_pcrematch_entry(struct pcrematch_set *set) { int hIndex = 0; struct pcrematch_entry* retVal___ = NULL; - if( HPMHooks.count.HP_npc_chat_create_pcrematch_entry_pre ) { - struct pcrematch_entry* (*preHookFunc) (struct pcrematch_set *set); + if (HPMHooks.count.HP_npc_chat_create_pcrematch_entry_pre > 0) { + struct pcrematch_entry* (*preHookFunc) (struct pcrematch_set **set); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_create_pcrematch_entry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_create_pcrematch_entry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_create_pcrematch_entry_pre[hIndex].func; - retVal___ = preHookFunc(set); + retVal___ = preHookFunc(&set); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47241,9 +55380,9 @@ struct pcrematch_entry* HP_npc_chat_create_pcrematch_entry(struct pcrematch_set { retVal___ = HPMHooks.source.npc_chat.create_pcrematch_entry(set); } - if( HPMHooks.count.HP_npc_chat_create_pcrematch_entry_post ) { + if (HPMHooks.count.HP_npc_chat_create_pcrematch_entry_post > 0) { struct pcrematch_entry* (*postHookFunc) (struct pcrematch_entry* retVal___, struct pcrematch_set *set); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_create_pcrematch_entry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_create_pcrematch_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_create_pcrematch_entry_post[hIndex].func; retVal___ = postHookFunc(retVal___, set); } @@ -47252,14 +55391,14 @@ struct pcrematch_entry* HP_npc_chat_create_pcrematch_entry(struct pcrematch_set } void HP_npc_chat_delete_pcreset(struct npc_data *nd, int setid) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_delete_pcreset_pre ) { - void (*preHookFunc) (struct npc_data *nd, int *setid); + if (HPMHooks.count.HP_npc_chat_delete_pcreset_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *setid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_delete_pcreset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_delete_pcreset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_delete_pcreset_pre[hIndex].func; - preHookFunc(nd, &setid); + preHookFunc(&nd, &setid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47267,25 +55406,25 @@ void HP_npc_chat_delete_pcreset(struct npc_data *nd, int setid) { { HPMHooks.source.npc_chat.delete_pcreset(nd, setid); } - if( HPMHooks.count.HP_npc_chat_delete_pcreset_post ) { - void (*postHookFunc) (struct npc_data *nd, int *setid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_delete_pcreset_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_chat_delete_pcreset_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int setid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_delete_pcreset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_delete_pcreset_post[hIndex].func; - postHookFunc(nd, &setid); + postHookFunc(nd, setid); } } return; } void HP_npc_chat_deactivate_pcreset(struct npc_data *nd, int setid) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_deactivate_pcreset_pre ) { - void (*preHookFunc) (struct npc_data *nd, int *setid); + if (HPMHooks.count.HP_npc_chat_deactivate_pcreset_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *setid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_deactivate_pcreset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_deactivate_pcreset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_deactivate_pcreset_pre[hIndex].func; - preHookFunc(nd, &setid); + preHookFunc(&nd, &setid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47293,25 +55432,25 @@ void HP_npc_chat_deactivate_pcreset(struct npc_data *nd, int setid) { { HPMHooks.source.npc_chat.deactivate_pcreset(nd, setid); } - if( HPMHooks.count.HP_npc_chat_deactivate_pcreset_post ) { - void (*postHookFunc) (struct npc_data *nd, int *setid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_deactivate_pcreset_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_chat_deactivate_pcreset_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int setid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_deactivate_pcreset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_deactivate_pcreset_post[hIndex].func; - postHookFunc(nd, &setid); + postHookFunc(nd, setid); } } return; } void HP_npc_chat_activate_pcreset(struct npc_data *nd, int setid) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_activate_pcreset_pre ) { - void (*preHookFunc) (struct npc_data *nd, int *setid); + if (HPMHooks.count.HP_npc_chat_activate_pcreset_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *setid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_activate_pcreset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_activate_pcreset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_activate_pcreset_pre[hIndex].func; - preHookFunc(nd, &setid); + preHookFunc(&nd, &setid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47319,11 +55458,11 @@ void HP_npc_chat_activate_pcreset(struct npc_data *nd, int setid) { { HPMHooks.source.npc_chat.activate_pcreset(nd, setid); } - if( HPMHooks.count.HP_npc_chat_activate_pcreset_post ) { - void (*postHookFunc) (struct npc_data *nd, int *setid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_activate_pcreset_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_chat_activate_pcreset_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int setid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_activate_pcreset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_activate_pcreset_post[hIndex].func; - postHookFunc(nd, &setid); + postHookFunc(nd, setid); } } return; @@ -47331,14 +55470,14 @@ void HP_npc_chat_activate_pcreset(struct npc_data *nd, int setid) { struct pcrematch_set* HP_npc_chat_lookup_pcreset(struct npc_data *nd, int setid) { int hIndex = 0; struct pcrematch_set* retVal___ = NULL; - if( HPMHooks.count.HP_npc_chat_lookup_pcreset_pre ) { - struct pcrematch_set* (*preHookFunc) (struct npc_data *nd, int *setid); + if (HPMHooks.count.HP_npc_chat_lookup_pcreset_pre > 0) { + struct pcrematch_set* (*preHookFunc) (struct npc_data **nd, int *setid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_lookup_pcreset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_lookup_pcreset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_lookup_pcreset_pre[hIndex].func; - retVal___ = preHookFunc(nd, &setid); + retVal___ = preHookFunc(&nd, &setid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47346,25 +55485,25 @@ struct pcrematch_set* HP_npc_chat_lookup_pcreset(struct npc_data *nd, int setid) { retVal___ = HPMHooks.source.npc_chat.lookup_pcreset(nd, setid); } - if( HPMHooks.count.HP_npc_chat_lookup_pcreset_post ) { - struct pcrematch_set* (*postHookFunc) (struct pcrematch_set* retVal___, struct npc_data *nd, int *setid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_lookup_pcreset_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_chat_lookup_pcreset_post > 0) { + struct pcrematch_set* (*postHookFunc) (struct pcrematch_set* retVal___, struct npc_data *nd, int setid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_lookup_pcreset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_lookup_pcreset_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, &setid); + retVal___ = postHookFunc(retVal___, nd, setid); } } return retVal___; } void HP_npc_chat_finalize_pcrematch_entry(struct pcrematch_entry *e) { int hIndex = 0; - if( HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_pre ) { - void (*preHookFunc) (struct pcrematch_entry *e); + if (HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_pre > 0) { + void (*preHookFunc) (struct pcrematch_entry **e); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_chat_finalize_pcrematch_entry_pre[hIndex].func; - preHookFunc(e); + preHookFunc(&e); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47372,27 +55511,27 @@ void HP_npc_chat_finalize_pcrematch_entry(struct pcrematch_entry *e) { { HPMHooks.source.npc_chat.finalize_pcrematch_entry(e); } - if( HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_post ) { + if (HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_post > 0) { void (*postHookFunc) (struct pcrematch_entry *e); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_chat_finalize_pcrematch_entry_post[hIndex].func; postHookFunc(e); } } return; } -/* npc */ +/* npc_interface */ int HP_npc_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_init_pre ) { + if (HPMHooks.count.HP_npc_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47400,11 +55539,11 @@ int HP_npc_init(bool minimal) { { retVal___ = HPMHooks.source.npc.init(minimal); } - if( HPMHooks.count.HP_npc_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_init_post > 0) { + int (*postHookFunc) (int retVal___, bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + retVal___ = postHookFunc(retVal___, minimal); } } return retVal___; @@ -47412,14 +55551,14 @@ int HP_npc_init(bool minimal) { int HP_npc_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_final_pre ) { + if (HPMHooks.count.HP_npc_final_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47427,9 +55566,9 @@ int HP_npc_final(void) { { retVal___ = HPMHooks.source.npc.final(); } - if( HPMHooks.count.HP_npc_final_post ) { + if (HPMHooks.count.HP_npc_final_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_final_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -47439,14 +55578,14 @@ int HP_npc_final(void) { int HP_npc_get_new_npc_id(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_get_new_npc_id_pre ) { + if (HPMHooks.count.HP_npc_get_new_npc_id_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47454,9 +55593,9 @@ int HP_npc_get_new_npc_id(void) { { retVal___ = HPMHooks.source.npc.get_new_npc_id(); } - if( HPMHooks.count.HP_npc_get_new_npc_id_post ) { + if (HPMHooks.count.HP_npc_get_new_npc_id_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_new_npc_id_post; hIndex++ ) { + 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___); } @@ -47466,14 +55605,14 @@ int HP_npc_get_new_npc_id(void) { 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 ) { + if (HPMHooks.count.HP_npc_get_viewdata_pre > 0) { struct view_data* (*preHookFunc) (int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_get_viewdata_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47481,11 +55620,11 @@ struct view_data* HP_npc_get_viewdata(int class_) { { 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++ ) { + if (HPMHooks.count.HP_npc_get_viewdata_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, class_); } } return retVal___; @@ -47493,16 +55632,16 @@ struct view_data* HP_npc_get_viewdata(int class_) { int HP_npc_isnear_sub(struct block_list *bl, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_isnear_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list args); + if (HPMHooks.count.HP_npc_isnear_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47512,9 +55651,9 @@ int HP_npc_isnear_sub(struct block_list *bl, va_list args) { retVal___ = HPMHooks.source.npc.isnear_sub(bl, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_npc_isnear_sub_post ) { + if (HPMHooks.count.HP_npc_isnear_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_sub_post; hIndex++ ) { + 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); @@ -47526,14 +55665,14 @@ int HP_npc_isnear_sub(struct block_list *bl, va_list args) { bool HP_npc_isnear(struct block_list *bl) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_isnear_pre ) { - bool (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_npc_isnear_pre > 0) { + bool (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_isnear_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47541,9 +55680,9 @@ bool HP_npc_isnear(struct block_list *bl) { { retVal___ = HPMHooks.source.npc.isnear(bl); } - if( HPMHooks.count.HP_npc_isnear_post ) { + if (HPMHooks.count.HP_npc_isnear_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_isnear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_isnear_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -47553,14 +55692,14 @@ bool HP_npc_isnear(struct block_list *bl) { int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_ontouch_event_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + if (HPMHooks.count.HP_npc_ontouch_event_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch_event_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47568,9 +55707,9 @@ int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.ontouch_event(sd, nd); } - if( HPMHooks.count.HP_npc_ontouch_event_post ) { + if (HPMHooks.count.HP_npc_ontouch_event_post > 0) { 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++ ) { + 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); } @@ -47580,14 +55719,14 @@ int HP_npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) { int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_ontouch2_event_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + if (HPMHooks.count.HP_npc_ontouch2_event_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ontouch2_event_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47595,9 +55734,9 @@ int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.ontouch2_event(sd, nd); } - if( HPMHooks.count.HP_npc_ontouch2_event_post ) { + if (HPMHooks.count.HP_npc_ontouch2_event_post > 0) { 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++ ) { + 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); } @@ -47607,14 +55746,14 @@ int HP_npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd) { int HP_npc_onuntouch_event(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_onuntouch_event_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + if (HPMHooks.count.HP_npc_onuntouch_event_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_onuntouch_event_pre[hIndex].func; - retVal___ = preHookFunc(sd, nd); + retVal___ = preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47622,9 +55761,9 @@ int HP_npc_onuntouch_event(struct map_session_data *sd, struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.onuntouch_event(sd, nd); } - if( HPMHooks.count.HP_npc_onuntouch_event_post ) { + if (HPMHooks.count.HP_npc_onuntouch_event_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_onuntouch_event_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_onuntouch_event_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, nd); } @@ -47634,16 +55773,16 @@ int HP_npc_onuntouch_event(struct map_session_data *sd, struct npc_data *nd) { int HP_npc_enable_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_enable_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_npc_enable_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47653,9 +55792,9 @@ int HP_npc_enable_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.npc.enable_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_enable_sub_post ) { + if (HPMHooks.count.HP_npc_enable_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_sub_post; hIndex++ ) { + 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); @@ -47667,14 +55806,14 @@ int HP_npc_enable_sub(struct block_list *bl, va_list ap) { int HP_npc_enable(const char *name, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_enable_pre ) { - int (*preHookFunc) (const char *name, int *flag); + if (HPMHooks.count.HP_npc_enable_pre > 0) { + int (*preHookFunc) (const char **name, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_enable_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_enable_pre[hIndex].func; - retVal___ = preHookFunc(name, &flag); + retVal___ = preHookFunc(&name, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47682,11 +55821,11 @@ int HP_npc_enable(const char *name, int flag) { { 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++ ) { + if (HPMHooks.count.HP_npc_enable_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, name, flag); } } return retVal___; @@ -47694,14 +55833,14 @@ int HP_npc_enable(const char *name, int flag) { 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); + if (HPMHooks.count.HP_npc_name2id_pre > 0) { + struct npc_data* (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_name2id_pre[hIndex].func; - retVal___ = preHookFunc(name); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47709,9 +55848,9 @@ struct npc_data* HP_npc_name2id(const char *name) { { retVal___ = HPMHooks.source.npc.name2id(name); } - if( HPMHooks.count.HP_npc_name2id_post ) { + if (HPMHooks.count.HP_npc_name2id_post > 0) { struct npc_data* (*postHookFunc) (struct npc_data* retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_name2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_name2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -47721,14 +55860,14 @@ struct npc_data* HP_npc_name2id(const char *name) { int HP_npc_event_dequeue(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_dequeue_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_npc_event_dequeue_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47736,9 +55875,9 @@ int HP_npc_event_dequeue(struct map_session_data *sd) { { retVal___ = HPMHooks.source.npc.event_dequeue(sd); } - if( HPMHooks.count.HP_npc_event_dequeue_post ) { + if (HPMHooks.count.HP_npc_event_dequeue_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_dequeue_post; hIndex++ ) { + 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); } @@ -47747,18 +55886,17 @@ int HP_npc_event_dequeue(struct map_session_data *sd) { } struct DBData HP_npc_event_export_create(union DBKey key, va_list args) { int hIndex = 0; - struct DBData retVal___; - memset(&retVal___, '\0', sizeof(struct DBData)); - if( HPMHooks.count.HP_npc_event_export_create_pre ) { + struct DBData retVal___ = { 0 }; + if (HPMHooks.count.HP_npc_event_export_create_pre > 0) { struct DBData (*preHookFunc) (union DBKey *key, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47768,12 +55906,12 @@ struct DBData HP_npc_event_export_create(union DBKey key, va_list args) { retVal___ = HPMHooks.source.npc.event_export_create(key, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_npc_event_export_create_post ) { - struct DBData (*postHookFunc) (struct DBData retVal___, union DBKey *key, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_create_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_event_export_create_post > 0) { + struct DBData (*postHookFunc) (struct DBData retVal___, union 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); + retVal___ = postHookFunc(retVal___, key, args___copy); va_end(args___copy); } } @@ -47782,14 +55920,14 @@ struct DBData HP_npc_event_export_create(union DBKey key, va_list args) { int HP_npc_event_export(struct npc_data *nd, int i) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_export_pre ) { - int (*preHookFunc) (struct npc_data *nd, int *i); + if (HPMHooks.count.HP_npc_event_export_pre > 0) { + int (*preHookFunc) (struct npc_data **nd, int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_export_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nd, &i); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47797,11 +55935,11 @@ int HP_npc_event_export(struct npc_data *nd, int i) { { 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++ ) { + if (HPMHooks.count.HP_npc_event_export_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, nd, i); } } return retVal___; @@ -47809,14 +55947,14 @@ int HP_npc_event_export(struct npc_data *nd, int i) { int HP_npc_event_sub(struct map_session_data *sd, struct event_data *ev, const char *eventname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct event_data *ev, const char *eventname); + if (HPMHooks.count.HP_npc_event_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct event_data **ev, const char **eventname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &ev, &eventname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47824,9 +55962,9 @@ int HP_npc_event_sub(struct map_session_data *sd, struct event_data *ev, const c { retVal___ = HPMHooks.source.npc.event_sub(sd, ev, eventname); } - if( HPMHooks.count.HP_npc_event_sub_post ) { + if (HPMHooks.count.HP_npc_event_sub_post > 0) { 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++ ) { + 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); } @@ -47835,16 +55973,16 @@ int HP_npc_event_sub(struct map_session_data *sd, struct event_data *ev, const c } 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); + if (HPMHooks.count.HP_npc_event_doall_sub_pre > 0) { + void (*preHookFunc) (void **key, void **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_pre; hIndex++ ) { + 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); + preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47854,9 +55992,9 @@ void HP_npc_event_doall_sub(void *key, void *data, va_list ap) { HPMHooks.source.npc.event_doall_sub(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_event_doall_sub_post ) { + if (HPMHooks.count.HP_npc_event_doall_sub_post > 0) { void (*postHookFunc) (void *key, void *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_sub_post; hIndex++ ) { + 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); @@ -47868,14 +56006,14 @@ void HP_npc_event_doall_sub(void *key, void *data, va_list ap) { int HP_npc_event_do(const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_do_pre ) { - int (*preHookFunc) (const char *name); + if (HPMHooks.count.HP_npc_event_do_pre > 0) { + int (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47883,9 +56021,9 @@ int HP_npc_event_do(const char *name) { { retVal___ = HPMHooks.source.npc.event_do(name); } - if( HPMHooks.count.HP_npc_event_do_post ) { + if (HPMHooks.count.HP_npc_event_do_post > 0) { int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_post; hIndex++ ) { + 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); } @@ -47895,14 +56033,14 @@ int HP_npc_event_do(const char *name) { int HP_npc_event_doall_id(const char *name, int rid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_doall_id_pre ) { - int (*preHookFunc) (const char *name, int *rid); + if (HPMHooks.count.HP_npc_event_doall_id_pre > 0) { + int (*preHookFunc) (const char **name, int *rid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_id_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name, &rid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47910,11 +56048,11 @@ int HP_npc_event_doall_id(const char *name, int rid) { { 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++ ) { + if (HPMHooks.count.HP_npc_event_doall_id_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, name, rid); } } return retVal___; @@ -47922,14 +56060,14 @@ int HP_npc_event_doall_id(const char *name, int rid) { int HP_npc_event_doall(const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_doall_pre ) { - int (*preHookFunc) (const char *name); + if (HPMHooks.count.HP_npc_event_doall_pre > 0) { + int (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47937,9 +56075,9 @@ int HP_npc_event_doall(const char *name) { { retVal___ = HPMHooks.source.npc.event_doall(name); } - if( HPMHooks.count.HP_npc_event_doall_post ) { + if (HPMHooks.count.HP_npc_event_doall_post > 0) { int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_doall_post; hIndex++ ) { + 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); } @@ -47949,14 +56087,14 @@ int HP_npc_event_doall(const char *name) { int HP_npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_do_clock_pre ) { + if (HPMHooks.count.HP_npc_event_do_clock_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -47964,25 +56102,25 @@ int HP_npc_event_do_clock(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_clock_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_event_do_clock_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } void HP_npc_event_do_oninit(bool reload) { int hIndex = 0; - if( HPMHooks.count.HP_npc_event_do_oninit_pre ) { + if (HPMHooks.count.HP_npc_event_do_oninit_pre > 0) { void (*preHookFunc) (bool *reload); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_pre; hIndex++ ) { + 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(&reload); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -47990,11 +56128,11 @@ void HP_npc_event_do_oninit(bool reload) { { HPMHooks.source.npc.event_do_oninit(reload); } - if( HPMHooks.count.HP_npc_event_do_oninit_post ) { - void (*postHookFunc) (bool *reload); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_do_oninit_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_event_do_oninit_post > 0) { + void (*postHookFunc) (bool reload); + 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(&reload); + postHookFunc(reload); } } return; @@ -48002,14 +56140,14 @@ void HP_npc_event_do_oninit(bool reload) { int HP_npc_timerevent_export(struct npc_data *nd, int i) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_export_pre ) { - int (*preHookFunc) (struct npc_data *nd, int *i); + if (HPMHooks.count.HP_npc_timerevent_export_pre > 0) { + int (*preHookFunc) (struct npc_data **nd, int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_export_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nd, &i); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48017,11 +56155,11 @@ int HP_npc_timerevent_export(struct npc_data *nd, int i) { { 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++ ) { + if (HPMHooks.count.HP_npc_timerevent_export_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, nd, i); } } return retVal___; @@ -48029,14 +56167,14 @@ int HP_npc_timerevent_export(struct npc_data *nd, int i) { int HP_npc_timerevent(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_pre ) { + if (HPMHooks.count.HP_npc_timerevent_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48044,11 +56182,11 @@ int HP_npc_timerevent(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.npc.timerevent(tid, tick, id, data); } - if( HPMHooks.count.HP_npc_timerevent_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_timerevent_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -48056,14 +56194,14 @@ int HP_npc_timerevent(int tid, int64 tick, int id, intptr_t data) { int HP_npc_timerevent_start(struct npc_data *nd, int rid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_start_pre ) { - int (*preHookFunc) (struct npc_data *nd, int *rid); + if (HPMHooks.count.HP_npc_timerevent_start_pre > 0) { + int (*preHookFunc) (struct npc_data **nd, int *rid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_start_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nd, &rid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48071,11 +56209,11 @@ int HP_npc_timerevent_start(struct npc_data *nd, int rid) { { 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++ ) { + if (HPMHooks.count.HP_npc_timerevent_start_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, nd, rid); } } return retVal___; @@ -48083,14 +56221,14 @@ int HP_npc_timerevent_start(struct npc_data *nd, int rid) { int HP_npc_timerevent_stop(struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_timerevent_stop_pre ) { - int (*preHookFunc) (struct npc_data *nd); + if (HPMHooks.count.HP_npc_timerevent_stop_pre > 0) { + int (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48098,9 +56236,9 @@ int HP_npc_timerevent_stop(struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.timerevent_stop(nd); } - if( HPMHooks.count.HP_npc_timerevent_stop_post ) { + if (HPMHooks.count.HP_npc_timerevent_stop_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_stop_post; hIndex++ ) { + 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); } @@ -48109,14 +56247,14 @@ int HP_npc_timerevent_stop(struct npc_data *nd) { } 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); + if (HPMHooks.count.HP_npc_timerevent_quit_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_timerevent_quit_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48124,9 +56262,9 @@ void HP_npc_timerevent_quit(struct map_session_data *sd) { { HPMHooks.source.npc.timerevent_quit(sd); } - if( HPMHooks.count.HP_npc_timerevent_quit_post ) { + if (HPMHooks.count.HP_npc_timerevent_quit_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_timerevent_quit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_timerevent_quit_post[hIndex].func; postHookFunc(sd); } @@ -48136,14 +56274,14 @@ void HP_npc_timerevent_quit(struct map_session_data *sd) { int64 HP_npc_gettimerevent_tick(struct npc_data *nd) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_npc_gettimerevent_tick_pre ) { - int64 (*preHookFunc) (struct npc_data *nd); + if (HPMHooks.count.HP_npc_gettimerevent_tick_pre > 0) { + int64 (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48151,9 +56289,9 @@ int64 HP_npc_gettimerevent_tick(struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.gettimerevent_tick(nd); } - if( HPMHooks.count.HP_npc_gettimerevent_tick_post ) { + if (HPMHooks.count.HP_npc_gettimerevent_tick_post > 0) { int64 (*postHookFunc) (int64 retVal___, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_gettimerevent_tick_post; hIndex++ ) { + 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); } @@ -48163,14 +56301,14 @@ int64 HP_npc_gettimerevent_tick(struct npc_data *nd) { int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_settimerevent_tick_pre ) { - int (*preHookFunc) (struct npc_data *nd, int *newtimer); + if (HPMHooks.count.HP_npc_settimerevent_tick_pre > 0) { + int (*preHookFunc) (struct npc_data **nd, int *newtimer); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_settimerevent_tick_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nd, &newtimer); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48178,11 +56316,11 @@ int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) { { 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++ ) { + if (HPMHooks.count.HP_npc_settimerevent_tick_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, nd, newtimer); } } return retVal___; @@ -48190,14 +56328,14 @@ int HP_npc_settimerevent_tick(struct npc_data *nd, int newtimer) { int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_event_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *eventname, int *ontouch); + if (HPMHooks.count.HP_npc_event_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **eventname, int *ontouch); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_event_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &eventname, &ontouch); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48205,11 +56343,11 @@ int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch { 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++ ) { + if (HPMHooks.count.HP_npc_event_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, eventname, ontouch); } } return retVal___; @@ -48217,16 +56355,16 @@ int HP_npc_event(struct map_session_data *sd, const char *eventname, int ontouch int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_touch_areanpc_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_npc_touch_areanpc_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48236,9 +56374,9 @@ int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.npc.touch_areanpc_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_touch_areanpc_sub_post ) { + if (HPMHooks.count.HP_npc_touch_areanpc_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_sub_post; hIndex++ ) { + 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); @@ -48250,14 +56388,14 @@ int HP_npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_touchnext_areanpc_pre ) { - int (*preHookFunc) (struct map_session_data *sd, bool *leavemap); + if (HPMHooks.count.HP_npc_touchnext_areanpc_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, bool *leavemap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touchnext_areanpc_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &leavemap); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48265,11 +56403,11 @@ int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) { { 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++ ) { + if (HPMHooks.count.HP_npc_touchnext_areanpc_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, leavemap); } } return retVal___; @@ -48277,14 +56415,14 @@ int HP_npc_touchnext_areanpc(struct map_session_data *sd, bool leavemap) { int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_touch_areanpc_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y); + if (HPMHooks.count.HP_npc_touch_areanpc_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int16 *m, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &m, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48292,11 +56430,11 @@ int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { 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++ ) { + if (HPMHooks.count.HP_npc_touch_areanpc_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, m, x, y); } } return retVal___; @@ -48304,14 +56442,14 @@ int HP_npc_touch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) int HP_npc_untouch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 y) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_untouch_areanpc_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int16 *m, int16 *x, int16 *y); + if (HPMHooks.count.HP_npc_untouch_areanpc_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int16 *m, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_pre[hIndex].func; - retVal___ = preHookFunc(sd, &m, &x, &y); + retVal___ = preHookFunc(&sd, &m, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48319,11 +56457,11 @@ int HP_npc_untouch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 { retVal___ = HPMHooks.source.npc.untouch_areanpc(sd, m, x, y); } - if( HPMHooks.count.HP_npc_untouch_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_untouch_areanpc_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_untouch_areanpc_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int16 m, int16 x, int16 y); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_untouch_areanpc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_untouch_areanpc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &m, &x, &y); + retVal___ = postHookFunc(retVal___, sd, m, x, y); } } return retVal___; @@ -48331,14 +56469,14 @@ int HP_npc_untouch_areanpc(struct map_session_data *sd, int16 m, int16 x, int16 int HP_npc_touch_areanpc2(struct mob_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_touch_areanpc2_pre ) { - int (*preHookFunc) (struct mob_data *md); + if (HPMHooks.count.HP_npc_touch_areanpc2_pre > 0) { + int (*preHookFunc) (struct mob_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48346,9 +56484,9 @@ int HP_npc_touch_areanpc2(struct mob_data *md) { { retVal___ = HPMHooks.source.npc.touch_areanpc2(md); } - if( HPMHooks.count.HP_npc_touch_areanpc2_post ) { + if (HPMHooks.count.HP_npc_touch_areanpc2_post > 0) { int (*postHookFunc) (int retVal___, struct mob_data *md); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_touch_areanpc2_post; hIndex++ ) { + 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); } @@ -48358,14 +56496,14 @@ int HP_npc_touch_areanpc2(struct mob_data *md) { int HP_npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_check_areanpc_pre ) { + if (HPMHooks.count.HP_npc_check_areanpc_pre > 0) { int (*preHookFunc) (int *flag, int16 *m, int16 *x, int16 *y, int16 *range); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_check_areanpc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48373,11 +56511,11 @@ int HP_npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) { { 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++ ) { + if (HPMHooks.count.HP_npc_check_areanpc_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, flag, m, x, y, range); } } return retVal___; @@ -48385,14 +56523,14 @@ int HP_npc_check_areanpc(int flag, int16 m, int16 x, int16 y, int16 range) { 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); + if (HPMHooks.count.HP_npc_checknear_pre > 0) { + struct npc_data* (*preHookFunc) (struct map_session_data **sd, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_checknear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_checknear_pre[hIndex].func; - retVal___ = preHookFunc(sd, bl); + retVal___ = preHookFunc(&sd, &bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48400,9 +56538,9 @@ struct npc_data* HP_npc_checknear(struct map_session_data *sd, struct block_list { retVal___ = HPMHooks.source.npc.checknear(sd, bl); } - if( HPMHooks.count.HP_npc_checknear_post ) { + if (HPMHooks.count.HP_npc_checknear_post > 0) { 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++ ) { + 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); } @@ -48412,14 +56550,14 @@ struct npc_data* HP_npc_checknear(struct map_session_data *sd, struct block_list int HP_npc_globalmessage(const char *name, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_globalmessage_pre ) { - int (*preHookFunc) (const char *name, const char *mes); + if (HPMHooks.count.HP_npc_globalmessage_pre > 0) { + int (*preHookFunc) (const char **name, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_globalmessage_pre[hIndex].func; - retVal___ = preHookFunc(name, mes); + retVal___ = preHookFunc(&name, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48427,9 +56565,9 @@ int HP_npc_globalmessage(const char *name, const char *mes) { { retVal___ = HPMHooks.source.npc.globalmessage(name, mes); } - if( HPMHooks.count.HP_npc_globalmessage_post ) { + if (HPMHooks.count.HP_npc_globalmessage_post > 0) { int (*postHookFunc) (int retVal___, const char *name, const char *mes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_globalmessage_post; hIndex++ ) { + 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); } @@ -48438,14 +56576,14 @@ int HP_npc_globalmessage(const char *name, const char *mes) { } 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); + if (HPMHooks.count.HP_npc_run_tomb_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48453,9 +56591,9 @@ void HP_npc_run_tomb(struct map_session_data *sd, struct npc_data *nd) { { HPMHooks.source.npc.run_tomb(sd, nd); } - if( HPMHooks.count.HP_npc_run_tomb_post ) { + if (HPMHooks.count.HP_npc_run_tomb_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_run_tomb_post; hIndex++ ) { + 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); } @@ -48465,14 +56603,14 @@ void HP_npc_run_tomb(struct map_session_data *sd, struct npc_data *nd) { int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_click_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + if (HPMHooks.count.HP_npc_click_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_click_pre[hIndex].func; - retVal___ = preHookFunc(sd, nd); + retVal___ = preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48480,9 +56618,9 @@ int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.click(sd, nd); } - if( HPMHooks.count.HP_npc_click_post ) { + if (HPMHooks.count.HP_npc_click_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_click_post; hIndex++ ) { + 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); } @@ -48492,14 +56630,14 @@ int HP_npc_click(struct map_session_data *sd, struct npc_data *nd) { int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_scriptcont_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *id, bool *closing); + if (HPMHooks.count.HP_npc_scriptcont_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *id, bool *closing); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_scriptcont_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &id, &closing); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48507,11 +56645,11 @@ int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) { { 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++ ) { + if (HPMHooks.count.HP_npc_scriptcont_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, id, closing); } } return retVal___; @@ -48519,14 +56657,14 @@ int HP_npc_scriptcont(struct map_session_data *sd, int id, bool closing) { int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_buysellsel_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *id, int *type); + if (HPMHooks.count.HP_npc_buysellsel_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *id, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buysellsel_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &id, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48534,11 +56672,11 @@ int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) { { 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++ ) { + if (HPMHooks.count.HP_npc_buysellsel_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, id, type); } } return retVal___; @@ -48546,14 +56684,14 @@ int HP_npc_buysellsel(struct map_session_data *sd, int id, int type) { int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, struct itemlist *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_cashshop_buylist_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *points, struct itemlist *item_list); + if (HPMHooks.count.HP_npc_cashshop_buylist_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *points, struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_pre; hIndex++ ) { + 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, item_list); + retVal___ = preHookFunc(&sd, &points, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48561,11 +56699,11 @@ int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, struct item { retVal___ = HPMHooks.source.npc.cashshop_buylist(sd, points, item_list); } - if( HPMHooks.count.HP_npc_cashshop_buylist_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *points, struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buylist_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_cashshop_buylist_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int points, struct itemlist *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, item_list); + retVal___ = postHookFunc(retVal___, sd, points, item_list); } } return retVal___; @@ -48573,14 +56711,14 @@ int HP_npc_cashshop_buylist(struct map_session_data *sd, int points, struct item int HP_npc_buylist_sub(struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_buylist_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd); + if (HPMHooks.count.HP_npc_buylist_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_pre; hIndex++ ) { + 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, item_list, nd); + retVal___ = preHookFunc(&sd, &item_list, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48588,9 +56726,9 @@ int HP_npc_buylist_sub(struct map_session_data *sd, struct itemlist *item_list, { retVal___ = HPMHooks.source.npc.buylist_sub(sd, item_list, nd); } - if( HPMHooks.count.HP_npc_buylist_sub_post ) { + if (HPMHooks.count.HP_npc_buylist_sub_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_sub_post; hIndex++ ) { + 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, item_list, nd); } @@ -48600,14 +56738,14 @@ int HP_npc_buylist_sub(struct map_session_data *sd, struct itemlist *item_list, int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int points) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_cashshop_buy_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount, int *points); + if (HPMHooks.count.HP_npc_cashshop_buy_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *nameid, int *amount, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_cashshop_buy_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &nameid, &amount, &points); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48615,11 +56753,11 @@ int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int { 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++ ) { + if (HPMHooks.count.HP_npc_cashshop_buy_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, nameid, amount, points); } } return retVal___; @@ -48627,14 +56765,14 @@ int HP_npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int int HP_npc_buylist(struct map_session_data *sd, struct itemlist *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_buylist_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct itemlist *item_list); + if (HPMHooks.count.HP_npc_buylist_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_buylist_pre[hIndex].func; - retVal___ = preHookFunc(sd, item_list); + retVal___ = preHookFunc(&sd, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48642,9 +56780,9 @@ int HP_npc_buylist(struct map_session_data *sd, struct itemlist *item_list) { { retVal___ = HPMHooks.source.npc.buylist(sd, item_list); } - if( HPMHooks.count.HP_npc_buylist_post ) { + if (HPMHooks.count.HP_npc_buylist_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_buylist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_buylist_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, item_list); } @@ -48654,14 +56792,14 @@ int HP_npc_buylist(struct map_session_data *sd, struct itemlist *item_list) { int HP_npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_selllist_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd); + if (HPMHooks.count.HP_npc_selllist_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_pre; hIndex++ ) { + 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, item_list, nd); + retVal___ = preHookFunc(&sd, &item_list, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48669,9 +56807,9 @@ int HP_npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, { retVal___ = HPMHooks.source.npc.selllist_sub(sd, item_list, nd); } - if( HPMHooks.count.HP_npc_selllist_sub_post ) { + if (HPMHooks.count.HP_npc_selllist_sub_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_sub_post; hIndex++ ) { + 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, item_list, nd); } @@ -48681,14 +56819,14 @@ int HP_npc_selllist_sub(struct map_session_data *sd, struct itemlist *item_list, int HP_npc_selllist(struct map_session_data *sd, struct itemlist *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_selllist_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct itemlist *item_list); + if (HPMHooks.count.HP_npc_selllist_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_selllist_pre[hIndex].func; - retVal___ = preHookFunc(sd, item_list); + retVal___ = preHookFunc(&sd, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48696,9 +56834,9 @@ int HP_npc_selllist(struct map_session_data *sd, struct itemlist *item_list) { { retVal___ = HPMHooks.source.npc.selllist(sd, item_list); } - if( HPMHooks.count.HP_npc_selllist_post ) { + if (HPMHooks.count.HP_npc_selllist_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_selllist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_selllist_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, item_list); } @@ -48708,14 +56846,14 @@ int HP_npc_selllist(struct map_session_data *sd, struct itemlist *item_list) { int HP_npc_remove_map(struct npc_data *nd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_remove_map_pre ) { - int (*preHookFunc) (struct npc_data *nd); + if (HPMHooks.count.HP_npc_remove_map_pre > 0) { + int (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48723,9 +56861,9 @@ int HP_npc_remove_map(struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.remove_map(nd); } - if( HPMHooks.count.HP_npc_remove_map_post ) { + if (HPMHooks.count.HP_npc_remove_map_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_remove_map_post; hIndex++ ) { + 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); } @@ -48735,16 +56873,16 @@ int HP_npc_remove_map(struct npc_data *nd) { int HP_npc_unload_ev(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_ev_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_npc_unload_ev_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48754,12 +56892,12 @@ int HP_npc_unload_ev(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_unload_ev_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -48768,16 +56906,16 @@ int HP_npc_unload_ev(union DBKey key, struct DBData *data, va_list ap) { int HP_npc_unload_ev_label(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_ev_label_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_npc_unload_ev_label_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48787,12 +56925,12 @@ int HP_npc_unload_ev_label(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_ev_label_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_unload_ev_label_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -48801,16 +56939,16 @@ int HP_npc_unload_ev_label(union DBKey key, struct DBData *data, va_list ap) { int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_dup_sub_pre ) { - int (*preHookFunc) (struct npc_data *nd, va_list args); + if (HPMHooks.count.HP_npc_unload_dup_sub_pre > 0) { + int (*preHookFunc) (struct npc_data **nd, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&nd, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48820,9 +56958,9 @@ int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) { retVal___ = HPMHooks.source.npc.unload_dup_sub(nd, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_npc_unload_dup_sub_post ) { + if (HPMHooks.count.HP_npc_unload_dup_sub_post > 0) { int (*postHookFunc) (int retVal___, struct npc_data *nd, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_dup_sub_post; hIndex++ ) { + 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); @@ -48831,69 +56969,102 @@ int HP_npc_unload_dup_sub(struct npc_data *nd, va_list args) { } return retVal___; } -void HP_npc_unload_duplicates(struct npc_data *nd) { +void HP_npc_unload_duplicates(struct npc_data *nd, bool unload_mobs) { int hIndex = 0; - if( HPMHooks.count.HP_npc_unload_duplicates_pre ) { - void (*preHookFunc) (struct npc_data *nd); + if (HPMHooks.count.HP_npc_unload_duplicates_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, bool *unload_mobs); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_unload_duplicates_pre[hIndex].func; - preHookFunc(nd); + preHookFunc(&nd, &unload_mobs); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.npc.unload_duplicates(nd); + HPMHooks.source.npc.unload_duplicates(nd, unload_mobs); } - 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++ ) { + if (HPMHooks.count.HP_npc_unload_duplicates_post > 0) { + void (*postHookFunc) (struct npc_data *nd, bool unload_mobs); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_duplicates_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_unload_duplicates_post[hIndex].func; - postHookFunc(nd); + postHookFunc(nd, unload_mobs); } } return; } -int HP_npc_unload(struct npc_data *nd, bool single) { +int HP_npc_unload_mob(struct mob_data *md, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unload_pre ) { - int (*preHookFunc) (struct npc_data *nd, bool *single); + if (HPMHooks.count.HP_npc_unload_mob_pre > 0) { + int (*preHookFunc) (struct mob_data **md, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_mob_pre; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_npc_unload_mob_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.npc.unload_mob(md, args___copy); + va_end(args___copy); + } + if (HPMHooks.count.HP_npc_unload_mob_post > 0) { + int (*postHookFunc) (int retVal___, struct mob_data *md, va_list args); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_mob_post; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_npc_unload_mob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, md, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_npc_unload(struct npc_data *nd, bool single, bool unload_mobs) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_npc_unload_pre > 0) { + int (*preHookFunc) (struct npc_data **nd, bool *single, bool *unload_mobs); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_unload_pre[hIndex].func; - retVal___ = preHookFunc(nd, &single); + retVal___ = preHookFunc(&nd, &single, &unload_mobs); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.npc.unload(nd, single); + retVal___ = HPMHooks.source.npc.unload(nd, single, unload_mobs); } - 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++ ) { + if (HPMHooks.count.HP_npc_unload_post > 0) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, bool single, bool unload_mobs); + 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); + retVal___ = postHookFunc(retVal___, nd, single, unload_mobs); } } return retVal___; } void HP_npc_clearsrcfile(void) { int hIndex = 0; - if( HPMHooks.count.HP_npc_clearsrcfile_pre ) { + if (HPMHooks.count.HP_npc_clearsrcfile_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_clearsrcfile_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48901,9 +57072,9 @@ void HP_npc_clearsrcfile(void) { { HPMHooks.source.npc.clearsrcfile(); } - if( HPMHooks.count.HP_npc_clearsrcfile_post ) { + if (HPMHooks.count.HP_npc_clearsrcfile_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_clearsrcfile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_clearsrcfile_post[hIndex].func; postHookFunc(); } @@ -48912,14 +57083,14 @@ void HP_npc_clearsrcfile(void) { } void HP_npc_addsrcfile(const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_npc_addsrcfile_pre ) { - void (*preHookFunc) (const char *name); + if (HPMHooks.count.HP_npc_addsrcfile_pre > 0) { + void (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_addsrcfile_pre[hIndex].func; - preHookFunc(name); + preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48927,9 +57098,9 @@ void HP_npc_addsrcfile(const char *name) { { HPMHooks.source.npc.addsrcfile(name); } - if( HPMHooks.count.HP_npc_addsrcfile_post ) { + if (HPMHooks.count.HP_npc_addsrcfile_post > 0) { void (*postHookFunc) (const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_addsrcfile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_addsrcfile_post[hIndex].func; postHookFunc(name); } @@ -48938,14 +57109,14 @@ void HP_npc_addsrcfile(const char *name) { } void HP_npc_delsrcfile(const char *name) { int hIndex = 0; - if( HPMHooks.count.HP_npc_delsrcfile_pre ) { - void (*preHookFunc) (const char *name); + if (HPMHooks.count.HP_npc_delsrcfile_pre > 0) { + void (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_delsrcfile_pre[hIndex].func; - preHookFunc(name); + preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -48953,9 +57124,9 @@ void HP_npc_delsrcfile(const char *name) { { HPMHooks.source.npc.delsrcfile(name); } - if( HPMHooks.count.HP_npc_delsrcfile_post ) { + if (HPMHooks.count.HP_npc_delsrcfile_post > 0) { void (*postHookFunc) (const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_delsrcfile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_delsrcfile_post[hIndex].func; postHookFunc(name); } @@ -48965,14 +57136,14 @@ void HP_npc_delsrcfile(const char *name) { const char* HP_npc_retainpathreference(const char *filepath) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_retainpathreference_pre ) { - const char* (*preHookFunc) (const char *filepath); + if (HPMHooks.count.HP_npc_retainpathreference_pre > 0) { + const char* (*preHookFunc) (const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_retainpathreference_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_retainpathreference_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_retainpathreference_pre[hIndex].func; - retVal___ = preHookFunc(filepath); + retVal___ = preHookFunc(&filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -48980,9 +57151,9 @@ const char* HP_npc_retainpathreference(const char *filepath) { { retVal___ = HPMHooks.source.npc.retainpathreference(filepath); } - if( HPMHooks.count.HP_npc_retainpathreference_post ) { + if (HPMHooks.count.HP_npc_retainpathreference_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_retainpathreference_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_retainpathreference_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_retainpathreference_post[hIndex].func; retVal___ = postHookFunc(retVal___, filepath); } @@ -48991,14 +57162,14 @@ const char* HP_npc_retainpathreference(const char *filepath) { } void HP_npc_releasepathreference(const char *filepath) { int hIndex = 0; - if( HPMHooks.count.HP_npc_releasepathreference_pre ) { - void (*preHookFunc) (const char *filepath); + if (HPMHooks.count.HP_npc_releasepathreference_pre > 0) { + void (*preHookFunc) (const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_releasepathreference_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_releasepathreference_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_releasepathreference_pre[hIndex].func; - preHookFunc(filepath); + preHookFunc(&filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49006,9 +57177,9 @@ void HP_npc_releasepathreference(const char *filepath) { { HPMHooks.source.npc.releasepathreference(filepath); } - if( HPMHooks.count.HP_npc_releasepathreference_post ) { + if (HPMHooks.count.HP_npc_releasepathreference_post > 0) { void (*postHookFunc) (const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_releasepathreference_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_releasepathreference_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_releasepathreference_post[hIndex].func; postHookFunc(filepath); } @@ -49017,14 +57188,14 @@ void HP_npc_releasepathreference(const char *filepath) { } 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); + if (HPMHooks.count.HP_npc_parsename_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, const char **name, const char **start, const char **buffer, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsename_pre; hIndex++ ) { + 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); + preHookFunc(&nd, &name, &start, &buffer, &filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49032,9 +57203,9 @@ void HP_npc_parsename(struct npc_data *nd, const char *name, const char *start, { HPMHooks.source.npc.parsename(nd, name, start, buffer, filepath); } - if( HPMHooks.count.HP_npc_parsename_post ) { + if (HPMHooks.count.HP_npc_parsename_post > 0) { 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++ ) { + 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); } @@ -49044,14 +57215,14 @@ void HP_npc_parsename(struct npc_data *nd, const char *name, const char *start, int HP_npc_parseview(const char *w4, const char *start, const char *buffer, const char *filepath) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_parseview_pre ) { - int (*preHookFunc) (const char *w4, const char *start, const char *buffer, const char *filepath); + if (HPMHooks.count.HP_npc_parseview_pre > 0) { + int (*preHookFunc) (const char **w4, const char **start, const char **buffer, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_parseview_pre[hIndex].func; - retVal___ = preHookFunc(w4, start, buffer, filepath); + retVal___ = preHookFunc(&w4, &start, &buffer, &filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49059,9 +57230,9 @@ int HP_npc_parseview(const char *w4, const char *start, const char *buffer, cons { retVal___ = HPMHooks.source.npc.parseview(w4, start, buffer, filepath); } - if( HPMHooks.count.HP_npc_parseview_post ) { + if (HPMHooks.count.HP_npc_parseview_post > 0) { int (*postHookFunc) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parseview_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_parseview_post[hIndex].func; retVal___ = postHookFunc(retVal___, w4, start, buffer, filepath); } @@ -49071,14 +57242,14 @@ int HP_npc_parseview(const char *w4, const char *start, const char *buffer, cons bool HP_npc_viewisid(const char *viewid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_viewisid_pre ) { - bool (*preHookFunc) (const char *viewid); + if (HPMHooks.count.HP_npc_viewisid_pre > 0) { + bool (*preHookFunc) (const char **viewid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_viewisid_pre[hIndex].func; - retVal___ = preHookFunc(viewid); + retVal___ = preHookFunc(&viewid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49086,26 +57257,26 @@ bool HP_npc_viewisid(const char *viewid) { { retVal___ = HPMHooks.source.npc.viewisid(viewid); } - if( HPMHooks.count.HP_npc_viewisid_post ) { + if (HPMHooks.count.HP_npc_viewisid_post > 0) { bool (*postHookFunc) (bool retVal___, const char *viewid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_viewisid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_viewisid_post[hIndex].func; retVal___ = postHookFunc(retVal___, viewid); } } return retVal___; } -struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_) { +struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_) { int hIndex = 0; struct npc_data* retVal___ = NULL; - if( HPMHooks.count.HP_npc_create_npc_pre ) { - struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_); + if (HPMHooks.count.HP_npc_create_npc_pre > 0) { + struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, enum unit_dir *dir, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_create_npc_pre[hIndex].func; retVal___ = preHookFunc(&subtype, &m, &x, &y, &dir, &class_); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49113,11 +57284,11 @@ struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y { retVal___ = HPMHooks.source.npc.create_npc(subtype, m, x, y, dir, class_); } - if( HPMHooks.count.HP_npc_create_npc_post ) { - struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_create_npc_post > 0) { + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, enum unit_dir dir, int class_); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_create_npc_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &subtype, &m, &x, &y, &dir, &class_); + retVal___ = postHookFunc(retVal___, subtype, m, x, y, dir, class_); } } return retVal___; @@ -49125,14 +57296,14 @@ struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y 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); + if (HPMHooks.count.HP_npc_add_warp_pre > 0) { + 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); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_warp_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name, &from_mapid, &from_x, &from_y, &xs, &ys, &to_mapindex, &to_x, &to_y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49140,11 +57311,11 @@ struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, sho { 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++ ) { + if (HPMHooks.count.HP_npc_add_warp_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, name, from_mapid, from_x, from_y, xs, ys, to_mapindex, to_x, to_y); } } return retVal___; @@ -49152,14 +57323,14 @@ struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, sho const char* HP_npc_parse_warp(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_warp_pre ) { - const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + if (HPMHooks.count.HP_npc_parse_warp_pre > 0) { + const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_pre; hIndex++ ) { + 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, retval); + retVal___ = preHookFunc(&w1, &w2, &w3, &w4, &start, &buffer, &filepath, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49167,9 +57338,9 @@ const char* HP_npc_parse_warp(const char *w1, const char *w2, const char *w3, co { retVal___ = HPMHooks.source.npc.parse_warp(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_warp_post ) { + if (HPMHooks.count.HP_npc_parse_warp_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_post; hIndex++ ) { + 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, retval); } @@ -49179,14 +57350,14 @@ const char* HP_npc_parse_warp(const char *w1, const char *w2, const char *w3, co const char* HP_npc_parse_shop(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_shop_pre ) { - const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + if (HPMHooks.count.HP_npc_parse_shop_pre > 0) { + const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_pre; hIndex++ ) { + 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, retval); + retVal___ = preHookFunc(&w1, &w2, &w3, &w4, &start, &buffer, &filepath, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49194,9 +57365,9 @@ const char* HP_npc_parse_shop(const char *w1, const char *w2, const char *w3, co { retVal___ = HPMHooks.source.npc.parse_shop(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_shop_post ) { + if (HPMHooks.count.HP_npc_parse_shop_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_post; hIndex++ ) { + 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, retval); } @@ -49206,14 +57377,14 @@ const char* HP_npc_parse_shop(const char *w1, const char *w2, const char *w3, co const char* HP_npc_parse_unknown_object(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_unknown_object_pre ) { - const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + if (HPMHooks.count.HP_npc_parse_unknown_object_pre > 0) { + const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_pre[hIndex].func; - retVal___ = preHookFunc(w1, w2, w3, w4, start, buffer, filepath, retval); + retVal___ = preHookFunc(&w1, &w2, &w3, &w4, &start, &buffer, &filepath, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49221,9 +57392,9 @@ const char* HP_npc_parse_unknown_object(const char *w1, const char *w2, const ch { retVal___ = HPMHooks.source.npc.parse_unknown_object(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_unknown_object_post ) { + if (HPMHooks.count.HP_npc_parse_unknown_object_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_post[hIndex].func; retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval); } @@ -49232,14 +57403,14 @@ const char* HP_npc_parse_unknown_object(const char *w1, const char *w2, const ch } 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); + if (HPMHooks.count.HP_npc_convertlabel_db_pre > 0) { + void (*preHookFunc) (struct npc_label_list **label_list, const char **filepath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_pre; hIndex++ ) { + 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); + preHookFunc(&label_list, &filepath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49247,9 +57418,9 @@ void HP_npc_convertlabel_db(struct npc_label_list *label_list, const char *filep { HPMHooks.source.npc.convertlabel_db(label_list, filepath); } - if( HPMHooks.count.HP_npc_convertlabel_db_post ) { + if (HPMHooks.count.HP_npc_convertlabel_db_post > 0) { void (*postHookFunc) (struct npc_label_list *label_list, const char *filepath); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_convertlabel_db_post; hIndex++ ) { + 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); } @@ -49259,14 +57430,14 @@ void HP_npc_convertlabel_db(struct npc_label_list *label_list, const char *filep const char* HP_npc_skip_script(const char *start, const char *buffer, const char *filepath, int *retval) { 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, int *retval); + if (HPMHooks.count.HP_npc_skip_script_pre > 0) { + const char* (*preHookFunc) (const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_pre; hIndex++ ) { + 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, retval); + retVal___ = preHookFunc(&start, &buffer, &filepath, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49274,9 +57445,9 @@ const char* HP_npc_skip_script(const char *start, const char *buffer, const char { retVal___ = HPMHooks.source.npc.skip_script(start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_skip_script_post ) { + if (HPMHooks.count.HP_npc_skip_script_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_skip_script_post; hIndex++ ) { + 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, retval); } @@ -49286,14 +57457,14 @@ const char* HP_npc_skip_script(const char *start, const char *buffer, const char const char* HP_npc_parse_script(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_script_pre ) { - const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); + if (HPMHooks.count.HP_npc_parse_script_pre > 0) { + const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int *options, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_pre; hIndex++ ) { + 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, &options, retval); + retVal___ = preHookFunc(&w1, &w2, &w3, &w4, &start, &buffer, &filepath, &options, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49301,25 +57472,25 @@ const char* HP_npc_parse_script(const char *w1, const char *w2, const char *w3, { retVal___ = HPMHooks.source.npc.parse_script(w1, w2, w3, w4, start, buffer, filepath, options, retval); } - if( HPMHooks.count.HP_npc_parse_script_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_parse_script_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval); + 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, &options, retval); + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, options, retval); } } return retVal___; } void HP_npc_add_to_location(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_add_to_location_pre ) { - void (*preHookFunc) (struct npc_data *nd); + if (HPMHooks.count.HP_npc_add_to_location_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_to_location_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_to_location_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_add_to_location_pre[hIndex].func; - preHookFunc(nd); + preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49327,9 +57498,9 @@ void HP_npc_add_to_location(struct npc_data *nd) { { HPMHooks.source.npc.add_to_location(nd); } - if( HPMHooks.count.HP_npc_add_to_location_post ) { + if (HPMHooks.count.HP_npc_add_to_location_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_to_location_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_add_to_location_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_add_to_location_post[hIndex].func; postHookFunc(nd); } @@ -49339,14 +57510,14 @@ void HP_npc_add_to_location(struct npc_data *nd) { bool HP_npc_duplicate_script_sub(struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_duplicate_script_sub_pre ) { - bool (*preHookFunc) (struct npc_data *nd, const struct npc_data *snd, int *xs, int *ys, int *options); + if (HPMHooks.count.HP_npc_duplicate_script_sub_pre > 0) { + bool (*preHookFunc) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_script_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_script_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_duplicate_script_sub_pre[hIndex].func; - retVal___ = preHookFunc(nd, snd, &xs, &ys, &options); + retVal___ = preHookFunc(&nd, &snd, &xs, &ys, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49354,11 +57525,11 @@ bool HP_npc_duplicate_script_sub(struct npc_data *nd, const struct npc_data *snd { retVal___ = HPMHooks.source.npc.duplicate_script_sub(nd, snd, xs, ys, options); } - if( HPMHooks.count.HP_npc_duplicate_script_sub_post ) { - bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int *xs, int *ys, int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_script_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_duplicate_script_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_script_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_duplicate_script_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, snd, &xs, &ys, &options); + retVal___ = postHookFunc(retVal___, nd, snd, xs, ys, options); } } return retVal___; @@ -49366,14 +57537,14 @@ bool HP_npc_duplicate_script_sub(struct npc_data *nd, const struct npc_data *snd bool HP_npc_duplicate_shop_sub(struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_duplicate_shop_sub_pre ) { - bool (*preHookFunc) (struct npc_data *nd, const struct npc_data *snd, int *xs, int *ys, int *options); + if (HPMHooks.count.HP_npc_duplicate_shop_sub_pre > 0) { + bool (*preHookFunc) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_shop_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_shop_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_duplicate_shop_sub_pre[hIndex].func; - retVal___ = preHookFunc(nd, snd, &xs, &ys, &options); + retVal___ = preHookFunc(&nd, &snd, &xs, &ys, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49381,11 +57552,11 @@ bool HP_npc_duplicate_shop_sub(struct npc_data *nd, const struct npc_data *snd, { retVal___ = HPMHooks.source.npc.duplicate_shop_sub(nd, snd, xs, ys, options); } - if( HPMHooks.count.HP_npc_duplicate_shop_sub_post ) { - bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int *xs, int *ys, int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_shop_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_duplicate_shop_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_shop_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_duplicate_shop_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, snd, &xs, &ys, &options); + retVal___ = postHookFunc(retVal___, nd, snd, xs, ys, options); } } return retVal___; @@ -49393,14 +57564,14 @@ bool HP_npc_duplicate_shop_sub(struct npc_data *nd, const struct npc_data *snd, bool HP_npc_duplicate_warp_sub(struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_duplicate_warp_sub_pre ) { - bool (*preHookFunc) (struct npc_data *nd, const struct npc_data *snd, int *xs, int *ys, int *options); + if (HPMHooks.count.HP_npc_duplicate_warp_sub_pre > 0) { + bool (*preHookFunc) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_warp_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_warp_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_duplicate_warp_sub_pre[hIndex].func; - retVal___ = preHookFunc(nd, snd, &xs, &ys, &options); + retVal___ = preHookFunc(&nd, &snd, &xs, &ys, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49408,11 +57579,11 @@ bool HP_npc_duplicate_warp_sub(struct npc_data *nd, const struct npc_data *snd, { retVal___ = HPMHooks.source.npc.duplicate_warp_sub(nd, snd, xs, ys, options); } - if( HPMHooks.count.HP_npc_duplicate_warp_sub_post ) { - bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int *xs, int *ys, int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_warp_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_duplicate_warp_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_warp_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_duplicate_warp_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, snd, &xs, &ys, &options); + retVal___ = postHookFunc(retVal___, nd, snd, xs, ys, options); } } return retVal___; @@ -49420,14 +57591,14 @@ bool HP_npc_duplicate_warp_sub(struct npc_data *nd, const struct npc_data *snd, bool HP_npc_duplicate_sub(struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_duplicate_sub_pre ) { - bool (*preHookFunc) (struct npc_data *nd, const struct npc_data *snd, int *xs, int *ys, int *options); + if (HPMHooks.count.HP_npc_duplicate_sub_pre > 0) { + bool (*preHookFunc) (struct npc_data **nd, const struct npc_data **snd, int *xs, int *ys, int *options); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_duplicate_sub_pre[hIndex].func; - retVal___ = preHookFunc(nd, snd, &xs, &ys, &options); + retVal___ = preHookFunc(&nd, &snd, &xs, &ys, &options); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49435,11 +57606,11 @@ bool HP_npc_duplicate_sub(struct npc_data *nd, const struct npc_data *snd, int x { retVal___ = HPMHooks.source.npc.duplicate_sub(nd, snd, xs, ys, options); } - if( HPMHooks.count.HP_npc_duplicate_sub_post ) { - bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int *xs, int *ys, int *options); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_duplicate_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_duplicate_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, snd, &xs, &ys, &options); + retVal___ = postHookFunc(retVal___, nd, snd, xs, ys, options); } } return retVal___; @@ -49447,14 +57618,14 @@ bool HP_npc_duplicate_sub(struct npc_data *nd, const struct npc_data *snd, int x const char* HP_npc_parse_duplicate(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_duplicate_pre ) { - const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); + if (HPMHooks.count.HP_npc_parse_duplicate_pre > 0) { + const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int *options, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_pre; hIndex++ ) { + 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, &options, retval); + retVal___ = preHookFunc(&w1, &w2, &w3, &w4, &start, &buffer, &filepath, &options, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49462,11 +57633,11 @@ const char* HP_npc_parse_duplicate(const char *w1, const char *w2, const char *w { retVal___ = HPMHooks.source.npc.parse_duplicate(w1, w2, w3, w4, start, buffer, filepath, options, retval); } - if( HPMHooks.count.HP_npc_parse_duplicate_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_parse_duplicate_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval); + 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, &options, retval); + retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, options, retval); } } return retVal___; @@ -49474,14 +57645,14 @@ const char* HP_npc_parse_duplicate(const char *w1, const char *w2, const char *w int HP_npc_duplicate4instance(struct npc_data *snd, int16 m) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_duplicate4instance_pre ) { - int (*preHookFunc) (struct npc_data *snd, int16 *m); + if (HPMHooks.count.HP_npc_duplicate4instance_pre > 0) { + int (*preHookFunc) (struct npc_data **snd, int16 *m); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_duplicate4instance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_duplicate4instance_pre[hIndex].func; - retVal___ = preHookFunc(snd, &m); + retVal___ = preHookFunc(&snd, &m); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49489,25 +57660,25 @@ int HP_npc_duplicate4instance(struct npc_data *snd, int16 m) { { 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++ ) { + if (HPMHooks.count.HP_npc_duplicate4instance_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_npc_setcells_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_setcells_pre[hIndex].func; - preHookFunc(nd); + preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49515,9 +57686,9 @@ void HP_npc_setcells(struct npc_data *nd) { { HPMHooks.source.npc.setcells(nd); } - if( HPMHooks.count.HP_npc_setcells_post ) { + if (HPMHooks.count.HP_npc_setcells_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setcells_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_setcells_post[hIndex].func; postHookFunc(nd); } @@ -49527,16 +57698,16 @@ void HP_npc_setcells(struct npc_data *nd) { int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_unsetcells_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_npc_unsetcells_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49546,9 +57717,9 @@ int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.npc.unsetcells_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_npc_unsetcells_sub_post ) { + if (HPMHooks.count.HP_npc_unsetcells_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_sub_post; hIndex++ ) { + 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); @@ -49559,14 +57730,14 @@ int HP_npc_unsetcells_sub(struct block_list *bl, va_list ap) { } void HP_npc_unsetcells(struct npc_data *nd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_unsetcells_pre ) { - void (*preHookFunc) (struct npc_data *nd); + if (HPMHooks.count.HP_npc_unsetcells_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_unsetcells_pre[hIndex].func; - preHookFunc(nd); + preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49574,9 +57745,9 @@ void HP_npc_unsetcells(struct npc_data *nd) { { HPMHooks.source.npc.unsetcells(nd); } - if( HPMHooks.count.HP_npc_unsetcells_post ) { + if (HPMHooks.count.HP_npc_unsetcells_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unsetcells_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_unsetcells_post[hIndex].func; postHookFunc(nd); } @@ -49585,14 +57756,14 @@ void HP_npc_unsetcells(struct npc_data *nd) { } 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); + if (HPMHooks.count.HP_npc_movenpc_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_movenpc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_movenpc_pre[hIndex].func; - preHookFunc(nd, &x, &y); + preHookFunc(&nd, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49600,25 +57771,25 @@ void HP_npc_movenpc(struct npc_data *nd, int16 x, int16 y) { { 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++ ) { + if (HPMHooks.count.HP_npc_movenpc_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_npc_setdisplayname_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, const char **newname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_setdisplayname_pre[hIndex].func; - preHookFunc(nd, newname); + preHookFunc(&nd, &newname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49626,25 +57797,25 @@ void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) { { HPMHooks.source.npc.setdisplayname(nd, newname); } - if( HPMHooks.count.HP_npc_setdisplayname_post ) { + if (HPMHooks.count.HP_npc_setdisplayname_post > 0) { void (*postHookFunc) (struct npc_data *nd, const char *newname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setdisplayname_post; hIndex++ ) { + 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_) { +void HP_npc_setclass(struct npc_data *nd, int class_) { int hIndex = 0; - if( HPMHooks.count.HP_npc_setclass_pre ) { - void (*preHookFunc) (struct npc_data *nd, short *class_); + if (HPMHooks.count.HP_npc_setclass_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_setclass_pre[hIndex].func; - preHookFunc(nd, &class_); + preHookFunc(&nd, &class_); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49652,11 +57823,11 @@ void HP_npc_setclass(struct npc_data *nd, short class_) { { 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++ ) { + if (HPMHooks.count.HP_npc_setclass_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int class_); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_setclass_post[hIndex].func; - postHookFunc(nd, &class_); + postHookFunc(nd, class_); } } return; @@ -49664,14 +57835,14 @@ void HP_npc_setclass(struct npc_data *nd, short class_) { 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___ = 0; - 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); + if (HPMHooks.count.HP_npc_do_atcmd_event_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **command, const char **message, const char **eventname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_atcmd_event_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &command, &message, &eventname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49679,9 +57850,9 @@ int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, cons { retVal___ = HPMHooks.source.npc.do_atcmd_event(sd, command, message, eventname); } - if( HPMHooks.count.HP_npc_do_atcmd_event_post ) { + if (HPMHooks.count.HP_npc_do_atcmd_event_post > 0) { 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++ ) { + 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); } @@ -49691,14 +57862,14 @@ int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, cons const char* HP_npc_parse_function(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_function_pre ) { - const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + if (HPMHooks.count.HP_npc_parse_function_pre > 0) { + const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_pre; hIndex++ ) { + 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, retval); + retVal___ = preHookFunc(&w1, &w2, &w3, &w4, &start, &buffer, &filepath, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49706,9 +57877,9 @@ const char* HP_npc_parse_function(const char *w1, const char *w2, const char *w3 { retVal___ = HPMHooks.source.npc.parse_function(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_function_post ) { + if (HPMHooks.count.HP_npc_parse_function_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_post; hIndex++ ) { + 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, retval); } @@ -49717,14 +57888,14 @@ const char* HP_npc_parse_function(const char *w1, const char *w2, const char *w3 } 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); + if (HPMHooks.count.HP_npc_parse_mob2_pre > 0) { + void (*preHookFunc) (struct spawn_data **mobspawn); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_parse_mob2_pre[hIndex].func; - preHookFunc(mobspawn); + preHookFunc(&mobspawn); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49732,9 +57903,9 @@ void HP_npc_parse_mob2(struct spawn_data *mobspawn) { { HPMHooks.source.npc.parse_mob2(mobspawn); } - if( HPMHooks.count.HP_npc_parse_mob2_post ) { + if (HPMHooks.count.HP_npc_parse_mob2_post > 0) { void (*postHookFunc) (struct spawn_data *mobspawn); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob2_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_parse_mob2_post[hIndex].func; postHookFunc(mobspawn); } @@ -49744,14 +57915,14 @@ void HP_npc_parse_mob2(struct spawn_data *mobspawn) { const char* HP_npc_parse_mob(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_mob_pre ) { - const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + if (HPMHooks.count.HP_npc_parse_mob_pre > 0) { + const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_pre; hIndex++ ) { + 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, retval); + retVal___ = preHookFunc(&w1, &w2, &w3, &w4, &start, &buffer, &filepath, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49759,9 +57930,9 @@ const char* HP_npc_parse_mob(const char *w1, const char *w2, const char *w3, con { retVal___ = HPMHooks.source.npc.parse_mob(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_mob_post ) { + if (HPMHooks.count.HP_npc_parse_mob_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_post; hIndex++ ) { + 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, retval); } @@ -49771,14 +57942,14 @@ const char* HP_npc_parse_mob(const char *w1, const char *w2, const char *w3, con const char* HP_npc_parse_mapflag(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_npc_parse_mapflag_pre ) { - const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + if (HPMHooks.count.HP_npc_parse_mapflag_pre > 0) { + const char* (*preHookFunc) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_pre; hIndex++ ) { + 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, retval); + retVal___ = preHookFunc(&w1, &w2, &w3, &w4, &start, &buffer, &filepath, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49786,9 +57957,9 @@ const char* HP_npc_parse_mapflag(const char *w1, const char *w2, const char *w3, { retVal___ = HPMHooks.source.npc.parse_mapflag(w1, w2, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_mapflag_post ) { + if (HPMHooks.count.HP_npc_parse_mapflag_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_post; hIndex++ ) { + 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, retval); } @@ -49797,14 +57968,14 @@ const char* HP_npc_parse_mapflag(const char *w1, const char *w2, const char *w3, } void HP_npc_parse_unknown_mapflag(const char *name, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) { int hIndex = 0; - if( HPMHooks.count.HP_npc_parse_unknown_mapflag_pre ) { - void (*preHookFunc) (const char *name, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); + if (HPMHooks.count.HP_npc_parse_unknown_mapflag_pre > 0) { + void (*preHookFunc) (const char **name, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_pre[hIndex].func; - preHookFunc(name, w3, w4, start, buffer, filepath, retval); + preHookFunc(&name, &w3, &w4, &start, &buffer, &filepath, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49812,9 +57983,9 @@ void HP_npc_parse_unknown_mapflag(const char *name, const char *w3, const char * { HPMHooks.source.npc.parse_unknown_mapflag(name, w3, w4, start, buffer, filepath, retval); } - if( HPMHooks.count.HP_npc_parse_unknown_mapflag_post ) { + if (HPMHooks.count.HP_npc_parse_unknown_mapflag_post > 0) { void (*postHookFunc) (const char *name, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_post[hIndex].func; postHookFunc(name, w3, w4, start, buffer, filepath, retval); } @@ -49824,14 +57995,14 @@ void HP_npc_parse_unknown_mapflag(const char *name, const char *w3, const char * int HP_npc_parsesrcfile(const char *filepath, bool runOnInit) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_parsesrcfile_pre ) { - int (*preHookFunc) (const char *filepath, bool *runOnInit); + if (HPMHooks.count.HP_npc_parsesrcfile_pre > 0) { + int (*preHookFunc) (const char **filepath, bool *runOnInit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_parsesrcfile_pre[hIndex].func; - retVal___ = preHookFunc(filepath, &runOnInit); + retVal___ = preHookFunc(&filepath, &runOnInit); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49839,11 +58010,11 @@ int HP_npc_parsesrcfile(const char *filepath, bool runOnInit) { { retVal___ = HPMHooks.source.npc.parsesrcfile(filepath, runOnInit); } - if( HPMHooks.count.HP_npc_parsesrcfile_post ) { - int (*postHookFunc) (int retVal___, const char *filepath, bool *runOnInit); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parsesrcfile_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_parsesrcfile_post > 0) { + int (*postHookFunc) (int retVal___, 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; - retVal___ = postHookFunc(retVal___, filepath, &runOnInit); + retVal___ = postHookFunc(retVal___, filepath, runOnInit); } } return retVal___; @@ -49851,14 +58022,14 @@ int HP_npc_parsesrcfile(const char *filepath, bool runOnInit) { int HP_npc_script_event(struct map_session_data *sd, enum npce_event type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_script_event_pre ) { - int (*preHookFunc) (struct map_session_data *sd, enum npce_event *type); + if (HPMHooks.count.HP_npc_script_event_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, enum npce_event *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_script_event_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49866,25 +58037,25 @@ int HP_npc_script_event(struct map_session_data *sd, enum npce_event type) { { 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++ ) { + if (HPMHooks.count.HP_npc_script_event_post > 0) { + 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); + 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 ) { + if (HPMHooks.count.HP_npc_read_event_script_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -49892,9 +58063,9 @@ void HP_npc_read_event_script(void) { { HPMHooks.source.npc.read_event_script(); } - if( HPMHooks.count.HP_npc_read_event_script_post ) { + if (HPMHooks.count.HP_npc_read_event_script_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_read_event_script_post; hIndex++ ) { + 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(); } @@ -49904,16 +58075,16 @@ void HP_npc_read_event_script(void) { int HP_npc_path_db_clear_sub(union DBKey key, struct DBData *data, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_path_db_clear_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list args); + if (HPMHooks.count.HP_npc_path_db_clear_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49923,12 +58094,12 @@ int HP_npc_path_db_clear_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_path_db_clear_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_path_db_clear_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, args___copy); va_end(args___copy); } } @@ -49937,16 +58108,16 @@ int HP_npc_path_db_clear_sub(union DBKey key, struct DBData *data, va_list args) int HP_npc_ev_label_db_clear_sub(union DBKey key, struct DBData *data, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list args); + if (HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49956,12 +58127,12 @@ int HP_npc_ev_label_db_clear_sub(union DBKey key, struct DBData *data, va_list a 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___, union DBKey *key, struct DBData *data, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_ev_label_db_clear_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_ev_label_db_clear_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, args___copy); va_end(args___copy); } } @@ -49970,14 +58141,14 @@ int HP_npc_ev_label_db_clear_sub(union DBKey key, struct DBData *data, va_list a int HP_npc_reload(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_reload_pre ) { + if (HPMHooks.count.HP_npc_reload_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -49985,52 +58156,52 @@ int HP_npc_reload(void) { { retVal___ = HPMHooks.source.npc.reload(); } - if( HPMHooks.count.HP_npc_reload_post ) { + if (HPMHooks.count.HP_npc_reload_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_reload_post; hIndex++ ) { + 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) { +bool HP_npc_unloadfile(const char *filepath, bool unload_mobs) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_unloadfile_pre ) { - bool (*preHookFunc) (const char *filepath); + if (HPMHooks.count.HP_npc_unloadfile_pre > 0) { + bool (*preHookFunc) (const char **filepath, bool *unload_mobs); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_unloadfile_pre[hIndex].func; - retVal___ = preHookFunc(filepath); + retVal___ = preHookFunc(&filepath, &unload_mobs); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.npc.unloadfile(filepath); + retVal___ = HPMHooks.source.npc.unloadfile(filepath, unload_mobs); } - 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++ ) { + if (HPMHooks.count.HP_npc_unloadfile_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filepath, bool unload_mobs); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_unloadfile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_unloadfile_post[hIndex].func; - retVal___ = postHookFunc(retVal___, filepath); + retVal___ = postHookFunc(retVal___, filepath, unload_mobs); } } return retVal___; } void HP_npc_do_clear_npc(void) { int hIndex = 0; - if( HPMHooks.count.HP_npc_do_clear_npc_pre ) { + if (HPMHooks.count.HP_npc_do_clear_npc_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50038,9 +58209,9 @@ void HP_npc_do_clear_npc(void) { { HPMHooks.source.npc.do_clear_npc(); } - if( HPMHooks.count.HP_npc_do_clear_npc_post ) { + if (HPMHooks.count.HP_npc_do_clear_npc_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_do_clear_npc_post; hIndex++ ) { + 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(); } @@ -50049,14 +58220,14 @@ void HP_npc_do_clear_npc(void) { } 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); + if (HPMHooks.count.HP_npc_debug_warps_sub_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_pre; hIndex++ ) { + 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); + preHookFunc(&nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50064,9 +58235,9 @@ void HP_npc_debug_warps_sub(struct npc_data *nd) { { HPMHooks.source.npc.debug_warps_sub(nd); } - if( HPMHooks.count.HP_npc_debug_warps_sub_post ) { + if (HPMHooks.count.HP_npc_debug_warps_sub_post > 0) { void (*postHookFunc) (struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_sub_post; hIndex++ ) { + 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); } @@ -50075,14 +58246,14 @@ void HP_npc_debug_warps_sub(struct npc_data *nd) { } void HP_npc_debug_warps(void) { int hIndex = 0; - if( HPMHooks.count.HP_npc_debug_warps_pre ) { + if (HPMHooks.count.HP_npc_debug_warps_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50090,9 +58261,9 @@ void HP_npc_debug_warps(void) { { HPMHooks.source.npc.debug_warps(); } - if( HPMHooks.count.HP_npc_debug_warps_post ) { + if (HPMHooks.count.HP_npc_debug_warps_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_debug_warps_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_debug_warps_post[hIndex].func; postHookFunc(); } @@ -50101,14 +58272,14 @@ void HP_npc_debug_warps(void) { } void HP_npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_npc_trader_count_funds_pre ) { - void (*preHookFunc) (struct npc_data *nd, struct map_session_data *sd); + if (HPMHooks.count.HP_npc_trader_count_funds_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_trader_count_funds_pre[hIndex].func; - preHookFunc(nd, sd); + preHookFunc(&nd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50116,9 +58287,9 @@ void HP_npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) { HPMHooks.source.npc.trader_count_funds(nd, sd); } - if( HPMHooks.count.HP_npc_trader_count_funds_post ) { + if (HPMHooks.count.HP_npc_trader_count_funds_post > 0) { void (*postHookFunc) (struct npc_data *nd, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_count_funds_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_trader_count_funds_post[hIndex].func; postHookFunc(nd, sd); } @@ -50128,14 +58299,14 @@ void HP_npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) bool HP_npc_trader_pay(struct npc_data *nd, struct map_session_data *sd, int price, int points) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_trader_pay_pre ) { - bool (*preHookFunc) (struct npc_data *nd, struct map_session_data *sd, int *price, int *points); + if (HPMHooks.count.HP_npc_trader_pay_pre > 0) { + bool (*preHookFunc) (struct npc_data **nd, struct map_session_data **sd, int *price, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_trader_pay_pre[hIndex].func; - retVal___ = preHookFunc(nd, sd, &price, &points); + retVal___ = preHookFunc(&nd, &sd, &price, &points); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50143,25 +58314,25 @@ bool HP_npc_trader_pay(struct npc_data *nd, struct map_session_data *sd, int pri { retVal___ = HPMHooks.source.npc.trader_pay(nd, sd, price, points); } - if( HPMHooks.count.HP_npc_trader_pay_post ) { - bool (*postHookFunc) (bool retVal___, struct npc_data *nd, struct map_session_data *sd, int *price, int *points); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_trader_pay_post > 0) { + bool (*postHookFunc) (bool retVal___, struct npc_data *nd, struct map_session_data *sd, int price, int points); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_pay_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_trader_pay_post[hIndex].func; - retVal___ = postHookFunc(retVal___, nd, sd, &price, &points); + retVal___ = postHookFunc(retVal___, nd, sd, price, points); } } return retVal___; } void HP_npc_trader_update(int master) { int hIndex = 0; - if( HPMHooks.count.HP_npc_trader_update_pre ) { + if (HPMHooks.count.HP_npc_trader_update_pre > 0) { void (*preHookFunc) (int *master); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_trader_update_pre[hIndex].func; preHookFunc(&master); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50169,26 +58340,26 @@ void HP_npc_trader_update(int master) { { HPMHooks.source.npc.trader_update(master); } - if( HPMHooks.count.HP_npc_trader_update_post ) { - void (*postHookFunc) (int *master); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_trader_update_post > 0) { + void (*postHookFunc) (int master); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_trader_update_post[hIndex].func; - postHookFunc(&master); + postHookFunc(master); } } return; } -int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) { +enum market_buy_result HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_list) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_npc_market_buylist_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct itemlist *item_list); + enum market_buy_result retVal___ = MARKET_BUY_RESULT_ERROR; + if (HPMHooks.count.HP_npc_market_buylist_pre > 0) { + enum market_buy_result (*preHookFunc) (struct map_session_data **sd, struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_buylist_pre[hIndex].func; - retVal___ = preHookFunc(sd, item_list); + retVal___ = preHookFunc(&sd, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50196,26 +58367,80 @@ int HP_npc_market_buylist(struct map_session_data *sd, struct itemlist *item_lis { retVal___ = HPMHooks.source.npc.market_buylist(sd, item_list); } - if( HPMHooks.count.HP_npc_market_buylist_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_market_buylist_post > 0) { + enum market_buy_result (*postHookFunc) (enum market_buy_result retVal___, struct map_session_data *sd, struct itemlist *item_list); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_buylist_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_buylist_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, item_list); } } return retVal___; } +int HP_npc_barter_buylist(struct map_session_data *sd, struct barteritemlist *item_list) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_npc_barter_buylist_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct barteritemlist **item_list); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_buylist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_barter_buylist_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &item_list); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.barter_buylist(sd, item_list); + } + if (HPMHooks.count.HP_npc_barter_buylist_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_buylist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_barter_buylist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_list); + } + } + return retVal___; +} +int HP_npc_expanded_barter_buylist(struct map_session_data *sd, struct barteritemlist *item_list) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_npc_expanded_barter_buylist_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct barteritemlist **item_list); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_buylist_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_expanded_barter_buylist_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &item_list); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.npc.expanded_barter_buylist(sd, item_list); + } + if (HPMHooks.count.HP_npc_expanded_barter_buylist_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct barteritemlist *item_list); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_buylist_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_expanded_barter_buylist_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_list); + } + } + return retVal___; +} bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_trader_open_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, struct npc_data *nd); + if (HPMHooks.count.HP_npc_trader_open_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct npc_data **nd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_trader_open_pre[hIndex].func; - retVal___ = preHookFunc(sd, nd); + retVal___ = preHookFunc(&sd, &nd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50223,9 +58448,9 @@ bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { { retVal___ = HPMHooks.source.npc.trader_open(sd, nd); } - if( HPMHooks.count.HP_npc_trader_open_post ) { + if (HPMHooks.count.HP_npc_trader_open_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct npc_data *nd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_trader_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_trader_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, nd); } @@ -50234,14 +58459,14 @@ bool HP_npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { } void HP_npc_market_fromsql(void) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_fromsql_pre ) { + if (HPMHooks.count.HP_npc_market_fromsql_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_fromsql_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50249,25 +58474,25 @@ void HP_npc_market_fromsql(void) { { HPMHooks.source.npc.market_fromsql(); } - if( HPMHooks.count.HP_npc_market_fromsql_post ) { + if (HPMHooks.count.HP_npc_market_fromsql_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_fromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_fromsql_post[hIndex].func; postHookFunc(); } } return; } -void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) { +void HP_npc_market_tosql(struct npc_data *nd, int index) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_tosql_pre ) { - void (*preHookFunc) (struct npc_data *nd, unsigned short *index); + if (HPMHooks.count.HP_npc_market_tosql_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_tosql_pre[hIndex].func; - preHookFunc(nd, &index); + preHookFunc(&nd, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50275,25 +58500,25 @@ void HP_npc_market_tosql(struct npc_data *nd, unsigned short index) { { HPMHooks.source.npc.market_tosql(nd, index); } - if( HPMHooks.count.HP_npc_market_tosql_post ) { - void (*postHookFunc) (struct npc_data *nd, unsigned short *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_market_tosql_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_tosql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_tosql_post[hIndex].func; - postHookFunc(nd, &index); + postHookFunc(nd, index); } } return; } -void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) { +void HP_npc_market_delfromsql(struct npc_data *nd, int index) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_delfromsql_pre ) { - void (*preHookFunc) (struct npc_data *nd, unsigned short *index); + if (HPMHooks.count.HP_npc_market_delfromsql_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_pre[hIndex].func; - preHookFunc(nd, &index); + preHookFunc(&nd, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50301,25 +58526,25 @@ void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) { { HPMHooks.source.npc.market_delfromsql(nd, index); } - if( HPMHooks.count.HP_npc_market_delfromsql_post ) { - void (*postHookFunc) (struct npc_data *nd, unsigned short *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_market_delfromsql_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_post[hIndex].func; - postHookFunc(nd, &index); + postHookFunc(nd, index); } } return; } -void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) { +void HP_npc_market_delfromsql_sub(const char *npcname, int index) { int hIndex = 0; - if( HPMHooks.count.HP_npc_market_delfromsql_sub_pre ) { - void (*preHookFunc) (const char *npcname, unsigned short *index); + if (HPMHooks.count.HP_npc_market_delfromsql_sub_pre > 0) { + void (*preHookFunc) (const char **npcname, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_pre[hIndex].func; - preHookFunc(npcname, &index); + preHookFunc(&npcname, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50327,11 +58552,219 @@ void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) { { HPMHooks.source.npc.market_delfromsql_sub(npcname, index); } - if( HPMHooks.count.HP_npc_market_delfromsql_sub_post ) { - void (*postHookFunc) (const char *npcname, unsigned short *index); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_market_delfromsql_sub_post > 0) { + void (*postHookFunc) (const char *npcname, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_post[hIndex].func; - postHookFunc(npcname, &index); + postHookFunc(npcname, index); + } + } + return; +} +void HP_npc_barter_fromsql(void) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_barter_fromsql_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_fromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_barter_fromsql_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.barter_fromsql(); + } + if (HPMHooks.count.HP_npc_barter_fromsql_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_fromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_barter_fromsql_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_npc_barter_tosql(struct npc_data *nd, int index) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_barter_tosql_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_tosql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_barter_tosql_pre[hIndex].func; + preHookFunc(&nd, &index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.barter_tosql(nd, index); + } + if (HPMHooks.count.HP_npc_barter_tosql_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_tosql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_barter_tosql_post[hIndex].func; + postHookFunc(nd, index); + } + } + return; +} +void HP_npc_barter_delfromsql(struct npc_data *nd, int index) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_barter_delfromsql_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_pre[hIndex].func; + preHookFunc(&nd, &index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.barter_delfromsql(nd, index); + } + if (HPMHooks.count.HP_npc_barter_delfromsql_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_post[hIndex].func; + postHookFunc(nd, index); + } + } + return; +} +void HP_npc_barter_delfromsql_sub(const char *npcname, int itemId, int itemId2, int amount2) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_barter_delfromsql_sub_pre > 0) { + void (*preHookFunc) (const char **npcname, int *itemId, int *itemId2, int *amount2); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_sub_pre[hIndex].func; + preHookFunc(&npcname, &itemId, &itemId2, &amount2); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.barter_delfromsql_sub(npcname, itemId, itemId2, amount2); + } + if (HPMHooks.count.HP_npc_barter_delfromsql_sub_post > 0) { + void (*postHookFunc) (const char *npcname, int itemId, int itemId2, int amount2); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_barter_delfromsql_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_barter_delfromsql_sub_post[hIndex].func; + postHookFunc(npcname, itemId, itemId2, amount2); + } + } + return; +} +void HP_npc_expanded_barter_fromsql(void) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_expanded_barter_fromsql_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_fromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_expanded_barter_fromsql_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.expanded_barter_fromsql(); + } + if (HPMHooks.count.HP_npc_expanded_barter_fromsql_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_fromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_expanded_barter_fromsql_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_npc_expanded_barter_tosql(struct npc_data *nd, int index) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_expanded_barter_tosql_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_tosql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_expanded_barter_tosql_pre[hIndex].func; + preHookFunc(&nd, &index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.expanded_barter_tosql(nd, index); + } + if (HPMHooks.count.HP_npc_expanded_barter_tosql_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_tosql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_expanded_barter_tosql_post[hIndex].func; + postHookFunc(nd, index); + } + } + return; +} +void HP_npc_expanded_barter_delfromsql(struct npc_data *nd, int index) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_expanded_barter_delfromsql_pre > 0) { + void (*preHookFunc) (struct npc_data **nd, int *index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_delfromsql_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_expanded_barter_delfromsql_pre[hIndex].func; + preHookFunc(&nd, &index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.expanded_barter_delfromsql(nd, index); + } + if (HPMHooks.count.HP_npc_expanded_barter_delfromsql_post > 0) { + void (*postHookFunc) (struct npc_data *nd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_delfromsql_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_expanded_barter_delfromsql_post[hIndex].func; + postHookFunc(nd, index); + } + } + return; +} +void HP_npc_expanded_barter_delfromsql_sub(const char *npcname, int itemId, int zeny, int currencyCount, struct npc_barter_currency *currency) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_expanded_barter_delfromsql_sub_pre > 0) { + void (*preHookFunc) (const char **npcname, int *itemId, int *zeny, int *currencyCount, struct npc_barter_currency **currency); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_delfromsql_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_expanded_barter_delfromsql_sub_pre[hIndex].func; + preHookFunc(&npcname, &itemId, &zeny, ¤cyCount, ¤cy); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.expanded_barter_delfromsql_sub(npcname, itemId, zeny, currencyCount, currency); + } + if (HPMHooks.count.HP_npc_expanded_barter_delfromsql_sub_post > 0) { + void (*postHookFunc) (const char *npcname, int itemId, int zeny, int currencyCount, struct npc_barter_currency *currency); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_expanded_barter_delfromsql_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_expanded_barter_delfromsql_sub_post[hIndex].func; + postHookFunc(npcname, itemId, zeny, currencyCount, currency); } } return; @@ -50339,14 +58772,14 @@ void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) { bool HP_npc_db_checkid(const int id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_npc_db_checkid_pre ) { + if (HPMHooks.count.HP_npc_db_checkid_pre > 0) { bool (*preHookFunc) (const int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_db_checkid_pre[hIndex].func; retVal___ = preHookFunc(&id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50354,26 +58787,78 @@ bool HP_npc_db_checkid(const int id) { { retVal___ = HPMHooks.source.npc.db_checkid(id); } - if( HPMHooks.count.HP_npc_db_checkid_post ) { - bool (*postHookFunc) (bool retVal___, const int *id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_db_checkid_post > 0) { + bool (*postHookFunc) (bool retVal___, const int id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_db_checkid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_db_checkid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &id); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; } +void HP_npc_refresh(struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_refresh_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_refresh_pre[hIndex].func; + preHookFunc(&nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.refresh(nd); + } + if (HPMHooks.count.HP_npc_refresh_post > 0) { + void (*postHookFunc) (struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_refresh_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_refresh_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} +void HP_npc_questinfo_clear(struct npc_data *nd) { + int hIndex = 0; + if (HPMHooks.count.HP_npc_questinfo_clear_pre > 0) { + void (*preHookFunc) (struct npc_data **nd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_questinfo_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_npc_questinfo_clear_pre[hIndex].func; + preHookFunc(&nd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.npc.questinfo_clear(nd); + } + if (HPMHooks.count.HP_npc_questinfo_clear_post > 0) { + void (*postHookFunc) (struct npc_data *nd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_questinfo_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_npc_questinfo_clear_post[hIndex].func; + postHookFunc(nd); + } + } + return; +} int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_npc_secure_timeout_timer_pre ) { + if (HPMHooks.count.HP_npc_secure_timeout_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_secure_timeout_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50381,26 +58866,78 @@ int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.npc.secure_timeout_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_npc_secure_timeout_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_npc_secure_timeout_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_secure_timeout_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_secure_timeout_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } -/* nullpo */ +/* nullpo_interface */ +void HP_nullpo_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_nullpo_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_nullpo_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.nullpo.init(); + } + if (HPMHooks.count.HP_nullpo_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_nullpo_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_nullpo_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_nullpo_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_nullpo_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.nullpo.final(); + } + if (HPMHooks.count.HP_nullpo_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_nullpo_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { int hIndex = 0; - if( HPMHooks.count.HP_nullpo_assert_report_pre ) { - void (*preHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); + if (HPMHooks.count.HP_nullpo_assert_report_pre > 0) { + void (*preHookFunc) (const char **file, int *line, const char **func, const char **targetname, const char **title); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func; - preHookFunc(file, &line, func, targetname, title); + preHookFunc(&file, &line, &func, &targetname, &title); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50408,26 +58945,131 @@ void HP_nullpo_assert_report(const char *file, int line, const char *func, const { HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title); } - if( HPMHooks.count.HP_nullpo_assert_report_post ) { - void (*postHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title); - for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) { + if (HPMHooks.count.HP_nullpo_assert_report_post > 0) { + void (*postHookFunc) (const char *file, int line, const char *func, const char *targetname, const char *title); + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++) { postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func; - postHookFunc(file, &line, func, targetname, title); + postHookFunc(file, line, func, targetname, title); } } return; } -/* party */ +/* packets_interface */ +void HP_packets_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.init(); + } + if (HPMHooks.count.HP_packets_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.final(); + } + if (HPMHooks.count.HP_packets_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_addLens(void) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_addLens_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLens_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_addLens_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.addLens(); + } + if (HPMHooks.count.HP_packets_addLens_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLens_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_addLens_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_packets_addLen(int id, int len) { + int hIndex = 0; + if (HPMHooks.count.HP_packets_addLen_pre > 0) { + void (*preHookFunc) (int *id, int *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLen_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_packets_addLen_pre[hIndex].func; + preHookFunc(&id, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.packets.addLen(id, len); + } + if (HPMHooks.count.HP_packets_addLen_post > 0) { + void (*postHookFunc) (int id, int len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_packets_addLen_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_packets_addLen_post[hIndex].func; + postHookFunc(id, len); + } + } + return; +} +/* party_interface */ void HP_party_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_party_init_pre ) { + if (HPMHooks.count.HP_party_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50435,25 +59077,25 @@ void HP_party_init(bool minimal) { { HPMHooks.source.party.init(minimal); } - if( HPMHooks.count.HP_party_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_init_post; hIndex++ ) { + if (HPMHooks.count.HP_party_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_party_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_party_final_pre ) { + if (HPMHooks.count.HP_party_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50461,9 +59103,9 @@ void HP_party_final(void) { { HPMHooks.source.party.final(); } - if( HPMHooks.count.HP_party_final_post ) { + if (HPMHooks.count.HP_party_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_final_post[hIndex].func; postHookFunc(); } @@ -50473,14 +59115,14 @@ void HP_party_final(void) { struct party_data* HP_party_search(int party_id) { int hIndex = 0; struct party_data* retVal___ = NULL; - if( HPMHooks.count.HP_party_search_pre ) { + if (HPMHooks.count.HP_party_search_pre > 0) { struct party_data* (*preHookFunc) (int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_search_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50488,11 +59130,11 @@ struct party_data* HP_party_search(int party_id) { { 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++ ) { + if (HPMHooks.count.HP_party_search_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id); } } return retVal___; @@ -50500,14 +59142,14 @@ struct party_data* HP_party_search(int party_id) { 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); + if (HPMHooks.count.HP_party_searchname_pre > 0) { + struct party_data* (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_searchname_pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50515,9 +59157,9 @@ struct party_data* HP_party_searchname(const char *str) { { retVal___ = HPMHooks.source.party.searchname(str); } - if( HPMHooks.count.HP_party_searchname_post ) { + if (HPMHooks.count.HP_party_searchname_post > 0) { struct party_data* (*postHookFunc) (struct party_data* retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_searchname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_searchname_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -50527,14 +59169,14 @@ struct party_data* HP_party_searchname(const char *str) { int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_getmemberid_pre ) { - int (*preHookFunc) (struct party_data *p, struct map_session_data *sd); + if (HPMHooks.count.HP_party_getmemberid_pre > 0) { + int (*preHookFunc) (struct party_data **p, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_getmemberid_pre[hIndex].func; - retVal___ = preHookFunc(p, sd); + retVal___ = preHookFunc(&p, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50542,9 +59184,9 @@ int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) { { retVal___ = HPMHooks.source.party.getmemberid(p, sd); } - if( HPMHooks.count.HP_party_getmemberid_post ) { + if (HPMHooks.count.HP_party_getmemberid_post > 0) { int (*postHookFunc) (int retVal___, struct party_data *p, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getmemberid_post; hIndex++ ) { + 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); } @@ -50554,14 +59196,14 @@ int HP_party_getmemberid(struct party_data *p, struct map_session_data *sd) { 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); + if (HPMHooks.count.HP_party_getavailablesd_pre > 0) { + struct map_session_data* (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_getavailablesd_pre[hIndex].func; - retVal___ = preHookFunc(p); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50569,9 +59211,9 @@ struct map_session_data* HP_party_getavailablesd(struct party_data *p) { { retVal___ = HPMHooks.source.party.getavailablesd(p); } - if( HPMHooks.count.HP_party_getavailablesd_post ) { + if (HPMHooks.count.HP_party_getavailablesd_post > 0) { 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++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_getavailablesd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_getavailablesd_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -50581,14 +59223,14 @@ struct map_session_data* HP_party_getavailablesd(struct party_data *p) { int HP_party_create(struct map_session_data *sd, const char *name, int item, int item2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_create_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *name, int *item, int *item2); + if (HPMHooks.count.HP_party_create_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **name, int *item, int *item2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &name, &item, &item2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50596,25 +59238,25 @@ int HP_party_create(struct map_session_data *sd, const char *name, int item, int { 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, const char *name, int *item, int *item2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_post; hIndex++ ) { + if (HPMHooks.count.HP_party_create_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const 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); + retVal___ = postHookFunc(retVal___, sd, name, item, item2); } } return retVal___; } void HP_party_created(int account_id, int char_id, int fail, int party_id, const 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, const char *name); + if (HPMHooks.count.HP_party_created_pre > 0) { + void (*preHookFunc) (int *account_id, int *char_id, int *fail, int *party_id, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_pre; hIndex++ ) { + 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); + preHookFunc(&account_id, &char_id, &fail, &party_id, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50622,11 +59264,11 @@ void HP_party_created(int account_id, int char_id, int fail, int party_id, const { 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, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_created_post; hIndex++ ) { + if (HPMHooks.count.HP_party_created_post > 0) { + void (*postHookFunc) (int account_id, int char_id, int fail, int party_id, const 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); + postHookFunc(account_id, char_id, fail, party_id, name); } } return; @@ -50634,14 +59276,14 @@ void HP_party_created(int account_id, int char_id, int fail, int party_id, const int HP_party_request_info(int party_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_request_info_pre ) { + if (HPMHooks.count.HP_party_request_info_pre > 0) { int (*preHookFunc) (int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_request_info_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50649,11 +59291,11 @@ int HP_party_request_info(int party_id, int char_id) { { 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++ ) { + if (HPMHooks.count.HP_party_request_info_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id, char_id); } } return retVal___; @@ -50661,14 +59303,14 @@ int HP_party_request_info(int party_id, int char_id) { int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_invite_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + if (HPMHooks.count.HP_party_invite_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_invite_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_invite_pre[hIndex].func; - retVal___ = preHookFunc(sd, tsd); + retVal___ = preHookFunc(&sd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50676,9 +59318,9 @@ int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { { retVal___ = HPMHooks.source.party.invite(sd, tsd); } - if( HPMHooks.count.HP_party_invite_post ) { + if (HPMHooks.count.HP_party_invite_post > 0) { 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++ ) { + 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); } @@ -50687,14 +59329,14 @@ int HP_party_invite(struct map_session_data *sd, struct map_session_data *tsd) { } 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); + if (HPMHooks.count.HP_party_member_joined_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_member_joined_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50702,9 +59344,9 @@ void HP_party_member_joined(struct map_session_data *sd) { { HPMHooks.source.party.member_joined(sd); } - if( HPMHooks.count.HP_party_member_joined_post ) { + if (HPMHooks.count.HP_party_member_joined_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_member_joined_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_member_joined_post[hIndex].func; postHookFunc(sd); } @@ -50714,14 +59356,14 @@ void HP_party_member_joined(struct map_session_data *sd) { int HP_party_member_added(int party_id, int account_id, int char_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_member_added_pre ) { + if (HPMHooks.count.HP_party_member_added_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_added_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50729,11 +59371,11 @@ int HP_party_member_added(int party_id, int account_id, int char_id, int flag) { { 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++ ) { + if (HPMHooks.count.HP_party_member_added_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id, account_id, char_id, flag); } } return retVal___; @@ -50741,14 +59383,14 @@ int HP_party_member_added(int party_id, int account_id, int char_id, int flag) { int HP_party_leave(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_leave_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_party_leave_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_leave_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50756,9 +59398,9 @@ int HP_party_leave(struct map_session_data *sd) { { retVal___ = HPMHooks.source.party.leave(sd); } - if( HPMHooks.count.HP_party_leave_post ) { + if (HPMHooks.count.HP_party_leave_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_leave_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_leave_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -50768,14 +59410,14 @@ int HP_party_leave(struct map_session_data *sd) { int HP_party_removemember(struct map_session_data *sd, int account_id, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_removemember_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *account_id, const char *name); + if (HPMHooks.count.HP_party_removemember_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *account_id, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &account_id, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50783,11 +59425,11 @@ int HP_party_removemember(struct map_session_data *sd, int account_id, const cha { 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, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_removemember_post; hIndex++ ) { + if (HPMHooks.count.HP_party_removemember_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int account_id, const 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); + retVal___ = postHookFunc(retVal___, sd, account_id, name); } } return retVal___; @@ -50795,14 +59437,14 @@ int HP_party_removemember(struct map_session_data *sd, int account_id, const cha int HP_party_member_withdraw(int party_id, int account_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_member_withdraw_pre ) { + if (HPMHooks.count.HP_party_member_withdraw_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_member_withdraw_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50810,25 +59452,25 @@ int HP_party_member_withdraw(int party_id, int account_id, int char_id) { { 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++ ) { + if (HPMHooks.count.HP_party_member_withdraw_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_party_reply_invite_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *party_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_reply_invite_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &party_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -50836,11 +59478,11 @@ void HP_party_reply_invite(struct map_session_data *sd, int party_id, int flag) { 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++ ) { + if (HPMHooks.count.HP_party_reply_invite_post > 0) { + 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); + postHookFunc(sd, party_id, flag); } } return; @@ -50848,14 +59490,14 @@ void HP_party_reply_invite(struct map_session_data *sd, int party_id, int flag) int HP_party_recv_noinfo(int party_id, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_recv_noinfo_pre ) { + if (HPMHooks.count.HP_party_recv_noinfo_pre > 0) { int (*preHookFunc) (int *party_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_noinfo_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50863,11 +59505,11 @@ int HP_party_recv_noinfo(int party_id, int char_id) { { 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++ ) { + if (HPMHooks.count.HP_party_recv_noinfo_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id, char_id); } } return retVal___; @@ -50875,14 +59517,14 @@ int HP_party_recv_noinfo(int party_id, int char_id) { int HP_party_recv_info(const struct party *sp, int char_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_recv_info_pre ) { - int (*preHookFunc) (const struct party *sp, int *char_id); + if (HPMHooks.count.HP_party_recv_info_pre > 0) { + int (*preHookFunc) (const struct party **sp, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sp, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50890,11 +59532,11 @@ int HP_party_recv_info(const struct party *sp, int char_id) { { retVal___ = HPMHooks.source.party.recv_info(sp, char_id); } - if( HPMHooks.count.HP_party_recv_info_post ) { - int (*postHookFunc) (int retVal___, const struct party *sp, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_info_post; hIndex++ ) { + if (HPMHooks.count.HP_party_recv_info_post > 0) { + int (*postHookFunc) (int retVal___, const 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); + retVal___ = postHookFunc(retVal___, sp, char_id); } } return retVal___; @@ -50902,14 +59544,14 @@ int HP_party_recv_info(const struct party *sp, int char_id) { 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___ = 0; - if( HPMHooks.count.HP_party_recv_movemap_pre ) { + if (HPMHooks.count.HP_party_recv_movemap_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *char_id, unsigned short *mapid, int *online, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recv_movemap_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50917,11 +59559,11 @@ int HP_party_recv_movemap(int party_id, int account_id, int char_id, unsigned sh { 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++ ) { + if (HPMHooks.count.HP_party_recv_movemap_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id, account_id, char_id, mapid, online, lv); } } return retVal___; @@ -50929,14 +59571,14 @@ int HP_party_recv_movemap(int party_id, int account_id, int char_id, unsigned sh int HP_party_broken(int party_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_broken_pre ) { + if (HPMHooks.count.HP_party_broken_pre > 0) { int (*preHookFunc) (int *party_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_broken_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50944,11 +59586,11 @@ int HP_party_broken(int party_id) { { 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++ ) { + if (HPMHooks.count.HP_party_broken_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id); } } return retVal___; @@ -50956,14 +59598,14 @@ int HP_party_broken(int party_id) { int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_optionchanged_pre ) { + if (HPMHooks.count.HP_party_optionchanged_pre > 0) { int (*preHookFunc) (int *party_id, int *account_id, int *exp, int *item, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_optionchanged_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50971,11 +59613,11 @@ int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int { 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++ ) { + if (HPMHooks.count.HP_party_optionchanged_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, party_id, account_id, exp, item, flag); } } return retVal___; @@ -50983,14 +59625,14 @@ int HP_party_optionchanged(int party_id, int account_id, int exp, int item, int int HP_party_changeoption(struct map_session_data *sd, int exp, int item) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_changeoption_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *exp, int *item); + if (HPMHooks.count.HP_party_changeoption_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *exp, int *item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeoption_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &exp, &item); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -50998,11 +59640,11 @@ int HP_party_changeoption(struct map_session_data *sd, int exp, int item) { { 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++ ) { + if (HPMHooks.count.HP_party_changeoption_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, exp, item); } } return retVal___; @@ -51010,14 +59652,14 @@ int HP_party_changeoption(struct map_session_data *sd, int exp, int item) { bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data *t_sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_party_changeleader_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, struct map_session_data *t_sd); + if (HPMHooks.count.HP_party_changeleader_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct map_session_data **t_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_changeleader_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &t_sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51025,9 +59667,9 @@ bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data { retVal___ = HPMHooks.source.party.changeleader(sd, t_sd); } - if( HPMHooks.count.HP_party_changeleader_post ) { + if (HPMHooks.count.HP_party_changeleader_post > 0) { 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++ ) { + 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); } @@ -51036,14 +59678,14 @@ bool HP_party_changeleader(struct map_session_data *sd, struct map_session_data } 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); + if (HPMHooks.count.HP_party_send_movemap_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_send_movemap_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51051,9 +59693,9 @@ void HP_party_send_movemap(struct map_session_data *sd) { { HPMHooks.source.party.send_movemap(sd); } - if( HPMHooks.count.HP_party_send_movemap_post ) { + if (HPMHooks.count.HP_party_send_movemap_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_send_movemap_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_send_movemap_post[hIndex].func; postHookFunc(sd); } @@ -51062,14 +59704,14 @@ void HP_party_send_movemap(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_party_send_levelup_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_send_levelup_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51077,9 +59719,9 @@ void HP_party_send_levelup(struct map_session_data *sd) { { HPMHooks.source.party.send_levelup(sd); } - if( HPMHooks.count.HP_party_send_levelup_post ) { + if (HPMHooks.count.HP_party_send_levelup_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_send_levelup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_send_levelup_post[hIndex].func; postHookFunc(sd); } @@ -51089,14 +59731,14 @@ void HP_party_send_levelup(struct map_session_data *sd) { int HP_party_send_logout(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_logout_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_party_send_logout_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51104,65 +59746,38 @@ int HP_party_send_logout(struct map_session_data *sd) { { retVal___ = HPMHooks.source.party.send_logout(sd); } - if( HPMHooks.count.HP_party_send_logout_post ) { + if (HPMHooks.count.HP_party_send_logout_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_logout_post; hIndex++ ) { + 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 HP_party_send_message(struct map_session_data *sd, const char *mes) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_message_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *mes, int *len); + if (HPMHooks.count.HP_party_send_message_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **mes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_message_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &mes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.party.send_message(sd, mes, len); + retVal___ = HPMHooks.source.party.send_message(sd, mes); } - 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++ ) { + if (HPMHooks.count.HP_party_send_message_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *mes); + 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___ = 0; - if( HPMHooks.count.HP_party_recv_message_pre ) { - int (*preHookFunc) (int *party_id, int *account_id, const char *mes, int *len); - *HPMforce_return = false; - 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); + retVal___ = postHookFunc(retVal___, sd, mes); } } return retVal___; @@ -51170,14 +59785,14 @@ int HP_party_recv_message(int party_id, int account_id, const char *mes, int len int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_skill_check_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *party_id, uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_party_skill_check_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *party_id, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_skill_check_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &party_id, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51185,11 +59800,11 @@ int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill { 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++ ) { + if (HPMHooks.count.HP_party_skill_check_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, party_id, skill_id, skill_lv); } } return retVal___; @@ -51197,14 +59812,14 @@ int HP_party_skill_check(struct map_session_data *sd, int party_id, uint16 skill int HP_party_send_xy_clear(struct party_data *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_xy_clear_pre ) { - int (*preHookFunc) (struct party_data *p); + if (HPMHooks.count.HP_party_send_xy_clear_pre > 0) { + int (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51212,9 +59827,9 @@ int HP_party_send_xy_clear(struct party_data *p) { { retVal___ = HPMHooks.source.party.send_xy_clear(p); } - if( HPMHooks.count.HP_party_send_xy_clear_post ) { + if (HPMHooks.count.HP_party_send_xy_clear_post > 0) { int (*postHookFunc) (int retVal___, struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_clear_post; hIndex++ ) { + 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); } @@ -51224,14 +59839,14 @@ int HP_party_send_xy_clear(struct party_data *p) { 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___ = 0; - 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); + if (HPMHooks.count.HP_party_exp_share_pre > 0) { + int (*preHookFunc) (struct party_data **p, struct block_list **src, unsigned int *base_exp, unsigned int *job_exp, int *zeny); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_exp_share_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p, &src, &base_exp, &job_exp, &zeny); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51239,11 +59854,11 @@ int HP_party_exp_share(struct party_data *p, struct block_list *src, unsigned in { 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++ ) { + if (HPMHooks.count.HP_party_exp_share_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, p, src, base_exp, job_exp, zeny); } } return retVal___; @@ -51251,14 +59866,14 @@ int HP_party_exp_share(struct party_data *p, struct block_list *src, unsigned in 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___ = 0; - 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); + if (HPMHooks.count.HP_party_share_loot_pre > 0) { + int (*preHookFunc) (struct party_data **p, struct map_session_data **sd, struct item **item_data, int *first_charid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_share_loot_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p, &sd, &item_data, &first_charid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51266,11 +59881,11 @@ int HP_party_share_loot(struct party_data *p, struct map_session_data *sd, struc { 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++ ) { + if (HPMHooks.count.HP_party_share_loot_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, p, sd, item_data, first_charid); } } return retVal___; @@ -51278,14 +59893,14 @@ int HP_party_share_loot(struct party_data *p, struct map_session_data *sd, struc int HP_party_send_dot_remove(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_dot_remove_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_party_send_dot_remove_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51293,9 +59908,9 @@ int HP_party_send_dot_remove(struct map_session_data *sd) { { retVal___ = HPMHooks.source.party.send_dot_remove(sd); } - if( HPMHooks.count.HP_party_send_dot_remove_post ) { + if (HPMHooks.count.HP_party_send_dot_remove_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_dot_remove_post; hIndex++ ) { + 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); } @@ -51305,16 +59920,16 @@ int HP_party_send_dot_remove(struct map_session_data *sd) { int HP_party_sub_count(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_sub_count_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_party_sub_count_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51324,9 +59939,9 @@ int HP_party_sub_count(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.party.sub_count(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_party_sub_count_post ) { + if (HPMHooks.count.HP_party_sub_count_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_post; hIndex++ ) { + 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); @@ -51338,16 +59953,16 @@ int HP_party_sub_count(struct block_list *bl, va_list ap) { int HP_party_sub_count_chorus(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_sub_count_chorus_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_party_sub_count_chorus_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_party_sub_count_chorus_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51357,9 +59972,9 @@ int HP_party_sub_count_chorus(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.party.sub_count_chorus(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_party_sub_count_chorus_post ) { + if (HPMHooks.count.HP_party_sub_count_chorus_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_sub_count_chorus_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_party_sub_count_chorus_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); @@ -51370,14 +59985,14 @@ int HP_party_sub_count_chorus(struct block_list *bl, va_list ap) { } void HP_party_booking_register(struct map_session_data *sd, short level, short mapid, short *job) { int hIndex = 0; - if( HPMHooks.count.HP_party_booking_register_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job); + if (HPMHooks.count.HP_party_booking_register_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *level, short *mapid, short **job); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_pre; hIndex++ ) { + 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, &mapid, job); + preHookFunc(&sd, &level, &mapid, &job); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51385,25 +60000,25 @@ void HP_party_booking_register(struct map_session_data *sd, short level, short m { HPMHooks.source.party.booking_register(sd, level, mapid, job); } - if( HPMHooks.count.HP_party_booking_register_post ) { - void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_register_post; hIndex++ ) { + if (HPMHooks.count.HP_party_booking_register_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, short level, short mapid, short *job); + 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, &mapid, job); + postHookFunc(sd, level, mapid, job); } } return; } void HP_party_booking_update(struct map_session_data *sd, short *job) { int hIndex = 0; - if( HPMHooks.count.HP_party_booking_update_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *job); + if (HPMHooks.count.HP_party_booking_update_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short **job); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_booking_update_pre[hIndex].func; - preHookFunc(sd, job); + preHookFunc(&sd, &job); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51411,9 +60026,9 @@ void HP_party_booking_update(struct map_session_data *sd, short *job) { { HPMHooks.source.party.booking_update(sd, job); } - if( HPMHooks.count.HP_party_booking_update_post ) { + if (HPMHooks.count.HP_party_booking_update_post > 0) { void (*postHookFunc) (struct map_session_data *sd, short *job); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_booking_update_post[hIndex].func; postHookFunc(sd, job); } @@ -51422,14 +60037,14 @@ void HP_party_booking_update(struct map_session_data *sd, short *job) { } void HP_party_booking_search(struct map_session_data *sd, short level, short mapid, short job, 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, short *job, unsigned long *lastindex, short *resultcount); + if (HPMHooks.count.HP_party_booking_search_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_pre; hIndex++ ) { + 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, &job, &lastindex, &resultcount); + preHookFunc(&sd, &level, &mapid, &job, &lastindex, &resultcount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51437,25 +60052,25 @@ void HP_party_booking_search(struct map_session_data *sd, short level, short map { HPMHooks.source.party.booking_search(sd, level, mapid, job, lastindex, resultcount); } - if( HPMHooks.count.HP_party_booking_search_post ) { - void (*postHookFunc) (struct map_session_data *sd, short *level, short *mapid, short *job, unsigned long *lastindex, short *resultcount); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_search_post; hIndex++ ) { + if (HPMHooks.count.HP_party_booking_search_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, short level, short mapid, short job, 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, &job, &lastindex, &resultcount); + postHookFunc(sd, level, mapid, job, lastindex, resultcount); } } return; } void HP_party_recruit_register(struct map_session_data *sd, short level, const char *notice) { int hIndex = 0; - if( HPMHooks.count.HP_party_recruit_register_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *level, const char *notice); + if (HPMHooks.count.HP_party_recruit_register_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *level, const char **notice); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_recruit_register_pre[hIndex].func; - preHookFunc(sd, &level, notice); + preHookFunc(&sd, &level, ¬ice); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51463,25 +60078,25 @@ void HP_party_recruit_register(struct map_session_data *sd, short level, const c { HPMHooks.source.party.recruit_register(sd, level, notice); } - if( HPMHooks.count.HP_party_recruit_register_post ) { - void (*postHookFunc) (struct map_session_data *sd, short *level, const char *notice); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_post; hIndex++ ) { + if (HPMHooks.count.HP_party_recruit_register_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, short level, const char *notice); + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_register_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_recruit_register_post[hIndex].func; - postHookFunc(sd, &level, notice); + postHookFunc(sd, level, notice); } } return; } void HP_party_recruit_update(struct map_session_data *sd, const char *notice) { int hIndex = 0; - if( HPMHooks.count.HP_party_recruit_update_pre ) { - void (*preHookFunc) (struct map_session_data *sd, const char *notice); + if (HPMHooks.count.HP_party_recruit_update_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **notice); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_recruit_update_pre[hIndex].func; - preHookFunc(sd, notice); + preHookFunc(&sd, ¬ice); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51489,9 +60104,9 @@ void HP_party_recruit_update(struct map_session_data *sd, const char *notice) { { HPMHooks.source.party.recruit_update(sd, notice); } - if( HPMHooks.count.HP_party_recruit_update_post ) { + if (HPMHooks.count.HP_party_recruit_update_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *notice); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_recruit_update_post[hIndex].func; postHookFunc(sd, notice); } @@ -51500,14 +60115,14 @@ void HP_party_recruit_update(struct map_session_data *sd, const char *notice) { } void HP_party_recruit_search(struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount) { int hIndex = 0; - if( HPMHooks.count.HP_party_recruit_search_pre ) { - void (*preHookFunc) (struct map_session_data *sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); + if (HPMHooks.count.HP_party_recruit_search_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *level, short *mapid, unsigned long *lastindex, short *resultcount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_recruit_search_pre[hIndex].func; - preHookFunc(sd, &level, &mapid, &lastindex, &resultcount); + preHookFunc(&sd, &level, &mapid, &lastindex, &resultcount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51515,11 +60130,11 @@ void HP_party_recruit_search(struct map_session_data *sd, short level, short map { HPMHooks.source.party.recruit_search(sd, level, mapid, lastindex, resultcount); } - if( HPMHooks.count.HP_party_recruit_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_recruit_search_post; hIndex++ ) { + if (HPMHooks.count.HP_party_recruit_search_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, short level, short mapid, unsigned long lastindex, short resultcount); + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_recruit_search_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_recruit_search_post[hIndex].func; - postHookFunc(sd, &level, &mapid, &lastindex, &resultcount); + postHookFunc(sd, level, mapid, lastindex, resultcount); } } return; @@ -51527,14 +60142,14 @@ void HP_party_recruit_search(struct map_session_data *sd, short level, short map bool HP_party_booking_delete(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_party_booking_delete_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_party_booking_delete_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51542,9 +60157,9 @@ bool HP_party_booking_delete(struct map_session_data *sd) { { retVal___ = HPMHooks.source.party.booking_delete(sd); } - if( HPMHooks.count.HP_party_booking_delete_post ) { + if (HPMHooks.count.HP_party_booking_delete_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_booking_delete_post; hIndex++ ) { + 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); } @@ -51554,16 +60169,16 @@ bool HP_party_booking_delete(struct map_session_data *sd) { 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___ = 0; - 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); + if (HPMHooks.count.HP_party_vforeachsamemap_pre > 0) { + int (*preHookFunc) (int ( **func ) (struct block_list *, va_list), struct map_session_data **sd, int *range, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_vforeachsamemap_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&func, &sd, &range, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51573,12 +60188,12 @@ int HP_party_vforeachsamemap(int ( *func ) (struct block_list *, va_list), struc 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++ ) { + if (HPMHooks.count.HP_party_vforeachsamemap_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, func, sd, range, ap___copy); va_end(ap___copy); } } @@ -51587,14 +60202,14 @@ int HP_party_vforeachsamemap(int ( *func ) (struct block_list *, va_list), struc int HP_party_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_send_xy_timer_pre ) { + if (HPMHooks.count.HP_party_send_xy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51602,25 +60217,25 @@ int HP_party_send_xy_timer(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_send_xy_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_party_send_xy_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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); + if (HPMHooks.count.HP_party_fill_member_pre > 0) { + void (*preHookFunc) (struct party_member **member, struct map_session_data **sd, unsigned int *leader); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_fill_member_pre; hIndex++ ) { + 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); + preHookFunc(&member, &sd, &leader); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51628,11 +60243,11 @@ void HP_party_fill_member(struct party_member *member, struct map_session_data * { 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++ ) { + if (HPMHooks.count.HP_party_fill_member_post > 0) { + 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); + postHookFunc(member, sd, leader); } } return; @@ -51640,14 +60255,14 @@ void HP_party_fill_member(struct party_member *member, struct map_session_data * struct map_session_data* HP_party_sd_check(int party_id, int account_id, int char_id) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_party_sd_check_pre ) { + if (HPMHooks.count.HP_party_sd_check_pre > 0) { struct map_session_data* (*preHookFunc) (int *party_id, int *account_id, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51655,25 +60270,25 @@ struct map_session_data* HP_party_sd_check(int party_id, int account_id, int cha { retVal___ = HPMHooks.source.party.sd_check(party_id, account_id, char_id); } - if( HPMHooks.count.HP_party_sd_check_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, int *party_id, int *account_id, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_sd_check_post; hIndex++ ) { + if (HPMHooks.count.HP_party_sd_check_post > 0) { + struct map_session_data* (*postHookFunc) (struct map_session_data* 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); + 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); + if (HPMHooks.count.HP_party_check_state_pre > 0) { + void (*preHookFunc) (struct party_data **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_party_check_state_pre[hIndex].func; - preHookFunc(p); + preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51681,9 +60296,9 @@ void HP_party_check_state(struct party_data *p) { { HPMHooks.source.party.check_state(p); } - if( HPMHooks.count.HP_party_check_state_post ) { + if (HPMHooks.count.HP_party_check_state_post > 0) { void (*postHookFunc) (struct party_data *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_party_check_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_party_check_state_post[hIndex].func; postHookFunc(p); } @@ -51693,14 +60308,14 @@ void HP_party_check_state(struct party_data *p) { 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 ) { + if (HPMHooks.count.HP_party_create_booking_data_pre > 0) { struct party_booking_ad_info* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_create_booking_data_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51708,9 +60323,9 @@ struct party_booking_ad_info* HP_party_create_booking_data(void) { { retVal___ = HPMHooks.source.party.create_booking_data(); } - if( HPMHooks.count.HP_party_create_booking_data_post ) { + if (HPMHooks.count.HP_party_create_booking_data_post > 0) { 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++ ) { + 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___); } @@ -51720,16 +60335,16 @@ struct party_booking_ad_info* HP_party_create_booking_data(void) { int HP_party_db_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_party_db_final_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_party_db_final_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51739,29 +60354,29 @@ int HP_party_db_final(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_party_db_final_post; hIndex++ ) { + if (HPMHooks.count.HP_party_db_final_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } return retVal___; } -/* path */ +/* path_interface */ int HP_path_blownpos(struct block_list *bl, int16 m, int16 x0, int16 y0, int16 dx, int16 dy, int count) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_path_blownpos_pre ) { - int (*preHookFunc) (struct block_list *bl, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); + if (HPMHooks.count.HP_path_blownpos_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_path_blownpos_pre[hIndex].func; - retVal___ = preHookFunc(bl, &m, &x0, &y0, &dx, &dy, &count); + retVal___ = preHookFunc(&bl, &m, &x0, &y0, &dx, &dy, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51769,11 +60384,11 @@ int HP_path_blownpos(struct block_list *bl, int16 m, int16 x0, int16 y0, int16 d { retVal___ = HPMHooks.source.path.blownpos(bl, m, x0, y0, dx, dy, count); } - if( HPMHooks.count.HP_path_blownpos_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, int16 *m, int16 *x0, int16 *y0, int16 *dx, int16 *dy, int *count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_blownpos_post; hIndex++ ) { + if (HPMHooks.count.HP_path_blownpos_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, 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___, bl, &m, &x0, &y0, &dx, &dy, &count); + retVal___ = postHookFunc(retVal___, bl, m, x0, y0, dx, dy, count); } } return retVal___; @@ -51781,14 +60396,14 @@ int HP_path_blownpos(struct block_list *bl, int16 m, int16 x0, int16 y0, int16 d bool HP_path_search(struct walkpath_data *wpd, struct block_list *bl, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, int flag, cell_chk cell) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_path_search_pre ) { - bool (*preHookFunc) (struct walkpath_data *wpd, struct block_list *bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); + if (HPMHooks.count.HP_path_search_pre > 0) { + bool (*preHookFunc) (struct walkpath_data **wpd, struct block_list **bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, int *flag, cell_chk *cell); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_search_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_path_search_pre[hIndex].func; - retVal___ = preHookFunc(wpd, bl, &m, &x0, &y0, &x1, &y1, &flag, &cell); + retVal___ = preHookFunc(&wpd, &bl, &m, &x0, &y0, &x1, &y1, &flag, &cell); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51796,11 +60411,11 @@ bool HP_path_search(struct walkpath_data *wpd, struct block_list *bl, int16 m, i { retVal___ = HPMHooks.source.path.search(wpd, bl, m, x0, y0, x1, y1, flag, cell); } - if( HPMHooks.count.HP_path_search_post ) { - bool (*postHookFunc) (bool retVal___, struct walkpath_data *wpd, struct block_list *bl, 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++ ) { + if (HPMHooks.count.HP_path_search_post > 0) { + bool (*postHookFunc) (bool retVal___, struct walkpath_data *wpd, struct block_list *bl, 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, bl, &m, &x0, &y0, &x1, &y1, &flag, &cell); + retVal___ = postHookFunc(retVal___, wpd, bl, m, x0, y0, x1, y1, flag, cell); } } return retVal___; @@ -51808,14 +60423,14 @@ bool HP_path_search(struct walkpath_data *wpd, struct block_list *bl, int16 m, i bool HP_path_search_long(struct shootpath_data *spd, struct block_list *bl, int16 m, int16 x0, int16 y0, int16 x1, int16 y1, cell_chk cell) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_path_search_long_pre ) { - bool (*preHookFunc) (struct shootpath_data *spd, struct block_list *bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); + if (HPMHooks.count.HP_path_search_long_pre > 0) { + bool (*preHookFunc) (struct shootpath_data **spd, struct block_list **bl, int16 *m, int16 *x0, int16 *y0, int16 *x1, int16 *y1, cell_chk *cell); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_search_long_pre; hIndex++ ) { + 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, bl, &m, &x0, &y0, &x1, &y1, &cell); + retVal___ = preHookFunc(&spd, &bl, &m, &x0, &y0, &x1, &y1, &cell); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51823,11 +60438,11 @@ bool HP_path_search_long(struct shootpath_data *spd, struct block_list *bl, int1 { retVal___ = HPMHooks.source.path.search_long(spd, bl, m, x0, y0, x1, y1, cell); } - if( HPMHooks.count.HP_path_search_long_post ) { - bool (*postHookFunc) (bool retVal___, struct shootpath_data *spd, struct block_list *bl, 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++ ) { + if (HPMHooks.count.HP_path_search_long_post > 0) { + bool (*postHookFunc) (bool retVal___, struct shootpath_data *spd, struct block_list *bl, 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, bl, &m, &x0, &y0, &x1, &y1, &cell); + retVal___ = postHookFunc(retVal___, spd, bl, m, x0, y0, x1, y1, cell); } } return retVal___; @@ -51835,14 +60450,14 @@ bool HP_path_search_long(struct shootpath_data *spd, struct block_list *bl, int1 bool HP_path_check_distance(int dx, int dy, int distance) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_path_check_distance_pre ) { + if (HPMHooks.count.HP_path_check_distance_pre > 0) { bool (*preHookFunc) (int *dx, int *dy, int *distance); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51850,11 +60465,11 @@ bool HP_path_check_distance(int dx, int dy, int distance) { { retVal___ = HPMHooks.source.path.check_distance(dx, dy, distance); } - if( HPMHooks.count.HP_path_check_distance_post ) { - bool (*postHookFunc) (bool retVal___, int *dx, int *dy, int *distance); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_post; hIndex++ ) { + if (HPMHooks.count.HP_path_check_distance_post > 0) { + bool (*postHookFunc) (bool 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); + retVal___ = postHookFunc(retVal___, dx, dy, distance); } } return retVal___; @@ -51862,14 +60477,14 @@ bool HP_path_check_distance(int dx, int dy, int distance) { unsigned int HP_path_distance(int dx, int dy) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_path_distance_pre ) { + if (HPMHooks.count.HP_path_distance_pre > 0) { unsigned int (*preHookFunc) (int *dx, int *dy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51877,11 +60492,11 @@ unsigned int HP_path_distance(int dx, int dy) { { 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++ ) { + if (HPMHooks.count.HP_path_distance_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, dx, dy); } } return retVal___; @@ -51889,14 +60504,14 @@ unsigned int HP_path_distance(int dx, int dy) { bool HP_path_check_distance_client(int dx, int dy, int distance) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_path_check_distance_client_pre ) { + if (HPMHooks.count.HP_path_check_distance_client_pre > 0) { bool (*preHookFunc) (int *dx, int *dy, int *distance); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_path_check_distance_client_pre[hIndex].func; retVal___ = preHookFunc(&dx, &dy, &distance); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51904,11 +60519,11 @@ bool HP_path_check_distance_client(int dx, int dy, int distance) { { retVal___ = HPMHooks.source.path.check_distance_client(dx, dy, distance); } - if( HPMHooks.count.HP_path_check_distance_client_post ) { - bool (*postHookFunc) (bool retVal___, int *dx, int *dy, int *distance); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_post; hIndex++ ) { + if (HPMHooks.count.HP_path_check_distance_client_post > 0) { + bool (*postHookFunc) (bool retVal___, int dx, int dy, int distance); + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_check_distance_client_post; hIndex++) { postHookFunc = HPMHooks.list.HP_path_check_distance_client_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &dx, &dy, &distance); + retVal___ = postHookFunc(retVal___, dx, dy, distance); } } return retVal___; @@ -51916,14 +60531,14 @@ bool HP_path_check_distance_client(int dx, int dy, int distance) { int HP_path_distance_client(int dx, int dy) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_path_distance_client_pre ) { + if (HPMHooks.count.HP_path_distance_client_pre > 0) { int (*preHookFunc) (int *dx, int *dy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_path_distance_client_pre[hIndex].func; retVal___ = preHookFunc(&dx, &dy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -51931,26 +60546,26 @@ int HP_path_distance_client(int dx, int dy) { { retVal___ = HPMHooks.source.path.distance_client(dx, dy); } - if( HPMHooks.count.HP_path_distance_client_post ) { - int (*postHookFunc) (int retVal___, int *dx, int *dy); - for(hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_post; hIndex++ ) { + if (HPMHooks.count.HP_path_distance_client_post > 0) { + int (*postHookFunc) (int retVal___, int dx, int dy); + for (hIndex = 0; hIndex < HPMHooks.count.HP_path_distance_client_post; hIndex++) { postHookFunc = HPMHooks.list.HP_path_distance_client_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &dx, &dy); + retVal___ = postHookFunc(retVal___, dx, dy); } } return retVal___; } -/* pcg */ +/* pc_groups_interface */ void HP_pcg_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_pcg_init_pre ) { + if (HPMHooks.count.HP_pcg_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51958,9 +60573,9 @@ void HP_pcg_init(void) { { HPMHooks.source.pcg.init(); } - if( HPMHooks.count.HP_pcg_init_post ) { + if (HPMHooks.count.HP_pcg_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_init_post[hIndex].func; postHookFunc(); } @@ -51969,14 +60584,14 @@ void HP_pcg_init(void) { } void HP_pcg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_pcg_final_pre ) { + if (HPMHooks.count.HP_pcg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -51984,9 +60599,9 @@ void HP_pcg_final(void) { { HPMHooks.source.pcg.final(); } - if( HPMHooks.count.HP_pcg_final_post ) { + if (HPMHooks.count.HP_pcg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_final_post[hIndex].func; postHookFunc(); } @@ -51995,14 +60610,14 @@ void HP_pcg_final(void) { } void HP_pcg_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_pcg_reload_pre ) { + if (HPMHooks.count.HP_pcg_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52010,9 +60625,9 @@ void HP_pcg_reload(void) { { HPMHooks.source.pcg.reload(); } - if( HPMHooks.count.HP_pcg_reload_post ) { + if (HPMHooks.count.HP_pcg_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_reload_post[hIndex].func; postHookFunc(); } @@ -52022,14 +60637,14 @@ void HP_pcg_reload(void) { GroupSettings* HP_pcg_get_dummy_group(void) { int hIndex = 0; GroupSettings* retVal___ = NULL; - if( HPMHooks.count.HP_pcg_get_dummy_group_pre ) { + if (HPMHooks.count.HP_pcg_get_dummy_group_pre > 0) { GroupSettings* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_get_dummy_group_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52037,9 +60652,9 @@ GroupSettings* HP_pcg_get_dummy_group(void) { { retVal___ = HPMHooks.source.pcg.get_dummy_group(); } - if( HPMHooks.count.HP_pcg_get_dummy_group_post ) { + if (HPMHooks.count.HP_pcg_get_dummy_group_post > 0) { GroupSettings* (*postHookFunc) (GroupSettings* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_dummy_group_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_get_dummy_group_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -52049,14 +60664,14 @@ GroupSettings* HP_pcg_get_dummy_group(void) { bool HP_pcg_exists(int group_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pcg_exists_pre ) { + if (HPMHooks.count.HP_pcg_exists_pre > 0) { bool (*preHookFunc) (int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_exists_pre[hIndex].func; retVal___ = preHookFunc(&group_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52064,11 +60679,11 @@ bool HP_pcg_exists(int group_id) { { retVal___ = HPMHooks.source.pcg.exists(group_id); } - if( HPMHooks.count.HP_pcg_exists_post ) { - bool (*postHookFunc) (bool retVal___, int *group_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_post; hIndex++ ) { + if (HPMHooks.count.HP_pcg_exists_post > 0) { + bool (*postHookFunc) (bool retVal___, int group_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_exists_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_exists_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &group_id); + retVal___ = postHookFunc(retVal___, group_id); } } return retVal___; @@ -52076,14 +60691,14 @@ bool HP_pcg_exists(int group_id) { GroupSettings* HP_pcg_id2group(int group_id) { int hIndex = 0; GroupSettings* retVal___ = NULL; - if( HPMHooks.count.HP_pcg_id2group_pre ) { + if (HPMHooks.count.HP_pcg_id2group_pre > 0) { GroupSettings* (*preHookFunc) (int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_id2group_pre[hIndex].func; retVal___ = preHookFunc(&group_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52091,11 +60706,11 @@ GroupSettings* HP_pcg_id2group(int group_id) { { retVal___ = HPMHooks.source.pcg.id2group(group_id); } - if( HPMHooks.count.HP_pcg_id2group_post ) { - GroupSettings* (*postHookFunc) (GroupSettings* retVal___, int *group_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_post; hIndex++ ) { + if (HPMHooks.count.HP_pcg_id2group_post > 0) { + GroupSettings* (*postHookFunc) (GroupSettings* retVal___, int group_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_id2group_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_id2group_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &group_id); + retVal___ = postHookFunc(retVal___, group_id); } } return retVal___; @@ -52103,14 +60718,14 @@ GroupSettings* HP_pcg_id2group(int group_id) { bool HP_pcg_has_permission(GroupSettings *group, unsigned int permission) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pcg_has_permission_pre ) { - bool (*preHookFunc) (GroupSettings *group, unsigned int *permission); + if (HPMHooks.count.HP_pcg_has_permission_pre > 0) { + bool (*preHookFunc) (GroupSettings **group, unsigned int *permission); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_has_permission_pre[hIndex].func; - retVal___ = preHookFunc(group, &permission); + retVal___ = preHookFunc(&group, &permission); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52118,11 +60733,11 @@ bool HP_pcg_has_permission(GroupSettings *group, unsigned int permission) { { retVal___ = HPMHooks.source.pcg.has_permission(group, permission); } - if( HPMHooks.count.HP_pcg_has_permission_post ) { - bool (*postHookFunc) (bool retVal___, GroupSettings *group, unsigned int *permission); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_post; hIndex++ ) { + if (HPMHooks.count.HP_pcg_has_permission_post > 0) { + bool (*postHookFunc) (bool retVal___, GroupSettings *group, unsigned int permission); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_has_permission_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_has_permission_post[hIndex].func; - retVal___ = postHookFunc(retVal___, group, &permission); + retVal___ = postHookFunc(retVal___, group, permission); } } return retVal___; @@ -52130,14 +60745,14 @@ bool HP_pcg_has_permission(GroupSettings *group, unsigned int permission) { bool HP_pcg_should_log_commands(GroupSettings *group) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pcg_should_log_commands_pre ) { - bool (*preHookFunc) (GroupSettings *group); + if (HPMHooks.count.HP_pcg_should_log_commands_pre > 0) { + bool (*preHookFunc) (GroupSettings **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_should_log_commands_pre[hIndex].func; - retVal___ = preHookFunc(group); + retVal___ = preHookFunc(&group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52145,9 +60760,9 @@ bool HP_pcg_should_log_commands(GroupSettings *group) { { retVal___ = HPMHooks.source.pcg.should_log_commands(group); } - if( HPMHooks.count.HP_pcg_should_log_commands_post ) { + if (HPMHooks.count.HP_pcg_should_log_commands_post > 0) { bool (*postHookFunc) (bool retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_should_log_commands_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_should_log_commands_post[hIndex].func; retVal___ = postHookFunc(retVal___, group); } @@ -52157,14 +60772,14 @@ bool HP_pcg_should_log_commands(GroupSettings *group) { const char* HP_pcg_get_name(GroupSettings *group) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_pcg_get_name_pre ) { - const char* (*preHookFunc) (GroupSettings *group); + if (HPMHooks.count.HP_pcg_get_name_pre > 0) { + const char* (*preHookFunc) (GroupSettings **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_get_name_pre[hIndex].func; - retVal___ = preHookFunc(group); + retVal___ = preHookFunc(&group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52172,9 +60787,9 @@ const char* HP_pcg_get_name(GroupSettings *group) { { retVal___ = HPMHooks.source.pcg.get_name(group); } - if( HPMHooks.count.HP_pcg_get_name_post ) { + if (HPMHooks.count.HP_pcg_get_name_post > 0) { const char* (*postHookFunc) (const char* retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_get_name_post[hIndex].func; retVal___ = postHookFunc(retVal___, group); } @@ -52184,14 +60799,14 @@ const char* HP_pcg_get_name(GroupSettings *group) { int HP_pcg_get_level(GroupSettings *group) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pcg_get_level_pre ) { - int (*preHookFunc) (GroupSettings *group); + if (HPMHooks.count.HP_pcg_get_level_pre > 0) { + int (*preHookFunc) (GroupSettings **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_get_level_pre[hIndex].func; - retVal___ = preHookFunc(group); + retVal___ = preHookFunc(&group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52199,9 +60814,9 @@ int HP_pcg_get_level(GroupSettings *group) { { retVal___ = HPMHooks.source.pcg.get_level(group); } - if( HPMHooks.count.HP_pcg_get_level_post ) { + if (HPMHooks.count.HP_pcg_get_level_post > 0) { int (*postHookFunc) (int retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_level_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_get_level_post[hIndex].func; retVal___ = postHookFunc(retVal___, group); } @@ -52211,14 +60826,14 @@ int HP_pcg_get_level(GroupSettings *group) { int HP_pcg_get_idx(GroupSettings *group) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pcg_get_idx_pre ) { - int (*preHookFunc) (GroupSettings *group); + if (HPMHooks.count.HP_pcg_get_idx_pre > 0) { + int (*preHookFunc) (GroupSettings **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pcg_get_idx_pre[hIndex].func; - retVal___ = preHookFunc(group); + retVal___ = preHookFunc(&group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52226,26 +60841,26 @@ int HP_pcg_get_idx(GroupSettings *group) { { retVal___ = HPMHooks.source.pcg.get_idx(group); } - if( HPMHooks.count.HP_pcg_get_idx_post ) { + if (HPMHooks.count.HP_pcg_get_idx_post > 0) { int (*postHookFunc) (int retVal___, GroupSettings *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pcg_get_idx_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pcg_get_idx_post[hIndex].func; retVal___ = postHookFunc(retVal___, group); } } return retVal___; } -/* pc */ +/* pc_interface */ void HP_pc_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_pc_init_pre ) { + if (HPMHooks.count.HP_pc_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52253,25 +60868,25 @@ void HP_pc_init(bool minimal) { { HPMHooks.source.pc.init(minimal); } - if( HPMHooks.count.HP_pc_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_pc_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_pc_final_pre ) { + if (HPMHooks.count.HP_pc_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52279,9 +60894,9 @@ void HP_pc_final(void) { { HPMHooks.source.pc.final(); } - if( HPMHooks.count.HP_pc_final_post ) { + if (HPMHooks.count.HP_pc_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_final_post[hIndex].func; postHookFunc(); } @@ -52291,14 +60906,14 @@ void HP_pc_final(void) { 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 ) { + if (HPMHooks.count.HP_pc_get_dummy_sd_pre > 0) { struct map_session_data* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52306,38 +60921,38 @@ struct map_session_data* HP_pc_get_dummy_sd(void) { { retVal___ = HPMHooks.source.pc.get_dummy_sd(); } - if( HPMHooks.count.HP_pc_get_dummy_sd_post ) { + if (HPMHooks.count.HP_pc_get_dummy_sd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_dummy_sd_post; hIndex++ ) { + 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 HP_pc_class2idx(int class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_class2idx_pre ) { - int (*preHookFunc) (int *class_); + if (HPMHooks.count.HP_pc_class2idx_pre > 0) { + int (*preHookFunc) (int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_class2idx_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_class2idx_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + retVal___ = preHookFunc(&class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.class2idx(class_); + 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++ ) { + if (HPMHooks.count.HP_pc_class2idx_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; @@ -52345,14 +60960,14 @@ int HP_pc_class2idx(int class_) { bool HP_pc_can_talk(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_talk_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_can_talk_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_can_talk_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52360,9 +60975,9 @@ bool HP_pc_can_talk(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.can_talk(sd); } - if( HPMHooks.count.HP_pc_can_talk_post ) { + if (HPMHooks.count.HP_pc_can_talk_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_talk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_can_talk_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -52372,14 +60987,14 @@ bool HP_pc_can_talk(struct map_session_data *sd) { bool HP_pc_can_attack(struct map_session_data *sd, int target_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_attack_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *target_id); + if (HPMHooks.count.HP_pc_can_attack_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_can_attack_pre[hIndex].func; - retVal___ = preHookFunc(sd, &target_id); + retVal___ = preHookFunc(&sd, &target_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52387,11 +61002,11 @@ bool HP_pc_can_attack(struct map_session_data *sd, int target_id) { { retVal___ = HPMHooks.source.pc.can_attack(sd, target_id); } - if( HPMHooks.count.HP_pc_can_attack_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *target_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_can_attack_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int target_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_attack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_can_attack_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &target_id); + retVal___ = postHookFunc(retVal___, sd, target_id); } } return retVal___; @@ -52399,14 +61014,14 @@ bool HP_pc_can_attack(struct map_session_data *sd, int target_id) { bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_use_command_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const char *command); + if (HPMHooks.count.HP_pc_can_use_command_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const char **command); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_use_command_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &command); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52414,9 +61029,9 @@ bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { { retVal___ = HPMHooks.source.pc.can_use_command(sd, command); } - if( HPMHooks.count.HP_pc_can_use_command_post ) { + if (HPMHooks.count.HP_pc_can_use_command_post > 0) { 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++ ) { + 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); } @@ -52426,14 +61041,14 @@ bool HP_pc_can_use_command(struct map_session_data *sd, const char *command) { int HP_pc_set_group(struct map_session_data *sd, int group_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_set_group_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *group_id); + if (HPMHooks.count.HP_pc_set_group_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_group_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &group_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52441,11 +61056,11 @@ int HP_pc_set_group(struct map_session_data *sd, int group_id) { { 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++ ) { + if (HPMHooks.count.HP_pc_set_group_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, group_id); } } return retVal___; @@ -52453,14 +61068,14 @@ int HP_pc_set_group(struct map_session_data *sd, int group_id) { bool HP_pc_should_log_commands(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_should_log_commands_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_should_log_commands_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52468,9 +61083,9 @@ bool HP_pc_should_log_commands(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.should_log_commands(sd); } - if( HPMHooks.count.HP_pc_should_log_commands_post ) { + if (HPMHooks.count.HP_pc_should_log_commands_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_should_log_commands_post; hIndex++ ) { + 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); } @@ -52480,14 +61095,14 @@ bool HP_pc_should_log_commands(struct map_session_data *sd) { int HP_pc_setrestartvalue(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setrestartvalue_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if (HPMHooks.count.HP_pc_setrestartvalue_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setrestartvalue_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setrestartvalue_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52495,11 +61110,11 @@ int HP_pc_setrestartvalue(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_pc_setrestartvalue_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type); } } return retVal___; @@ -52507,14 +61122,14 @@ int HP_pc_setrestartvalue(struct map_session_data *sd, int type) { int HP_pc_makesavestatus(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_makesavestatus_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_makesavestatus_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_makesavestatus_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52522,25 +61137,25 @@ int HP_pc_makesavestatus(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.makesavestatus(sd); } - if( HPMHooks.count.HP_pc_makesavestatus_post ) { + if (HPMHooks.count.HP_pc_makesavestatus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_makesavestatus_post; hIndex++ ) { + 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) { +void HP_pc_respawn(struct map_session_data *sd, enum clr_type clrtype) { int hIndex = 0; - if( HPMHooks.count.HP_pc_respawn_pre ) { - void (*preHookFunc) (struct map_session_data *sd, clr_type *clrtype); + if (HPMHooks.count.HP_pc_respawn_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum clr_type *clrtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_respawn_pre[hIndex].func; - preHookFunc(sd, &clrtype); + preHookFunc(&sd, &clrtype); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52548,11 +61163,11 @@ void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) { { 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++ ) { + if (HPMHooks.count.HP_pc_respawn_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum 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); + postHookFunc(sd, clrtype); } } return; @@ -52560,14 +61175,14 @@ void HP_pc_respawn(struct map_session_data *sd, clr_type clrtype) { 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___ = 0; - 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); + if (HPMHooks.count.HP_pc_setnewpc_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *account_id, int *char_id, int *login_id1, unsigned int *client_tick, int *sex, int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setnewpc_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &account_id, &char_id, &login_id1, &client_tick, &sex, &fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52575,11 +61190,11 @@ int HP_pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int { 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++ ) { + if (HPMHooks.count.HP_pc_setnewpc_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, account_id, char_id, login_id1, client_tick, sex, fd); } } return retVal___; @@ -52587,14 +61202,14 @@ int HP_pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, const struct mmo_charstatus *st, bool changing_mapservers) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_authok_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *login_id2, time_t *expiration_time, int *group_id, const struct mmo_charstatus *st, bool *changing_mapservers); + if (HPMHooks.count.HP_pc_authok_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *login_id2, time_t *expiration_time, int *group_id, const struct mmo_charstatus **st, bool *changing_mapservers); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &login_id2, &expiration_time, &group_id, &st, &changing_mapservers); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52602,25 +61217,25 @@ bool HP_pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_ { 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, const struct mmo_charstatus *st, bool *changing_mapservers); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authok_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_authok_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, const 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); + 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); + if (HPMHooks.count.HP_pc_authfail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_authfail_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -52628,9 +61243,9 @@ void HP_pc_authfail(struct map_session_data *sd) { { HPMHooks.source.pc.authfail(sd); } - if( HPMHooks.count.HP_pc_authfail_post ) { + if (HPMHooks.count.HP_pc_authfail_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_authfail_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_authfail_post[hIndex].func; postHookFunc(sd); } @@ -52640,14 +61255,14 @@ void HP_pc_authfail(struct map_session_data *sd) { int HP_pc_reg_received(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_reg_received_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_reg_received_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52655,9 +61270,9 @@ int HP_pc_reg_received(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.reg_received(sd); } - if( HPMHooks.count.HP_pc_reg_received_post ) { + if (HPMHooks.count.HP_pc_reg_received_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_reg_received_post; hIndex++ ) { + 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); } @@ -52667,14 +61282,14 @@ int HP_pc_reg_received(struct map_session_data *sd) { int HP_pc_isequip(struct map_session_data *sd, int n) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_isequip_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n); + if (HPMHooks.count.HP_pc_isequip_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_isequip_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n); + retVal___ = preHookFunc(&sd, &n); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52682,11 +61297,11 @@ int HP_pc_isequip(struct map_session_data *sd, int n) { { 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++ ) { + if (HPMHooks.count.HP_pc_isequip_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, n); } } return retVal___; @@ -52694,14 +61309,14 @@ int HP_pc_isequip(struct map_session_data *sd, int n) { int HP_pc_equippoint(struct map_session_data *sd, int n) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_equippoint_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n); + if (HPMHooks.count.HP_pc_equippoint_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_equippoint_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_equippoint_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n); + retVal___ = preHookFunc(&sd, &n); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52709,11 +61324,38 @@ int HP_pc_equippoint(struct map_session_data *sd, int n) { { 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++ ) { + if (HPMHooks.count.HP_pc_equippoint_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, n); + } + } + return retVal___; +} +int HP_pc_item_equippoint(struct map_session_data *sd, struct item_data *id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_item_equippoint_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct item_data **id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_item_equippoint_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_item_equippoint_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.item_equippoint(sd, id); + } + if (HPMHooks.count.HP_pc_item_equippoint_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_item_equippoint_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_item_equippoint_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, id); } } return retVal___; @@ -52721,14 +61363,14 @@ int HP_pc_equippoint(struct map_session_data *sd, int n) { int HP_pc_setinventorydata(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setinventorydata_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_setinventorydata_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setinventorydata_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52736,9 +61378,9 @@ int HP_pc_setinventorydata(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.setinventorydata(sd); } - if( HPMHooks.count.HP_pc_setinventorydata_post ) { + if (HPMHooks.count.HP_pc_setinventorydata_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinventorydata_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setinventorydata_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -52748,14 +61390,14 @@ int HP_pc_setinventorydata(struct map_session_data *sd) { int HP_pc_checkskill(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkskill_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if (HPMHooks.count.HP_pc_checkskill_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52763,11 +61405,11 @@ int HP_pc_checkskill(struct map_session_data *sd, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_pc_checkskill_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id); } } return retVal___; @@ -52775,14 +61417,14 @@ int HP_pc_checkskill(struct map_session_data *sd, uint16 skill_id) { int HP_pc_checkskill2(struct map_session_data *sd, uint16 index) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkskill2_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *index); + if (HPMHooks.count.HP_pc_checkskill2_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkskill2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_checkskill2_pre[hIndex].func; - retVal___ = preHookFunc(sd, &index); + retVal___ = preHookFunc(&sd, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52790,11 +61432,11 @@ int HP_pc_checkskill2(struct map_session_data *sd, uint16 index) { { 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++ ) { + if (HPMHooks.count.HP_pc_checkskill2_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, index); } } return retVal___; @@ -52802,14 +61444,14 @@ int HP_pc_checkskill2(struct map_session_data *sd, uint16 index) { int HP_pc_checkallowskill(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkallowskill_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_checkallowskill_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_checkallowskill_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52817,9 +61459,9 @@ int HP_pc_checkallowskill(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.checkallowskill(sd); } - if( HPMHooks.count.HP_pc_checkallowskill_post ) { + if (HPMHooks.count.HP_pc_checkallowskill_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkallowskill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_checkallowskill_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -52829,14 +61471,14 @@ int HP_pc_checkallowskill(struct map_session_data *sd) { int HP_pc_checkequip(struct map_session_data *sd, int pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkequip_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *pos); + if (HPMHooks.count.HP_pc_checkequip_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkequip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_checkequip_pre[hIndex].func; - retVal___ = preHookFunc(sd, &pos); + retVal___ = preHookFunc(&sd, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52844,11 +61486,11 @@ int HP_pc_checkequip(struct map_session_data *sd, int pos) { { 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++ ) { + if (HPMHooks.count.HP_pc_checkequip_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, pos); } } return retVal___; @@ -52856,14 +61498,14 @@ int HP_pc_checkequip(struct map_session_data *sd, int pos) { int HP_pc_calc_skilltree(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_skilltree_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_calc_skilltree_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52871,26 +61513,78 @@ int HP_pc_calc_skilltree(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.calc_skilltree(sd); } - if( HPMHooks.count.HP_pc_calc_skilltree_post ) { + if (HPMHooks.count.HP_pc_calc_skilltree_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_post; hIndex++ ) { + 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___; } +void HP_pc_calc_skilltree_clear(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_calc_skilltree_clear_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_clear_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.calc_skilltree_clear(sd); + } + if (HPMHooks.count.HP_pc_calc_skilltree_clear_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_clear_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_pc_calc_skilltree_bonus(struct map_session_data *sd, int classidx) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_calc_skilltree_bonus_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *classidx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_bonus_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_calc_skilltree_bonus_pre[hIndex].func; + preHookFunc(&sd, &classidx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.calc_skilltree_bonus(sd, classidx); + } + if (HPMHooks.count.HP_pc_calc_skilltree_bonus_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int classidx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_bonus_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_calc_skilltree_bonus_post[hIndex].func; + postHookFunc(sd, classidx); + } + } + return; +} int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52898,9 +61592,9 @@ int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.calc_skilltree_normalize_job(sd); } - if( HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post ) { + if (HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skilltree_normalize_job_post; hIndex++ ) { + 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); } @@ -52910,14 +61604,14 @@ int HP_pc_calc_skilltree_normalize_job(struct map_session_data *sd) { int HP_pc_clean_skilltree(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_clean_skilltree_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_clean_skilltree_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52925,26 +61619,26 @@ int HP_pc_clean_skilltree(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.clean_skilltree(sd); } - if( HPMHooks.count.HP_pc_clean_skilltree_post ) { + if (HPMHooks.count.HP_pc_clean_skilltree_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clean_skilltree_post; hIndex++ ) { + 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 map_index, int x, int y, clr_type clrtype) { +int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, int y, enum clr_type clrtype) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setpos_pre ) { - int (*preHookFunc) (struct map_session_data *sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype); + if (HPMHooks.count.HP_pc_setpos_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, unsigned short *map_index, int *x, int *y, enum clr_type *clrtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setpos_pre[hIndex].func; - retVal___ = preHookFunc(sd, &map_index, &x, &y, &clrtype); + retVal___ = preHookFunc(&sd, &map_index, &x, &y, &clrtype); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52952,11 +61646,11 @@ int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, i { retVal___ = HPMHooks.source.pc.setpos(sd, map_index, x, y, clrtype); } - if( HPMHooks.count.HP_pc_setpos_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short *map_index, int *x, int *y, clr_type *clrtype); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setpos_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_setpos_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, unsigned short map_index, int x, int y, enum 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, &map_index, &x, &y, &clrtype); + retVal___ = postHookFunc(retVal___, sd, map_index, x, y, clrtype); } } return retVal___; @@ -52964,14 +61658,14 @@ int HP_pc_setpos(struct map_session_data *sd, unsigned short map_index, int x, i int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int y) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setsavepoint_pre ) { - int (*preHookFunc) (struct map_session_data *sd, short *map_index, int *x, int *y); + if (HPMHooks.count.HP_pc_setsavepoint_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, short *map_index, int *x, int *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setsavepoint_pre[hIndex].func; - retVal___ = preHookFunc(sd, &map_index, &x, &y); + retVal___ = preHookFunc(&sd, &map_index, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -52979,26 +61673,26 @@ int HP_pc_setsavepoint(struct map_session_data *sd, short map_index, int x, int { retVal___ = HPMHooks.source.pc.setsavepoint(sd, map_index, x, y); } - if( HPMHooks.count.HP_pc_setsavepoint_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, short *map_index, int *x, int *y); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setsavepoint_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_setsavepoint_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, short map_index, 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, &map_index, &x, &y); + retVal___ = postHookFunc(retVal___, sd, map_index, x, y); } } return retVal___; } -int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { +int HP_pc_randomwarp(struct map_session_data *sd, enum clr_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_randomwarp_pre ) { - int (*preHookFunc) (struct map_session_data *sd, clr_type *type); + if (HPMHooks.count.HP_pc_randomwarp_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, enum clr_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_randomwarp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_randomwarp_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53006,11 +61700,11 @@ int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { { 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++ ) { + if (HPMHooks.count.HP_pc_randomwarp_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum 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); + retVal___ = postHookFunc(retVal___, sd, type); } } return retVal___; @@ -53018,14 +61712,14 @@ int HP_pc_randomwarp(struct map_session_data *sd, clr_type type) { int HP_pc_memo(struct map_session_data *sd, int pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_memo_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *pos); + if (HPMHooks.count.HP_pc_memo_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_memo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_memo_pre[hIndex].func; - retVal___ = preHookFunc(sd, &pos); + retVal___ = preHookFunc(&sd, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53033,11 +61727,11 @@ int HP_pc_memo(struct map_session_data *sd, int pos) { { 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++ ) { + if (HPMHooks.count.HP_pc_memo_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, pos); } } return retVal___; @@ -53045,14 +61739,14 @@ int HP_pc_memo(struct map_session_data *sd, int pos) { int HP_pc_checkadditem(struct map_session_data *sd, int nameid, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkadditem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *amount); + if (HPMHooks.count.HP_pc_checkadditem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *nameid, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkadditem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &nameid, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53060,11 +61754,11 @@ int HP_pc_checkadditem(struct map_session_data *sd, int nameid, int amount) { { 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++ ) { + if (HPMHooks.count.HP_pc_checkadditem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, nameid, amount); } } return retVal___; @@ -53072,14 +61766,14 @@ int HP_pc_checkadditem(struct map_session_data *sd, int nameid, int amount) { int HP_pc_inventoryblank(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_inventoryblank_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_inventoryblank_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_inventoryblank_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53087,9 +61781,9 @@ int HP_pc_inventoryblank(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.inventoryblank(sd); } - if( HPMHooks.count.HP_pc_inventoryblank_post ) { + if (HPMHooks.count.HP_pc_inventoryblank_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventoryblank_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_inventoryblank_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -53099,14 +61793,14 @@ int HP_pc_inventoryblank(struct map_session_data *sd) { int HP_pc_search_inventory(struct map_session_data *sd, int item_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_search_inventory_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *item_id); + if (HPMHooks.count.HP_pc_search_inventory_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *item_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_search_inventory_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &item_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53114,11 +61808,11 @@ int HP_pc_search_inventory(struct map_session_data *sd, int item_id) { { 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++ ) { + if (HPMHooks.count.HP_pc_search_inventory_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, item_id); } } return retVal___; @@ -53126,14 +61820,14 @@ int HP_pc_search_inventory(struct map_session_data *sd, int item_id) { 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___ = 0; - 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); + if (HPMHooks.count.HP_pc_payzeny_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *zeny, enum e_log_pick_type *type, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_payzeny_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &zeny, &type, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53141,26 +61835,26 @@ int HP_pc_payzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty { 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++ ) { + if (HPMHooks.count.HP_pc_payzeny_post > 0) { + 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); + 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 HP_pc_additem(struct map_session_data *sd, const struct item *item_data, int amount, e_log_pick_type log_type) { int hIndex = 0; int retVal___ = 0; - 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); + if (HPMHooks.count.HP_pc_additem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const struct item **item_data, int *amount, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_additem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &item_data, &amount, &log_type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53168,11 +61862,11 @@ int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amoun { 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++ ) { + if (HPMHooks.count.HP_pc_additem_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const 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); + retVal___ = postHookFunc(retVal___, sd, item_data, amount, log_type); } } return retVal___; @@ -53180,14 +61874,14 @@ int HP_pc_additem(struct map_session_data *sd, struct item *item_data, int amoun 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___ = 0; - 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); + if (HPMHooks.count.HP_pc_getzeny_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *zeny, enum e_log_pick_type *type, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getzeny_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &zeny, &type, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53195,11 +61889,11 @@ int HP_pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty { 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++ ) { + if (HPMHooks.count.HP_pc_getzeny_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, zeny, type, tsd); } } return retVal___; @@ -53207,14 +61901,14 @@ int HP_pc_getzeny(struct map_session_data *sd, int zeny, enum e_log_pick_type ty 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___ = 0; - 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); + if (HPMHooks.count.HP_pc_delitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *n, int *amount, int *type, short *reason, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delitem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &n, &amount, &type, &reason, &log_type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53222,11 +61916,11 @@ int HP_pc_delitem(struct map_session_data *sd, int n, int amount, int type, shor { 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++ ) { + if (HPMHooks.count.HP_pc_delitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, n, amount, type, reason, log_type); } } return retVal___; @@ -53234,14 +61928,14 @@ int HP_pc_delitem(struct map_session_data *sd, int n, int amount, int type, shor int HP_pc_paycash(struct map_session_data *sd, int price, int points) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_paycash_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *price, int *points); + if (HPMHooks.count.HP_pc_paycash_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *price, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_paycash_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &price, &points); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53249,11 +61943,11 @@ int HP_pc_paycash(struct map_session_data *sd, int price, int points) { { 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++ ) { + if (HPMHooks.count.HP_pc_paycash_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, price, points); } } return retVal___; @@ -53261,14 +61955,14 @@ int HP_pc_paycash(struct map_session_data *sd, int price, int points) { int HP_pc_getcash(struct map_session_data *sd, int cash, int points) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_getcash_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *cash, int *points); + if (HPMHooks.count.HP_pc_getcash_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *cash, int *points); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getcash_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &cash, &points); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53276,11 +61970,11 @@ int HP_pc_getcash(struct map_session_data *sd, int cash, int points) { { 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++ ) { + if (HPMHooks.count.HP_pc_getcash_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, cash, points); } } return retVal___; @@ -53288,14 +61982,14 @@ int HP_pc_getcash(struct map_session_data *sd, int cash, int points) { 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___ = 0; - 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); + if (HPMHooks.count.HP_pc_cart_additem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct item **item_data, int *amount, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_additem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &item_data, &amount, &log_type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53303,11 +61997,11 @@ int HP_pc_cart_additem(struct map_session_data *sd, struct item *item_data, int { 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++ ) { + if (HPMHooks.count.HP_pc_cart_additem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, item_data, amount, log_type); } } return retVal___; @@ -53315,14 +62009,14 @@ int HP_pc_cart_additem(struct map_session_data *sd, struct item *item_data, int 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___ = 0; - 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); + if (HPMHooks.count.HP_pc_cart_delitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *n, int *amount, int *type, e_log_pick_type *log_type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cart_delitem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &n, &amount, &type, &log_type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53330,11 +62024,11 @@ int HP_pc_cart_delitem(struct map_session_data *sd, int n, int amount, int type, { 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++ ) { + if (HPMHooks.count.HP_pc_cart_delitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, n, amount, type, log_type); } } return retVal___; @@ -53342,14 +62036,14 @@ int HP_pc_cart_delitem(struct map_session_data *sd, int n, int amount, int type, int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_putitemtocart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + if (HPMHooks.count.HP_pc_putitemtocart_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *idx, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_putitemtocart_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &idx, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53357,11 +62051,11 @@ int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) { { 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++ ) { + if (HPMHooks.count.HP_pc_putitemtocart_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, idx, amount); } } return retVal___; @@ -53369,14 +62063,14 @@ int HP_pc_putitemtocart(struct map_session_data *sd, int idx, int amount) { int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_getitemfromcart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + if (HPMHooks.count.HP_pc_getitemfromcart_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *idx, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getitemfromcart_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &idx, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53384,11 +62078,11 @@ int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) { { 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++ ) { + if (HPMHooks.count.HP_pc_getitemfromcart_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, idx, amount); } } return retVal___; @@ -53396,14 +62090,14 @@ int HP_pc_getitemfromcart(struct map_session_data *sd, int idx, int amount) { int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_cartitem_amount_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *idx, int *amount); + if (HPMHooks.count.HP_pc_cartitem_amount_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *idx, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cartitem_amount_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &idx, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53411,11 +62105,11 @@ int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) { { 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++ ) { + if (HPMHooks.count.HP_pc_cartitem_amount_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, idx, amount); } } return retVal___; @@ -53423,14 +62117,14 @@ int HP_pc_cartitem_amount(struct map_session_data *sd, int idx, int amount) { int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_takeitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct flooritem_data *fitem); + if (HPMHooks.count.HP_pc_takeitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct flooritem_data **fitem); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_takeitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, fitem); + retVal___ = preHookFunc(&sd, &fitem); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53438,9 +62132,9 @@ int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) { { retVal___ = HPMHooks.source.pc.takeitem(sd, fitem); } - if( HPMHooks.count.HP_pc_takeitem_post ) { + if (HPMHooks.count.HP_pc_takeitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct flooritem_data *fitem); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_takeitem_post; hIndex++ ) { + 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); } @@ -53450,14 +62144,14 @@ int HP_pc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem) { int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_dropitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount); + if (HPMHooks.count.HP_pc_dropitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dropitem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &n, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53465,11 +62159,11 @@ int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) { { 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++ ) { + if (HPMHooks.count.HP_pc_dropitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, n, amount); } } return retVal___; @@ -53477,14 +62171,14 @@ int HP_pc_dropitem(struct map_session_data *sd, int n, int amount) { bool HP_pc_isequipped(struct map_session_data *sd, int nameid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_isequipped_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *nameid); + if (HPMHooks.count.HP_pc_isequipped_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_isequipped_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_isequipped_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + retVal___ = preHookFunc(&sd, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53492,11 +62186,11 @@ bool HP_pc_isequipped(struct map_session_data *sd, int nameid) { { 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++ ) { + if (HPMHooks.count.HP_pc_isequipped_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, nameid); } } return retVal___; @@ -53504,14 +62198,14 @@ bool HP_pc_isequipped(struct map_session_data *sd, int nameid) { 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___ = false; - 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); + if (HPMHooks.count.HP_pc_can_Adopt_pre > 0) { + bool (*preHookFunc) (struct map_session_data **p1_sd, struct map_session_data **p2_sd, struct map_session_data **b_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_Adopt_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p1_sd, &p2_sd, &b_sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53519,9 +62213,9 @@ bool HP_pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2 { retVal___ = HPMHooks.source.pc.can_Adopt(p1_sd, p2_sd, b_sd); } - if( HPMHooks.count.HP_pc_can_Adopt_post ) { + if (HPMHooks.count.HP_pc_can_Adopt_post > 0) { 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++ ) { + 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); } @@ -53531,14 +62225,14 @@ bool HP_pc_can_Adopt(struct map_session_data *p1_sd, struct map_session_data *p2 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___ = false; - 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); + if (HPMHooks.count.HP_pc_adoption_pre > 0) { + bool (*preHookFunc) (struct map_session_data **p1_sd, struct map_session_data **p2_sd, struct map_session_data **b_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_adoption_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p1_sd, &p2_sd, &b_sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53546,9 +62240,9 @@ bool HP_pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_ { retVal___ = HPMHooks.source.pc.adoption(p1_sd, p2_sd, b_sd); } - if( HPMHooks.count.HP_pc_adoption_post ) { + if (HPMHooks.count.HP_pc_adoption_post > 0) { 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++ ) { + 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); } @@ -53558,14 +62252,14 @@ bool HP_pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_ int HP_pc_updateweightstatus(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_updateweightstatus_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_updateweightstatus_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_updateweightstatus_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53573,26 +62267,26 @@ int HP_pc_updateweightstatus(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.updateweightstatus(sd); } - if( HPMHooks.count.HP_pc_updateweightstatus_post ) { + if (HPMHooks.count.HP_pc_updateweightstatus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_updateweightstatus_post; hIndex++ ) { + 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 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 int pos, bool onskill) { int hIndex = 0; int retVal___ = 0; - 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); + if (HPMHooks.count.HP_pc_addautobonus_pre > 0) { + 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 int *pos, bool *onskill); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addautobonus_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bonus, &max, &bonus_script, &rate, &dur, &atk_type, &o_script, &pos, &onskill); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53600,11 +62294,11 @@ int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_sc { 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++ ) { + if (HPMHooks.count.HP_pc_addautobonus_post > 0) { + 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 int 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); + retVal___ = postHookFunc(retVal___, bonus, max, bonus_script, rate, dur, atk_type, o_script, pos, onskill); } } return retVal___; @@ -53612,14 +62306,14 @@ int HP_pc_addautobonus(struct s_autobonus *bonus, char max, const char *bonus_sc int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_exeautobonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus); + if (HPMHooks.count.HP_pc_exeautobonus_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct s_autobonus **bonus); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_exeautobonus_pre[hIndex].func; - retVal___ = preHookFunc(sd, bonus); + retVal___ = preHookFunc(&sd, &bonus); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53627,9 +62321,9 @@ int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) { { retVal___ = HPMHooks.source.pc.exeautobonus(sd, bonus); } - if( HPMHooks.count.HP_pc_exeautobonus_post ) { + if (HPMHooks.count.HP_pc_exeautobonus_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct s_autobonus *bonus); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_exeautobonus_post; hIndex++ ) { + 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); } @@ -53639,14 +62333,14 @@ int HP_pc_exeautobonus(struct map_session_data *sd, struct s_autobonus *bonus) { int HP_pc_endautobonus(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_endautobonus_pre ) { + if (HPMHooks.count.HP_pc_endautobonus_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53654,11 +62348,11 @@ int HP_pc_endautobonus(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.endautobonus(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_endautobonus_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_endautobonus_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_endautobonus_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -53666,14 +62360,14 @@ int HP_pc_endautobonus(int tid, int64 tick, int id, intptr_t data) { int HP_pc_delautobonus(struct map_session_data *sd, struct s_autobonus *bonus, char max, bool restore) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_delautobonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct s_autobonus *bonus, char *max, bool *restore); + if (HPMHooks.count.HP_pc_delautobonus_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct s_autobonus **bonus, char *max, bool *restore); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delautobonus_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &bonus, &max, &restore); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53681,11 +62375,11 @@ int HP_pc_delautobonus(struct map_session_data *sd, struct s_autobonus *bonus, c { 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++ ) { + if (HPMHooks.count.HP_pc_delautobonus_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, bonus, max, restore); } } return retVal___; @@ -53693,14 +62387,14 @@ int HP_pc_delautobonus(struct map_session_data *sd, struct s_autobonus *bonus, c int HP_pc_bonus(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + if (HPMHooks.count.HP_pc_bonus_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53708,11 +62402,11 @@ int HP_pc_bonus(struct map_session_data *sd, int type, int val) { { 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++ ) { + if (HPMHooks.count.HP_pc_bonus_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type, val); } } return retVal___; @@ -53720,14 +62414,14 @@ int HP_pc_bonus(struct map_session_data *sd, int type, int val) { int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus2_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *val); + if (HPMHooks.count.HP_pc_bonus2_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, int *type2, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type, &type2, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53735,11 +62429,11 @@ int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) { { 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++ ) { + if (HPMHooks.count.HP_pc_bonus2_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type, type2, val); } } return retVal___; @@ -53747,14 +62441,14 @@ int HP_pc_bonus2(struct map_session_data *sd, int type, int type2, int val) { int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus3_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *val); + if (HPMHooks.count.HP_pc_bonus3_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, int *type2, int *type3, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus3_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type, &type2, &type3, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53762,11 +62456,11 @@ int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, in { 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++ ) { + if (HPMHooks.count.HP_pc_bonus3_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type, type2, type3, val); } } return retVal___; @@ -53774,14 +62468,14 @@ int HP_pc_bonus3(struct map_session_data *sd, int type, int type2, int type3, in int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, int type4, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus4_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *type2, int *type3, int *type4, int *val); + if (HPMHooks.count.HP_pc_bonus4_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, int *type2, int *type3, int *type4, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus4_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type, &type2, &type3, &type4, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53789,11 +62483,11 @@ int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, in { 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++ ) { + if (HPMHooks.count.HP_pc_bonus4_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type, type2, type3, type4, val); } } return retVal___; @@ -53801,14 +62495,14 @@ int HP_pc_bonus4(struct map_session_data *sd, int type, int type2, int type3, in 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___ = 0; - 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); + if (HPMHooks.count.HP_pc_bonus5_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, int *type2, int *type3, int *type4, int *type5, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus5_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type, &type2, &type3, &type4, &type5, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53816,11 +62510,11 @@ int HP_pc_bonus5(struct map_session_data *sd, int type, int type2, int type3, in { 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++ ) { + if (HPMHooks.count.HP_pc_bonus5_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type, type2, type3, type4, type5, val); } } return retVal___; @@ -53828,14 +62522,14 @@ int HP_pc_bonus5(struct map_session_data *sd, int type, int type2, int type3, in int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skill_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *id, int *level, int *flag); + if (HPMHooks.count.HP_pc_skill_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *id, int *level, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skill_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &id, &level, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53843,11 +62537,11 @@ int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) { { 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++ ) { + if (HPMHooks.count.HP_pc_skill_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, id, level, flag); } } return retVal___; @@ -53855,14 +62549,14 @@ int HP_pc_skill(struct map_session_data *sd, int id, int level, int flag) { int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_insert_card_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *idx_card, int *idx_equip); + if (HPMHooks.count.HP_pc_insert_card_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *idx_card, int *idx_equip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_insert_card_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &idx_card, &idx_equip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53870,11 +62564,11 @@ int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) { 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++ ) { + if (HPMHooks.count.HP_pc_insert_card_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, idx_card, idx_equip); } } return retVal___; @@ -53882,14 +62576,14 @@ int HP_pc_insert_card(struct map_session_data *sd, int idx_card, int idx_equip) bool HP_pc_can_insert_card(struct map_session_data *sd, int idx_card) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_insert_card_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *idx_card); + if (HPMHooks.count.HP_pc_can_insert_card_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *idx_card); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_can_insert_card_pre[hIndex].func; - retVal___ = preHookFunc(sd, &idx_card); + retVal___ = preHookFunc(&sd, &idx_card); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53897,11 +62591,11 @@ bool HP_pc_can_insert_card(struct map_session_data *sd, int idx_card) { { retVal___ = HPMHooks.source.pc.can_insert_card(sd, idx_card); } - if( HPMHooks.count.HP_pc_can_insert_card_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *idx_card); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_can_insert_card_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int idx_card); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_can_insert_card_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &idx_card); + retVal___ = postHookFunc(retVal___, sd, idx_card); } } return retVal___; @@ -53909,14 +62603,14 @@ bool HP_pc_can_insert_card(struct map_session_data *sd, int idx_card) { bool HP_pc_can_insert_card_into(struct map_session_data *sd, int idx_card, int idx_equip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_can_insert_card_into_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *idx_card, int *idx_equip); + if (HPMHooks.count.HP_pc_can_insert_card_into_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *idx_card, int *idx_equip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_can_insert_card_into_pre[hIndex].func; - retVal___ = preHookFunc(sd, &idx_card, &idx_equip); + retVal___ = preHookFunc(&sd, &idx_card, &idx_equip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53924,11 +62618,11 @@ bool HP_pc_can_insert_card_into(struct map_session_data *sd, int idx_card, int i { retVal___ = HPMHooks.source.pc.can_insert_card_into(sd, idx_card, idx_equip); } - if( HPMHooks.count.HP_pc_can_insert_card_into_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *idx_card, int *idx_equip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_can_insert_card_into_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int idx_card, int idx_equip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_can_insert_card_into_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_can_insert_card_into_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &idx_card, &idx_equip); + retVal___ = postHookFunc(retVal___, sd, idx_card, idx_equip); } } return retVal___; @@ -53936,14 +62630,14 @@ bool HP_pc_can_insert_card_into(struct map_session_data *sd, int idx_card, int i int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_steal_item_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_lv); + if (HPMHooks.count.HP_pc_steal_item_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_item_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &bl, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -53951,38 +62645,38 @@ int HP_pc_steal_item(struct map_session_data *sd, struct block_list *bl, uint16 { 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++ ) { + if (HPMHooks.count.HP_pc_steal_item_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, bl, skill_lv); } } return retVal___; } -int HP_pc_steal_coin(struct map_session_data *sd, struct block_list *bl) { +int HP_pc_steal_coin(struct map_session_data *sd, struct block_list *bl, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_steal_coin_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl); + if (HPMHooks.count.HP_pc_steal_coin_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_steal_coin_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &bl, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.steal_coin(sd, bl); + retVal___ = HPMHooks.source.pc.steal_coin(sd, bl, skill_lv); } - 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++ ) { + if (HPMHooks.count.HP_pc_steal_coin_post > 0) { + 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_coin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_steal_coin_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, bl); + retVal___ = postHookFunc(retVal___, sd, bl, skill_lv); } } return retVal___; @@ -53990,14 +62684,14 @@ int HP_pc_steal_coin(struct map_session_data *sd, struct block_list *bl) { int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_modifybuyvalue_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *orig_value); + if (HPMHooks.count.HP_pc_modifybuyvalue_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *orig_value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifybuyvalue_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &orig_value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54005,11 +62699,11 @@ int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) { { 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++ ) { + if (HPMHooks.count.HP_pc_modifybuyvalue_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, orig_value); } } return retVal___; @@ -54017,14 +62711,14 @@ int HP_pc_modifybuyvalue(struct map_session_data *sd, int orig_value) { int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_modifysellvalue_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *orig_value); + if (HPMHooks.count.HP_pc_modifysellvalue_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *orig_value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_modifysellvalue_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &orig_value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54032,11 +62726,11 @@ int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) { { 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++ ) { + if (HPMHooks.count.HP_pc_modifysellvalue_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, orig_value); } } return retVal___; @@ -54044,14 +62738,14 @@ int HP_pc_modifysellvalue(struct map_session_data *sd, int orig_value) { int HP_pc_follow(struct map_session_data *sd, int target_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_follow_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *target_id); + if (HPMHooks.count.HP_pc_follow_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &target_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54059,11 +62753,11 @@ int HP_pc_follow(struct map_session_data *sd, int target_id) { { 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++ ) { + if (HPMHooks.count.HP_pc_follow_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, target_id); } } return retVal___; @@ -54071,14 +62765,14 @@ int HP_pc_follow(struct map_session_data *sd, int target_id) { int HP_pc_stop_following(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_stop_following_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_stop_following_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54086,26 +62780,26 @@ int HP_pc_stop_following(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.stop_following(sd); } - if( HPMHooks.count.HP_pc_stop_following_post ) { + if (HPMHooks.count.HP_pc_stop_following_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_stop_following_post; hIndex++ ) { + 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 HP_pc_maxbaselv(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_maxbaselv_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if (HPMHooks.count.HP_pc_maxbaselv_pre > 0) { + int (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxbaselv_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_maxbaselv_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54113,26 +62807,26 @@ unsigned int HP_pc_maxbaselv(struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_pc_maxbaselv_post > 0) { + int (*postHookFunc) (int retVal___, const 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 HP_pc_maxjoblv(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_maxjoblv_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + int retVal___ = 0; + if (HPMHooks.count.HP_pc_maxjoblv_pre > 0) { + int (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxjoblv_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_maxjoblv_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54140,9 +62834,9 @@ unsigned int HP_pc_maxjoblv(struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_pc_maxjoblv_post > 0) { + int (*postHookFunc) (int retVal___, const 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); } @@ -54152,14 +62846,14 @@ unsigned int HP_pc_maxjoblv(struct map_session_data *sd) { int HP_pc_checkbaselevelup(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkbaselevelup_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_checkbaselevelup_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54167,26 +62861,52 @@ int HP_pc_checkbaselevelup(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.checkbaselevelup(sd); } - if( HPMHooks.count.HP_pc_checkbaselevelup_post ) { + if (HPMHooks.count.HP_pc_checkbaselevelup_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_post; hIndex++ ) { + 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___; } +void HP_pc_checkbaselevelup_sc(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_checkbaselevelup_sc_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_sc_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_sc_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.checkbaselevelup_sc(sd); + } + if (HPMHooks.count.HP_pc_checkbaselevelup_sc_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkbaselevelup_sc_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_checkbaselevelup_sc_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} int HP_pc_checkjoblevelup(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkjoblevelup_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_checkjoblevelup_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_checkjoblevelup_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54194,26 +62914,26 @@ int HP_pc_checkjoblevelup(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.checkjoblevelup(sd); } - if( HPMHooks.count.HP_pc_checkjoblevelup_post ) { + if (HPMHooks.count.HP_pc_checkjoblevelup_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkjoblevelup_post; hIndex++ ) { + 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___; } -bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest) { +bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_gainexp_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, struct block_list *src, unsigned int *base_exp, unsigned int *job_exp, bool *is_quest); + if (HPMHooks.count.HP_pc_gainexp_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &src, &base_exp, &job_exp, &is_quest); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54221,26 +62941,26 @@ bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned { retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, is_quest); } - if( HPMHooks.count.HP_pc_gainexp_post ) { - bool (*postHookFunc) (bool 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++ ) { + if (HPMHooks.count.HP_pc_gainexp_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 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); + retVal___ = postHookFunc(retVal___, sd, src, base_exp, job_exp, is_quest); } } return retVal___; } -unsigned int HP_pc_nextbaseexp(struct map_session_data *sd) { +uint64 HP_pc_nextbaseexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_nextbaseexp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + uint64 retVal___ = 0; + if (HPMHooks.count.HP_pc_nextbaseexp_pre > 0) { + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextbaseexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_nextbaseexp_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54248,26 +62968,26 @@ unsigned int HP_pc_nextbaseexp(struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_pc_nextbaseexp_post > 0) { + uint64 (*postHookFunc) (uint64 retVal___, const 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) { +uint64 HP_pc_thisbaseexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_thisbaseexp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + uint64 retVal___ = 0; + if (HPMHooks.count.HP_pc_thisbaseexp_pre > 0) { + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisbaseexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_thisbaseexp_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54275,26 +62995,26 @@ unsigned int HP_pc_thisbaseexp(struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_pc_thisbaseexp_post > 0) { + uint64 (*postHookFunc) (uint64 retVal___, const 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) { +uint64 HP_pc_nextjobexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_nextjobexp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + uint64 retVal___ = 0; + if (HPMHooks.count.HP_pc_nextjobexp_pre > 0) { + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_nextjobexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_nextjobexp_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54302,26 +63022,26 @@ unsigned int HP_pc_nextjobexp(struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_pc_nextjobexp_post > 0) { + uint64 (*postHookFunc) (uint64 retVal___, const 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) { +uint64 HP_pc_thisjobexp(const struct map_session_data *sd) { int hIndex = 0; - unsigned int retVal___ = 0; - if( HPMHooks.count.HP_pc_thisjobexp_pre ) { - unsigned int (*preHookFunc) (struct map_session_data *sd); + uint64 retVal___ = 0; + if (HPMHooks.count.HP_pc_thisjobexp_pre > 0) { + uint64 (*preHookFunc) (const struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_thisjobexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_thisjobexp_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54329,9 +63049,9 @@ unsigned int HP_pc_thisjobexp(struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_pc_thisjobexp_post > 0) { + uint64 (*postHookFunc) (uint64 retVal___, const 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); } @@ -54341,14 +63061,14 @@ unsigned int HP_pc_thisjobexp(struct map_session_data *sd) { int HP_pc_gets_status_point(int level) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_gets_status_point_pre ) { + if (HPMHooks.count.HP_pc_gets_status_point_pre > 0) { int (*preHookFunc) (int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_gets_status_point_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54356,11 +63076,11 @@ int HP_pc_gets_status_point(int level) { { 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++ ) { + if (HPMHooks.count.HP_pc_gets_status_point_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, level); } } return retVal___; @@ -54368,14 +63088,14 @@ int HP_pc_gets_status_point(int level) { int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_need_status_point_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + if (HPMHooks.count.HP_pc_need_status_point_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_need_status_point_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54383,11 +63103,11 @@ int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) { { 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++ ) { + if (HPMHooks.count.HP_pc_need_status_point_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type, val); } } return retVal___; @@ -54395,14 +63115,14 @@ int HP_pc_need_status_point(struct map_session_data *sd, int type, int val) { int HP_pc_maxparameterincrease(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_maxparameterincrease_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if (HPMHooks.count.HP_pc_maxparameterincrease_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_maxparameterincrease_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54410,11 +63130,11 @@ int HP_pc_maxparameterincrease(struct map_session_data *sd, int type) { { retVal___ = HPMHooks.source.pc.maxparameterincrease(sd, type); } - if( HPMHooks.count.HP_pc_maxparameterincrease_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_maxparameterincrease_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_maxparameterincrease_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_maxparameterincrease_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &type); + retVal___ = postHookFunc(retVal___, sd, type); } } return retVal___; @@ -54422,14 +63142,14 @@ int HP_pc_maxparameterincrease(struct map_session_data *sd, int type) { bool HP_pc_statusup(struct map_session_data *sd, int type, int increase) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_statusup_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *type, int *increase); + if (HPMHooks.count.HP_pc_statusup_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *type, int *increase); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_statusup_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type, &increase); + retVal___ = preHookFunc(&sd, &type, &increase); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54437,11 +63157,11 @@ bool HP_pc_statusup(struct map_session_data *sd, int type, int increase) { { retVal___ = HPMHooks.source.pc.statusup(sd, type, increase); } - if( HPMHooks.count.HP_pc_statusup_post ) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int *type, int *increase); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_statusup_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int type, int increase); + 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, &increase); + retVal___ = postHookFunc(retVal___, sd, type, increase); } } return retVal___; @@ -54449,14 +63169,14 @@ bool HP_pc_statusup(struct map_session_data *sd, int type, int increase) { int HP_pc_statusup2(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_statusup2_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + if (HPMHooks.count.HP_pc_statusup2_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_statusup2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54464,11 +63184,11 @@ int HP_pc_statusup2(struct map_session_data *sd, int type, int val) { { 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++ ) { + if (HPMHooks.count.HP_pc_statusup2_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type, val); } } return retVal___; @@ -54476,14 +63196,14 @@ int HP_pc_statusup2(struct map_session_data *sd, int type, int val) { int HP_pc_skillup(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillup_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if (HPMHooks.count.HP_pc_skillup_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillup_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54491,11 +63211,11 @@ int HP_pc_skillup(struct map_session_data *sd, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_pc_skillup_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id); } } return retVal___; @@ -54503,14 +63223,14 @@ int HP_pc_skillup(struct map_session_data *sd, uint16 skill_id) { int HP_pc_allskillup(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_allskillup_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_allskillup_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_allskillup_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54518,9 +63238,9 @@ int HP_pc_allskillup(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.allskillup(sd); } - if( HPMHooks.count.HP_pc_allskillup_post ) { + if (HPMHooks.count.HP_pc_allskillup_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_allskillup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_allskillup_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -54530,14 +63250,14 @@ int HP_pc_allskillup(struct map_session_data *sd) { int HP_pc_resetlvl(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetlvl_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if (HPMHooks.count.HP_pc_resetlvl_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetlvl_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_resetlvl_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54545,11 +63265,11 @@ int HP_pc_resetlvl(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_pc_resetlvl_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type); } } return retVal___; @@ -54557,14 +63277,14 @@ int HP_pc_resetlvl(struct map_session_data *sd, int type) { int HP_pc_resetstate(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetstate_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_resetstate_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_resetstate_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54572,9 +63292,9 @@ int HP_pc_resetstate(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.resetstate(sd); } - if( HPMHooks.count.HP_pc_resetstate_post ) { + if (HPMHooks.count.HP_pc_resetstate_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetstate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_resetstate_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -54584,14 +63304,14 @@ int HP_pc_resetstate(struct map_session_data *sd) { int HP_pc_resetskill(struct map_session_data *sd, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetskill_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *flag); + if (HPMHooks.count.HP_pc_resetskill_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_resetskill_pre[hIndex].func; - retVal___ = preHookFunc(sd, &flag); + retVal___ = preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54599,11 +63319,38 @@ int HP_pc_resetskill(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_pc_resetskill_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, flag); + } + } + return retVal___; +} +bool HP_pc_resetskill_job(struct map_session_data *sd, int index) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_resetskill_job_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_job_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_resetskill_job_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.resetskill_job(sd, index); + } + if (HPMHooks.count.HP_pc_resetskill_job_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetskill_job_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_resetskill_job_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, index); } } return retVal___; @@ -54611,14 +63358,14 @@ int HP_pc_resetskill(struct map_session_data *sd, int flag) { int HP_pc_resetfeel(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resetfeel_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_resetfeel_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_resetfeel_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54626,9 +63373,9 @@ int HP_pc_resetfeel(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.resetfeel(sd); } - if( HPMHooks.count.HP_pc_resetfeel_post ) { + if (HPMHooks.count.HP_pc_resetfeel_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resetfeel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_resetfeel_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -54638,14 +63385,14 @@ int HP_pc_resetfeel(struct map_session_data *sd) { int HP_pc_resethate(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_resethate_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_resethate_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_resethate_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54653,9 +63400,9 @@ int HP_pc_resethate(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.resethate(sd); } - if( HPMHooks.count.HP_pc_resethate_post ) { + if (HPMHooks.count.HP_pc_resethate_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_resethate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_resethate_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -54665,14 +63412,14 @@ int HP_pc_resethate(struct map_session_data *sd) { int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_equipitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, int *req_pos); + if (HPMHooks.count.HP_pc_equipitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *n, int *req_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &n, &req_pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54680,25 +63427,25 @@ int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) { { 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++ ) { + if (HPMHooks.count.HP_pc_equipitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, n, req_pos); } } return retVal___; } void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int n, int pos) { int hIndex = 0; - if( HPMHooks.count.HP_pc_equipitem_pos_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct item_data *id, int *n, int *pos); + if (HPMHooks.count.HP_pc_equipitem_pos_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item_data **id, int *n, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_equipitem_pos_pre[hIndex].func; - preHookFunc(sd, id, &n, &pos); + preHookFunc(&sd, &id, &n, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -54706,11 +63453,11 @@ void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int { HPMHooks.source.pc.equipitem_pos(sd, id, n, pos); } - if( HPMHooks.count.HP_pc_equipitem_pos_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct item_data *id, int *n, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_equipitem_pos_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *id, int n, int pos); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_equipitem_pos_post[hIndex].func; - postHookFunc(sd, id, &n, &pos); + postHookFunc(sd, id, n, pos); } } return; @@ -54718,14 +63465,14 @@ void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_unequipitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, int *flag); + if (HPMHooks.count.HP_pc_unequipitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *n, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &n, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54733,25 +63480,25 @@ int HP_pc_unequipitem(struct map_session_data *sd, int n, int flag) { { 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++ ) { + if (HPMHooks.count.HP_pc_unequipitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, n, flag); } } return retVal___; } void HP_pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) { int hIndex = 0; - if( HPMHooks.count.HP_pc_unequipitem_pos_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *n, int *pos); + if (HPMHooks.count.HP_pc_unequipitem_pos_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *n, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_unequipitem_pos_pre[hIndex].func; - preHookFunc(sd, &n, &pos); + preHookFunc(&sd, &n, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -54759,11 +63506,11 @@ void HP_pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) { { HPMHooks.source.pc.unequipitem_pos(sd, n, pos); } - if( HPMHooks.count.HP_pc_unequipitem_pos_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *n, int *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_unequipitem_pos_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int n, int pos); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_unequipitem_pos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_unequipitem_pos_post[hIndex].func; - postHookFunc(sd, &n, &pos); + postHookFunc(sd, n, pos); } } return; @@ -54771,14 +63518,14 @@ void HP_pc_unequipitem_pos(struct map_session_data *sd, int n, int pos) { int HP_pc_checkitem(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_checkitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_checkitem_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54786,9 +63533,9 @@ int HP_pc_checkitem(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.checkitem(sd); } - if( HPMHooks.count.HP_pc_checkitem_post ) { + if (HPMHooks.count.HP_pc_checkitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkitem_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_checkitem_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -54798,14 +63545,14 @@ int HP_pc_checkitem(struct map_session_data *sd) { int HP_pc_useitem(struct map_session_data *sd, int n) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_useitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n); + if (HPMHooks.count.HP_pc_useitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_useitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_useitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n); + retVal___ = preHookFunc(&sd, &n); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54813,11 +63560,38 @@ int HP_pc_useitem(struct map_session_data *sd, int n) { { 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++ ) { + if (HPMHooks.count.HP_pc_useitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, n); + } + } + return retVal___; +} +int HP_pc_autocast_clear(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_autocast_clear_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autocast_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_autocast_clear_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.autocast_clear(sd); + } + if (HPMHooks.count.HP_pc_autocast_clear_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autocast_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_autocast_clear_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; @@ -54825,14 +63599,14 @@ int HP_pc_useitem(struct map_session_data *sd, int n) { int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillatk_bonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if (HPMHooks.count.HP_pc_skillatk_bonus_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillatk_bonus_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54840,11 +63614,11 @@ int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_pc_skillatk_bonus_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id); } } return retVal___; @@ -54852,14 +63626,14 @@ int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) { int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillheal_bonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if (HPMHooks.count.HP_pc_skillheal_bonus_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal_bonus_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54867,11 +63641,11 @@ int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_pc_skillheal_bonus_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id); } } return retVal___; @@ -54879,14 +63653,14 @@ int HP_pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { int HP_pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_skillheal2_bonus_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if (HPMHooks.count.HP_pc_skillheal2_bonus_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_skillheal2_bonus_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54894,25 +63668,25 @@ int HP_pc_skillheal2_bonus(struct map_session_data *sd, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_pc_skillheal2_bonus_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_pc_damage_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct block_list **src, unsigned int *hp, unsigned int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_damage_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &src, &hp, &sp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -54920,11 +63694,11 @@ void HP_pc_damage(struct map_session_data *sd, struct block_list *src, unsigned { 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++ ) { + if (HPMHooks.count.HP_pc_damage_post > 0) { + 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); + postHookFunc(sd, src, hp, sp); } } return; @@ -54932,14 +63706,14 @@ void HP_pc_damage(struct map_session_data *sd, struct block_list *src, unsigned int HP_pc_dead(struct map_session_data *sd, struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_dead_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct block_list *src); + if (HPMHooks.count.HP_pc_dead_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_dead_pre[hIndex].func; - retVal___ = preHookFunc(sd, src); + retVal___ = preHookFunc(&sd, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -54947,9 +63721,9 @@ int HP_pc_dead(struct map_session_data *sd, struct block_list *src) { { retVal___ = HPMHooks.source.pc.dead(sd, src); } - if( HPMHooks.count.HP_pc_dead_post ) { + if (HPMHooks.count.HP_pc_dead_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_dead_post; hIndex++ ) { + 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); } @@ -54958,14 +63732,14 @@ int HP_pc_dead(struct map_session_data *sd, struct block_list *src) { } 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); + if (HPMHooks.count.HP_pc_revive_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned int *hp, unsigned int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_revive_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_revive_pre[hIndex].func; - preHookFunc(sd, &hp, &sp); + preHookFunc(&sd, &hp, &sp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -54973,25 +63747,25 @@ void HP_pc_revive(struct map_session_data *sd, unsigned int hp, unsigned int sp) { 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++ ) { + if (HPMHooks.count.HP_pc_revive_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_pc_heal_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned int *hp, unsigned int *sp, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_heal_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &hp, &sp, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -54999,11 +63773,11 @@ void HP_pc_heal(struct map_session_data *sd, unsigned int hp, unsigned int sp, i { 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++ ) { + if (HPMHooks.count.HP_pc_heal_post > 0) { + 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); + postHookFunc(sd, hp, sp, type); } } return; @@ -55011,14 +63785,14 @@ void HP_pc_heal(struct map_session_data *sd, unsigned int hp, unsigned int sp, i int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_itemheal_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *itemid, int *hp, int *sp); + if (HPMHooks.count.HP_pc_itemheal_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *itemid, int *hp, int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemheal_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &itemid, &hp, &sp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55026,11 +63800,11 @@ int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) { { 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++ ) { + if (HPMHooks.count.HP_pc_itemheal_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, itemid, hp, sp); } } return retVal___; @@ -55038,14 +63812,14 @@ int HP_pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) { int HP_pc_percentheal(struct map_session_data *sd, int hp, int sp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_percentheal_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *hp, int *sp); + if (HPMHooks.count.HP_pc_percentheal_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *hp, int *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_percentheal_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &hp, &sp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55053,53 +63827,105 @@ int HP_pc_percentheal(struct map_session_data *sd, int hp, int sp) { { 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++ ) { + if (HPMHooks.count.HP_pc_percentheal_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, hp, sp); } } return retVal___; } -int HP_pc_jobchange(struct map_session_data *sd, int job, int upper) { +int HP_pc_jobchange(struct map_session_data *sd, int class, int upper) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_jobchange_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *job, int *upper); + if (HPMHooks.count.HP_pc_jobchange_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *class, int *upper); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &class, &upper); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.jobchange(sd, job, upper); + retVal___ = HPMHooks.source.pc.jobchange(sd, class, 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++ ) { + if (HPMHooks.count.HP_pc_jobchange_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int class, 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); + retVal___ = postHookFunc(retVal___, sd, class, upper); } } return retVal___; } +void HP_pc_hide(struct map_session_data *sd, bool show_msg) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_hide_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *show_msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_hide_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_hide_pre[hIndex].func; + preHookFunc(&sd, &show_msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.hide(sd, show_msg); + } + if (HPMHooks.count.HP_pc_hide_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, bool show_msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_hide_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_hide_post[hIndex].func; + postHookFunc(sd, show_msg); + } + } + return; +} +void HP_pc_unhide(struct map_session_data *sd, bool show_msg) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_unhide_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *show_msg); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_unhide_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_unhide_pre[hIndex].func; + preHookFunc(&sd, &show_msg); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.unhide(sd, show_msg); + } + if (HPMHooks.count.HP_pc_unhide_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, bool show_msg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_unhide_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_unhide_post[hIndex].func; + postHookFunc(sd, show_msg); + } + } + return; +} int HP_pc_setoption(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setoption_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if (HPMHooks.count.HP_pc_setoption_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setoption_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setoption_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55107,11 +63933,11 @@ int HP_pc_setoption(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_pc_setoption_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type); } } return retVal___; @@ -55119,14 +63945,14 @@ int HP_pc_setoption(struct map_session_data *sd, int type) { int HP_pc_setcart(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setcart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if (HPMHooks.count.HP_pc_setcart_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setcart_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setcart_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55134,25 +63960,25 @@ int HP_pc_setcart(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_pc_setcart_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type); } } return retVal___; } void HP_pc_setfalcon(struct map_session_data *sd, bool flag) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setfalcon_pre ) { - void (*preHookFunc) (struct map_session_data *sd, bool *flag); + if (HPMHooks.count.HP_pc_setfalcon_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setfalcon_pre[hIndex].func; - preHookFunc(sd, &flag); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55160,25 +63986,25 @@ void HP_pc_setfalcon(struct map_session_data *sd, bool flag) { { HPMHooks.source.pc.setfalcon(sd, flag); } - if( HPMHooks.count.HP_pc_setfalcon_post ) { - void (*postHookFunc) (struct map_session_data *sd, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_setfalcon_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, bool flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setfalcon_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setfalcon_post[hIndex].func; - postHookFunc(sd, &flag); + postHookFunc(sd, flag); } } return; } void HP_pc_setridingpeco(struct map_session_data *sd, bool flag) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setridingpeco_pre ) { - void (*preHookFunc) (struct map_session_data *sd, bool *flag); + if (HPMHooks.count.HP_pc_setridingpeco_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setridingpeco_pre[hIndex].func; - preHookFunc(sd, &flag); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55186,51 +64012,51 @@ void HP_pc_setridingpeco(struct map_session_data *sd, bool flag) { { HPMHooks.source.pc.setridingpeco(sd, flag); } - if( HPMHooks.count.HP_pc_setridingpeco_post ) { - void (*postHookFunc) (struct map_session_data *sd, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_setridingpeco_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, bool flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingpeco_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setridingpeco_post[hIndex].func; - postHookFunc(sd, &flag); + postHookFunc(sd, flag); } } return; } -void HP_pc_setmadogear(struct map_session_data *sd, bool flag) { +void HP_pc_setmadogear(struct map_session_data *sd, bool flag, enum mado_type mtype) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setmadogear_pre ) { - void (*preHookFunc) (struct map_session_data *sd, bool *flag); + if (HPMHooks.count.HP_pc_setmadogear_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *flag, enum mado_type *mtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setmadogear_pre[hIndex].func; - preHookFunc(sd, &flag); + preHookFunc(&sd, &flag, &mtype); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.pc.setmadogear(sd, flag); + HPMHooks.source.pc.setmadogear(sd, flag, mtype); } - if( HPMHooks.count.HP_pc_setmadogear_post ) { - void (*postHookFunc) (struct map_session_data *sd, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_setmadogear_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, bool flag, enum mado_type mtype); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setmadogear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setmadogear_post[hIndex].func; - postHookFunc(sd, &flag); + postHookFunc(sd, flag, mtype); } } return; } void HP_pc_setridingdragon(struct map_session_data *sd, unsigned int type) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setridingdragon_pre ) { - void (*preHookFunc) (struct map_session_data *sd, unsigned int *type); + if (HPMHooks.count.HP_pc_setridingdragon_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setridingdragon_pre[hIndex].func; - preHookFunc(sd, &type); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55238,25 +64064,25 @@ void HP_pc_setridingdragon(struct map_session_data *sd, unsigned int type) { { HPMHooks.source.pc.setridingdragon(sd, type); } - if( HPMHooks.count.HP_pc_setridingdragon_post ) { - void (*postHookFunc) (struct map_session_data *sd, unsigned int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_setridingdragon_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, unsigned int type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingdragon_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setridingdragon_post[hIndex].func; - postHookFunc(sd, &type); + postHookFunc(sd, type); } } return; } void HP_pc_setridingwug(struct map_session_data *sd, bool flag) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setridingwug_pre ) { - void (*preHookFunc) (struct map_session_data *sd, bool *flag); + if (HPMHooks.count.HP_pc_setridingwug_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setridingwug_pre[hIndex].func; - preHookFunc(sd, &flag); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55264,11 +64090,11 @@ void HP_pc_setridingwug(struct map_session_data *sd, bool flag) { { HPMHooks.source.pc.setridingwug(sd, flag); } - if( HPMHooks.count.HP_pc_setridingwug_post ) { - void (*postHookFunc) (struct map_session_data *sd, bool *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_setridingwug_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, bool flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setridingwug_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setridingwug_post[hIndex].func; - postHookFunc(sd, &flag); + postHookFunc(sd, flag); } } return; @@ -55276,14 +64102,14 @@ void HP_pc_setridingwug(struct map_session_data *sd, bool flag) { int HP_pc_changelook(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_changelook_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + if (HPMHooks.count.HP_pc_changelook_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_changelook_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55291,11 +64117,11 @@ int HP_pc_changelook(struct map_session_data *sd, int type, int val) { { 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++ ) { + if (HPMHooks.count.HP_pc_changelook_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type, val); } } return retVal___; @@ -55303,14 +64129,14 @@ int HP_pc_changelook(struct map_session_data *sd, int type, int val) { int HP_pc_equiplookall(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_equiplookall_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_equiplookall_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_equiplookall_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55318,26 +64144,26 @@ int HP_pc_equiplookall(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.equiplookall(sd); } - if( HPMHooks.count.HP_pc_equiplookall_post ) { + if (HPMHooks.count.HP_pc_equiplookall_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equiplookall_post; hIndex++ ) { + 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) { +int64 HP_pc_readparam(const struct map_session_data *sd, int type) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pc_readparam_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + int64 retVal___ = 0; + if (HPMHooks.count.HP_pc_readparam_pre > 0) { + int64 (*preHookFunc) (const struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_readparam_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_readparam_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55345,26 +64171,26 @@ int HP_pc_readparam(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_pc_readparam_post > 0) { + int64 (*postHookFunc) (int64 retVal___, const 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); + retVal___ = postHookFunc(retVal___, sd, type); } } return retVal___; } -int HP_pc_setparam(struct map_session_data *sd, int type, int val) { +int HP_pc_setparam(struct map_session_data *sd, int type, int64 val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setparam_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + if (HPMHooks.count.HP_pc_setparam_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, int64 *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setparam_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55372,11 +64198,11 @@ int HP_pc_setparam(struct map_session_data *sd, int type, int val) { { 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++ ) { + if (HPMHooks.count.HP_pc_setparam_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int type, int64 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); + retVal___ = postHookFunc(retVal___, sd, type, val); } } return retVal___; @@ -55384,14 +64210,14 @@ int HP_pc_setparam(struct map_session_data *sd, int type, int val) { int HP_pc_readreg(struct map_session_data *sd, int64 reg) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_readreg_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int64 *reg); + if (HPMHooks.count.HP_pc_readreg_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_readreg_pre[hIndex].func; - retVal___ = preHookFunc(sd, ®); + retVal___ = preHookFunc(&sd, ®); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55399,25 +64225,25 @@ int HP_pc_readreg(struct map_session_data *sd, int64 reg) { { retVal___ = HPMHooks.source.pc.readreg(sd, reg); } - if( HPMHooks.count.HP_pc_readreg_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readreg_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_readreg_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 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, ®); + retVal___ = postHookFunc(retVal___, sd, reg); } } return retVal___; } void HP_pc_setreg(struct map_session_data *sd, int64 reg, int val) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setreg_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int64 *reg, int *val); + if (HPMHooks.count.HP_pc_setreg_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *reg, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setreg_pre[hIndex].func; - preHookFunc(sd, ®, &val); + preHookFunc(&sd, ®, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55425,11 +64251,11 @@ void HP_pc_setreg(struct map_session_data *sd, int64 reg, int val) { { HPMHooks.source.pc.setreg(sd, reg, val); } - if( HPMHooks.count.HP_pc_setreg_post ) { - void (*postHookFunc) (struct map_session_data *sd, int64 *reg, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_setreg_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 reg, int val); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setreg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setreg_post[hIndex].func; - postHookFunc(sd, ®, &val); + postHookFunc(sd, reg, val); } } return; @@ -55437,14 +64263,14 @@ void HP_pc_setreg(struct map_session_data *sd, int64 reg, int val) { char* HP_pc_readregstr(struct map_session_data *sd, int64 reg) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_pc_readregstr_pre ) { - char* (*preHookFunc) (struct map_session_data *sd, int64 *reg); + if (HPMHooks.count.HP_pc_readregstr_pre > 0) { + char* (*preHookFunc) (struct map_session_data **sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_readregstr_pre[hIndex].func; - retVal___ = preHookFunc(sd, ®); + retVal___ = preHookFunc(&sd, ®); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55452,25 +64278,25 @@ char* HP_pc_readregstr(struct map_session_data *sd, int64 reg) { { retVal___ = HPMHooks.source.pc.readregstr(sd, reg); } - if( HPMHooks.count.HP_pc_readregstr_post ) { - char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int64 *reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregstr_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_readregstr_post > 0) { + char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int64 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, ®); + retVal___ = postHookFunc(retVal___, sd, reg); } } return retVal___; } void HP_pc_setregstr(struct map_session_data *sd, int64 reg, const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_pc_setregstr_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int64 *reg, const char *str); + if (HPMHooks.count.HP_pc_setregstr_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *reg, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setregstr_pre[hIndex].func; - preHookFunc(sd, ®, str); + preHookFunc(&sd, ®, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55478,11 +64304,11 @@ void HP_pc_setregstr(struct map_session_data *sd, int64 reg, const char *str) { { HPMHooks.source.pc.setregstr(sd, reg, str); } - if( HPMHooks.count.HP_pc_setregstr_post ) { - void (*postHookFunc) (struct map_session_data *sd, int64 *reg, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_setregstr_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 reg, const char *str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregstr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setregstr_post[hIndex].func; - postHookFunc(sd, ®, str); + postHookFunc(sd, reg, str); } } return; @@ -55490,14 +64316,14 @@ void HP_pc_setregstr(struct map_session_data *sd, int64 reg, const char *str) { int HP_pc_readregistry(struct map_session_data *sd, int64 reg) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_readregistry_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int64 *reg); + if (HPMHooks.count.HP_pc_readregistry_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_readregistry_pre[hIndex].func; - retVal___ = preHookFunc(sd, ®); + retVal___ = preHookFunc(&sd, ®); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55505,11 +64331,11 @@ int HP_pc_readregistry(struct map_session_data *sd, int64 reg) { { retVal___ = HPMHooks.source.pc.readregistry(sd, reg); } - if( HPMHooks.count.HP_pc_readregistry_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_readregistry_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 reg); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_readregistry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ®); + retVal___ = postHookFunc(retVal___, sd, reg); } } return retVal___; @@ -55517,14 +64343,14 @@ int HP_pc_readregistry(struct map_session_data *sd, int64 reg) { int HP_pc_setregistry(struct map_session_data *sd, int64 reg, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setregistry_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int64 *reg, int *val); + if (HPMHooks.count.HP_pc_setregistry_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int64 *reg, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setregistry_pre[hIndex].func; - retVal___ = preHookFunc(sd, ®, &val); + retVal___ = preHookFunc(&sd, ®, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55532,11 +64358,11 @@ int HP_pc_setregistry(struct map_session_data *sd, int64 reg, int val) { { retVal___ = HPMHooks.source.pc.setregistry(sd, reg, val); } - if( HPMHooks.count.HP_pc_setregistry_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_setregistry_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 reg, int val); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setregistry_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, ®, &val); + retVal___ = postHookFunc(retVal___, sd, reg, val); } } return retVal___; @@ -55544,14 +64370,14 @@ int HP_pc_setregistry(struct map_session_data *sd, int64 reg, int val) { char* HP_pc_readregistry_str(struct map_session_data *sd, int64 reg) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_pc_readregistry_str_pre ) { - char* (*preHookFunc) (struct map_session_data *sd, int64 *reg); + if (HPMHooks.count.HP_pc_readregistry_str_pre > 0) { + char* (*preHookFunc) (struct map_session_data **sd, int64 *reg); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_pre; hIndex++ ) { + 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, ®); + retVal___ = preHookFunc(&sd, ®); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55559,11 +64385,11 @@ char* HP_pc_readregistry_str(struct map_session_data *sd, int64 reg) { { retVal___ = HPMHooks.source.pc.readregistry_str(sd, reg); } - if( HPMHooks.count.HP_pc_readregistry_str_post ) { - char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int64 *reg); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readregistry_str_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_readregistry_str_post > 0) { + char* (*postHookFunc) (char* retVal___, struct map_session_data *sd, int64 reg); + 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, ®); + retVal___ = postHookFunc(retVal___, sd, reg); } } return retVal___; @@ -55571,14 +64397,14 @@ char* HP_pc_readregistry_str(struct map_session_data *sd, int64 reg) { int HP_pc_setregistry_str(struct map_session_data *sd, int64 reg, const char *val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setregistry_str_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int64 *reg, const char *val); + if (HPMHooks.count.HP_pc_setregistry_str_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int64 *reg, const char **val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_pre; hIndex++ ) { + 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, ®, val); + retVal___ = preHookFunc(&sd, ®, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55586,11 +64412,11 @@ int HP_pc_setregistry_str(struct map_session_data *sd, int64 reg, const char *va { retVal___ = HPMHooks.source.pc.setregistry_str(sd, reg, val); } - if( HPMHooks.count.HP_pc_setregistry_str_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 *reg, const char *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setregistry_str_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_setregistry_str_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int64 reg, const char *val); + 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, ®, val); + retVal___ = postHookFunc(retVal___, sd, reg, val); } } return retVal___; @@ -55598,14 +64424,14 @@ int HP_pc_setregistry_str(struct map_session_data *sd, int64 reg, const char *va int HP_pc_addeventtimer(struct map_session_data *sd, int tick, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_addeventtimer_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *tick, const char *name); + if (HPMHooks.count.HP_pc_addeventtimer_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *tick, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimer_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &tick, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55613,11 +64439,11 @@ int HP_pc_addeventtimer(struct map_session_data *sd, int tick, const char *name) { 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++ ) { + if (HPMHooks.count.HP_pc_addeventtimer_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, tick, name); } } return retVal___; @@ -55625,14 +64451,14 @@ int HP_pc_addeventtimer(struct map_session_data *sd, int tick, const char *name) int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_deleventtimer_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *name); + if (HPMHooks.count.HP_pc_deleventtimer_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_deleventtimer_pre[hIndex].func; - retVal___ = preHookFunc(sd, name); + retVal___ = preHookFunc(&sd, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55640,9 +64466,9 @@ int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) { { retVal___ = HPMHooks.source.pc.deleventtimer(sd, name); } - if( HPMHooks.count.HP_pc_deleventtimer_post ) { + if (HPMHooks.count.HP_pc_deleventtimer_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_deleventtimer_post; hIndex++ ) { + 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); } @@ -55652,14 +64478,14 @@ int HP_pc_deleventtimer(struct map_session_data *sd, const char *name) { int HP_pc_cleareventtimer(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_cleareventtimer_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_cleareventtimer_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_cleareventtimer_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55667,9 +64493,9 @@ int HP_pc_cleareventtimer(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.cleareventtimer(sd); } - if( HPMHooks.count.HP_pc_cleareventtimer_post ) { + if (HPMHooks.count.HP_pc_cleareventtimer_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_cleareventtimer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_cleareventtimer_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -55679,14 +64505,14 @@ int HP_pc_cleareventtimer(struct map_session_data *sd) { int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_addeventtimercount_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *name, int *tick); + if (HPMHooks.count.HP_pc_addeventtimercount_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **name, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addeventtimercount_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &name, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55694,11 +64520,11 @@ int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int { 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++ ) { + if (HPMHooks.count.HP_pc_addeventtimercount_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, name, tick); } } return retVal___; @@ -55706,14 +64532,14 @@ int HP_pc_addeventtimercount(struct map_session_data *sd, const char *name, int int HP_pc_calc_pvprank(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_pvprank_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_calc_pvprank_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55721,9 +64547,9 @@ int HP_pc_calc_pvprank(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.calc_pvprank(sd); } - if( HPMHooks.count.HP_pc_calc_pvprank_post ) { + if (HPMHooks.count.HP_pc_calc_pvprank_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_post; hIndex++ ) { + 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); } @@ -55733,14 +64559,14 @@ int HP_pc_calc_pvprank(struct map_session_data *sd) { int HP_pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_pvprank_timer_pre ) { + if (HPMHooks.count.HP_pc_calc_pvprank_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55748,11 +64574,11 @@ int HP_pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_pvprank_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_calc_pvprank_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -55760,14 +64586,14 @@ int HP_pc_calc_pvprank_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_ismarried(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_ismarried_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_ismarried_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_ismarried_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55775,9 +64601,9 @@ int HP_pc_ismarried(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.ismarried(sd); } - if( HPMHooks.count.HP_pc_ismarried_post ) { + if (HPMHooks.count.HP_pc_ismarried_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_ismarried_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_ismarried_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -55787,14 +64613,14 @@ int HP_pc_ismarried(struct map_session_data *sd) { int HP_pc_marriage(struct map_session_data *sd, struct map_session_data *dstsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_marriage_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *dstsd); + if (HPMHooks.count.HP_pc_marriage_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **dstsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_marriage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_marriage_pre[hIndex].func; - retVal___ = preHookFunc(sd, dstsd); + retVal___ = preHookFunc(&sd, &dstsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55802,9 +64628,9 @@ int HP_pc_marriage(struct map_session_data *sd, struct map_session_data *dstsd) { retVal___ = HPMHooks.source.pc.marriage(sd, dstsd); } - if( HPMHooks.count.HP_pc_marriage_post ) { + if (HPMHooks.count.HP_pc_marriage_post > 0) { 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++ ) { + 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); } @@ -55814,14 +64640,14 @@ int HP_pc_marriage(struct map_session_data *sd, struct map_session_data *dstsd) int HP_pc_divorce(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_divorce_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_divorce_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_divorce_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55829,9 +64655,9 @@ int HP_pc_divorce(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.divorce(sd); } - if( HPMHooks.count.HP_pc_divorce_post ) { + if (HPMHooks.count.HP_pc_divorce_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_divorce_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_divorce_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -55841,14 +64667,14 @@ int HP_pc_divorce(struct map_session_data *sd) { 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); + if (HPMHooks.count.HP_pc_get_partner_pre > 0) { + struct map_session_data* (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_partner_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55856,9 +64682,9 @@ struct map_session_data* HP_pc_get_partner(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.get_partner(sd); } - if( HPMHooks.count.HP_pc_get_partner_post ) { + if (HPMHooks.count.HP_pc_get_partner_post > 0) { 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++ ) { + 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); } @@ -55868,14 +64694,14 @@ struct map_session_data* HP_pc_get_partner(struct map_session_data *sd) { 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); + if (HPMHooks.count.HP_pc_get_father_pre > 0) { + struct map_session_data* (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_father_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55883,9 +64709,9 @@ struct map_session_data* HP_pc_get_father(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.get_father(sd); } - if( HPMHooks.count.HP_pc_get_father_post ) { + if (HPMHooks.count.HP_pc_get_father_post > 0) { 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++ ) { + 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); } @@ -55895,14 +64721,14 @@ struct map_session_data* HP_pc_get_father(struct map_session_data *sd) { 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); + if (HPMHooks.count.HP_pc_get_mother_pre > 0) { + struct map_session_data* (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_mother_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55910,9 +64736,9 @@ struct map_session_data* HP_pc_get_mother(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.get_mother(sd); } - if( HPMHooks.count.HP_pc_get_mother_post ) { + if (HPMHooks.count.HP_pc_get_mother_post > 0) { 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++ ) { + 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); } @@ -55922,14 +64748,14 @@ struct map_session_data* HP_pc_get_mother(struct map_session_data *sd) { 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); + if (HPMHooks.count.HP_pc_get_child_pre > 0) { + struct map_session_data* (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_get_child_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -55937,9 +64763,9 @@ struct map_session_data* HP_pc_get_child(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.get_child(sd); } - if( HPMHooks.count.HP_pc_get_child_post ) { + if (HPMHooks.count.HP_pc_get_child_post > 0) { 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++ ) { + 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); } @@ -55948,14 +64774,14 @@ struct map_session_data* HP_pc_get_child(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_pc_bleeding_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned int *diff_tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bleeding_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_bleeding_pre[hIndex].func; - preHookFunc(sd, &diff_tick); + preHookFunc(&sd, &diff_tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55963,25 +64789,25 @@ void HP_pc_bleeding(struct map_session_data *sd, unsigned int diff_tick) { { 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++ ) { + if (HPMHooks.count.HP_pc_bleeding_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_pc_regen_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned int *diff_tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_regen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_regen_pre[hIndex].func; - preHookFunc(sd, &diff_tick); + preHookFunc(&sd, &diff_tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -55989,25 +64815,25 @@ void HP_pc_regen(struct map_session_data *sd, unsigned int diff_tick) { { 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++ ) { + if (HPMHooks.count.HP_pc_regen_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_pc_setstand_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setstand_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56015,9 +64841,9 @@ void HP_pc_setstand(struct map_session_data *sd) { { HPMHooks.source.pc.setstand(sd); } - if( HPMHooks.count.HP_pc_setstand_post ) { + if (HPMHooks.count.HP_pc_setstand_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstand_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_setstand_post[hIndex].func; postHookFunc(sd); } @@ -56027,14 +64853,14 @@ void HP_pc_setstand(struct map_session_data *sd) { int HP_pc_candrop(struct map_session_data *sd, struct item *item) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_candrop_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct item *item); + if (HPMHooks.count.HP_pc_candrop_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct item **item); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_candrop_pre[hIndex].func; - retVal___ = preHookFunc(sd, item); + retVal___ = preHookFunc(&sd, &item); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56042,53 +64868,53 @@ int HP_pc_candrop(struct map_session_data *sd, struct item *item) { { retVal___ = HPMHooks.source.pc.candrop(sd, item); } - if( HPMHooks.count.HP_pc_candrop_post ) { + if (HPMHooks.count.HP_pc_candrop_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item *item); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_candrop_post; hIndex++ ) { + 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 HP_pc_jobid2mapid(int class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_jobid2mapid_pre ) { - int (*preHookFunc) (unsigned short *b_class); + if (HPMHooks.count.HP_pc_jobid2mapid_pre > 0) { + int (*preHookFunc) (int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_jobid2mapid_pre[hIndex].func; - retVal___ = preHookFunc(&b_class); + retVal___ = preHookFunc(&class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.jobid2mapid(b_class); + retVal___ = HPMHooks.source.pc.jobid2mapid(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++ ) { + if (HPMHooks.count.HP_pc_jobid2mapid_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; } -int HP_pc_mapid2jobid(unsigned short class_, int sex) { +int HP_pc_mapid2jobid(unsigned int class_, int sex) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_mapid2jobid_pre ) { - int (*preHookFunc) (unsigned short *class_, int *sex); + if (HPMHooks.count.HP_pc_mapid2jobid_pre > 0) { + int (*preHookFunc) (unsigned int *class_, int *sex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56096,52 +64922,52 @@ int HP_pc_mapid2jobid(unsigned short class_, int sex) { { 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++ ) { + if (HPMHooks.count.HP_pc_mapid2jobid_post > 0) { + int (*postHookFunc) (int retVal___, unsigned int 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); + retVal___ = postHookFunc(retVal___, class_, sex); } } return retVal___; } -const char* HP_pc_job_name(int class_) { +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_); + if (HPMHooks.count.HP_pc_job_name_pre > 0) { + const char* (*preHookFunc) (int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_job_name_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.job_name(class_); + 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++ ) { + if (HPMHooks.count.HP_pc_job_name_post > 0) { + 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_); + 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); + if (HPMHooks.count.HP_pc_setinvincibletimer_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_setinvincibletimer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_setinvincibletimer_pre[hIndex].func; - preHookFunc(sd, &val); + preHookFunc(&sd, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56149,25 +64975,25 @@ void HP_pc_setinvincibletimer(struct map_session_data *sd, int val) { { 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++ ) { + if (HPMHooks.count.HP_pc_setinvincibletimer_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_pc_delinvincibletimer_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56175,9 +65001,9 @@ void HP_pc_delinvincibletimer(struct map_session_data *sd) { { HPMHooks.source.pc.delinvincibletimer(sd); } - if( HPMHooks.count.HP_pc_delinvincibletimer_post ) { + if (HPMHooks.count.HP_pc_delinvincibletimer_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_delinvincibletimer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_delinvincibletimer_post[hIndex].func; postHookFunc(sd); } @@ -56187,14 +65013,14 @@ void HP_pc_delinvincibletimer(struct map_session_data *sd) { int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_addspiritball_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *interval, int *max); + if (HPMHooks.count.HP_pc_addspiritball_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *interval, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &interval, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56202,11 +65028,38 @@ int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) { { 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++ ) { + if (HPMHooks.count.HP_pc_addspiritball_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, interval, max); + } + } + return retVal___; +} +int HP_pc_addspiritball_sub(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_addspiritball_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_addspiritball_sub_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.addspiritball_sub(sd); + } + if (HPMHooks.count.HP_pc_addspiritball_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addspiritball_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_addspiritball_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; @@ -56214,14 +65067,14 @@ int HP_pc_addspiritball(struct map_session_data *sd, int interval, int max) { int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_delspiritball_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *count, int *type); + if (HPMHooks.count.HP_pc_delspiritball_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *count, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &count, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56229,11 +65082,38 @@ int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { { 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++ ) { + if (HPMHooks.count.HP_pc_delspiritball_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, count, type); + } + } + return retVal___; +} +int HP_pc_delspiritball_sub(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_delspiritball_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_delspiritball_sub_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.delspiritball_sub(sd); + } + if (HPMHooks.count.HP_pc_delspiritball_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_delspiritball_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_delspiritball_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); } } return retVal___; @@ -56241,14 +65121,14 @@ int HP_pc_delspiritball(struct map_session_data *sd, int count, int type) { int HP_pc_getmaxspiritball(struct map_session_data *sd, int min) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_getmaxspiritball_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *min); + if (HPMHooks.count.HP_pc_getmaxspiritball_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *min); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_getmaxspiritball_pre[hIndex].func; - retVal___ = preHookFunc(sd, &min); + retVal___ = preHookFunc(&sd, &min); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56256,64 +65136,91 @@ int HP_pc_getmaxspiritball(struct map_session_data *sd, int min) { { retVal___ = HPMHooks.source.pc.getmaxspiritball(sd, min); } - if( HPMHooks.count.HP_pc_getmaxspiritball_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *min); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_getmaxspiritball_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int min); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_getmaxspiritball_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_getmaxspiritball_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, &min); + retVal___ = postHookFunc(retVal___, sd, min); } } return retVal___; } -void HP_pc_addfame(struct map_session_data *sd, int count) { +void HP_pc_addfame(struct map_session_data *sd, int ranktype, int count) { int hIndex = 0; - if( HPMHooks.count.HP_pc_addfame_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *count); + if (HPMHooks.count.HP_pc_addfame_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *ranktype, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_addfame_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_addfame_pre[hIndex].func; - preHookFunc(sd, &count); + preHookFunc(&sd, &ranktype, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.pc.addfame(sd, count); + HPMHooks.source.pc.addfame(sd, ranktype, 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++ ) { + if (HPMHooks.count.HP_pc_addfame_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int ranktype, 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); + postHookFunc(sd, ranktype, count); } } return; } -unsigned char HP_pc_famerank(int char_id, int job) { +int HP_pc_fame_rank(int char_id, int ranktype) { int hIndex = 0; - unsigned char retVal___ = 0; - if( HPMHooks.count.HP_pc_famerank_pre ) { - unsigned char (*preHookFunc) (int *char_id, int *job); + int retVal___ = 0; + if (HPMHooks.count.HP_pc_fame_rank_pre > 0) { + int (*preHookFunc) (int *char_id, int *ranktype); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_fame_rank_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_fame_rank_pre[hIndex].func; + retVal___ = preHookFunc(&char_id, &ranktype); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.fame_rank(char_id, ranktype); + } + if (HPMHooks.count.HP_pc_fame_rank_post > 0) { + int (*postHookFunc) (int retVal___, int char_id, int ranktype); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_fame_rank_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_fame_rank_post[hIndex].func; + retVal___ = postHookFunc(retVal___, char_id, ranktype); + } + } + return retVal___; +} +int HP_pc_famelist_type(uint16 job_mapid) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_famelist_type_pre > 0) { + int (*preHookFunc) (uint16 *job_mapid); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_famelist_type_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_famelist_type_pre[hIndex].func; + retVal___ = preHookFunc(&job_mapid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.famerank(char_id, job); + retVal___ = HPMHooks.source.pc.famelist_type(job_mapid); } - 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); + if (HPMHooks.count.HP_pc_famelist_type_post > 0) { + int (*postHookFunc) (int retVal___, uint16 job_mapid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_famelist_type_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_famelist_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, job_mapid); } } return retVal___; @@ -56321,14 +65228,14 @@ unsigned char HP_pc_famerank(int char_id, int job) { int HP_pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_set_hate_mob_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *pos, struct block_list *bl); + if (HPMHooks.count.HP_pc_set_hate_mob_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *pos, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_set_hate_mob_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &pos, &bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56336,11 +65243,11 @@ int HP_pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list * { 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++ ) { + if (HPMHooks.count.HP_pc_set_hate_mob_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, pos, bl); } } return retVal___; @@ -56348,14 +65255,14 @@ int HP_pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list * int HP_pc_readdb(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_readdb_pre ) { + if (HPMHooks.count.HP_pc_readdb_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56363,26 +65270,107 @@ int HP_pc_readdb(void) { { retVal___ = HPMHooks.source.pc.readdb(); } - if( HPMHooks.count.HP_pc_readdb_post ) { + if (HPMHooks.count.HP_pc_readdb_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_post; hIndex++ ) { + 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___; } +bool HP_pc_read_exp_db(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_read_exp_db_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_exp_db_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_read_exp_db_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.read_exp_db(); + } + if (HPMHooks.count.HP_pc_read_exp_db_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_exp_db_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_read_exp_db_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_pc_read_exp_db_sub(struct config_setting_t *conf, bool base) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_read_exp_db_sub_pre > 0) { + int (*preHookFunc) (struct config_setting_t **conf, bool *base); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_exp_db_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_read_exp_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(&conf, &base); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.read_exp_db_sub(conf, base); + } + if (HPMHooks.count.HP_pc_read_exp_db_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *conf, bool base); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_exp_db_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_read_exp_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, conf, base); + } + } + return retVal___; +} +bool HP_pc_read_exp_db_sub_class(struct config_setting_t *t, bool base) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_read_exp_db_sub_class_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **t, bool *base); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_exp_db_sub_class_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_read_exp_db_sub_class_pre[hIndex].func; + retVal___ = preHookFunc(&t, &base); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.read_exp_db_sub_class(t, base); + } + if (HPMHooks.count.HP_pc_read_exp_db_sub_class_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *t, bool base); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_exp_db_sub_class_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_read_exp_db_sub_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, t, base); + } + } + return retVal___; +} int HP_pc_map_day_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_map_day_timer_pre ) { + if (HPMHooks.count.HP_pc_map_day_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56390,11 +65378,11 @@ int HP_pc_map_day_timer(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_day_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_map_day_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -56402,14 +65390,14 @@ int HP_pc_map_day_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_map_night_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_map_night_timer_pre ) { + if (HPMHooks.count.HP_pc_map_night_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56417,25 +65405,25 @@ int HP_pc_map_night_timer(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_map_night_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_map_night_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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); + if (HPMHooks.count.HP_pc_inventory_rentals_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_inventory_rentals_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56443,9 +65431,9 @@ void HP_pc_inventory_rentals(struct map_session_data *sd) { { HPMHooks.source.pc.inventory_rentals(sd); } - if( HPMHooks.count.HP_pc_inventory_rentals_post ) { + if (HPMHooks.count.HP_pc_inventory_rentals_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rentals_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_inventory_rentals_post[hIndex].func; postHookFunc(sd); } @@ -56455,14 +65443,14 @@ void HP_pc_inventory_rentals(struct map_session_data *sd) { int HP_pc_inventory_rental_clear(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_inventory_rental_clear_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_inventory_rental_clear_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56470,9 +65458,9 @@ int HP_pc_inventory_rental_clear(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.inventory_rental_clear(sd); } - if( HPMHooks.count.HP_pc_inventory_rental_clear_post ) { + if (HPMHooks.count.HP_pc_inventory_rental_clear_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_clear_post; hIndex++ ) { + 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); } @@ -56481,14 +65469,14 @@ int HP_pc_inventory_rental_clear(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_pc_inventory_rental_add_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *seconds); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_add_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &seconds); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56496,38 +65484,38 @@ void HP_pc_inventory_rental_add(struct map_session_data *sd, int seconds) { { 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++ ) { + if (HPMHooks.count.HP_pc_inventory_rental_add_post > 0) { + 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); + postHookFunc(sd, seconds); } } return; } -int HP_pc_disguise(struct map_session_data *sd, int class_) { +int HP_pc_disguise(struct map_session_data *sd, int class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_disguise_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *class_); + if (HPMHooks.count.HP_pc_disguise_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_disguise_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_disguise_pre[hIndex].func; - retVal___ = preHookFunc(sd, &class_); + retVal___ = preHookFunc(&sd, &class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.disguise(sd, class_); + 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++ ) { + if (HPMHooks.count.HP_pc_disguise_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, sd, class); } } return retVal___; @@ -56535,14 +65523,14 @@ int HP_pc_disguise(struct map_session_data *sd, int class_) { bool HP_pc_isautolooting(struct map_session_data *sd, int nameid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_isautolooting_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *nameid); + if (HPMHooks.count.HP_pc_isautolooting_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_isautolooting_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_isautolooting_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + retVal___ = preHookFunc(&sd, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56550,25 +65538,25 @@ bool HP_pc_isautolooting(struct map_session_data *sd, int nameid) { { 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++ ) { + if (HPMHooks.count.HP_pc_isautolooting_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_pc_overheat_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_overheat_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_overheat_pre[hIndex].func; - preHookFunc(sd, &val); + preHookFunc(&sd, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56576,11 +65564,11 @@ void HP_pc_overheat(struct map_session_data *sd, int val) { { 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++ ) { + if (HPMHooks.count.HP_pc_overheat_post > 0) { + 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); + postHookFunc(sd, val); } } return; @@ -56588,14 +65576,14 @@ void HP_pc_overheat(struct map_session_data *sd, int val) { int HP_pc_banding(struct map_session_data *sd, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_banding_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv); + if (HPMHooks.count.HP_pc_banding_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_banding_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56603,25 +65591,25 @@ int HP_pc_banding(struct map_session_data *sd, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_pc_banding_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_pc_itemcd_do_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, bool *load); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemcd_do_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &load); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56629,11 +65617,11 @@ void HP_pc_itemcd_do(struct map_session_data *sd, bool load) { { 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++ ) { + if (HPMHooks.count.HP_pc_itemcd_do_post > 0) { + 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); + postHookFunc(sd, load); } } return; @@ -56641,14 +65629,14 @@ void HP_pc_itemcd_do(struct map_session_data *sd, bool load) { int HP_pc_load_combo(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_load_combo_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_load_combo_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56656,25 +65644,25 @@ int HP_pc_load_combo(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.load_combo(sd); } - if( HPMHooks.count.HP_pc_load_combo_post ) { + if (HPMHooks.count.HP_pc_load_combo_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_load_combo_post; hIndex++ ) { + 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___; } -void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int type) { +void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, enum spirit_charm_types type) { int hIndex = 0; - if( HPMHooks.count.HP_pc_add_charm_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *interval, int *max, int *type); + if (HPMHooks.count.HP_pc_add_charm_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *interval, int *max, enum spirit_charm_types *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_add_charm_pre[hIndex].func; - preHookFunc(sd, &interval, &max, &type); + preHookFunc(&sd, &interval, &max, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56682,25 +65670,25 @@ void HP_pc_add_charm(struct map_session_data *sd, int interval, int max, int typ { HPMHooks.source.pc.add_charm(sd, interval, max, type); } - if( HPMHooks.count.HP_pc_add_charm_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *interval, int *max, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_add_charm_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int interval, int max, enum spirit_charm_types type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_add_charm_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_add_charm_post[hIndex].func; - postHookFunc(sd, &interval, &max, &type); + postHookFunc(sd, interval, max, type); } } return; } -void HP_pc_del_charm(struct map_session_data *sd, int count, int type) { +void HP_pc_del_charm(struct map_session_data *sd, int count, enum spirit_charm_types type) { int hIndex = 0; - if( HPMHooks.count.HP_pc_del_charm_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *count, int *type); + if (HPMHooks.count.HP_pc_del_charm_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *count, enum spirit_charm_types *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_del_charm_pre[hIndex].func; - preHookFunc(sd, &count, &type); + preHookFunc(&sd, &count, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56708,25 +65696,25 @@ void HP_pc_del_charm(struct map_session_data *sd, int count, int type) { { HPMHooks.source.pc.del_charm(sd, count, type); } - if( HPMHooks.count.HP_pc_del_charm_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *count, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_del_charm_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int count, enum spirit_charm_types type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_del_charm_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_del_charm_post[hIndex].func; - postHookFunc(sd, &count, &type); + postHookFunc(sd, count, type); } } return; } 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); + if (HPMHooks.count.HP_pc_baselevelchanged_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_baselevelchanged_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56734,9 +65722,9 @@ void HP_pc_baselevelchanged(struct map_session_data *sd) { { HPMHooks.source.pc.baselevelchanged(sd); } - if( HPMHooks.count.HP_pc_baselevelchanged_post ) { + if (HPMHooks.count.HP_pc_baselevelchanged_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_baselevelchanged_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_baselevelchanged_post[hIndex].func; postHookFunc(sd); } @@ -56746,14 +65734,14 @@ void HP_pc_baselevelchanged(struct map_session_data *sd) { int HP_pc_level_penalty_mod(int diff, unsigned char race, uint32 mode, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_level_penalty_mod_pre ) { + if (HPMHooks.count.HP_pc_level_penalty_mod_pre > 0) { int (*preHookFunc) (int *diff, unsigned char *race, uint32 *mode, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56761,11 +65749,11 @@ int HP_pc_level_penalty_mod(int diff, unsigned char race, uint32 mode, int type) { 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, uint32 *mode, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_level_penalty_mod_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_level_penalty_mod_post > 0) { + int (*postHookFunc) (int retVal___, int diff, unsigned char race, uint32 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); + retVal___ = postHookFunc(retVal___, diff, race, mode, type); } } return retVal___; @@ -56773,14 +65761,14 @@ int HP_pc_level_penalty_mod(int diff, unsigned char race, uint32 mode, int type) int HP_pc_calc_skillpoint(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calc_skillpoint_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_calc_skillpoint_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56788,9 +65776,9 @@ int HP_pc_calc_skillpoint(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.calc_skillpoint(sd); } - if( HPMHooks.count.HP_pc_calc_skillpoint_post ) { + if (HPMHooks.count.HP_pc_calc_skillpoint_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calc_skillpoint_post; hIndex++ ) { + 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); } @@ -56800,14 +65788,14 @@ int HP_pc_calc_skillpoint(struct map_session_data *sd) { int HP_pc_invincible_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_invincible_timer_pre ) { + if (HPMHooks.count.HP_pc_invincible_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56815,11 +65803,11 @@ int HP_pc_invincible_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.invincible_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_invincible_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_invincible_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_invincible_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -56827,14 +65815,14 @@ int HP_pc_invincible_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_spiritball_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_spiritball_timer_pre ) { + if (HPMHooks.count.HP_pc_spiritball_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56842,11 +65830,11 @@ int HP_pc_spiritball_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.spiritball_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_spiritball_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_spiritball_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_spiritball_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -56854,16 +65842,16 @@ int HP_pc_spiritball_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_check_banding(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_check_banding_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_pc_check_banding_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56873,9 +65861,9 @@ int HP_pc_check_banding(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.pc.check_banding(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pc_check_banding_post ) { + if (HPMHooks.count.HP_pc_check_banding_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_banding_post; hIndex++ ) { + 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); @@ -56887,14 +65875,14 @@ int HP_pc_check_banding(struct block_list *bl, va_list ap) { int HP_pc_inventory_rental_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_inventory_rental_end_pre ) { + if (HPMHooks.count.HP_pc_inventory_rental_end_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56902,25 +65890,25 @@ int HP_pc_inventory_rental_end(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_inventory_rental_end_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_inventory_rental_end_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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); + if (HPMHooks.count.HP_pc_check_skilltree_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_skilltree_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -56928,26 +65916,26 @@ void HP_pc_check_skilltree(struct map_session_data *sd, int skill_id) { { 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++ ) { + if (HPMHooks.count.HP_pc_check_skilltree_post > 0) { + 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); + 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 HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv, short rate, short flag, int card_id) { int hIndex = 0; int retVal___ = 0; - 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); + if (HPMHooks.count.HP_pc_bonus_autospell_pre > 0) { + int (*preHookFunc) (struct s_autospell **spell, int *max, short *id, short *lv, short *rate, short *flag, int *card_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&spell, &max, &id, &lv, &rate, &flag, &card_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56955,26 +65943,26 @@ int HP_pc_bonus_autospell(struct s_autospell *spell, int max, short id, short lv { 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++ ) { + if (HPMHooks.count.HP_pc_bonus_autospell_post > 0) { + int (*postHookFunc) (int retVal___, struct s_autospell *spell, int max, short id, short lv, short rate, short flag, int 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); + 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 HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, int card_id) { int hIndex = 0; int retVal___ = 0; - 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); + if (HPMHooks.count.HP_pc_bonus_autospell_onskill_pre > 0) { + int (*preHookFunc) (struct s_autospell **spell, int *max, short *src_skill, short *id, short *lv, short *rate, int *card_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_autospell_onskill_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&spell, &max, &src_skill, &id, &lv, &rate, &card_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -56982,11 +65970,11 @@ int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_ { 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++ ) { + if (HPMHooks.count.HP_pc_bonus_autospell_onskill_post > 0) { + int (*postHookFunc) (int retVal___, struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, int 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); + retVal___ = postHookFunc(retVal___, spell, max, src_skill, id, lv, rate, card_id); } } return retVal___; @@ -56994,14 +65982,14 @@ int HP_pc_bonus_autospell_onskill(struct s_autospell *spell, int max, short src_ int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_bonus_addeff_pre ) { - int (*preHookFunc) (struct s_addeffect *effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); + if (HPMHooks.count.HP_pc_bonus_addeff_pre > 0) { + int (*preHookFunc) (struct s_addeffect **effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_pre; hIndex++ ) { + 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, &duration); + retVal___ = preHookFunc(&effect, &max, &id, &rate, &arrow_rate, &flag, &duration); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57009,11 +65997,11 @@ int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, int { retVal___ = HPMHooks.source.pc.bonus_addeff(effect, max, id, rate, arrow_rate, flag, duration); } - if( HPMHooks.count.HP_pc_bonus_addeff_post ) { - int (*postHookFunc) (int retVal___, struct s_addeffect *effect, int *max, enum sc_type *id, int16 *rate, int16 *arrow_rate, uint8 *flag, uint16 *duration); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_bonus_addeff_post > 0) { + int (*postHookFunc) (int retVal___, struct s_addeffect *effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration); + 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, &duration); + retVal___ = postHookFunc(retVal___, effect, max, id, rate, arrow_rate, flag, duration); } } return retVal___; @@ -57021,14 +66009,14 @@ int HP_pc_bonus_addeff(struct s_addeffect *effect, int max, enum sc_type id, int 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___ = 0; - 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); + if (HPMHooks.count.HP_pc_bonus_addeff_onskill_pre > 0) { + int (*preHookFunc) (struct s_addeffectonskill **effect, int *max, enum sc_type *id, short *rate, short *skill_id, unsigned char *target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_addeff_onskill_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&effect, &max, &id, &rate, &skill_id, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57036,52 +66024,52 @@ int HP_pc_bonus_addeff_onskill(struct s_addeffectonskill *effect, int max, enum { 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++ ) { + if (HPMHooks.count.HP_pc_bonus_addeff_onskill_post > 0) { + 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); + 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 HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate) { int hIndex = 0; int retVal___ = 0; - 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); + if (HPMHooks.count.HP_pc_bonus_item_drop_pre > 0) { + int (*preHookFunc) (struct s_add_drop **drop, const short *max, int *id, bool *is_group, int *race, int *rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bonus_item_drop_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&drop, &max, &id, &is_group, &race, &rate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.bonus_item_drop(drop, max, id, group, race, rate); + retVal___ = HPMHooks.source.pc.bonus_item_drop(drop, max, id, is_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++ ) { + if (HPMHooks.count.HP_pc_bonus_item_drop_post > 0) { + int (*postHookFunc) (int retVal___, struct s_add_drop *drop, const short max, int id, bool is_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); + retVal___ = postHookFunc(retVal___, drop, max, id, is_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) { +void HP_pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *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); + if (HPMHooks.count.HP_pc_calcexp_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &base_exp, &job_exp, &src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57089,9 +66077,9 @@ void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned { 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++ ) { + if (HPMHooks.count.HP_pc_calcexp_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, uint64 *base_exp, uint64 *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); } @@ -57101,14 +66089,14 @@ void HP_pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned int HP_pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_respawn_timer_pre ) { + if (HPMHooks.count.HP_pc_respawn_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57116,11 +66104,11 @@ int HP_pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.respawn_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_respawn_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_respawn_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_respawn_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -57128,16 +66116,16 @@ int HP_pc_respawn_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_jobchange_killclone(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_jobchange_killclone_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_pc_jobchange_killclone_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57147,9 +66135,9 @@ int HP_pc_jobchange_killclone(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.pc.jobchange_killclone(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pc_jobchange_killclone_post ) { + if (HPMHooks.count.HP_pc_jobchange_killclone_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobchange_killclone_post; hIndex++ ) { + 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); @@ -57161,14 +66149,14 @@ int HP_pc_jobchange_killclone(struct block_list *bl, va_list ap) { int HP_pc_getstat(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_getstat_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if (HPMHooks.count.HP_pc_getstat_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_getstat_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_getstat_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57176,11 +66164,11 @@ int HP_pc_getstat(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_pc_getstat_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type); } } return retVal___; @@ -57188,14 +66176,14 @@ int HP_pc_getstat(struct map_session_data *sd, int type) { int HP_pc_setstat(struct map_session_data *sd, int type, int val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_setstat_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type, int *val); + if (HPMHooks.count.HP_pc_setstat_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_setstat_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57203,11 +66191,11 @@ int HP_pc_setstat(struct map_session_data *sd, int type, int val) { { 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++ ) { + if (HPMHooks.count.HP_pc_setstat_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type, val); } } return retVal___; @@ -57215,14 +66203,14 @@ int HP_pc_setstat(struct map_session_data *sd, int type, int val) { int HP_pc_eventtimer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_eventtimer_pre ) { + if (HPMHooks.count.HP_pc_eventtimer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57230,11 +66218,11 @@ int HP_pc_eventtimer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.eventtimer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_eventtimer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_eventtimer_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_eventtimer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -57242,16 +66230,16 @@ int HP_pc_eventtimer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_daynight_timer_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + if (HPMHooks.count.HP_pc_daynight_timer_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_daynight_timer_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57261,9 +66249,9 @@ int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.pc.daynight_timer_sub(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pc_daynight_timer_sub_post ) { + if (HPMHooks.count.HP_pc_daynight_timer_sub_post > 0) { 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++ ) { + 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); @@ -57275,14 +66263,14 @@ int HP_pc_daynight_timer_sub(struct map_session_data *sd, va_list ap) { int HP_pc_charm_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_charm_timer_pre ) { + if (HPMHooks.count.HP_pc_charm_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57290,11 +66278,11 @@ int HP_pc_charm_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.charm_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_charm_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_charm_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_charm_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -57302,14 +66290,14 @@ int HP_pc_charm_timer(int tid, int64 tick, int id, intptr_t data) { bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_readdb_levelpenalty_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + if (HPMHooks.count.HP_pc_readdb_levelpenalty_pre > 0) { + bool (*preHookFunc) (char **fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_readdb_levelpenalty_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&fields, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57317,11 +66305,11 @@ bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_pc_readdb_levelpenalty_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, fields, columns, current); } } return retVal___; @@ -57329,14 +66317,14 @@ bool HP_pc_readdb_levelpenalty(char *fields[], int columns, int current) { int HP_pc_autosave(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_autosave_pre ) { + if (HPMHooks.count.HP_pc_autosave_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57344,11 +66332,11 @@ int HP_pc_autosave(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.autosave(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_autosave_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autosave_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_autosave_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -57356,14 +66344,14 @@ int HP_pc_autosave(int tid, int64 tick, int id, intptr_t data) { int HP_pc_follow_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_follow_timer_pre ) { + if (HPMHooks.count.HP_pc_follow_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57371,25 +66359,25 @@ int HP_pc_follow_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.follow_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_follow_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_follow_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_follow_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + 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 ) { + if (HPMHooks.count.HP_pc_read_skill_tree_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57397,25 +66385,52 @@ void HP_pc_read_skill_tree(void) { { HPMHooks.source.pc.read_skill_tree(); } - if( HPMHooks.count.HP_pc_read_skill_tree_post ) { + if (HPMHooks.count.HP_pc_read_skill_tree_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_tree_post; hIndex++ ) { + 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; } +bool HP_pc_read_skill_job_skip(short skill_id, int job_id) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_read_skill_job_skip_pre > 0) { + bool (*preHookFunc) (short *skill_id, int *job_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_job_skip_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_read_skill_job_skip_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &job_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.read_skill_job_skip(skill_id, job_id); + } + if (HPMHooks.count.HP_pc_read_skill_job_skip_post > 0) { + bool (*postHookFunc) (bool retVal___, short skill_id, int job_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_read_skill_job_skip_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_read_skill_job_skip_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skill_id, job_id); + } + } + return retVal___; +} void HP_pc_clear_skill_tree(void) { int hIndex = 0; - if( HPMHooks.count.HP_pc_clear_skill_tree_pre ) { + if (HPMHooks.count.HP_pc_clear_skill_tree_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clear_skill_tree_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_clear_skill_tree_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_clear_skill_tree_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57423,9 +66438,9 @@ void HP_pc_clear_skill_tree(void) { { HPMHooks.source.pc.clear_skill_tree(); } - if( HPMHooks.count.HP_pc_clear_skill_tree_post ) { + if (HPMHooks.count.HP_pc_clear_skill_tree_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_clear_skill_tree_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_clear_skill_tree_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_clear_skill_tree_post[hIndex].func; postHookFunc(); } @@ -57435,14 +66450,14 @@ void HP_pc_clear_skill_tree(void) { int HP_pc_isUseitem(struct map_session_data *sd, int n) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_isUseitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n); + if (HPMHooks.count.HP_pc_isUseitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_isUseitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_isUseitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &n); + retVal___ = preHookFunc(&sd, &n); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57450,11 +66465,11 @@ int HP_pc_isUseitem(struct map_session_data *sd, int n) { { 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++ ) { + if (HPMHooks.count.HP_pc_isUseitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, n); } } return retVal___; @@ -57462,16 +66477,16 @@ int HP_pc_isUseitem(struct map_session_data *sd, int n) { int HP_pc_show_steal(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_show_steal_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_pc_show_steal_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57481,9 +66496,9 @@ int HP_pc_show_steal(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.pc.show_steal(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pc_show_steal_post ) { + if (HPMHooks.count.HP_pc_show_steal_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_show_steal_post; hIndex++ ) { + 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); @@ -57495,14 +66510,14 @@ int HP_pc_show_steal(struct block_list *bl, va_list ap) { int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_checkcombo_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct item_data *data); + if (HPMHooks.count.HP_pc_checkcombo_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_checkcombo_pre[hIndex].func; - retVal___ = preHookFunc(sd, data); + retVal___ = preHookFunc(&sd, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57510,9 +66525,9 @@ int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) { { retVal___ = HPMHooks.source.pc.checkcombo(sd, data); } - if( HPMHooks.count.HP_pc_checkcombo_post ) { + if (HPMHooks.count.HP_pc_checkcombo_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_checkcombo_post; hIndex++ ) { + 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); } @@ -57522,14 +66537,14 @@ int HP_pc_checkcombo(struct map_session_data *sd, struct item_data *data) { int HP_pc_calcweapontype(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_calcweapontype_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_calcweapontype_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_calcweapontype_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57537,9 +66552,9 @@ int HP_pc_calcweapontype(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.calcweapontype(sd); } - if( HPMHooks.count.HP_pc_calcweapontype_post ) { + if (HPMHooks.count.HP_pc_calcweapontype_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcweapontype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_calcweapontype_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -57549,14 +66564,14 @@ int HP_pc_calcweapontype(struct map_session_data *sd) { int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_removecombo_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct item_data *data); + if (HPMHooks.count.HP_pc_removecombo_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct item_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_removecombo_pre[hIndex].func; - retVal___ = preHookFunc(sd, data); + retVal___ = preHookFunc(&sd, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57564,9 +66579,9 @@ int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) { { retVal___ = HPMHooks.source.pc.removecombo(sd, data); } - if( HPMHooks.count.HP_pc_removecombo_post ) { + if (HPMHooks.count.HP_pc_removecombo_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct item_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_removecombo_post; hIndex++ ) { + 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); } @@ -57575,14 +66590,14 @@ int HP_pc_removecombo(struct map_session_data *sd, struct item_data *data) { } void HP_pc_bank_deposit(struct map_session_data *sd, int money) { int hIndex = 0; - if( HPMHooks.count.HP_pc_bank_deposit_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *money); + if (HPMHooks.count.HP_pc_bank_deposit_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *money); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_bank_deposit_pre[hIndex].func; - preHookFunc(sd, &money); + preHookFunc(&sd, &money); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57590,25 +66605,25 @@ void HP_pc_bank_deposit(struct map_session_data *sd, int money) { { HPMHooks.source.pc.bank_deposit(sd, money); } - if( HPMHooks.count.HP_pc_bank_deposit_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *money); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_bank_deposit_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int money); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_deposit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_bank_deposit_post[hIndex].func; - postHookFunc(sd, &money); + postHookFunc(sd, money); } } return; } void HP_pc_bank_withdraw(struct map_session_data *sd, int money) { int hIndex = 0; - if( HPMHooks.count.HP_pc_bank_withdraw_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *money); + if (HPMHooks.count.HP_pc_bank_withdraw_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *money); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_bank_withdraw_pre[hIndex].func; - preHookFunc(sd, &money); + preHookFunc(&sd, &money); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57616,25 +66631,25 @@ void HP_pc_bank_withdraw(struct map_session_data *sd, int money) { { HPMHooks.source.pc.bank_withdraw(sd, money); } - if( HPMHooks.count.HP_pc_bank_withdraw_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *money); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_bank_withdraw_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int money); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bank_withdraw_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_bank_withdraw_post[hIndex].func; - postHookFunc(sd, &money); + postHookFunc(sd, money); } } return; } void HP_pc_rental_expire(struct map_session_data *sd, int i) { int hIndex = 0; - if( HPMHooks.count.HP_pc_rental_expire_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *i); + if (HPMHooks.count.HP_pc_rental_expire_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_rental_expire_pre[hIndex].func; - preHookFunc(sd, &i); + preHookFunc(&sd, &i); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57642,25 +66657,25 @@ void HP_pc_rental_expire(struct map_session_data *sd, int i) { { HPMHooks.source.pc.rental_expire(sd, i); } - if( HPMHooks.count.HP_pc_rental_expire_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_rental_expire_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int i); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_rental_expire_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_rental_expire_post[hIndex].func; - postHookFunc(sd, &i); + postHookFunc(sd, i); } } return; } void HP_pc_scdata_received(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_scdata_received_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_scdata_received_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_scdata_received_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57668,9 +66683,9 @@ void HP_pc_scdata_received(struct map_session_data *sd) { { HPMHooks.source.pc.scdata_received(sd); } - if( HPMHooks.count.HP_pc_scdata_received_post ) { + if (HPMHooks.count.HP_pc_scdata_received_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_scdata_received_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_scdata_received_post[hIndex].func; postHookFunc(sd); } @@ -57679,14 +66694,14 @@ void HP_pc_scdata_received(struct map_session_data *sd) { } void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) { int hIndex = 0; - if( HPMHooks.count.HP_pc_bound_clear_pre ) { - void (*preHookFunc) (struct map_session_data *sd, enum e_item_bound_type *type); + if (HPMHooks.count.HP_pc_bound_clear_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum e_item_bound_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_bound_clear_pre[hIndex].func; - preHookFunc(sd, &type); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57694,11 +66709,11 @@ void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) { HPMHooks.source.pc.bound_clear(sd, type); } - if( HPMHooks.count.HP_pc_bound_clear_post ) { - void (*postHookFunc) (struct map_session_data *sd, enum e_item_bound_type *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_bound_clear_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum e_item_bound_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_bound_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_bound_clear_post[hIndex].func; - postHookFunc(sd, &type); + postHookFunc(sd, type); } } return; @@ -57706,14 +66721,14 @@ void HP_pc_bound_clear(struct map_session_data *sd, enum e_item_bound_type type) int HP_pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_expiration_timer_pre ) { + if (HPMHooks.count.HP_pc_expiration_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_expiration_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57721,11 +66736,11 @@ int HP_pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.expiration_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_expiration_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_expiration_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expiration_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_expiration_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -57733,14 +66748,14 @@ int HP_pc_expiration_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_global_expiration_timer_pre ) { + if (HPMHooks.count.HP_pc_global_expiration_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_global_expiration_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57748,25 +66763,25 @@ int HP_pc_global_expiration_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pc.global_expiration_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pc_global_expiration_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_global_expiration_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_global_expiration_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_global_expiration_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } void HP_pc_expire_check(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_expire_check_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_expire_check_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_expire_check_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57774,52 +66789,52 @@ void HP_pc_expire_check(struct map_session_data *sd) { { HPMHooks.source.pc.expire_check(sd); } - if( HPMHooks.count.HP_pc_expire_check_post ) { + if (HPMHooks.count.HP_pc_expire_check_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expire_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_expire_check_post[hIndex].func; postHookFunc(sd); } } return; } -bool HP_pc_db_checkid(unsigned int class_) { +bool HP_pc_db_checkid(int class) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pc_db_checkid_pre ) { - bool (*preHookFunc) (unsigned int *class_); + if (HPMHooks.count.HP_pc_db_checkid_pre > 0) { + bool (*preHookFunc) (int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_db_checkid_pre[hIndex].func; - retVal___ = preHookFunc(&class_); + retVal___ = preHookFunc(&class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.pc.db_checkid(class_); + retVal___ = HPMHooks.source.pc.db_checkid(class); } - if( HPMHooks.count.HP_pc_db_checkid_post ) { - bool (*postHookFunc) (bool retVal___, unsigned int *class_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_db_checkid_post > 0) { + bool (*postHookFunc) (bool retVal___, int class); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_db_checkid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_db_checkid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &class_); + retVal___ = postHookFunc(retVal___, class); } } return retVal___; } void HP_pc_validate_levels(void) { int hIndex = 0; - if( HPMHooks.count.HP_pc_validate_levels_pre ) { + if (HPMHooks.count.HP_pc_validate_levels_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_validate_levels_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57827,25 +66842,130 @@ void HP_pc_validate_levels(void) { { HPMHooks.source.pc.validate_levels(); } - if( HPMHooks.count.HP_pc_validate_levels_post ) { + if (HPMHooks.count.HP_pc_validate_levels_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_validate_levels_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_validate_levels_post[hIndex].func; postHookFunc(); } } return; } +void HP_pc_update_job_and_level(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_update_job_and_level_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_job_and_level_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_update_job_and_level_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.update_job_and_level(sd); + } + if (HPMHooks.count.HP_pc_update_job_and_level_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_job_and_level_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_update_job_and_level_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +void HP_pc_clear_exp_groups(void) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_clear_exp_groups_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_clear_exp_groups_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_clear_exp_groups_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.clear_exp_groups(); + } + if (HPMHooks.count.HP_pc_clear_exp_groups_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_clear_exp_groups_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_clear_exp_groups_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_pc_init_exp_groups(void) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_init_exp_groups_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_exp_groups_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_init_exp_groups_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.init_exp_groups(); + } + if (HPMHooks.count.HP_pc_init_exp_groups_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_init_exp_groups_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_init_exp_groups_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_pc_job_is_dummy(int job) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_job_is_dummy_pre > 0) { + bool (*preHookFunc) (int *job); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_job_is_dummy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_job_is_dummy_pre[hIndex].func; + retVal___ = preHookFunc(&job); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.job_is_dummy(job); + } + if (HPMHooks.count.HP_pc_job_is_dummy_post > 0) { + bool (*postHookFunc) (bool retVal___, int job); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_job_is_dummy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_job_is_dummy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, job); + } + } + return retVal___; +} void HP_pc_autotrade_load(void) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_load_pre ) { + if (HPMHooks.count.HP_pc_autotrade_load_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_autotrade_load_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57853,9 +66973,9 @@ void HP_pc_autotrade_load(void) { { HPMHooks.source.pc.autotrade_load(); } - if( HPMHooks.count.HP_pc_autotrade_load_post ) { + if (HPMHooks.count.HP_pc_autotrade_load_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_autotrade_load_post[hIndex].func; postHookFunc(); } @@ -57864,14 +66984,14 @@ void HP_pc_autotrade_load(void) { } void HP_pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_update_action action) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_update_pre ) { - void (*preHookFunc) (struct map_session_data *sd, enum e_pc_autotrade_update_action *action); + if (HPMHooks.count.HP_pc_autotrade_update_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum e_pc_autotrade_update_action *action); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_autotrade_update_pre[hIndex].func; - preHookFunc(sd, &action); + preHookFunc(&sd, &action); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57879,25 +66999,25 @@ void HP_pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_upd { HPMHooks.source.pc.autotrade_update(sd, action); } - if( HPMHooks.count.HP_pc_autotrade_update_post ) { - void (*postHookFunc) (struct map_session_data *sd, enum e_pc_autotrade_update_action *action); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_autotrade_update_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum e_pc_autotrade_update_action action); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_autotrade_update_post[hIndex].func; - postHookFunc(sd, &action); + postHookFunc(sd, action); } } return; } void HP_pc_autotrade_start(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_start_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_autotrade_start_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_autotrade_start_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57905,9 +67025,9 @@ void HP_pc_autotrade_start(struct map_session_data *sd) { { HPMHooks.source.pc.autotrade_start(sd); } - if( HPMHooks.count.HP_pc_autotrade_start_post ) { + if (HPMHooks.count.HP_pc_autotrade_start_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_start_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_autotrade_start_post[hIndex].func; postHookFunc(sd); } @@ -57916,14 +67036,14 @@ void HP_pc_autotrade_start(struct map_session_data *sd) { } void HP_pc_autotrade_prepare(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_prepare_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_autotrade_prepare_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_autotrade_prepare_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57931,9 +67051,9 @@ void HP_pc_autotrade_prepare(struct map_session_data *sd) { { HPMHooks.source.pc.autotrade_prepare(sd); } - if( HPMHooks.count.HP_pc_autotrade_prepare_post ) { + if (HPMHooks.count.HP_pc_autotrade_prepare_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_prepare_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_autotrade_prepare_post[hIndex].func; postHookFunc(sd); } @@ -57942,14 +67062,14 @@ void HP_pc_autotrade_prepare(struct map_session_data *sd) { } void HP_pc_autotrade_populate(struct map_session_data *sd) { int hIndex = 0; - if( HPMHooks.count.HP_pc_autotrade_populate_pre ) { - void (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_autotrade_populate_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_autotrade_populate_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -57957,9 +67077,9 @@ void HP_pc_autotrade_populate(struct map_session_data *sd) { { HPMHooks.source.pc.autotrade_populate(sd); } - if( HPMHooks.count.HP_pc_autotrade_populate_post ) { + if (HPMHooks.count.HP_pc_autotrade_populate_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_populate_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_autotrade_populate_post[hIndex].func; postHookFunc(sd); } @@ -57969,16 +67089,16 @@ void HP_pc_autotrade_populate(struct map_session_data *sd) { int HP_pc_autotrade_final(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_autotrade_final_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_pc_autotrade_final_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_final_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_pc_autotrade_final_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -57988,12 +67108,12 @@ int HP_pc_autotrade_final(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.pc.autotrade_final(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pc_autotrade_final_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_final_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_autotrade_final_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_autotrade_final_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_pc_autotrade_final_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -58002,14 +67122,14 @@ int HP_pc_autotrade_final(union DBKey key, struct DBData *data, va_list ap) { int HP_pc_check_job_name(const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_check_job_name_pre ) { - int (*preHookFunc) (const char *name); + if (HPMHooks.count.HP_pc_check_job_name_pre > 0) { + int (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_check_job_name_pre[hIndex].func; - retVal___ = preHookFunc(name); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58017,9 +67137,9 @@ int HP_pc_check_job_name(const char *name) { { retVal___ = HPMHooks.source.pc.check_job_name(name); } - if( HPMHooks.count.HP_pc_check_job_name_post ) { + if (HPMHooks.count.HP_pc_check_job_name_post > 0) { int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_job_name_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_check_job_name_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -58028,14 +67148,14 @@ int HP_pc_check_job_name(const char *name) { } void HP_pc_update_idle_time(struct map_session_data *sd, enum e_battle_config_idletime type) { int hIndex = 0; - if( HPMHooks.count.HP_pc_update_idle_time_pre ) { - void (*preHookFunc) (struct map_session_data *sd, enum e_battle_config_idletime *type); + if (HPMHooks.count.HP_pc_update_idle_time_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum e_battle_config_idletime *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_idle_time_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_idle_time_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_update_idle_time_pre[hIndex].func; - preHookFunc(sd, &type); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58043,11 +67163,11 @@ void HP_pc_update_idle_time(struct map_session_data *sd, enum e_battle_config_id { HPMHooks.source.pc.update_idle_time(sd, type); } - if( HPMHooks.count.HP_pc_update_idle_time_post ) { - void (*postHookFunc) (struct map_session_data *sd, enum e_battle_config_idletime *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_idle_time_post; hIndex++ ) { + if (HPMHooks.count.HP_pc_update_idle_time_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum e_battle_config_idletime type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_update_idle_time_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_update_idle_time_post[hIndex].func; - postHookFunc(sd, &type); + postHookFunc(sd, type); } } return; @@ -58055,14 +67175,14 @@ void HP_pc_update_idle_time(struct map_session_data *sd, enum e_battle_config_id int HP_pc_have_magnifier(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pc_have_magnifier_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_pc_have_magnifier_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_magnifier_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_magnifier_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_have_magnifier_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58070,27 +67190,302 @@ int HP_pc_have_magnifier(struct map_session_data *sd) { { retVal___ = HPMHooks.source.pc.have_magnifier(sd); } - if( HPMHooks.count.HP_pc_have_magnifier_post ) { + if (HPMHooks.count.HP_pc_have_magnifier_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_magnifier_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_magnifier_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_have_magnifier_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } } return retVal___; } -/* libpcre */ +int HP_pc_have_item_chain(struct map_session_data *sd, enum e_chain_cache chain_cache_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_have_item_chain_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, enum e_chain_cache *chain_cache_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_item_chain_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_have_item_chain_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &chain_cache_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.have_item_chain(sd, chain_cache_id); + } + if (HPMHooks.count.HP_pc_have_item_chain_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum e_chain_cache chain_cache_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_have_item_chain_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_have_item_chain_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, chain_cache_id); + } + } + return retVal___; +} +bool HP_pc_process_chat_message(struct map_session_data *sd, const char *message) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_process_chat_message_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const char **message); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_process_chat_message_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_process_chat_message_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &message); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.process_chat_message(sd, message); + } + if (HPMHooks.count.HP_pc_process_chat_message_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, const char *message); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_process_chat_message_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_process_chat_message_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, message); + } + } + return retVal___; +} +int HP_pc_wis_message_to_gm(const char *sender_name, int permission, const char *message) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_wis_message_to_gm_pre > 0) { + int (*preHookFunc) (const char **sender_name, int *permission, const char **message); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_pre[hIndex].func; + retVal___ = preHookFunc(&sender_name, &permission, &message); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.wis_message_to_gm(sender_name, permission, message); + } + if (HPMHooks.count.HP_pc_wis_message_to_gm_post > 0) { + int (*postHookFunc) (int retVal___, const char *sender_name, int permission, const char *message); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sender_name, permission, message); + } + } + return retVal___; +} +int HP_pc_wis_message_to_gm_sub(struct map_session_data *sd, va_list va) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pc_wis_message_to_gm_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list va); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_sub_pre; hIndex++) { + va_list va___copy; va_copy(va___copy, va); + preHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_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.pc.wis_message_to_gm_sub(sd, va___copy); + va_end(va___copy); + } + if (HPMHooks.count.HP_pc_wis_message_to_gm_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list va); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_wis_message_to_gm_sub_post; hIndex++) { + va_list va___copy; va_copy(va___copy, va); + postHookFunc = HPMHooks.list.HP_pc_wis_message_to_gm_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, va___copy); + va_end(va___copy); + } + } + return retVal___; +} +void HP_pc_check_supernovice_call(struct map_session_data *sd, const char *message) { + int hIndex = 0; + if (HPMHooks.count.HP_pc_check_supernovice_call_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **message); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_supernovice_call_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_check_supernovice_call_pre[hIndex].func; + preHookFunc(&sd, &message); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pc.check_supernovice_call(sd, message); + } + if (HPMHooks.count.HP_pc_check_supernovice_call_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const char *message); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_supernovice_call_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_check_supernovice_call_post[hIndex].func; + postHookFunc(sd, message); + } + } + return; +} +bool HP_pc_check_basicskill(struct map_session_data *sd, int level) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_check_basicskill_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *level); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_basicskill_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_check_basicskill_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &level); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.check_basicskill(sd, level); + } + if (HPMHooks.count.HP_pc_check_basicskill_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int level); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_check_basicskill_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_check_basicskill_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, level); + } + } + return retVal___; +} +bool HP_pc_isDeathPenaltyJob(uint16 job) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_isDeathPenaltyJob_pre > 0) { + bool (*preHookFunc) (uint16 *job); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_isDeathPenaltyJob_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_isDeathPenaltyJob_pre[hIndex].func; + retVal___ = preHookFunc(&job); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.isDeathPenaltyJob(job); + } + if (HPMHooks.count.HP_pc_isDeathPenaltyJob_post > 0) { + bool (*postHookFunc) (bool retVal___, uint16 job); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_isDeathPenaltyJob_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_isDeathPenaltyJob_post[hIndex].func; + retVal___ = postHookFunc(retVal___, job); + } + } + return retVal___; +} +bool HP_pc_has_second_costume(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_has_second_costume_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_has_second_costume_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_has_second_costume_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.has_second_costume(sd); + } + if (HPMHooks.count.HP_pc_has_second_costume_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_has_second_costume_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_has_second_costume_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +bool HP_pc_expandInventory(struct map_session_data *sd, int adjustSize) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_expandInventory_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *adjustSize); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expandInventory_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_expandInventory_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &adjustSize); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.expandInventory(sd, adjustSize); + } + if (HPMHooks.count.HP_pc_expandInventory_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int adjustSize); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_expandInventory_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_expandInventory_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, adjustSize); + } + } + return retVal___; +} +bool HP_pc_auto_exp_insurance(struct map_session_data *sd) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pc_auto_exp_insurance_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_auto_exp_insurance_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pc_auto_exp_insurance_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pc.auto_exp_insurance(sd); + } + if (HPMHooks.count.HP_pc_auto_exp_insurance_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_auto_exp_insurance_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pc_auto_exp_insurance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +/* pcre_interface */ pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr) { int hIndex = 0; pcre* retVal___ = NULL; - if( HPMHooks.count.HP_libpcre_compile_pre ) { - pcre* (*preHookFunc) (const char *pattern, int *options, const char **errptr, int *erroffset, const unsigned char *tableptr); + if (HPMHooks.count.HP_libpcre_compile_pre > 0) { + pcre* (*preHookFunc) (const char **pattern, int *options, const char ***errptr, int **erroffset, const unsigned char **tableptr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_compile_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_compile_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_compile_pre[hIndex].func; - retVal___ = preHookFunc(pattern, &options, errptr, erroffset, tableptr); + retVal___ = preHookFunc(&pattern, &options, &errptr, &erroffset, &tableptr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58098,11 +67493,11 @@ pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, { retVal___ = HPMHooks.source.libpcre.compile(pattern, options, errptr, erroffset, tableptr); } - if( HPMHooks.count.HP_libpcre_compile_post ) { - pcre* (*postHookFunc) (pcre* retVal___, const char *pattern, int *options, const char **errptr, int *erroffset, const unsigned char *tableptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_compile_post; hIndex++ ) { + if (HPMHooks.count.HP_libpcre_compile_post > 0) { + pcre* (*postHookFunc) (pcre* retVal___, const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_compile_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_compile_post[hIndex].func; - retVal___ = postHookFunc(retVal___, pattern, &options, errptr, erroffset, tableptr); + retVal___ = postHookFunc(retVal___, pattern, options, errptr, erroffset, tableptr); } } return retVal___; @@ -58110,14 +67505,14 @@ pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, pcre_extra* HP_libpcre_study(const pcre *code, int options, const char **errptr) { int hIndex = 0; pcre_extra* retVal___ = NULL; - if( HPMHooks.count.HP_libpcre_study_pre ) { - pcre_extra* (*preHookFunc) (const pcre *code, int *options, const char **errptr); + if (HPMHooks.count.HP_libpcre_study_pre > 0) { + pcre_extra* (*preHookFunc) (const pcre **code, int *options, const char ***errptr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_study_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_study_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_study_pre[hIndex].func; - retVal___ = preHookFunc(code, &options, errptr); + retVal___ = preHookFunc(&code, &options, &errptr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58125,11 +67520,11 @@ pcre_extra* HP_libpcre_study(const pcre *code, int options, const char **errptr) { retVal___ = HPMHooks.source.libpcre.study(code, options, errptr); } - if( HPMHooks.count.HP_libpcre_study_post ) { - pcre_extra* (*postHookFunc) (pcre_extra* retVal___, const pcre *code, int *options, const char **errptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_study_post; hIndex++ ) { + if (HPMHooks.count.HP_libpcre_study_post > 0) { + pcre_extra* (*postHookFunc) (pcre_extra* retVal___, const pcre *code, int options, const char **errptr); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_study_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_study_post[hIndex].func; - retVal___ = postHookFunc(retVal___, code, &options, errptr); + retVal___ = postHookFunc(retVal___, code, options, errptr); } } return retVal___; @@ -58137,14 +67532,14 @@ pcre_extra* HP_libpcre_study(const pcre *code, int options, const char **errptr) int HP_libpcre_exec(const pcre *code, const pcre_extra *extra, PCRE_SPTR subject, int length, int startoffset, int options, int *ovector, int ovecsize) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libpcre_exec_pre ) { - int (*preHookFunc) (const pcre *code, const pcre_extra *extra, PCRE_SPTR *subject, int *length, int *startoffset, int *options, int *ovector, int *ovecsize); + if (HPMHooks.count.HP_libpcre_exec_pre > 0) { + int (*preHookFunc) (const pcre **code, const pcre_extra **extra, PCRE_SPTR *subject, int *length, int *startoffset, int *options, int **ovector, int *ovecsize); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_exec_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_exec_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_exec_pre[hIndex].func; - retVal___ = preHookFunc(code, extra, &subject, &length, &startoffset, &options, ovector, &ovecsize); + retVal___ = preHookFunc(&code, &extra, &subject, &length, &startoffset, &options, &ovector, &ovecsize); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58152,25 +67547,25 @@ int HP_libpcre_exec(const pcre *code, const pcre_extra *extra, PCRE_SPTR subject { retVal___ = HPMHooks.source.libpcre.exec(code, extra, subject, length, startoffset, options, ovector, ovecsize); } - if( HPMHooks.count.HP_libpcre_exec_post ) { - int (*postHookFunc) (int retVal___, const pcre *code, const pcre_extra *extra, PCRE_SPTR *subject, int *length, int *startoffset, int *options, int *ovector, int *ovecsize); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_exec_post; hIndex++ ) { + if (HPMHooks.count.HP_libpcre_exec_post > 0) { + int (*postHookFunc) (int retVal___, const pcre *code, const pcre_extra *extra, PCRE_SPTR subject, int length, int startoffset, int options, int *ovector, int ovecsize); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_exec_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_exec_post[hIndex].func; - retVal___ = postHookFunc(retVal___, code, extra, &subject, &length, &startoffset, &options, ovector, &ovecsize); + retVal___ = postHookFunc(retVal___, code, extra, subject, length, startoffset, options, ovector, ovecsize); } } return retVal___; } void HP_libpcre_free(void *ptr) { int hIndex = 0; - if( HPMHooks.count.HP_libpcre_free_pre ) { - void (*preHookFunc) (void *ptr); + if (HPMHooks.count.HP_libpcre_free_pre > 0) { + void (*preHookFunc) (void **ptr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_free_pre[hIndex].func; - preHookFunc(ptr); + preHookFunc(&ptr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58178,9 +67573,9 @@ void HP_libpcre_free(void *ptr) { { HPMHooks.source.libpcre.free(ptr); } - if( HPMHooks.count.HP_libpcre_free_post ) { + if (HPMHooks.count.HP_libpcre_free_post > 0) { void (*postHookFunc) (void *ptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_free_post[hIndex].func; postHookFunc(ptr); } @@ -58190,14 +67585,14 @@ void HP_libpcre_free(void *ptr) { int HP_libpcre_copy_substring(const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int buffersize) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libpcre_copy_substring_pre ) { - int (*preHookFunc) (const char *subject, int *ovector, int *stringcount, int *stringnumber, char *buffer, int *buffersize); + if (HPMHooks.count.HP_libpcre_copy_substring_pre > 0) { + int (*preHookFunc) (const char **subject, int **ovector, int *stringcount, int *stringnumber, char **buffer, int *buffersize); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_substring_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_substring_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_copy_substring_pre[hIndex].func; - retVal___ = preHookFunc(subject, ovector, &stringcount, &stringnumber, buffer, &buffersize); + retVal___ = preHookFunc(&subject, &ovector, &stringcount, &stringnumber, &buffer, &buffersize); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58205,25 +67600,25 @@ int HP_libpcre_copy_substring(const char *subject, int *ovector, int stringcount { retVal___ = HPMHooks.source.libpcre.copy_substring(subject, ovector, stringcount, stringnumber, buffer, buffersize); } - if( HPMHooks.count.HP_libpcre_copy_substring_post ) { - int (*postHookFunc) (int retVal___, const char *subject, int *ovector, int *stringcount, int *stringnumber, char *buffer, int *buffersize); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_substring_post; hIndex++ ) { + if (HPMHooks.count.HP_libpcre_copy_substring_post > 0) { + int (*postHookFunc) (int retVal___, const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int buffersize); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_substring_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_copy_substring_post[hIndex].func; - retVal___ = postHookFunc(retVal___, subject, ovector, &stringcount, &stringnumber, buffer, &buffersize); + retVal___ = postHookFunc(retVal___, subject, ovector, stringcount, stringnumber, buffer, buffersize); } } return retVal___; } void HP_libpcre_free_substring(const char *stringptr) { int hIndex = 0; - if( HPMHooks.count.HP_libpcre_free_substring_pre ) { - void (*preHookFunc) (const char *stringptr); + if (HPMHooks.count.HP_libpcre_free_substring_pre > 0) { + void (*preHookFunc) (const char **stringptr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_substring_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_substring_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_free_substring_pre[hIndex].func; - preHookFunc(stringptr); + preHookFunc(&stringptr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58231,9 +67626,9 @@ void HP_libpcre_free_substring(const char *stringptr) { { HPMHooks.source.libpcre.free_substring(stringptr); } - if( HPMHooks.count.HP_libpcre_free_substring_post ) { + if (HPMHooks.count.HP_libpcre_free_substring_post > 0) { void (*postHookFunc) (const char *stringptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_substring_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_substring_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_free_substring_post[hIndex].func; postHookFunc(stringptr); } @@ -58243,14 +67638,14 @@ void HP_libpcre_free_substring(const char *stringptr) { int HP_libpcre_copy_named_substring(const pcre *code, const char *subject, int *ovector, int stringcount, const char *stringname, char *buffer, int buffersize) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libpcre_copy_named_substring_pre ) { - int (*preHookFunc) (const pcre *code, const char *subject, int *ovector, int *stringcount, const char *stringname, char *buffer, int *buffersize); + if (HPMHooks.count.HP_libpcre_copy_named_substring_pre > 0) { + int (*preHookFunc) (const pcre **code, const char **subject, int **ovector, int *stringcount, const char **stringname, char **buffer, int *buffersize); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_named_substring_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_named_substring_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_copy_named_substring_pre[hIndex].func; - retVal___ = preHookFunc(code, subject, ovector, &stringcount, stringname, buffer, &buffersize); + retVal___ = preHookFunc(&code, &subject, &ovector, &stringcount, &stringname, &buffer, &buffersize); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58258,11 +67653,11 @@ int HP_libpcre_copy_named_substring(const pcre *code, const char *subject, int * { retVal___ = HPMHooks.source.libpcre.copy_named_substring(code, subject, ovector, stringcount, stringname, buffer, buffersize); } - if( HPMHooks.count.HP_libpcre_copy_named_substring_post ) { - int (*postHookFunc) (int retVal___, const pcre *code, const char *subject, int *ovector, int *stringcount, const char *stringname, char *buffer, int *buffersize); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_named_substring_post; hIndex++ ) { + if (HPMHooks.count.HP_libpcre_copy_named_substring_post > 0) { + int (*postHookFunc) (int retVal___, const pcre *code, const char *subject, int *ovector, int stringcount, const char *stringname, char *buffer, int buffersize); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_named_substring_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_copy_named_substring_post[hIndex].func; - retVal___ = postHookFunc(retVal___, code, subject, ovector, &stringcount, stringname, buffer, &buffersize); + retVal___ = postHookFunc(retVal___, code, subject, ovector, stringcount, stringname, buffer, buffersize); } } return retVal___; @@ -58270,14 +67665,14 @@ int HP_libpcre_copy_named_substring(const pcre *code, const char *subject, int * int HP_libpcre_get_substring(const char *subject, int *ovector, int stringcount, int stringnumber, const char **stringptr) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_libpcre_get_substring_pre ) { - int (*preHookFunc) (const char *subject, int *ovector, int *stringcount, int *stringnumber, const char **stringptr); + if (HPMHooks.count.HP_libpcre_get_substring_pre > 0) { + int (*preHookFunc) (const char **subject, int **ovector, int *stringcount, int *stringnumber, const char ***stringptr); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_get_substring_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_get_substring_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_libpcre_get_substring_pre[hIndex].func; - retVal___ = preHookFunc(subject, ovector, &stringcount, &stringnumber, stringptr); + retVal___ = preHookFunc(&subject, &ovector, &stringcount, &stringnumber, &stringptr); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58285,27 +67680,27 @@ int HP_libpcre_get_substring(const char *subject, int *ovector, int stringcount, { retVal___ = HPMHooks.source.libpcre.get_substring(subject, ovector, stringcount, stringnumber, stringptr); } - if( HPMHooks.count.HP_libpcre_get_substring_post ) { - int (*postHookFunc) (int retVal___, const char *subject, int *ovector, int *stringcount, int *stringnumber, const char **stringptr); - for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_get_substring_post; hIndex++ ) { + if (HPMHooks.count.HP_libpcre_get_substring_post > 0) { + int (*postHookFunc) (int retVal___, const char *subject, int *ovector, int stringcount, int stringnumber, const char **stringptr); + for (hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_get_substring_post; hIndex++) { postHookFunc = HPMHooks.list.HP_libpcre_get_substring_post[hIndex].func; - retVal___ = postHookFunc(retVal___, subject, ovector, &stringcount, &stringnumber, stringptr); + retVal___ = postHookFunc(retVal___, subject, ovector, stringcount, stringnumber, stringptr); } } return retVal___; } -/* pet */ +/* pet_interface */ int HP_pet_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_init_pre ) { + if (HPMHooks.count.HP_pet_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58313,11 +67708,11 @@ int HP_pet_init(bool minimal) { { retVal___ = HPMHooks.source.pet.init(minimal); } - if( HPMHooks.count.HP_pet_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_post; hIndex++ ) { + if (HPMHooks.count.HP_pet_init_post > 0) { + int (*postHookFunc) (int retVal___, bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pet_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + retVal___ = postHookFunc(retVal___, minimal); } } return retVal___; @@ -58325,14 +67720,14 @@ int HP_pet_init(bool minimal) { int HP_pet_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_final_pre ) { + if (HPMHooks.count.HP_pet_final_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58340,9 +67735,9 @@ int HP_pet_final(void) { { retVal___ = HPMHooks.source.pet.final(); } - if( HPMHooks.count.HP_pet_final_post ) { + if (HPMHooks.count.HP_pet_final_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pet_final_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -58352,14 +67747,14 @@ int HP_pet_final(void) { int HP_pet_hungry_val(struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_hungry_val_pre ) { - int (*preHookFunc) (struct pet_data *pd); + if (HPMHooks.count.HP_pet_hungry_val_pre > 0) { + int (*preHookFunc) (struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&pd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58367,25 +67762,51 @@ int HP_pet_hungry_val(struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.hungry_val(pd); } - if( HPMHooks.count.HP_pet_hungry_val_post ) { + if (HPMHooks.count.HP_pet_hungry_val_post > 0) { int (*postHookFunc) (int retVal___, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_val_post; hIndex++ ) { + 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_hunger(struct pet_data *pd, int value) { + int hIndex = 0; + if (HPMHooks.count.HP_pet_set_hunger_pre > 0) { + void (*preHookFunc) (struct pet_data **pd, int *value); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_hunger_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_set_hunger_pre[hIndex].func; + preHookFunc(&pd, &value); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pet.set_hunger(pd, value); + } + if (HPMHooks.count.HP_pet_set_hunger_post > 0) { + void (*postHookFunc) (struct pet_data *pd, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_hunger_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_set_hunger_post[hIndex].func; + postHookFunc(pd, value); + } + } + return; +} 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); + if (HPMHooks.count.HP_pet_set_intimate_pre > 0) { + void (*preHookFunc) (struct pet_data **pd, int *value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_set_intimate_pre; hIndex++ ) { + 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); + preHookFunc(&pd, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -58393,11 +67814,11 @@ void HP_pet_set_intimate(struct pet_data *pd, int value) { { 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++ ) { + if (HPMHooks.count.HP_pet_set_intimate_post > 0) { + 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); + postHookFunc(pd, value); } } return; @@ -58405,14 +67826,14 @@ void HP_pet_set_intimate(struct pet_data *pd, int value) { int HP_pet_create_egg(struct map_session_data *sd, int item_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_create_egg_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *item_id); + if (HPMHooks.count.HP_pet_create_egg_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *item_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_create_egg_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &item_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58420,11 +67841,11 @@ int HP_pet_create_egg(struct map_session_data *sd, int item_id) { { 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++ ) { + if (HPMHooks.count.HP_pet_create_egg_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, item_id); } } return retVal___; @@ -58432,14 +67853,14 @@ int HP_pet_create_egg(struct map_session_data *sd, int item_id) { int HP_pet_unlocktarget(struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_unlocktarget_pre ) { - int (*preHookFunc) (struct pet_data *pd); + if (HPMHooks.count.HP_pet_unlocktarget_pre > 0) { + int (*preHookFunc) (struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_unlocktarget_pre[hIndex].func; - retVal___ = preHookFunc(pd); + retVal___ = preHookFunc(&pd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58447,9 +67868,9 @@ int HP_pet_unlocktarget(struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.unlocktarget(pd); } - if( HPMHooks.count.HP_pet_unlocktarget_post ) { + if (HPMHooks.count.HP_pet_unlocktarget_post > 0) { int (*postHookFunc) (int retVal___, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_unlocktarget_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pet_unlocktarget_post[hIndex].func; retVal___ = postHookFunc(retVal___, pd); } @@ -58459,14 +67880,14 @@ int HP_pet_unlocktarget(struct pet_data *pd) { int HP_pet_attackskill(struct pet_data *pd, int target_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_attackskill_pre ) { - int (*preHookFunc) (struct pet_data *pd, int *target_id); + if (HPMHooks.count.HP_pet_attackskill_pre > 0) { + int (*preHookFunc) (struct pet_data **pd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_attackskill_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&pd, &target_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58474,11 +67895,11 @@ int HP_pet_attackskill(struct pet_data *pd, int target_id) { { 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++ ) { + if (HPMHooks.count.HP_pet_attackskill_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, pd, target_id); } } return retVal___; @@ -58486,14 +67907,14 @@ int HP_pet_attackskill(struct pet_data *pd, int target_id) { int HP_pet_target_check(struct map_session_data *sd, struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_target_check_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, int *type); + if (HPMHooks.count.HP_pet_target_check_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_target_check_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58501,11 +67922,11 @@ int HP_pet_target_check(struct map_session_data *sd, struct block_list *bl, int { 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++ ) { + if (HPMHooks.count.HP_pet_target_check_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, bl, type); } } return retVal___; @@ -58513,14 +67934,14 @@ int HP_pet_target_check(struct map_session_data *sd, struct block_list *bl, int int HP_pet_sc_check(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_sc_check_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if (HPMHooks.count.HP_pet_sc_check_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_sc_check_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58528,11 +67949,11 @@ int HP_pet_sc_check(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_pet_sc_check_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, type); } } return retVal___; @@ -58540,14 +67961,14 @@ int HP_pet_sc_check(struct map_session_data *sd, int type) { int HP_pet_hungry(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_hungry_pre ) { + if (HPMHooks.count.HP_pet_hungry_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58555,11 +67976,11 @@ int HP_pet_hungry(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pet.hungry(tid, tick, id, data); } - if( HPMHooks.count.HP_pet_hungry_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_post; hIndex++ ) { + if (HPMHooks.count.HP_pet_hungry_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -58567,14 +67988,14 @@ int HP_pet_hungry(int tid, int64 tick, int id, intptr_t data) { int HP_pet_search_petDB_index(int key, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_search_petDB_index_pre ) { + if (HPMHooks.count.HP_pet_search_petDB_index_pre > 0) { int (*preHookFunc) (int *key, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_search_petDB_index_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58582,11 +68003,11 @@ int HP_pet_search_petDB_index(int key, int type) { { 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++ ) { + if (HPMHooks.count.HP_pet_search_petDB_index_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, key, type); } } return retVal___; @@ -58594,14 +68015,14 @@ int HP_pet_search_petDB_index(int key, int type) { int HP_pet_hungry_timer_delete(struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_hungry_timer_delete_pre ) { - int (*preHookFunc) (struct pet_data *pd); + if (HPMHooks.count.HP_pet_hungry_timer_delete_pre > 0) { + int (*preHookFunc) (struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&pd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58609,9 +68030,9 @@ int HP_pet_hungry_timer_delete(struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.hungry_timer_delete(pd); } - if( HPMHooks.count.HP_pet_hungry_timer_delete_post ) { + if (HPMHooks.count.HP_pet_hungry_timer_delete_post > 0) { int (*postHookFunc) (int retVal___, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_hungry_timer_delete_post; hIndex++ ) { + 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); } @@ -58621,14 +68042,14 @@ int HP_pet_hungry_timer_delete(struct pet_data *pd) { int HP_pet_performance(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_performance_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + if (HPMHooks.count.HP_pet_performance_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_performance_pre[hIndex].func; - retVal___ = preHookFunc(sd, pd); + retVal___ = preHookFunc(&sd, &pd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58636,9 +68057,9 @@ int HP_pet_performance(struct map_session_data *sd, struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.performance(sd, pd); } - if( HPMHooks.count.HP_pet_performance_post ) { + if (HPMHooks.count.HP_pet_performance_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_performance_post; hIndex++ ) { + 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); } @@ -58648,14 +68069,14 @@ int HP_pet_performance(struct map_session_data *sd, struct pet_data *pd) { int HP_pet_return_egg(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_return_egg_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + if (HPMHooks.count.HP_pet_return_egg_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_return_egg_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &pd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58663,9 +68084,9 @@ int HP_pet_return_egg(struct map_session_data *sd, struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.return_egg(sd, pd); } - if( HPMHooks.count.HP_pet_return_egg_post ) { + if (HPMHooks.count.HP_pet_return_egg_post > 0) { 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++ ) { + 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); } @@ -58675,14 +68096,14 @@ int HP_pet_return_egg(struct map_session_data *sd, struct pet_data *pd) { int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_data_init_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo); + if (HPMHooks.count.HP_pet_data_init_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct s_pet **petinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_data_init_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &petinfo); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58690,9 +68111,9 @@ int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) { { retVal___ = HPMHooks.source.pet.data_init(sd, petinfo); } - if( HPMHooks.count.HP_pet_data_init_post ) { + if (HPMHooks.count.HP_pet_data_init_post > 0) { 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++ ) { + 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); } @@ -58702,14 +68123,14 @@ int HP_pet_data_init(struct map_session_data *sd, struct s_pet *petinfo) { int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_birth_process_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct s_pet *petinfo); + if (HPMHooks.count.HP_pet_birth_process_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct s_pet **petinfo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_birth_process_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &petinfo); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58717,9 +68138,9 @@ int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) { { retVal___ = HPMHooks.source.pet.birth_process(sd, petinfo); } - if( HPMHooks.count.HP_pet_birth_process_post ) { + if (HPMHooks.count.HP_pet_birth_process_post > 0) { 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++ ) { + 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); } @@ -58729,14 +68150,14 @@ int HP_pet_birth_process(struct map_session_data *sd, struct s_pet *petinfo) { int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_recv_petdata_pre ) { - int (*preHookFunc) (int *account_id, struct s_pet *p, int *flag); + if (HPMHooks.count.HP_pet_recv_petdata_pre > 0) { + int (*preHookFunc) (int *account_id, struct s_pet **p, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recv_petdata_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&account_id, &p, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58744,26 +68165,26 @@ int HP_pet_recv_petdata(int account_id, struct s_pet *p, int flag) { { 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++ ) { + if (HPMHooks.count.HP_pet_recv_petdata_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, account_id, p, flag); } } return retVal___; } -int HP_pet_select_egg(struct map_session_data *sd, short egg_index) { +int HP_pet_select_egg(struct map_session_data *sd, int egg_index) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_select_egg_pre ) { - int (*preHookFunc) (struct map_session_data *sd, short *egg_index); + if (HPMHooks.count.HP_pet_select_egg_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *egg_index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_select_egg_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &egg_index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58771,11 +68192,11 @@ int HP_pet_select_egg(struct map_session_data *sd, short egg_index) { { 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++ ) { + if (HPMHooks.count.HP_pet_select_egg_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int 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); + retVal___ = postHookFunc(retVal___, sd, egg_index); } } return retVal___; @@ -58783,14 +68204,14 @@ int HP_pet_select_egg(struct map_session_data *sd, short egg_index) { int HP_pet_catch_process1(struct map_session_data *sd, int target_class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_catch_process1_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *target_class); + if (HPMHooks.count.HP_pet_catch_process1_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *target_class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process1_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &target_class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58798,11 +68219,11 @@ int HP_pet_catch_process1(struct map_session_data *sd, int target_class) { { 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++ ) { + if (HPMHooks.count.HP_pet_catch_process1_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, target_class); } } return retVal___; @@ -58810,14 +68231,14 @@ int HP_pet_catch_process1(struct map_session_data *sd, int target_class) { int HP_pet_catch_process2(struct map_session_data *sd, int target_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_catch_process2_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *target_id); + if (HPMHooks.count.HP_pet_catch_process2_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_catch_process2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &target_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58825,26 +68246,26 @@ int HP_pet_catch_process2(struct map_session_data *sd, int target_id) { { 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++ ) { + if (HPMHooks.count.HP_pet_catch_process2_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, target_id); } } return retVal___; } -bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { +bool HP_pet_get_egg(int account_id, int pet_class, int pet_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_pet_get_egg_pre ) { - bool (*preHookFunc) (int *account_id, short *pet_class, int *pet_id); + if (HPMHooks.count.HP_pet_get_egg_pre > 0) { + bool (*preHookFunc) (int *account_id, int *pet_class, int *pet_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_pre; hIndex++ ) { + 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_class, &pet_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58852,11 +68273,11 @@ bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { { retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_class, pet_id); } - if( HPMHooks.count.HP_pet_get_egg_post ) { - bool (*postHookFunc) (bool retVal___, int *account_id, short *pet_class, int *pet_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_post; hIndex++ ) { + if (HPMHooks.count.HP_pet_get_egg_post > 0) { + bool (*postHookFunc) (bool retVal___, int account_id, int pet_class, int pet_id); + 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_class, &pet_id); + retVal___ = postHookFunc(retVal___, account_id, pet_class, pet_id); } } return retVal___; @@ -58864,14 +68285,14 @@ bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { int HP_pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_unequipitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + if (HPMHooks.count.HP_pet_unequipitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_unequipitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, pd); + retVal___ = preHookFunc(&sd, &pd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58879,9 +68300,9 @@ int HP_pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.unequipitem(sd, pd); } - if( HPMHooks.count.HP_pet_unequipitem_post ) { + if (HPMHooks.count.HP_pet_unequipitem_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_unequipitem_post; hIndex++ ) { + 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); } @@ -58891,14 +68312,14 @@ int HP_pet_unequipitem(struct map_session_data *sd, struct pet_data *pd) { int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_food_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct pet_data *pd); + if (HPMHooks.count.HP_pet_food_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct pet_data **pd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_food_pre[hIndex].func; - retVal___ = preHookFunc(sd, pd); + retVal___ = preHookFunc(&sd, &pd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58906,9 +68327,9 @@ int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) { { retVal___ = HPMHooks.source.pet.food(sd, pd); } - if( HPMHooks.count.HP_pet_food_post ) { + if (HPMHooks.count.HP_pet_food_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct pet_data *pd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_food_post; hIndex++ ) { + 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); } @@ -58918,16 +68339,16 @@ int HP_pet_food(struct map_session_data *sd, struct pet_data *pd) { int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58937,9 +68358,9 @@ int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_pet_ai_sub_hard_lootsearch_post > 0) { 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++ ) { + 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); @@ -58951,14 +68372,14 @@ int HP_pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { int HP_pet_menu(struct map_session_data *sd, int menunum) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_menu_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *menunum); + if (HPMHooks.count.HP_pet_menu_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *menunum); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_menu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_menu_pre[hIndex].func; - retVal___ = preHookFunc(sd, &menunum); + retVal___ = preHookFunc(&sd, &menunum); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58966,11 +68387,11 @@ int HP_pet_menu(struct map_session_data *sd, int menunum) { { 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++ ) { + if (HPMHooks.count.HP_pet_menu_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, menunum); } } return retVal___; @@ -58978,14 +68399,14 @@ int HP_pet_menu(struct map_session_data *sd, int menunum) { int HP_pet_change_name(struct map_session_data *sd, const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_change_name_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *name); + if (HPMHooks.count.HP_pet_change_name_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -58993,9 +68414,9 @@ int HP_pet_change_name(struct map_session_data *sd, const char *name) { { retVal___ = HPMHooks.source.pet.change_name(sd, name); } - if( HPMHooks.count.HP_pet_change_name_post ) { + if (HPMHooks.count.HP_pet_change_name_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_post; hIndex++ ) { + 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); } @@ -59005,14 +68426,14 @@ int HP_pet_change_name(struct map_session_data *sd, const char *name) { int HP_pet_change_name_ack(struct map_session_data *sd, const char *name, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_change_name_ack_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const char *name, int *flag); + if (HPMHooks.count.HP_pet_change_name_ack_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **name, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &name, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59020,11 +68441,11 @@ int HP_pet_change_name_ack(struct map_session_data *sd, const char *name, int fl { 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, const char *name, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_change_name_ack_post; hIndex++ ) { + if (HPMHooks.count.HP_pet_change_name_ack_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const 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); + retVal___ = postHookFunc(retVal___, sd, name, flag); } } return retVal___; @@ -59032,14 +68453,14 @@ int HP_pet_change_name_ack(struct map_session_data *sd, const char *name, int fl int HP_pet_equipitem(struct map_session_data *sd, int index) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_equipitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index); + if (HPMHooks.count.HP_pet_equipitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_equipitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_equipitem_pre[hIndex].func; - retVal___ = preHookFunc(sd, &index); + retVal___ = preHookFunc(&sd, &index); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59047,11 +68468,11 @@ int HP_pet_equipitem(struct map_session_data *sd, int index) { { 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++ ) { + if (HPMHooks.count.HP_pet_equipitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, index); } } return retVal___; @@ -59059,14 +68480,14 @@ int HP_pet_equipitem(struct map_session_data *sd, int index) { int HP_pet_randomwalk(struct pet_data *pd, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_randomwalk_pre ) { - int (*preHookFunc) (struct pet_data *pd, int64 *tick); + if (HPMHooks.count.HP_pet_randomwalk_pre > 0) { + int (*preHookFunc) (struct pet_data **pd, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_randomwalk_pre[hIndex].func; - retVal___ = preHookFunc(pd, &tick); + retVal___ = preHookFunc(&pd, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59074,11 +68495,11 @@ int HP_pet_randomwalk(struct pet_data *pd, int64 tick) { { retVal___ = HPMHooks.source.pet.randomwalk(pd, tick); } - if( HPMHooks.count.HP_pet_randomwalk_post ) { - int (*postHookFunc) (int retVal___, struct pet_data *pd, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_randomwalk_post; hIndex++ ) { + if (HPMHooks.count.HP_pet_randomwalk_post > 0) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, int64 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); + retVal___ = postHookFunc(retVal___, pd, tick); } } return retVal___; @@ -59086,14 +68507,14 @@ int HP_pet_randomwalk(struct pet_data *pd, int64 tick) { int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_sub_hard_pre ) { - int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd, int64 *tick); + if (HPMHooks.count.HP_pet_ai_sub_hard_pre > 0) { + int (*preHookFunc) (struct pet_data **pd, struct map_session_data **sd, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&pd, &sd, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59101,11 +68522,11 @@ int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 t { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_hard_post; hIndex++ ) { + if (HPMHooks.count.HP_pet_ai_sub_hard_post > 0) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, struct map_session_data *sd, int64 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); + retVal___ = postHookFunc(retVal___, pd, sd, tick); } } return retVal___; @@ -59113,16 +68534,16 @@ int HP_pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int64 t int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_sub_foreachclient_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + if (HPMHooks.count.HP_pet_ai_sub_foreachclient_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_sub_foreachclient_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59132,9 +68553,9 @@ int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { retVal___ = HPMHooks.source.pet.ai_sub_foreachclient(sd, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_pet_ai_sub_foreachclient_post ) { + if (HPMHooks.count.HP_pet_ai_sub_foreachclient_post > 0) { 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++ ) { + 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); @@ -59146,14 +68567,14 @@ int HP_pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { int HP_pet_ai_hard(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_ai_hard_pre ) { + if (HPMHooks.count.HP_pet_ai_hard_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59161,11 +68582,11 @@ int HP_pet_ai_hard(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pet.ai_hard(tid, tick, id, data); } - if( HPMHooks.count.HP_pet_ai_hard_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_ai_hard_post; hIndex++ ) { + if (HPMHooks.count.HP_pet_ai_hard_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -59173,14 +68594,14 @@ int HP_pet_ai_hard(int tid, int64 tick, int id, intptr_t data) { int HP_pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_delay_item_drop_pre ) { + if (HPMHooks.count.HP_pet_delay_item_drop_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59188,11 +68609,11 @@ int HP_pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_delay_item_drop_post; hIndex++ ) { + if (HPMHooks.count.HP_pet_delay_item_drop_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -59200,14 +68621,14 @@ int HP_pet_delay_item_drop(int tid, int64 tick, int id, intptr_t data) { int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_lootitem_drop_pre ) { - int (*preHookFunc) (struct pet_data *pd, struct map_session_data *sd); + if (HPMHooks.count.HP_pet_lootitem_drop_pre > 0) { + int (*preHookFunc) (struct pet_data **pd, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_lootitem_drop_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&pd, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59215,9 +68636,9 @@ int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) { { retVal___ = HPMHooks.source.pet.lootitem_drop(pd, sd); } - if( HPMHooks.count.HP_pet_lootitem_drop_post ) { + if (HPMHooks.count.HP_pet_lootitem_drop_post > 0) { 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++ ) { + 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); } @@ -59227,14 +68648,14 @@ int HP_pet_lootitem_drop(struct pet_data *pd, struct map_session_data *sd) { int HP_pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_skill_bonus_timer_pre ) { + if (HPMHooks.count.HP_pet_skill_bonus_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59242,11 +68663,11 @@ int HP_pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_bonus_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pet_skill_bonus_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -59254,14 +68675,14 @@ int HP_pet_skill_bonus_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_recovery_timer_pre ) { + if (HPMHooks.count.HP_pet_recovery_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59269,11 +68690,11 @@ int HP_pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.pet.recovery_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_pet_recovery_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_recovery_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pet_recovery_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -59281,14 +68702,14 @@ int HP_pet_recovery_timer(int tid, int64 tick, int id, intptr_t data) { int HP_pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_pet_skill_support_timer_pre ) { + if (HPMHooks.count.HP_pet_skill_support_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59296,53 +68717,185 @@ int HP_pet_skill_support_timer(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_skill_support_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_pet_skill_support_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } -int HP_pet_read_db(void) { +void HP_pet_read_db(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_pet_read_db_pre ) { - int (*preHookFunc) (void); + if (HPMHooks.count.HP_pet_read_db_pre > 0) { + void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_read_db_pre[hIndex].func; - retVal___ = preHookFunc(); + preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return retVal___; + return; } } { - retVal___ = HPMHooks.source.pet.read_db(); + 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++ ) { + if (HPMHooks.count.HP_pet_read_db_post > 0) { + void (*postHookFunc) (void); + 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___); + postHookFunc(); + } + } + return; +} +int HP_pet_read_db_libconfig(const char *filename, bool ignore_missing) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pet_read_db_libconfig_pre > 0) { + int (*preHookFunc) (const char **filename, bool *ignore_missing); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_read_db_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(&filename, &ignore_missing); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.read_db_libconfig(filename, ignore_missing); + } + if (HPMHooks.count.HP_pet_read_db_libconfig_post > 0) { + int (*postHookFunc) (int retVal___, const char *filename, bool ignore_missing); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_read_db_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename, ignore_missing); + } + } + return retVal___; +} +int HP_pet_read_db_sub(struct config_setting_t *it, int n, const char *source) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_pet_read_db_sub_pre > 0) { + int (*preHookFunc) (struct config_setting_t **it, int *n, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_read_db_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &n, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.read_db_sub(it, n, source); + } + if (HPMHooks.count.HP_pet_read_db_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *it, int n, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_read_db_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, n, source); + } + } + return retVal___; +} +bool HP_pet_read_db_sub_intimacy(int idx, struct config_setting_t *t) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_pet_read_db_sub_intimacy_pre > 0) { + bool (*preHookFunc) (int *idx, struct config_setting_t **t); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_intimacy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_read_db_sub_intimacy_pre[hIndex].func; + retVal___ = preHookFunc(&idx, &t); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.pet.read_db_sub_intimacy(idx, t); + } + if (HPMHooks.count.HP_pet_read_db_sub_intimacy_post > 0) { + bool (*postHookFunc) (bool retVal___, int idx, struct config_setting_t *t); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_intimacy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_read_db_sub_intimacy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, idx, t); } } return retVal___; } -/* quest */ +void HP_pet_read_db_clear(void) { + int hIndex = 0; + if (HPMHooks.count.HP_pet_read_db_clear_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_read_db_clear_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pet.read_db_clear(); + } + if (HPMHooks.count.HP_pet_read_db_clear_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_read_db_clear_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_pet_read_db_sub_evolution(struct config_setting_t *t, int n) { + int hIndex = 0; + if (HPMHooks.count.HP_pet_read_db_sub_evolution_pre > 0) { + void (*preHookFunc) (struct config_setting_t **t, int *n); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_evolution_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_pet_read_db_sub_evolution_pre[hIndex].func; + preHookFunc(&t, &n); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.pet.read_db_sub_evolution(t, n); + } + if (HPMHooks.count.HP_pet_read_db_sub_evolution_post > 0) { + void (*postHookFunc) (struct config_setting_t *t, int n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_read_db_sub_evolution_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_pet_read_db_sub_evolution_post[hIndex].func; + postHookFunc(t, n); + } + } + return; +} +/* quest_interface */ void HP_quest_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_quest_init_pre ) { + if (HPMHooks.count.HP_quest_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59350,25 +68903,25 @@ void HP_quest_init(bool minimal) { { HPMHooks.source.quest.init(minimal); } - if( HPMHooks.count.HP_quest_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_post; hIndex++ ) { + if (HPMHooks.count.HP_quest_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_quest_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_quest_final_pre ) { + if (HPMHooks.count.HP_quest_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59376,9 +68929,9 @@ void HP_quest_final(void) { { HPMHooks.source.quest.final(); } - if( HPMHooks.count.HP_quest_final_post ) { + if (HPMHooks.count.HP_quest_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_final_post[hIndex].func; postHookFunc(); } @@ -59387,14 +68940,14 @@ void HP_quest_final(void) { } void HP_quest_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_quest_reload_pre ) { + if (HPMHooks.count.HP_quest_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59402,9 +68955,9 @@ void HP_quest_reload(void) { { HPMHooks.source.quest.reload(); } - if( HPMHooks.count.HP_quest_reload_post ) { + if (HPMHooks.count.HP_quest_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_reload_post[hIndex].func; postHookFunc(); } @@ -59414,14 +68967,14 @@ void HP_quest_reload(void) { struct quest_db* HP_quest_db(int quest_id) { int hIndex = 0; struct quest_db* retVal___ = NULL; - if( HPMHooks.count.HP_quest_db_pre ) { + if (HPMHooks.count.HP_quest_db_pre > 0) { struct quest_db* (*preHookFunc) (int *quest_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_db_pre[hIndex].func; retVal___ = preHookFunc(&quest_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59429,11 +68982,11 @@ struct quest_db* HP_quest_db(int quest_id) { { retVal___ = HPMHooks.source.quest.db(quest_id); } - if( HPMHooks.count.HP_quest_db_post ) { - struct quest_db* (*postHookFunc) (struct quest_db* retVal___, int *quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_post; hIndex++ ) { + if (HPMHooks.count.HP_quest_db_post > 0) { + struct quest_db* (*postHookFunc) (struct quest_db* retVal___, int quest_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_db_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &quest_id); + retVal___ = postHookFunc(retVal___, quest_id); } } return retVal___; @@ -59441,14 +68994,14 @@ struct quest_db* HP_quest_db(int quest_id) { int HP_quest_pc_login(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_pc_login_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_quest_pc_login_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59456,38 +69009,38 @@ int HP_quest_pc_login(struct map_session_data *sd) { { retVal___ = HPMHooks.source.quest.pc_login(sd); } - if( HPMHooks.count.HP_quest_pc_login_post ) { + if (HPMHooks.count.HP_quest_pc_login_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_pc_login_post; hIndex++ ) { + 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(struct map_session_data *sd, int quest_id) { +int HP_quest_add(struct map_session_data *sd, int quest_id, unsigned int time_limit) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_add_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *quest_id); + if (HPMHooks.count.HP_quest_add_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *quest_id, unsigned int *time_limit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &quest_id, &time_limit); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.quest.add(sd, quest_id); + retVal___ = HPMHooks.source.quest.add(sd, quest_id, time_limit); } - if( HPMHooks.count.HP_quest_add_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_add_post; hIndex++ ) { + if (HPMHooks.count.HP_quest_add_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int quest_id, unsigned int time_limit); + 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); + retVal___ = postHookFunc(retVal___, sd, quest_id, time_limit); } } return retVal___; @@ -59495,14 +69048,14 @@ int HP_quest_add(struct map_session_data *sd, int quest_id) { int HP_quest_change(struct map_session_data *sd, int qid1, int qid2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_change_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *qid1, int *qid2); + if (HPMHooks.count.HP_quest_change_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *qid1, int *qid2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &qid1, &qid2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59510,11 +69063,11 @@ int HP_quest_change(struct map_session_data *sd, int qid1, int qid2) { { retVal___ = HPMHooks.source.quest.change(sd, qid1, qid2); } - if( HPMHooks.count.HP_quest_change_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *qid1, int *qid2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_change_post; hIndex++ ) { + if (HPMHooks.count.HP_quest_change_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *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); + retVal___ = postHookFunc(retVal___, sd, qid1, qid2); } } return retVal___; @@ -59522,14 +69075,14 @@ int HP_quest_change(struct map_session_data *sd, int qid1, int qid2) { int HP_quest_delete(struct map_session_data *sd, int quest_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_delete_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *quest_id); + if (HPMHooks.count.HP_quest_delete_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *quest_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &quest_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59537,11 +69090,11 @@ int HP_quest_delete(struct map_session_data *sd, int quest_id) { { retVal___ = HPMHooks.source.quest.delete(sd, quest_id); } - if( HPMHooks.count.HP_quest_delete_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *quest_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_quest_delete_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *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); + retVal___ = postHookFunc(retVal___, sd, quest_id); } } return retVal___; @@ -59549,16 +69102,16 @@ int HP_quest_delete(struct map_session_data *sd, int quest_id) { int HP_quest_update_objective_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_update_objective_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_quest_update_objective_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59568,9 +69121,9 @@ int HP_quest_update_objective_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.quest.update_objective_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_quest_update_objective_sub_post ) { + if (HPMHooks.count.HP_quest_update_objective_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_sub_post; hIndex++ ) { + 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); @@ -59581,14 +69134,14 @@ int HP_quest_update_objective_sub(struct block_list *bl, va_list ap) { } void HP_quest_update_objective(struct map_session_data *sd, int mob_id) { int hIndex = 0; - if( HPMHooks.count.HP_quest_update_objective_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int *mob_id); + if (HPMHooks.count.HP_quest_update_objective_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *mob_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &mob_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59596,11 +69149,11 @@ void HP_quest_update_objective(struct map_session_data *sd, int mob_id) { { HPMHooks.source.quest.update_objective(sd, mob_id); } - if( HPMHooks.count.HP_quest_update_objective_post ) { - void (*postHookFunc) (struct map_session_data *sd, int *mob_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_objective_post; hIndex++ ) { + if (HPMHooks.count.HP_quest_update_objective_post > 0) { + void (*postHookFunc) (struct map_session_data *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); + postHookFunc(sd, mob_id); } } return; @@ -59608,14 +69161,14 @@ void HP_quest_update_objective(struct map_session_data *sd, int mob_id) { int HP_quest_update_status(struct map_session_data *sd, int quest_id, enum quest_state qs) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_update_status_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *quest_id, enum quest_state *qs); + if (HPMHooks.count.HP_quest_update_status_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *quest_id, enum quest_state *qs); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &quest_id, &qs); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59623,11 +69176,11 @@ int HP_quest_update_status(struct map_session_data *sd, int quest_id, enum quest { retVal___ = HPMHooks.source.quest.update_status(sd, quest_id, qs); } - if( HPMHooks.count.HP_quest_update_status_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *quest_id, enum quest_state *qs); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_update_status_post; hIndex++ ) { + if (HPMHooks.count.HP_quest_update_status_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int quest_id, enum 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); + retVal___ = postHookFunc(retVal___, sd, quest_id, qs); } } return retVal___; @@ -59635,14 +69188,14 @@ int HP_quest_update_status(struct map_session_data *sd, int quest_id, enum quest int HP_quest_check(struct map_session_data *sd, int quest_id, enum quest_check_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_check_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *quest_id, enum quest_check_type *type); + if (HPMHooks.count.HP_quest_check_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *quest_id, enum quest_check_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &quest_id, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59650,25 +69203,25 @@ int HP_quest_check(struct map_session_data *sd, int quest_id, enum quest_check_t { retVal___ = HPMHooks.source.quest.check(sd, quest_id, type); } - if( HPMHooks.count.HP_quest_check_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *quest_id, enum quest_check_type *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_check_post; hIndex++ ) { + if (HPMHooks.count.HP_quest_check_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int quest_id, enum 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); + retVal___ = postHookFunc(retVal___, sd, quest_id, type); } } return retVal___; } void HP_quest_clear(void) { int hIndex = 0; - if( HPMHooks.count.HP_quest_clear_pre ) { + if (HPMHooks.count.HP_quest_clear_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_clear_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59676,9 +69229,9 @@ void HP_quest_clear(void) { { HPMHooks.source.quest.clear(); } - if( HPMHooks.count.HP_quest_clear_post ) { + if (HPMHooks.count.HP_quest_clear_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_clear_post[hIndex].func; postHookFunc(); } @@ -59688,14 +69241,14 @@ void HP_quest_clear(void) { int HP_quest_read_db(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_quest_read_db_pre ) { + if (HPMHooks.count.HP_quest_read_db_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59703,9 +69256,9 @@ int HP_quest_read_db(void) { { retVal___ = HPMHooks.source.quest.read_db(); } - if( HPMHooks.count.HP_quest_read_db_post ) { + if (HPMHooks.count.HP_quest_read_db_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_post; hIndex++ ) { + 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___); } @@ -59715,14 +69268,14 @@ int HP_quest_read_db(void) { struct quest_db* HP_quest_read_db_sub(struct config_setting_t *cs, int n, const char *source) { int hIndex = 0; struct quest_db* retVal___ = NULL; - if( HPMHooks.count.HP_quest_read_db_sub_pre ) { - struct quest_db* (*preHookFunc) (struct config_setting_t *cs, int *n, const char *source); + if (HPMHooks.count.HP_quest_read_db_sub_pre > 0) { + struct quest_db* (*preHookFunc) (struct config_setting_t **cs, int *n, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_quest_read_db_sub_pre[hIndex].func; - retVal___ = preHookFunc(cs, &n, source); + retVal___ = preHookFunc(&cs, &n, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59730,26 +69283,1465 @@ struct quest_db* HP_quest_read_db_sub(struct config_setting_t *cs, int n, const { retVal___ = HPMHooks.source.quest.read_db_sub(cs, n, source); } - if( HPMHooks.count.HP_quest_read_db_sub_post ) { - struct quest_db* (*postHookFunc) (struct quest_db* retVal___, struct config_setting_t *cs, int *n, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_quest_read_db_sub_post > 0) { + struct quest_db* (*postHookFunc) (struct quest_db* retVal___, struct config_setting_t *cs, int n, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_read_db_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_quest_read_db_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, cs, &n, source); + retVal___ = postHookFunc(retVal___, cs, n, source); + } + } + return retVal___; +} +int HP_quest_questinfo_validate_icon(int icon) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_quest_questinfo_validate_icon_pre > 0) { + int (*preHookFunc) (int *icon); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_icon_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_icon_pre[hIndex].func; + retVal___ = preHookFunc(&icon); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_icon(icon); + } + if (HPMHooks.count.HP_quest_questinfo_validate_icon_post > 0) { + int (*postHookFunc) (int retVal___, int icon); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_icon_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_icon_post[hIndex].func; + retVal___ = postHookFunc(retVal___, icon); + } + } + return retVal___; +} +void HP_quest_questinfo_refresh(struct map_session_data *sd) { + int hIndex = 0; + if (HPMHooks.count.HP_quest_questinfo_refresh_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_refresh_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_refresh_pre[hIndex].func; + preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.quest.questinfo_refresh(sd); + } + if (HPMHooks.count.HP_quest_questinfo_refresh_post > 0) { + void (*postHookFunc) (struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_refresh_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_refresh_post[hIndex].func; + postHookFunc(sd); + } + } + return; +} +bool HP_quest_questinfo_validate(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); } } return retVal___; } -/* script */ +bool HP_quest_questinfo_validate_job(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_job_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_job_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_job_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_job(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_job_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_job_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_job_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_sex(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_sex_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_sex_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_sex_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_sex(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_sex_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_sex_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_sex_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_baselevel(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_baselevel_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_baselevel_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_baselevel_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_baselevel(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_baselevel_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_baselevel_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_baselevel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_joblevel(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_joblevel_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_joblevel_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_joblevel_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_joblevel(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_joblevel_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_joblevel_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_joblevel_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_items(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_items_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_items_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_items(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_items_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_items_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_homunculus_level(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_homunculus_level_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_homunculus_level_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_homunculus_level_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_homunculus_level(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_homunculus_level_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_homunculus_level_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_homunculus_level_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_homunculus_type(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_homunculus_type_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_homunculus_type_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_homunculus_type_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_homunculus_type(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_homunculus_type_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_homunculus_type_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_homunculus_type_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_quests(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_quests_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_quests_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_quests_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_quests(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_quests_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_quests_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_quests_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +bool HP_quest_questinfo_validate_mercenary_class(struct map_session_data *sd, struct questinfo *qi) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct questinfo **qi); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_quest_questinfo_validate_mercenary_class_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &qi); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.quest.questinfo_validate_mercenary_class(sd, qi); + } + if (HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct questinfo *qi); + for (hIndex = 0; hIndex < HPMHooks.count.HP_quest_questinfo_validate_mercenary_class_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_quest_questinfo_validate_mercenary_class_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, qi); + } + } + return retVal___; +} +/* refine_interface */ +int HP_refine_init(bool minimal) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_refine_init_pre > 0) { + int (*preHookFunc) (bool *minimal); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_init_pre[hIndex].func; + retVal___ = preHookFunc(&minimal); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.refine.init(minimal); + } + if (HPMHooks.count.HP_refine_init_post > 0) { + int (*postHookFunc) (int retVal___, bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_init_post[hIndex].func; + retVal___ = postHookFunc(retVal___, minimal); + } + } + return retVal___; +} +void HP_refine_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_refine_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.refine.final(); + } + if (HPMHooks.count.HP_refine_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +int HP_refine_get_refine_chance(enum refine_type wlv, int refine_level, enum refine_chance_type type) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_refine_get_refine_chance_pre > 0) { + int (*preHookFunc) (enum refine_type *wlv, int *refine_level, enum refine_chance_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_refine_chance_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_get_refine_chance_pre[hIndex].func; + retVal___ = preHookFunc(&wlv, &refine_level, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.refine.get_refine_chance(wlv, refine_level, type); + } + if (HPMHooks.count.HP_refine_get_refine_chance_post > 0) { + int (*postHookFunc) (int retVal___, enum refine_type wlv, int refine_level, enum refine_chance_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_refine_chance_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_get_refine_chance_post[hIndex].func; + retVal___ = postHookFunc(retVal___, wlv, refine_level, type); + } + } + return retVal___; +} +int HP_refine_get_bonus(enum refine_type equipment_type, int refine_level) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_refine_get_bonus_pre > 0) { + int (*preHookFunc) (enum refine_type *equipment_type, int *refine_level); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_bonus_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_get_bonus_pre[hIndex].func; + retVal___ = preHookFunc(&equipment_type, &refine_level); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.refine.get_bonus(equipment_type, refine_level); + } + if (HPMHooks.count.HP_refine_get_bonus_post > 0) { + int (*postHookFunc) (int retVal___, enum refine_type equipment_type, int refine_level); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_bonus_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_get_bonus_post[hIndex].func; + retVal___ = postHookFunc(retVal___, equipment_type, refine_level); + } + } + return retVal___; +} +int HP_refine_get_randombonus_max(enum refine_type equipment_type, int refine_level) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_refine_get_randombonus_max_pre > 0) { + int (*preHookFunc) (enum refine_type *equipment_type, int *refine_level); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_randombonus_max_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_get_randombonus_max_pre[hIndex].func; + retVal___ = preHookFunc(&equipment_type, &refine_level); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.refine.get_randombonus_max(equipment_type, refine_level); + } + if (HPMHooks.count.HP_refine_get_randombonus_max_post > 0) { + int (*postHookFunc) (int retVal___, enum refine_type equipment_type, int refine_level); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_get_randombonus_max_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_get_randombonus_max_post[hIndex].func; + retVal___ = postHookFunc(retVal___, equipment_type, refine_level); + } + } + return retVal___; +} +void HP_refine_refinery_add_item(struct map_session_data *sd, int item_index) { + int hIndex = 0; + if (HPMHooks.count.HP_refine_refinery_add_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *item_index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_add_item_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_refinery_add_item_pre[hIndex].func; + preHookFunc(&sd, &item_index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.refine.refinery_add_item(sd, item_index); + } + if (HPMHooks.count.HP_refine_refinery_add_item_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int item_index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_add_item_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_refinery_add_item_post[hIndex].func; + postHookFunc(sd, item_index); + } + } + return; +} +void HP_refine_refinery_refine_request(struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing) { + int hIndex = 0; + if (HPMHooks.count.HP_refine_refinery_refine_request_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *item_index, int *material_id, bool *use_blacksmith_blessing); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_refine_request_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_refine_refinery_refine_request_pre[hIndex].func; + preHookFunc(&sd, &item_index, &material_id, &use_blacksmith_blessing); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.refine.refinery_refine_request(sd, item_index, material_id, use_blacksmith_blessing); + } + if (HPMHooks.count.HP_refine_refinery_refine_request_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int item_index, int material_id, bool use_blacksmith_blessing); + for (hIndex = 0; hIndex < HPMHooks.count.HP_refine_refinery_refine_request_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_refine_refinery_refine_request_post[hIndex].func; + postHookFunc(sd, item_index, material_id, use_blacksmith_blessing); + } + } + return; +} +/* refine_interface_private */ +int HP_PRIV__refine_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_pre > 0) { + int (*preHookFunc) (struct config_setting_t **r, const char **name, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&r, &name, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.readdb_refine_libconfig_sub(r, name, source); + } + if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct config_setting_t *r, const char *name, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, r, name, source); + } + } + return retVal___; +} +int HP_PRIV__refine_readdb_refine_libconfig(const char *filename) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_pre > 0) { + int (*preHookFunc) (const char **filename); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(&filename); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.readdb_refine_libconfig(filename); + } + if (HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_post > 0) { + int (*postHookFunc) (int retVal___, const char *filename); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refine_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refine_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename); + } + } + return retVal___; +} +bool HP_PRIV__refine_announce_behavior_string2enum(const char *str, unsigned int *result) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_pre > 0) { + bool (*preHookFunc) (const char **str, unsigned int **result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_announce_behavior_string2enum_pre[hIndex].func; + retVal___ = preHookFunc(&str, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.announce_behavior_string2enum(str, result); + } + if (HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *str, unsigned int *result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_announce_behavior_string2enum_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_announce_behavior_string2enum_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, result); + } + } + return retVal___; +} +bool HP_PRIV__refine_failure_behavior_string2enum(const char *str, enum refine_ui_failure_behavior *result) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_pre > 0) { + bool (*preHookFunc) (const char **str, enum refine_ui_failure_behavior **result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_failure_behavior_string2enum_pre[hIndex].func; + retVal___ = preHookFunc(&str, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.failure_behavior_string2enum(str, result); + } + if (HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *str, enum refine_ui_failure_behavior *result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_failure_behavior_string2enum_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_failure_behavior_string2enum_post[hIndex].func; + retVal___ = postHookFunc(retVal___, str, result); + } + } + return retVal___; +} +bool HP_PRIV__refine_readdb_refinery_ui_settings_items(const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **elem, struct s_refine_requirement **req, const char **name, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_items_pre[hIndex].func; + retVal___ = preHookFunc(&elem, &req, &name, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings_items(elem, req, name, source); + } + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *elem, struct s_refine_requirement *req, const char *name, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_items_post[hIndex].func; + retVal___ = postHookFunc(retVal___, elem, req, name, source); + } + } + return retVal___; +} +bool HP_PRIV__refine_readdb_refinery_ui_settings_sub(const struct config_setting_t *elem, int type, const char *name, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre > 0) { + bool (*preHookFunc) (const struct config_setting_t **elem, int *type, const char **name, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_sub_pre[hIndex].func; + retVal___ = preHookFunc(&elem, &type, &name, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings_sub(elem, type, name, source); + } + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct config_setting_t *elem, int type, const char *name, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, elem, type, name, source); + } + } + return retVal___; +} +int HP_PRIV__refine_readdb_refinery_ui_settings(const struct config_setting_t *r, int type, const char *name, const char *source) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_pre > 0) { + int (*preHookFunc) (const struct config_setting_t **r, int *type, const char **name, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_pre[hIndex].func; + retVal___ = preHookFunc(&r, &type, &name, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.readdb_refinery_ui_settings(r, type, name, source); + } + if (HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_post > 0) { + int (*postHookFunc) (int retVal___, const struct config_setting_t *r, int type, const char *name, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_readdb_refinery_ui_settings_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_readdb_refinery_ui_settings_post[hIndex].func; + retVal___ = postHookFunc(retVal___, r, type, name, source); + } + } + return retVal___; +} +bool HP_PRIV__refine_is_refinable(struct map_session_data *sd, int item_index) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_PRIV__refine_is_refinable_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *item_index); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_is_refinable_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_PRIV__refine_is_refinable_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &item_index); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.PRIV__refine.is_refinable(sd, item_index); + } + if (HPMHooks.count.HP_PRIV__refine_is_refinable_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int item_index); + for (hIndex = 0; hIndex < HPMHooks.count.HP_PRIV__refine_is_refinable_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_PRIV__refine_is_refinable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, item_index); + } + } + return retVal___; +} +/* rnd_interface */ +void HP_rnd_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_rnd_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rnd.init(); + } + if (HPMHooks.count.HP_rnd_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_rnd_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_rnd_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rnd.final(); + } + if (HPMHooks.count.HP_rnd_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_rnd_seed(uint32 seed) { + int hIndex = 0; + if (HPMHooks.count.HP_rnd_seed_pre > 0) { + void (*preHookFunc) (uint32 *seed); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_seed_pre[hIndex].func; + preHookFunc(&seed); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rnd.seed(seed); + } + if (HPMHooks.count.HP_rnd_seed_post > 0) { + void (*postHookFunc) (uint32 seed); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_seed_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_seed_post[hIndex].func; + postHookFunc(seed); + } + } + return; +} +int32 HP_rnd_random(void) { + int hIndex = 0; + int32 retVal___ = 0; + if (HPMHooks.count.HP_rnd_random_pre > 0) { + int32 (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_random_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.random(); + } + if (HPMHooks.count.HP_rnd_random_post > 0) { + int32 (*postHookFunc) (int32 retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_random_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_random_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +uint32 HP_rnd_roll(uint32 dice_faces) { + int hIndex = 0; + uint32 retVal___ = 0; + if (HPMHooks.count.HP_rnd_roll_pre > 0) { + uint32 (*preHookFunc) (uint32 *dice_faces); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_roll_pre[hIndex].func; + retVal___ = preHookFunc(&dice_faces); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.roll(dice_faces); + } + if (HPMHooks.count.HP_rnd_roll_post > 0) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 dice_faces); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_roll_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_roll_post[hIndex].func; + retVal___ = postHookFunc(retVal___, dice_faces); + } + } + return retVal___; +} +int32 HP_rnd_value(int32 min, int32 max) { + int hIndex = 0; + int32 retVal___ = 0; + if (HPMHooks.count.HP_rnd_value_pre > 0) { + int32 (*preHookFunc) (int32 *min, int32 *max); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_value_pre[hIndex].func; + retVal___ = preHookFunc(&min, &max); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.value(min, max); + } + if (HPMHooks.count.HP_rnd_value_post > 0) { + int32 (*postHookFunc) (int32 retVal___, int32 min, int32 max); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_value_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_value_post[hIndex].func; + retVal___ = postHookFunc(retVal___, min, max); + } + } + return retVal___; +} +double HP_rnd_uniform(void) { + int hIndex = 0; + double retVal___ = 0.; + if (HPMHooks.count.HP_rnd_uniform_pre > 0) { + double (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_uniform_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.uniform(); + } + if (HPMHooks.count.HP_rnd_uniform_post > 0) { + double (*postHookFunc) (double retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_uniform_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +double HP_rnd_uniform53(void) { + int hIndex = 0; + double retVal___ = 0.; + if (HPMHooks.count.HP_rnd_uniform53_pre > 0) { + double (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rnd_uniform53_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rnd.uniform53(); + } + if (HPMHooks.count.HP_rnd_uniform53_post > 0) { + double (*postHookFunc) (double retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rnd_uniform53_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rnd_uniform53_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +/* rodex_interface */ +void HP_rodex_init(bool minimal) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_init_pre > 0) { + void (*preHookFunc) (bool *minimal); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_init_pre[hIndex].func; + preHookFunc(&minimal); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.init(minimal); + } + if (HPMHooks.count.HP_rodex_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_init_post[hIndex].func; + postHookFunc(minimal); + } + } + return; +} +void HP_rodex_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.final(); + } + if (HPMHooks.count.HP_rodex_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_rodex_isenabled(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_rodex_isenabled_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_isenabled_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_isenabled_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rodex.isenabled(); + } + if (HPMHooks.count.HP_rodex_isenabled_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_isenabled_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_isenabled_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +void HP_rodex_open(struct map_session_data *sd, int8 open_type, int64 first_mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_open_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_open_pre[hIndex].func; + preHookFunc(&sd, &open_type, &first_mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.open(sd, open_type, first_mail_id); + } + if (HPMHooks.count.HP_rodex_open_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_open_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_open_post[hIndex].func; + postHookFunc(sd, open_type, first_mail_id); + } + } + return; +} +void HP_rodex_next_page(struct map_session_data *sd, int8 open_type, int64 last_mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_next_page_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *open_type, int64 *last_mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_next_page_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_next_page_pre[hIndex].func; + preHookFunc(&sd, &open_type, &last_mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.next_page(sd, open_type, last_mail_id); + } + if (HPMHooks.count.HP_rodex_next_page_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 open_type, int64 last_mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_next_page_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_next_page_post[hIndex].func; + postHookFunc(sd, open_type, last_mail_id); + } + } + return; +} +void HP_rodex_refresh(struct map_session_data *sd, int8 open_type, int64 first_mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_refresh_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *open_type, int64 *first_mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_refresh_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_refresh_pre[hIndex].func; + preHookFunc(&sd, &open_type, &first_mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.refresh(sd, open_type, first_mail_id); + } + if (HPMHooks.count.HP_rodex_refresh_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_refresh_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_refresh_post[hIndex].func; + postHookFunc(sd, open_type, first_mail_id); + } + } + return; +} +void HP_rodex_add_item(struct map_session_data *sd, int16 idx, int16 amount) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_add_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_add_item_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_add_item_pre[hIndex].func; + preHookFunc(&sd, &idx, &amount); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.add_item(sd, idx, amount); + } + if (HPMHooks.count.HP_rodex_add_item_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_add_item_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_add_item_post[hIndex].func; + postHookFunc(sd, idx, amount); + } + } + return; +} +void HP_rodex_remove_item(struct map_session_data *sd, int16 idx, int16 amount) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_remove_item_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int16 *idx, int16 *amount); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_remove_item_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_remove_item_pre[hIndex].func; + preHookFunc(&sd, &idx, &amount); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.remove_item(sd, idx, amount); + } + if (HPMHooks.count.HP_rodex_remove_item_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int16 idx, int16 amount); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_remove_item_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_remove_item_post[hIndex].func; + postHookFunc(sd, idx, amount); + } + } + return; +} +void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_check_player_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, int **class); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_check_player_pre[hIndex].func; + preHookFunc(&sd, &name, &base_level, &char_id, &class); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.check_player(sd, name, base_level, char_id, class); + } + if (HPMHooks.count.HP_rodex_check_player_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_check_player_post[hIndex].func; + postHookFunc(sd, name, base_level, char_id, class); + } + } + return; +} +int HP_rodex_send_mail(struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_rodex_send_mail_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const char **receiver_name, const char **body, const char **title, int64 *zeny); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_send_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_send_mail_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &receiver_name, &body, &title, &zeny); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rodex.send_mail(sd, receiver_name, body, title, zeny); + } + if (HPMHooks.count.HP_rodex_send_mail_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_send_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_send_mail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, receiver_name, body, title, zeny); + } + } + return retVal___; +} +void HP_rodex_send_mail_result(struct map_session_data *ssd, struct map_session_data *rsd, bool result) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_send_mail_result_pre > 0) { + void (*preHookFunc) (struct map_session_data **ssd, struct map_session_data **rsd, bool *result); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_send_mail_result_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_send_mail_result_pre[hIndex].func; + preHookFunc(&ssd, &rsd, &result); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.send_mail_result(ssd, rsd, result); + } + if (HPMHooks.count.HP_rodex_send_mail_result_post > 0) { + void (*postHookFunc) (struct map_session_data *ssd, struct map_session_data *rsd, bool result); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_send_mail_result_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_send_mail_result_post[hIndex].func; + postHookFunc(ssd, rsd, result); + } + } + return; +} +struct rodex_message* HP_rodex_get_mail(struct map_session_data *sd, int64 mail_id) { + int hIndex = 0; + struct rodex_message* retVal___ = NULL; + if (HPMHooks.count.HP_rodex_get_mail_pre > 0) { + struct rodex_message* (*preHookFunc) (struct map_session_data **sd, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_get_mail_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.rodex.get_mail(sd, mail_id); + } + if (HPMHooks.count.HP_rodex_get_mail_post > 0) { + struct rodex_message* (*postHookFunc) (struct rodex_message* retVal___, struct map_session_data *sd, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_get_mail_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, mail_id); + } + } + return retVal___; +} +void HP_rodex_read_mail(struct map_session_data *sd, int64 mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_read_mail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_read_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_read_mail_pre[hIndex].func; + preHookFunc(&sd, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.read_mail(sd, mail_id); + } + if (HPMHooks.count.HP_rodex_read_mail_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_read_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_read_mail_post[hIndex].func; + postHookFunc(sd, mail_id); + } + } + return; +} +void HP_rodex_get_zeny(struct map_session_data *sd, int8 opentype, int64 mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_get_zeny_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_zeny_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_get_zeny_pre[hIndex].func; + preHookFunc(&sd, &opentype, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.get_zeny(sd, opentype, mail_id); + } + if (HPMHooks.count.HP_rodex_get_zeny_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_zeny_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_get_zeny_post[hIndex].func; + postHookFunc(sd, opentype, mail_id); + } + } + return; +} +void HP_rodex_get_items(struct map_session_data *sd, int8 opentype, int64 mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_get_items_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_items_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_get_items_pre[hIndex].func; + preHookFunc(&sd, &opentype, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.get_items(sd, opentype, mail_id); + } + if (HPMHooks.count.HP_rodex_get_items_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 opentype, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_get_items_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_get_items_post[hIndex].func; + postHookFunc(sd, opentype, mail_id); + } + } + return; +} +void HP_rodex_delete_mail(struct map_session_data *sd, int64 mail_id) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_delete_mail_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_delete_mail_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_delete_mail_pre[hIndex].func; + preHookFunc(&sd, &mail_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.delete_mail(sd, mail_id); + } + if (HPMHooks.count.HP_rodex_delete_mail_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 mail_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_delete_mail_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_delete_mail_post[hIndex].func; + postHookFunc(sd, mail_id); + } + } + return; +} +void HP_rodex_clean(struct map_session_data *sd, int8 flag) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_clean_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int8 *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_clean_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_clean_pre[hIndex].func; + preHookFunc(&sd, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.clean(sd, flag); + } + if (HPMHooks.count.HP_rodex_clean_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int8 flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_clean_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_clean_post[hIndex].func; + postHookFunc(sd, flag); + } + } + return; +} +void HP_rodex_getZenyAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_getZenyAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int64 *zeny); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getZenyAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_getZenyAck_pre[hIndex].func; + preHookFunc(&sd, &mail_id, &opentype, &zeny); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.getZenyAck(sd, mail_id, opentype, zeny); + } + if (HPMHooks.count.HP_rodex_getZenyAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 mail_id, int8 opentype, int64 zeny); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getZenyAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_getZenyAck_post[hIndex].func; + postHookFunc(sd, mail_id, opentype, zeny); + } + } + return; +} +void HP_rodex_getItemsAck(struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items) { + int hIndex = 0; + if (HPMHooks.count.HP_rodex_getItemsAck_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *mail_id, int8 *opentype, int *count, const struct rodex_item **items); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getItemsAck_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_rodex_getItemsAck_pre[hIndex].func; + preHookFunc(&sd, &mail_id, &opentype, &count, &items); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.rodex.getItemsAck(sd, mail_id, opentype, count, items); + } + if (HPMHooks.count.HP_rodex_getItemsAck_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 mail_id, int8 opentype, int count, const struct rodex_item *items); + for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_getItemsAck_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_rodex_getItemsAck_post[hIndex].func; + postHookFunc(sd, mail_id, opentype, count, items); + } + } + return; +} +/* script_interface */ void HP_script_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_script_init_pre ) { + if (HPMHooks.count.HP_script_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59757,25 +70749,25 @@ void HP_script_init(bool minimal) { { HPMHooks.source.script.init(minimal); } - if( HPMHooks.count.HP_script_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_init_post; hIndex++ ) { + if (HPMHooks.count.HP_script_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_script_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_final_pre ) { + if (HPMHooks.count.HP_script_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59783,9 +70775,9 @@ void HP_script_final(void) { { HPMHooks.source.script.final(); } - if( HPMHooks.count.HP_script_final_post ) { + if (HPMHooks.count.HP_script_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_final_post[hIndex].func; postHookFunc(); } @@ -59795,14 +70787,14 @@ void HP_script_final(void) { int HP_script_reload(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_reload_pre ) { + if (HPMHooks.count.HP_script_reload_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59810,9 +70802,9 @@ int HP_script_reload(void) { { retVal___ = HPMHooks.source.script.reload(); } - if( HPMHooks.count.HP_script_reload_post ) { + if (HPMHooks.count.HP_script_reload_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_reload_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -59822,14 +70814,14 @@ int HP_script_reload(void) { struct script_code* HP_script_parse(const char *src, const char *file, int line, int options, int *retval) { 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, int *retval); + if (HPMHooks.count.HP_script_parse_pre > 0) { + struct script_code* (*preHookFunc) (const char **src, const char **file, int *line, int *options, int **retval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_pre; hIndex++ ) { + 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, retval); + retVal___ = preHookFunc(&src, &file, &line, &options, &retval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59837,11 +70829,11 @@ struct script_code* HP_script_parse(const char *src, const char *file, int line, { retVal___ = HPMHooks.source.script.parse(src, file, line, options, retval); } - 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, int *retval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_post; hIndex++ ) { + if (HPMHooks.count.HP_script_parse_post > 0) { + struct script_code* (*postHookFunc) (struct script_code* retVal___, const char *src, const char *file, int line, int options, int *retval); + 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, retval); + retVal___ = postHookFunc(retVal___, src, file, line, options, retval); } } return retVal___; @@ -59849,14 +70841,14 @@ struct script_code* HP_script_parse(const char *src, const char *file, int line, bool HP_script_add_builtin(const struct script_function *buildin, bool override) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_add_builtin_pre ) { - bool (*preHookFunc) (const struct script_function *buildin, bool *override); + if (HPMHooks.count.HP_script_add_builtin_pre > 0) { + bool (*preHookFunc) (const struct script_function **buildin, bool *override); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_add_builtin_pre[hIndex].func; - retVal___ = preHookFunc(buildin, &override); + retVal___ = preHookFunc(&buildin, &override); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59864,25 +70856,25 @@ bool HP_script_add_builtin(const struct script_function *buildin, bool override) { retVal___ = HPMHooks.source.script.add_builtin(buildin, override); } - if( HPMHooks.count.HP_script_add_builtin_post ) { - bool (*postHookFunc) (bool retVal___, const struct script_function *buildin, bool *override); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_post; hIndex++ ) { + if (HPMHooks.count.HP_script_add_builtin_post > 0) { + bool (*postHookFunc) (bool retVal___, const struct script_function *buildin, bool override); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_builtin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_add_builtin_post[hIndex].func; - retVal___ = postHookFunc(retVal___, buildin, &override); + retVal___ = postHookFunc(retVal___, buildin, override); } } return retVal___; } void HP_script_parse_builtin(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_parse_builtin_pre ) { + if (HPMHooks.count.HP_script_parse_builtin_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59890,9 +70882,9 @@ void HP_script_parse_builtin(void) { { HPMHooks.source.script.parse_builtin(); } - if( HPMHooks.count.HP_script_parse_builtin_post ) { + if (HPMHooks.count.HP_script_parse_builtin_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_builtin_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_parse_builtin_post[hIndex].func; postHookFunc(); } @@ -59902,14 +70894,14 @@ void HP_script_parse_builtin(void) { 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); + if (HPMHooks.count.HP_script_parse_subexpr_pre > 0) { + const char* (*preHookFunc) (const char **p, int *limit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_subexpr_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p, &limit); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59917,11 +70909,11 @@ const char* HP_script_parse_subexpr(const char *p, int limit) { { 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++ ) { + if (HPMHooks.count.HP_script_parse_subexpr_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, p, limit); } } return retVal___; @@ -59929,14 +70921,14 @@ const char* HP_script_parse_subexpr(const char *p, int limit) { 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); + if (HPMHooks.count.HP_script_skip_space_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -59944,9 +70936,9 @@ const char* HP_script_skip_space(const char *p) { { retVal___ = HPMHooks.source.script.skip_space(p); } - if( HPMHooks.count.HP_script_skip_space_post ) { + if (HPMHooks.count.HP_script_skip_space_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_space_post; hIndex++ ) { + 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); } @@ -59955,14 +70947,14 @@ const char* HP_script_skip_space(const char *p) { } 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); + if (HPMHooks.count.HP_script_error_pre > 0) { + void (*preHookFunc) (const char **src, const char **file, int *start_line, const char **error_msg, const char **error_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_error_pre; hIndex++ ) { + 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); + preHookFunc(&src, &file, &start_line, &error_msg, &error_pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59970,25 +70962,25 @@ void HP_script_error(const char *src, const char *file, int start_line, const ch { 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++ ) { + if (HPMHooks.count.HP_script_error_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_warning_pre > 0) { + void (*preHookFunc) (const char **src, const char **file, int *start_line, const char **error_msg, const char **error_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_warning_pre; hIndex++ ) { + 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); + preHookFunc(&src, &file, &start_line, &error_msg, &error_pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -59996,11 +70988,11 @@ void HP_script_warning(const char *src, const char *file, int start_line, const { 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++ ) { + if (HPMHooks.count.HP_script_warning_post > 0) { + 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); + postHookFunc(src, file, start_line, error_msg, error_pos); } } return; @@ -60008,14 +71000,14 @@ void HP_script_warning(const char *src, const char *file, int start_line, const bool HP_script_addScript(char *name, char *args, bool ( *func ) (struct script_state *st), bool isDeprecated) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_addScript_pre ) { - bool (*preHookFunc) (char *name, char *args, bool ( *func ) (struct script_state *st), bool *isDeprecated); + if (HPMHooks.count.HP_script_addScript_pre > 0) { + bool (*preHookFunc) (char **name, char **args, bool ( **func ) (struct script_state *st), bool *isDeprecated); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_pre; hIndex++ ) { + 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, &isDeprecated); + retVal___ = preHookFunc(&name, &args, &func, &isDeprecated); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60023,11 +71015,11 @@ bool HP_script_addScript(char *name, char *args, bool ( *func ) (struct script_s { retVal___ = HPMHooks.source.script.addScript(name, args, func, isDeprecated); } - if( HPMHooks.count.HP_script_addScript_post ) { - bool (*postHookFunc) (bool retVal___, char *name, char *args, bool ( *func ) (struct script_state *st), bool *isDeprecated); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addScript_post; hIndex++ ) { + if (HPMHooks.count.HP_script_addScript_post > 0) { + bool (*postHookFunc) (bool retVal___, char *name, char *args, bool ( *func ) (struct script_state *st), bool isDeprecated); + 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, &isDeprecated); + retVal___ = postHookFunc(retVal___, name, args, func, isDeprecated); } } return retVal___; @@ -60035,14 +71027,14 @@ bool HP_script_addScript(char *name, char *args, bool ( *func ) (struct script_s int HP_script_conv_num(struct script_state *st, struct script_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_conv_num_pre ) { - int (*preHookFunc) (struct script_state *st, struct script_data *data); + if (HPMHooks.count.HP_script_conv_num_pre > 0) { + int (*preHookFunc) (struct script_state **st, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&st, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60050,9 +71042,9 @@ int HP_script_conv_num(struct script_state *st, struct script_data *data) { { retVal___ = HPMHooks.source.script.conv_num(st, data); } - if( HPMHooks.count.HP_script_conv_num_post ) { + if (HPMHooks.count.HP_script_conv_num_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_num_post; hIndex++ ) { + 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); } @@ -60062,14 +71054,14 @@ int HP_script_conv_num(struct script_state *st, struct script_data *data) { 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); + if (HPMHooks.count.HP_script_conv_str_pre > 0) { + const char* (*preHookFunc) (struct script_state **st, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_conv_str_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&st, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60077,9 +71069,9 @@ const char* HP_script_conv_str(struct script_state *st, struct script_data *data { retVal___ = HPMHooks.source.script.conv_str(st, data); } - if( HPMHooks.count.HP_script_conv_str_post ) { + if (HPMHooks.count.HP_script_conv_str_post > 0) { 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++ ) { + 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); } @@ -60089,14 +71081,14 @@ const char* HP_script_conv_str(struct script_state *st, struct script_data *data struct map_session_data* HP_script_rid2sd(struct script_state *st) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_rid2sd_pre ) { - struct map_session_data* (*preHookFunc) (struct script_state *st); + if (HPMHooks.count.HP_script_rid2sd_pre > 0) { + struct map_session_data* (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_rid2sd_pre[hIndex].func; - retVal___ = preHookFunc(st); + retVal___ = preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60104,9 +71096,9 @@ struct map_session_data* HP_script_rid2sd(struct script_state *st) { { retVal___ = HPMHooks.source.script.rid2sd(st); } - if( HPMHooks.count.HP_script_rid2sd_post ) { + if (HPMHooks.count.HP_script_rid2sd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_rid2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_rid2sd_post[hIndex].func; retVal___ = postHookFunc(retVal___, st); } @@ -60116,14 +71108,14 @@ struct map_session_data* HP_script_rid2sd(struct script_state *st) { struct map_session_data* HP_script_id2sd(struct script_state *st, int account_id) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_id2sd_pre ) { - struct map_session_data* (*preHookFunc) (struct script_state *st, int *account_id); + if (HPMHooks.count.HP_script_id2sd_pre > 0) { + struct map_session_data* (*preHookFunc) (struct script_state **st, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_id2sd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_id2sd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_id2sd_pre[hIndex].func; - retVal___ = preHookFunc(st, &account_id); + retVal___ = preHookFunc(&st, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60131,11 +71123,11 @@ struct map_session_data* HP_script_id2sd(struct script_state *st, int account_id { retVal___ = HPMHooks.source.script.id2sd(st, account_id); } - if( HPMHooks.count.HP_script_id2sd_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct script_state *st, int *account_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_id2sd_post; hIndex++ ) { + if (HPMHooks.count.HP_script_id2sd_post > 0) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct script_state *st, int account_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_id2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_id2sd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, &account_id); + retVal___ = postHookFunc(retVal___, st, account_id); } } return retVal___; @@ -60143,14 +71135,14 @@ struct map_session_data* HP_script_id2sd(struct script_state *st, int account_id struct map_session_data* HP_script_charid2sd(struct script_state *st, int char_id) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_charid2sd_pre ) { - struct map_session_data* (*preHookFunc) (struct script_state *st, int *char_id); + if (HPMHooks.count.HP_script_charid2sd_pre > 0) { + struct map_session_data* (*preHookFunc) (struct script_state **st, int *char_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_charid2sd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_charid2sd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_charid2sd_pre[hIndex].func; - retVal___ = preHookFunc(st, &char_id); + retVal___ = preHookFunc(&st, &char_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60158,11 +71150,11 @@ struct map_session_data* HP_script_charid2sd(struct script_state *st, int char_i { retVal___ = HPMHooks.source.script.charid2sd(st, char_id); } - if( HPMHooks.count.HP_script_charid2sd_post ) { - struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct script_state *st, int *char_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_charid2sd_post; hIndex++ ) { + if (HPMHooks.count.HP_script_charid2sd_post > 0) { + struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct script_state *st, int char_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_charid2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_charid2sd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, st, &char_id); + retVal___ = postHookFunc(retVal___, st, char_id); } } return retVal___; @@ -60170,14 +71162,14 @@ struct map_session_data* HP_script_charid2sd(struct script_state *st, int char_i struct map_session_data* HP_script_nick2sd(struct script_state *st, const char *name) { int hIndex = 0; struct map_session_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_nick2sd_pre ) { - struct map_session_data* (*preHookFunc) (struct script_state *st, const char *name); + if (HPMHooks.count.HP_script_nick2sd_pre > 0) { + struct map_session_data* (*preHookFunc) (struct script_state **st, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_nick2sd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_nick2sd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_nick2sd_pre[hIndex].func; - retVal___ = preHookFunc(st, name); + retVal___ = preHookFunc(&st, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60185,9 +71177,9 @@ struct map_session_data* HP_script_nick2sd(struct script_state *st, const char * { retVal___ = HPMHooks.source.script.nick2sd(st, name); } - if( HPMHooks.count.HP_script_nick2sd_post ) { + if (HPMHooks.count.HP_script_nick2sd_post > 0) { struct map_session_data* (*postHookFunc) (struct map_session_data* retVal___, struct script_state *st, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_nick2sd_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_nick2sd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_nick2sd_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, name); } @@ -60196,14 +71188,14 @@ struct map_session_data* HP_script_nick2sd(struct script_state *st, const char * } 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); + if (HPMHooks.count.HP_script_detach_rid_pre > 0) { + void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_detach_rid_pre[hIndex].func; - preHookFunc(st); + preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60211,9 +71203,9 @@ void HP_script_detach_rid(struct script_state *st) { { HPMHooks.source.script.detach_rid(st); } - if( HPMHooks.count.HP_script_detach_rid_post ) { + if (HPMHooks.count.HP_script_detach_rid_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_rid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_detach_rid_post[hIndex].func; postHookFunc(st); } @@ -60223,14 +71215,14 @@ void HP_script_detach_rid(struct script_state *st) { struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op type, int64 val, struct reg_db *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, int64 *val, struct reg_db *ref); + if (HPMHooks.count.HP_script_push_val_pre > 0) { + struct script_data* (*preHookFunc) (struct script_stack **stack, enum c_op *type, int64 *val, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&stack, &type, &val, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60238,11 +71230,11 @@ struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op typ { 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, int64 *val, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_val_post; hIndex++ ) { + if (HPMHooks.count.HP_script_push_val_post > 0) { + struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, enum c_op type, int64 val, struct reg_db *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); + retVal___ = postHookFunc(retVal___, stack, type, val, ref); } } return retVal___; @@ -60250,14 +71242,14 @@ struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op typ struct script_data* HP_script_get_val(struct script_state *st, struct script_data *data) { int hIndex = 0; struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val_pre ) { - struct script_data* (*preHookFunc) (struct script_state *st, struct script_data *data); + if (HPMHooks.count.HP_script_get_val_pre > 0) { + struct script_data* (*preHookFunc) (struct script_state **st, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_pre[hIndex].func; - retVal___ = preHookFunc(st, data); + retVal___ = preHookFunc(&st, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60265,9 +71257,9 @@ struct script_data* HP_script_get_val(struct script_state *st, struct script_dat { retVal___ = HPMHooks.source.script.get_val(st, data); } - if( HPMHooks.count.HP_script_get_val_post ) { + if (HPMHooks.count.HP_script_get_val_post > 0) { struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_state *st, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, data); } @@ -60277,14 +71269,14 @@ struct script_data* HP_script_get_val(struct script_state *st, struct script_dat char* HP_script_get_val_ref_str(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val_ref_str_pre ) { - char* (*preHookFunc) (struct script_state *st, struct reg_db *n, struct script_data *data); + if (HPMHooks.count.HP_script_get_val_ref_str_pre > 0) { + char* (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_ref_str_pre[hIndex].func; - retVal___ = preHookFunc(st, n, data); + retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60292,26 +71284,53 @@ char* HP_script_get_val_ref_str(struct script_state *st, struct reg_db *n, struc { retVal___ = HPMHooks.source.script.get_val_ref_str(st, n, data); } - if( HPMHooks.count.HP_script_get_val_ref_str_post ) { + if (HPMHooks.count.HP_script_get_val_ref_str_post > 0) { char* (*postHookFunc) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_ref_str_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } } return retVal___; } +char* HP_script_get_val_pc_ref_str(struct script_state *st, struct reg_db *n, struct script_data *data) { + int hIndex = 0; + char* retVal___ = NULL; + if (HPMHooks.count.HP_script_get_val_pc_ref_str_pre > 0) { + char* (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_str_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_str_pre[hIndex].func; + retVal___ = preHookFunc(&st, &n, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.get_val_pc_ref_str(st, n, data); + } + if (HPMHooks.count.HP_script_get_val_pc_ref_str_post > 0) { + char* (*postHookFunc) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_str_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_str_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, n, data); + } + } + return retVal___; +} char* HP_script_get_val_scope_str(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val_scope_str_pre ) { - char* (*preHookFunc) (struct script_state *st, struct reg_db *n, struct script_data *data); + if (HPMHooks.count.HP_script_get_val_scope_str_pre > 0) { + char* (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_scope_str_pre[hIndex].func; - retVal___ = preHookFunc(st, n, data); + retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60319,9 +71338,9 @@ char* HP_script_get_val_scope_str(struct script_state *st, struct reg_db *n, str { retVal___ = HPMHooks.source.script.get_val_scope_str(st, n, data); } - if( HPMHooks.count.HP_script_get_val_scope_str_post ) { + if (HPMHooks.count.HP_script_get_val_scope_str_post > 0) { char* (*postHookFunc) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_scope_str_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } @@ -60331,14 +71350,14 @@ char* HP_script_get_val_scope_str(struct script_state *st, struct reg_db *n, str char* HP_script_get_val_npc_str(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val_npc_str_pre ) { - char* (*preHookFunc) (struct script_state *st, struct reg_db *n, struct script_data *data); + if (HPMHooks.count.HP_script_get_val_npc_str_pre > 0) { + char* (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_npc_str_pre[hIndex].func; - retVal___ = preHookFunc(st, n, data); + retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60346,9 +71365,9 @@ char* HP_script_get_val_npc_str(struct script_state *st, struct reg_db *n, struc { retVal___ = HPMHooks.source.script.get_val_npc_str(st, n, data); } - if( HPMHooks.count.HP_script_get_val_npc_str_post ) { + if (HPMHooks.count.HP_script_get_val_npc_str_post > 0) { char* (*postHookFunc) (char* retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_npc_str_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } @@ -60358,14 +71377,14 @@ char* HP_script_get_val_npc_str(struct script_state *st, struct reg_db *n, struc char* HP_script_get_val_instance_str(struct script_state *st, const char *name, struct script_data *data) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val_instance_str_pre ) { - char* (*preHookFunc) (struct script_state *st, const char *name, struct script_data *data); + if (HPMHooks.count.HP_script_get_val_instance_str_pre > 0) { + char* (*preHookFunc) (struct script_state **st, const char **name, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_instance_str_pre[hIndex].func; - retVal___ = preHookFunc(st, name, data); + retVal___ = preHookFunc(&st, &name, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60373,9 +71392,9 @@ char* HP_script_get_val_instance_str(struct script_state *st, const char *name, { retVal___ = HPMHooks.source.script.get_val_instance_str(st, name, data); } - if( HPMHooks.count.HP_script_get_val_instance_str_post ) { + if (HPMHooks.count.HP_script_get_val_instance_str_post > 0) { char* (*postHookFunc) (char* retVal___, struct script_state *st, const char *name, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_str_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_instance_str_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, name, data); } @@ -60385,14 +71404,14 @@ char* HP_script_get_val_instance_str(struct script_state *st, const char *name, int HP_script_get_val_ref_num(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_get_val_ref_num_pre ) { - int (*preHookFunc) (struct script_state *st, struct reg_db *n, struct script_data *data); + if (HPMHooks.count.HP_script_get_val_ref_num_pre > 0) { + int (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_ref_num_pre[hIndex].func; - retVal___ = preHookFunc(st, n, data); + retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60400,26 +71419,53 @@ int HP_script_get_val_ref_num(struct script_state *st, struct reg_db *n, struct { retVal___ = HPMHooks.source.script.get_val_ref_num(st, n, data); } - if( HPMHooks.count.HP_script_get_val_ref_num_post ) { + if (HPMHooks.count.HP_script_get_val_ref_num_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_ref_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_ref_num_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } } return retVal___; } +int HP_script_get_val_pc_ref_num(struct script_state *st, struct reg_db *n, struct script_data *data) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_get_val_pc_ref_num_pre > 0) { + int (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_num_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_num_pre[hIndex].func; + retVal___ = preHookFunc(&st, &n, &data); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.get_val_pc_ref_num(st, n, data); + } + if (HPMHooks.count.HP_script_get_val_pc_ref_num_post > 0) { + int (*postHookFunc) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pc_ref_num_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_get_val_pc_ref_num_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, n, data); + } + } + return retVal___; +} int HP_script_get_val_scope_num(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_get_val_scope_num_pre ) { - int (*preHookFunc) (struct script_state *st, struct reg_db *n, struct script_data *data); + if (HPMHooks.count.HP_script_get_val_scope_num_pre > 0) { + int (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_scope_num_pre[hIndex].func; - retVal___ = preHookFunc(st, n, data); + retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60427,9 +71473,9 @@ int HP_script_get_val_scope_num(struct script_state *st, struct reg_db *n, struc { retVal___ = HPMHooks.source.script.get_val_scope_num(st, n, data); } - if( HPMHooks.count.HP_script_get_val_scope_num_post ) { + if (HPMHooks.count.HP_script_get_val_scope_num_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_scope_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_scope_num_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } @@ -60439,14 +71485,14 @@ int HP_script_get_val_scope_num(struct script_state *st, struct reg_db *n, struc int HP_script_get_val_npc_num(struct script_state *st, struct reg_db *n, struct script_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_get_val_npc_num_pre ) { - int (*preHookFunc) (struct script_state *st, struct reg_db *n, struct script_data *data); + if (HPMHooks.count.HP_script_get_val_npc_num_pre > 0) { + int (*preHookFunc) (struct script_state **st, struct reg_db **n, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_npc_num_pre[hIndex].func; - retVal___ = preHookFunc(st, n, data); + retVal___ = preHookFunc(&st, &n, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60454,9 +71500,9 @@ int HP_script_get_val_npc_num(struct script_state *st, struct reg_db *n, struct { retVal___ = HPMHooks.source.script.get_val_npc_num(st, n, data); } - if( HPMHooks.count.HP_script_get_val_npc_num_post ) { + if (HPMHooks.count.HP_script_get_val_npc_num_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, struct reg_db *n, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_npc_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_npc_num_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, n, data); } @@ -60466,14 +71512,14 @@ int HP_script_get_val_npc_num(struct script_state *st, struct reg_db *n, struct int HP_script_get_val_instance_num(struct script_state *st, const char *name, struct script_data *data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_get_val_instance_num_pre ) { - int (*preHookFunc) (struct script_state *st, const char *name, struct script_data *data); + if (HPMHooks.count.HP_script_get_val_instance_num_pre > 0) { + int (*preHookFunc) (struct script_state **st, const char **name, struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_get_val_instance_num_pre[hIndex].func; - retVal___ = preHookFunc(st, name, data); + retVal___ = preHookFunc(&st, &name, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60481,9 +71527,9 @@ int HP_script_get_val_instance_num(struct script_state *st, const char *name, st { retVal___ = HPMHooks.source.script.get_val_instance_num(st, name, data); } - if( HPMHooks.count.HP_script_get_val_instance_num_post ) { + if (HPMHooks.count.HP_script_get_val_instance_num_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, const char *name, struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_num_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_instance_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_get_val_instance_num_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, name, data); } @@ -60493,14 +71539,14 @@ int HP_script_get_val_instance_num(struct script_state *st, const char *name, st const void* HP_script_get_val2(struct script_state *st, int64 uid, struct reg_db *ref) { int hIndex = 0; const void* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_val2_pre ) { - const void* (*preHookFunc) (struct script_state *st, int64 *uid, struct reg_db *ref); + if (HPMHooks.count.HP_script_get_val2_pre > 0) { + const void* (*preHookFunc) (struct script_state **st, int64 *uid, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&st, &uid, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60508,11 +71554,11 @@ const void* HP_script_get_val2(struct script_state *st, int64 uid, struct reg_db { retVal___ = HPMHooks.source.script.get_val2(st, uid, ref); } - if( HPMHooks.count.HP_script_get_val2_post ) { - const void* (*postHookFunc) (const void* retVal___, struct script_state *st, int64 *uid, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val2_post; hIndex++ ) { + if (HPMHooks.count.HP_script_get_val2_post > 0) { + const void* (*postHookFunc) (const void* retVal___, struct script_state *st, int64 uid, struct reg_db *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); + retVal___ = postHookFunc(retVal___, st, uid, ref); } } return retVal___; @@ -60520,14 +71566,14 @@ const void* HP_script_get_val2(struct script_state *st, int64 uid, struct reg_db struct script_data* HP_script_push_str(struct script_stack *stack, 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, char *str); + if (HPMHooks.count.HP_script_push_str_pre > 0) { + struct script_data* (*preHookFunc) (struct script_stack **stack, char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_pre; hIndex++ ) { + 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, str); + retVal___ = preHookFunc(&stack, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60535,9 +71581,9 @@ struct script_data* HP_script_push_str(struct script_stack *stack, char *str) { { retVal___ = HPMHooks.source.script.push_str(stack, str); } - if( HPMHooks.count.HP_script_push_str_post ) { + if (HPMHooks.count.HP_script_push_str_post > 0) { struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_str_post; hIndex++ ) { + 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, str); } @@ -60547,14 +71593,14 @@ struct script_data* HP_script_push_str(struct script_stack *stack, char *str) { struct script_data* HP_script_push_conststr(struct script_stack *stack, const char *str) { int hIndex = 0; struct script_data* retVal___ = NULL; - if( HPMHooks.count.HP_script_push_conststr_pre ) { - struct script_data* (*preHookFunc) (struct script_stack *stack, const char *str); + if (HPMHooks.count.HP_script_push_conststr_pre > 0) { + struct script_data* (*preHookFunc) (struct script_stack **stack, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_conststr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_push_conststr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_push_conststr_pre[hIndex].func; - retVal___ = preHookFunc(stack, str); + retVal___ = preHookFunc(&stack, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60562,9 +71608,9 @@ struct script_data* HP_script_push_conststr(struct script_stack *stack, const ch { retVal___ = HPMHooks.source.script.push_conststr(stack, str); } - if( HPMHooks.count.HP_script_push_conststr_post ) { + if (HPMHooks.count.HP_script_push_conststr_post > 0) { struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_conststr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_push_conststr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_push_conststr_post[hIndex].func; retVal___ = postHookFunc(retVal___, stack, str); } @@ -60574,14 +71620,14 @@ struct script_data* HP_script_push_conststr(struct script_stack *stack, const ch 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); + if (HPMHooks.count.HP_script_push_copy_pre > 0) { + struct script_data* (*preHookFunc) (struct script_stack **stack, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_copy_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&stack, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60589,25 +71635,25 @@ struct script_data* HP_script_push_copy(struct script_stack *stack, int pos) { { 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++ ) { + if (HPMHooks.count.HP_script_push_copy_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_pop_stack_pre > 0) { + void (*preHookFunc) (struct script_state **st, int *start, int *end); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_pop_stack_pre; hIndex++ ) { + 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); + preHookFunc(&st, &start, &end); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60615,25 +71661,25 @@ void HP_script_pop_stack(struct script_state *st, int start, int end) { { 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++ ) { + if (HPMHooks.count.HP_script_pop_stack_post > 0) { + 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); + postHookFunc(st, start, end); } } return; } void HP_script_set_constant(const char *name, int value, bool is_parameter, bool is_deprecated) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_constant_pre ) { - void (*preHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); + if (HPMHooks.count.HP_script_set_constant_pre > 0) { + void (*preHookFunc) (const char **name, int *value, bool *is_parameter, bool *is_deprecated); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_pre; hIndex++ ) { + 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, &is_parameter, &is_deprecated); + preHookFunc(&name, &value, &is_parameter, &is_deprecated); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60641,25 +71687,25 @@ void HP_script_set_constant(const char *name, int value, bool is_parameter, bool { HPMHooks.source.script.set_constant(name, value, is_parameter, is_deprecated); } - if( HPMHooks.count.HP_script_set_constant_post ) { - void (*postHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant_post; hIndex++ ) { + if (HPMHooks.count.HP_script_set_constant_post > 0) { + void (*postHookFunc) (const char *name, int value, bool is_parameter, bool is_deprecated); + 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, &is_parameter, &is_deprecated); + postHookFunc(name, value, is_parameter, is_deprecated); } } return; } void HP_script_set_constant2(const char *name, int value, bool is_parameter, bool is_deprecated) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_constant2_pre ) { - void (*preHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); + if (HPMHooks.count.HP_script_set_constant2_pre > 0) { + void (*preHookFunc) (const char **name, int *value, bool *is_parameter, bool *is_deprecated); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_pre; hIndex++ ) { + 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, &is_parameter, &is_deprecated); + preHookFunc(&name, &value, &is_parameter, &is_deprecated); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60667,11 +71713,11 @@ void HP_script_set_constant2(const char *name, int value, bool is_parameter, boo { HPMHooks.source.script.set_constant2(name, value, is_parameter, is_deprecated); } - if( HPMHooks.count.HP_script_set_constant2_post ) { - void (*postHookFunc) (const char *name, int *value, bool *is_parameter, bool *is_deprecated); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_constant2_post; hIndex++ ) { + if (HPMHooks.count.HP_script_set_constant2_post > 0) { + void (*postHookFunc) (const char *name, int value, bool is_parameter, bool is_deprecated); + 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, &is_parameter, &is_deprecated); + postHookFunc(name, value, is_parameter, is_deprecated); } } return; @@ -60679,14 +71725,14 @@ void HP_script_set_constant2(const char *name, int value, bool is_parameter, boo bool HP_script_get_constant(const char *name, int *value) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_get_constant_pre ) { - bool (*preHookFunc) (const char *name, int *value); + if (HPMHooks.count.HP_script_get_constant_pre > 0) { + bool (*preHookFunc) (const char **name, int **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&name, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60694,9 +71740,9 @@ bool HP_script_get_constant(const char *name, int *value) { { retVal___ = HPMHooks.source.script.get_constant(name, value); } - if( HPMHooks.count.HP_script_get_constant_post ) { + if (HPMHooks.count.HP_script_get_constant_post > 0) { bool (*postHookFunc) (bool retVal___, const char *name, int *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_constant_post; hIndex++ ) { + 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); } @@ -60705,14 +71751,14 @@ bool HP_script_get_constant(const char *name, int *value) { } void HP_script_label_add(int key, int pos) { int hIndex = 0; - if( HPMHooks.count.HP_script_label_add_pre ) { + if (HPMHooks.count.HP_script_label_add_pre > 0) { void (*preHookFunc) (int *key, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_label_add_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60720,25 +71766,25 @@ void HP_script_label_add(int key, int pos) { { 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++ ) { + if (HPMHooks.count.HP_script_label_add_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_run_pre > 0) { + void (*preHookFunc) (struct script_code **rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pre; hIndex++ ) { + 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); + preHookFunc(&rootscript, &pos, &rid, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60746,25 +71792,25 @@ void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) { { 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++ ) { + if (HPMHooks.count.HP_script_run_post > 0) { + 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); + postHookFunc(rootscript, pos, rid, oid); } } return; } void HP_script_run_npc(struct script_code *rootscript, int pos, int rid, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_npc_pre ) { - void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + if (HPMHooks.count.HP_script_run_npc_pre > 0) { + void (*preHookFunc) (struct script_code **rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_run_npc_pre[hIndex].func; - preHookFunc(rootscript, &pos, &rid, &oid); + preHookFunc(&rootscript, &pos, &rid, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60772,25 +71818,25 @@ void HP_script_run_npc(struct script_code *rootscript, int pos, int rid, int oid { HPMHooks.source.script.run_npc(rootscript, pos, rid, oid); } - if( HPMHooks.count.HP_script_run_npc_post ) { - void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_post; hIndex++ ) { + if (HPMHooks.count.HP_script_run_npc_post > 0) { + void (*postHookFunc) (struct script_code *rootscript, int pos, int rid, int oid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_npc_post[hIndex].func; - postHookFunc(rootscript, &pos, &rid, &oid); + postHookFunc(rootscript, pos, rid, oid); } } return; } void HP_script_run_pet(struct script_code *rootscript, int pos, int rid, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_pet_pre ) { - void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); + if (HPMHooks.count.HP_script_run_pet_pre > 0) { + void (*preHookFunc) (struct script_code **rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_run_pet_pre[hIndex].func; - preHookFunc(rootscript, &pos, &rid, &oid); + preHookFunc(&rootscript, &pos, &rid, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60798,25 +71844,25 @@ void HP_script_run_pet(struct script_code *rootscript, int pos, int rid, int oid { HPMHooks.source.script.run_pet(rootscript, pos, rid, oid); } - if( HPMHooks.count.HP_script_run_pet_post ) { - void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_post; hIndex++ ) { + if (HPMHooks.count.HP_script_run_pet_post > 0) { + void (*postHookFunc) (struct script_code *rootscript, int pos, int rid, int oid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_pet_post[hIndex].func; - postHookFunc(rootscript, &pos, &rid, &oid); + 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); + if (HPMHooks.count.HP_script_run_main_pre > 0) { + void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_run_main_pre[hIndex].func; - preHookFunc(st); + preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60824,9 +71870,9 @@ void HP_script_run_main(struct script_state *st) { { HPMHooks.source.script.run_main(st); } - if( HPMHooks.count.HP_script_run_main_post ) { + if (HPMHooks.count.HP_script_run_main_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_main_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_main_post[hIndex].func; postHookFunc(st); } @@ -60836,14 +71882,14 @@ void HP_script_run_main(struct script_state *st) { int HP_script_run_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_run_timer_pre ) { + if (HPMHooks.count.HP_script_run_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60851,11 +71897,11 @@ int HP_script_run_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.script.run_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_script_run_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_script_run_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -60863,14 +71909,14 @@ int HP_script_run_timer(int tid, int64 tick, int id, intptr_t data) { int HP_script_set_var(struct map_session_data *sd, char *name, void *val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_set_var_pre ) { - int (*preHookFunc) (struct map_session_data *sd, char *name, void *val); + if (HPMHooks.count.HP_script_set_var_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, char **name, void **val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_var_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &name, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60878,9 +71924,9 @@ int HP_script_set_var(struct map_session_data *sd, char *name, void *val) { { retVal___ = HPMHooks.source.script.set_var(sd, name, val); } - if( HPMHooks.count.HP_script_set_var_post ) { + if (HPMHooks.count.HP_script_set_var_post > 0) { 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++ ) { + 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); } @@ -60889,14 +71935,14 @@ int HP_script_set_var(struct map_session_data *sd, char *name, void *val) { } 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); + if (HPMHooks.count.HP_script_stop_instances_pre > 0) { + void (*preHookFunc) (struct script_code **code); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_stop_instances_pre[hIndex].func; - preHookFunc(code); + preHookFunc(&code); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60904,9 +71950,9 @@ void HP_script_stop_instances(struct script_code *code) { { HPMHooks.source.script.stop_instances(code); } - if( HPMHooks.count.HP_script_stop_instances_post ) { + if (HPMHooks.count.HP_script_stop_instances_post > 0) { void (*postHookFunc) (struct script_code *code); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_stop_instances_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_stop_instances_post[hIndex].func; postHookFunc(code); } @@ -60915,14 +71961,14 @@ void HP_script_stop_instances(struct script_code *code) { } 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); + if (HPMHooks.count.HP_script_free_code_pre > 0) { + void (*preHookFunc) (struct script_code **code); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_free_code_pre[hIndex].func; - preHookFunc(code); + preHookFunc(&code); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60930,9 +71976,9 @@ void HP_script_free_code(struct script_code *code) { { HPMHooks.source.script.free_code(code); } - if( HPMHooks.count.HP_script_free_code_post ) { + if (HPMHooks.count.HP_script_free_code_post > 0) { void (*postHookFunc) (struct script_code *code); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_free_code_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_free_code_post[hIndex].func; postHookFunc(code); } @@ -60941,14 +71987,14 @@ void HP_script_free_code(struct script_code *code) { } 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); + if (HPMHooks.count.HP_script_free_vars_pre > 0) { + void (*preHookFunc) (struct DBMap **var_storage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_pre; hIndex++ ) { + 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); + preHookFunc(&var_storage); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -60956,9 +72002,9 @@ void HP_script_free_vars(struct DBMap *var_storage) { { HPMHooks.source.script.free_vars(var_storage); } - if( HPMHooks.count.HP_script_free_vars_post ) { + if (HPMHooks.count.HP_script_free_vars_post > 0) { void (*postHookFunc) (struct DBMap *var_storage); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_vars_post; hIndex++ ) { + 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); } @@ -60968,14 +72014,14 @@ void HP_script_free_vars(struct DBMap *var_storage) { 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); + if (HPMHooks.count.HP_script_alloc_state_pre > 0) { + struct script_state* (*preHookFunc) (struct script_code **rootscript, int *pos, int *rid, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_alloc_state_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&rootscript, &pos, &rid, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -60983,25 +72029,25 @@ struct script_state* HP_script_alloc_state(struct script_code *rootscript, int p { 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++ ) { + if (HPMHooks.count.HP_script_alloc_state_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_free_state_pre > 0) { + void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_free_state_pre[hIndex].func; - preHookFunc(st); + preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61009,9 +72055,9 @@ void HP_script_free_state(struct script_state *st) { { HPMHooks.source.script.free_state(st); } - if( HPMHooks.count.HP_script_free_state_post ) { + if (HPMHooks.count.HP_script_free_state_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_free_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_free_state_post[hIndex].func; postHookFunc(st); } @@ -61020,14 +72066,14 @@ void HP_script_free_state(struct script_state *st) { } void HP_script_add_pending_ref(struct script_state *st, struct reg_db *ref) { int hIndex = 0; - if( HPMHooks.count.HP_script_add_pending_ref_pre ) { - void (*preHookFunc) (struct script_state *st, struct reg_db *ref); + if (HPMHooks.count.HP_script_add_pending_ref_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_add_pending_ref_pre[hIndex].func; - preHookFunc(st, ref); + preHookFunc(&st, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61035,9 +72081,9 @@ void HP_script_add_pending_ref(struct script_state *st, struct reg_db *ref) { { HPMHooks.source.script.add_pending_ref(st, ref); } - if( HPMHooks.count.HP_script_add_pending_ref_post ) { + if (HPMHooks.count.HP_script_add_pending_ref_post > 0) { void (*postHookFunc) (struct script_state *st, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_pending_ref_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_add_pending_ref_post[hIndex].func; postHookFunc(st, ref); } @@ -61046,14 +72092,14 @@ void HP_script_add_pending_ref(struct script_state *st, struct reg_db *ref) { } 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); + if (HPMHooks.count.HP_script_run_autobonus_pre > 0) { + void (*preHookFunc) (const char **autobonus, int *id, int *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_autobonus_pre; hIndex++ ) { + 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); + preHookFunc(&autobonus, &id, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61061,25 +72107,25 @@ void HP_script_run_autobonus(const char *autobonus, int id, int pos) { { 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++ ) { + if (HPMHooks.count.HP_script_run_autobonus_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_cleararray_pc_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **varname, void **value); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &varname, &value); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61087,9 +72133,9 @@ void HP_script_cleararray_pc(struct map_session_data *sd, const char *varname, v { HPMHooks.source.script.cleararray_pc(sd, varname, value); } - if( HPMHooks.count.HP_script_cleararray_pc_post ) { + if (HPMHooks.count.HP_script_cleararray_pc_post > 0) { void (*postHookFunc) (struct map_session_data *sd, const char *varname, void *value); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleararray_pc_post; hIndex++ ) { + 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); } @@ -61098,14 +72144,14 @@ void HP_script_cleararray_pc(struct map_session_data *sd, const char *varname, v } void HP_script_setarray_pc(struct map_session_data *sd, const char *varname, uint32 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, uint32 *idx, void *value, int *refcache); + if (HPMHooks.count.HP_script_setarray_pc_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **varname, uint32 *idx, void **value, int **refcache); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &varname, &idx, &value, &refcache); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61113,38 +72159,38 @@ void HP_script_setarray_pc(struct map_session_data *sd, const char *varname, uin { 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, uint32 *idx, void *value, int *refcache); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setarray_pc_post; hIndex++ ) { + if (HPMHooks.count.HP_script_setarray_pc_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, const char *varname, uint32 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); + postHookFunc(sd, varname, idx, value, refcache); } } return; } -int HP_script_config_read(char *cfgName) { +bool HP_script_config_read(const char *filename, bool imported) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_script_config_read_pre ) { - int (*preHookFunc) (char *cfgName); + bool retVal___ = false; + if (HPMHooks.count.HP_script_config_read_pre > 0) { + bool (*preHookFunc) (const char **filename, bool *imported); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_config_read_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&filename, &imported); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.script.config_read(cfgName); + retVal___ = HPMHooks.source.script.config_read(filename, imported); } - 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++ ) { + if (HPMHooks.count.HP_script_config_read_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename, bool imported); + 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); + retVal___ = postHookFunc(retVal___, filename, imported); } } return retVal___; @@ -61152,14 +72198,14 @@ int HP_script_config_read(char *cfgName) { int HP_script_add_str(const char *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_add_str_pre ) { - int (*preHookFunc) (const char *p); + if (HPMHooks.count.HP_script_add_str_pre > 0) { + int (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61167,26 +72213,53 @@ int HP_script_add_str(const char *p) { { retVal___ = HPMHooks.source.script.add_str(p); } - if( HPMHooks.count.HP_script_add_str_post ) { + if (HPMHooks.count.HP_script_add_str_post > 0) { int (*postHookFunc) (int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_str_post; hIndex++ ) { + 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___; } +int HP_script_add_variable(const char *varname) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_add_variable_pre > 0) { + int (*preHookFunc) (const char **varname); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_variable_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_add_variable_pre[hIndex].func; + retVal___ = preHookFunc(&varname); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.add_variable(varname); + } + if (HPMHooks.count.HP_script_add_variable_post > 0) { + int (*postHookFunc) (int retVal___, const char *varname); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_variable_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_add_variable_post[hIndex].func; + retVal___ = postHookFunc(retVal___, varname); + } + } + 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 ) { + if (HPMHooks.count.HP_script_get_str_pre > 0) { const char* (*preHookFunc) (int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_str_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61194,11 +72267,11 @@ const char* HP_script_get_str(int id) { { 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++ ) { + if (HPMHooks.count.HP_script_get_str_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, id); } } return retVal___; @@ -61206,14 +72279,14 @@ const char* HP_script_get_str(int id) { int HP_script_search_str(const char *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_search_str_pre ) { - int (*preHookFunc) (const char *p); + if (HPMHooks.count.HP_script_search_str_pre > 0) { + int (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61221,9 +72294,9 @@ int HP_script_search_str(const char *p) { { retVal___ = HPMHooks.source.script.search_str(p); } - if( HPMHooks.count.HP_script_search_str_post ) { + if (HPMHooks.count.HP_script_search_str_post > 0) { int (*postHookFunc) (int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_search_str_post; hIndex++ ) { + 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); } @@ -61232,14 +72305,14 @@ int HP_script_search_str(const char *p) { } void HP_script_setd_sub(struct script_state *st, struct map_session_data *sd, const char *varname, int elem, const void *value, struct reg_db *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, const void *value, struct reg_db *ref); + if (HPMHooks.count.HP_script_setd_sub_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct map_session_data **sd, const char **varname, int *elem, const void **value, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_pre; hIndex++ ) { + 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); + preHookFunc(&st, &sd, &varname, &elem, &value, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61247,25 +72320,25 @@ void HP_script_setd_sub(struct script_state *st, struct map_session_data *sd, co { 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, const void *value, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_setd_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_script_setd_sub_post > 0) { + void (*postHookFunc) (struct script_state *st, struct map_session_data *sd, const char *varname, int elem, const void *value, struct reg_db *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); + 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); + if (HPMHooks.count.HP_script_attach_state_pre > 0) { + void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_attach_state_pre[hIndex].func; - preHookFunc(st); + preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61273,9 +72346,9 @@ void HP_script_attach_state(struct script_state *st) { { HPMHooks.source.script.attach_state(st); } - if( HPMHooks.count.HP_script_attach_state_post ) { + if (HPMHooks.count.HP_script_attach_state_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_attach_state_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_attach_state_post[hIndex].func; postHookFunc(st); } @@ -61285,14 +72358,14 @@ void HP_script_attach_state(struct script_state *st) { struct script_queue* HP_script_queue(int idx) { int hIndex = 0; struct script_queue* retVal___ = NULL; - if( HPMHooks.count.HP_script_queue_pre ) { + if (HPMHooks.count.HP_script_queue_pre > 0) { struct script_queue* (*preHookFunc) (int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61300,11 +72373,11 @@ struct script_queue* HP_script_queue(int idx) { { retVal___ = HPMHooks.source.script.queue(idx); } - if( HPMHooks.count.HP_script_queue_post ) { - struct script_queue* (*postHookFunc) (struct script_queue* retVal___, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_post; hIndex++ ) { + if (HPMHooks.count.HP_script_queue_post > 0) { + struct script_queue* (*postHookFunc) (struct script_queue* 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); + retVal___ = postHookFunc(retVal___, idx); } } return retVal___; @@ -61312,14 +72385,14 @@ struct script_queue* HP_script_queue(int idx) { bool HP_script_queue_add(int idx, int var) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_queue_add_pre ) { + if (HPMHooks.count.HP_script_queue_add_pre > 0) { bool (*preHookFunc) (int *idx, int *var); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_add_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61327,11 +72400,11 @@ bool HP_script_queue_add(int idx, int var) { { 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++ ) { + if (HPMHooks.count.HP_script_queue_add_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, idx, var); } } return retVal___; @@ -61339,14 +72412,14 @@ bool HP_script_queue_add(int idx, int var) { bool HP_script_queue_del(int idx) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_queue_del_pre ) { + if (HPMHooks.count.HP_script_queue_del_pre > 0) { bool (*preHookFunc) (int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_del_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61354,11 +72427,11 @@ bool HP_script_queue_del(int idx) { { 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++ ) { + if (HPMHooks.count.HP_script_queue_del_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, idx); } } return retVal___; @@ -61366,14 +72439,14 @@ bool HP_script_queue_del(int idx) { bool HP_script_queue_remove(int idx, int var) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_queue_remove_pre ) { + if (HPMHooks.count.HP_script_queue_remove_pre > 0) { bool (*preHookFunc) (int *idx, int *var); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_remove_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61381,11 +72454,11 @@ bool HP_script_queue_remove(int idx, int var) { { 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++ ) { + if (HPMHooks.count.HP_script_queue_remove_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, idx, var); } } return retVal___; @@ -61393,14 +72466,14 @@ bool HP_script_queue_remove(int idx, int var) { int HP_script_queue_create(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_queue_create_pre ) { + if (HPMHooks.count.HP_script_queue_create_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61408,9 +72481,9 @@ int HP_script_queue_create(void) { { retVal___ = HPMHooks.source.script.queue_create(); } - if( HPMHooks.count.HP_script_queue_create_post ) { + if (HPMHooks.count.HP_script_queue_create_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_create_post; hIndex++ ) { + 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___); } @@ -61420,14 +72493,14 @@ int HP_script_queue_create(void) { bool HP_script_queue_clear(int idx) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_queue_clear_pre ) { + if (HPMHooks.count.HP_script_queue_clear_pre > 0) { bool (*preHookFunc) (int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_queue_clear_pre[hIndex].func; retVal___ = preHookFunc(&idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61435,11 +72508,11 @@ bool HP_script_queue_clear(int idx) { { retVal___ = HPMHooks.source.script.queue_clear(idx); } - if( HPMHooks.count.HP_script_queue_clear_post ) { - bool (*postHookFunc) (bool retVal___, int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_post; hIndex++ ) { + if (HPMHooks.count.HP_script_queue_clear_post > 0) { + bool (*postHookFunc) (bool retVal___, int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_queue_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_queue_clear_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &idx); + retVal___ = postHookFunc(retVal___, idx); } } return retVal___; @@ -61447,14 +72520,14 @@ bool HP_script_queue_clear(int idx) { 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); + if (HPMHooks.count.HP_script_parse_curly_close_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61462,9 +72535,9 @@ const char* HP_script_parse_curly_close(const char *p) { { retVal___ = HPMHooks.source.script.parse_curly_close(p); } - if( HPMHooks.count.HP_script_parse_curly_close_post ) { + if (HPMHooks.count.HP_script_parse_curly_close_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_curly_close_post; hIndex++ ) { + 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); } @@ -61474,14 +72547,14 @@ const char* HP_script_parse_curly_close(const char *p) { 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); + if (HPMHooks.count.HP_script_parse_syntax_close_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61489,9 +72562,9 @@ const char* HP_script_parse_syntax_close(const char *p) { { retVal___ = HPMHooks.source.script.parse_syntax_close(p); } - if( HPMHooks.count.HP_script_parse_syntax_close_post ) { + if (HPMHooks.count.HP_script_parse_syntax_close_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_post; hIndex++ ) { + 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); } @@ -61501,14 +72574,14 @@ const char* HP_script_parse_syntax_close(const char *p) { 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); + if (HPMHooks.count.HP_script_parse_syntax_close_sub_pre > 0) { + const char* (*preHookFunc) (const char **p, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_close_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61516,9 +72589,9 @@ const char* HP_script_parse_syntax_close_sub(const char *p, int *flag) { { retVal___ = HPMHooks.source.script.parse_syntax_close_sub(p, flag); } - if( HPMHooks.count.HP_script_parse_syntax_close_sub_post ) { + if (HPMHooks.count.HP_script_parse_syntax_close_sub_post > 0) { 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++ ) { + 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); } @@ -61528,14 +72601,14 @@ const char* HP_script_parse_syntax_close_sub(const char *p, int *flag) { 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); + if (HPMHooks.count.HP_script_parse_syntax_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61543,26 +72616,26 @@ const char* HP_script_parse_syntax(const char *p) { { retVal___ = HPMHooks.source.script.parse_syntax(p); } - if( HPMHooks.count.HP_script_parse_syntax_post ) { + if (HPMHooks.count.HP_script_parse_syntax_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_syntax_post; hIndex++ ) { + 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) { +c_op HP_script_get_com(const struct script_buf *scriptbuf, int *pos) { int hIndex = 0; c_op retVal___ = C_NOP; - if( HPMHooks.count.HP_script_get_com_pre ) { - c_op (*preHookFunc) (unsigned char *scriptbuf, int *pos); + if (HPMHooks.count.HP_script_get_com_pre > 0) { + c_op (*preHookFunc) (const struct script_buf **scriptbuf, int **pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_com_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&scriptbuf, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61570,26 +72643,26 @@ c_op HP_script_get_com(unsigned char *scriptbuf, int *pos) { { 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++ ) { + if (HPMHooks.count.HP_script_get_com_post > 0) { + c_op (*postHookFunc) (c_op retVal___, const struct script_buf *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 HP_script_get_num(const struct script_buf *scriptbuf, int *pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_get_num_pre ) { - int (*preHookFunc) (unsigned char *scriptbuf, int *pos); + if (HPMHooks.count.HP_script_get_num_pre > 0) { + int (*preHookFunc) (const struct script_buf **scriptbuf, int **pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_num_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&scriptbuf, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61597,9 +72670,9 @@ int HP_script_get_num(unsigned char *scriptbuf, int *pos) { { 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++ ) { + if (HPMHooks.count.HP_script_get_num_post > 0) { + int (*postHookFunc) (int retVal___, const struct script_buf *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); } @@ -61609,14 +72682,14 @@ int HP_script_get_num(unsigned char *scriptbuf, int *pos) { const char* HP_script_op2name(int op) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_op2name_pre ) { + if (HPMHooks.count.HP_script_op2name_pre > 0) { const char* (*preHookFunc) (int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op2name_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61624,25 +72697,25 @@ const char* HP_script_op2name(int op) { { 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++ ) { + if (HPMHooks.count.HP_script_op2name_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_reportsrc_pre > 0) { + void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_reportsrc_pre[hIndex].func; - preHookFunc(st); + preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61650,9 +72723,9 @@ void HP_script_reportsrc(struct script_state *st) { { HPMHooks.source.script.reportsrc(st); } - if( HPMHooks.count.HP_script_reportsrc_post ) { + if (HPMHooks.count.HP_script_reportsrc_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reportsrc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_reportsrc_post[hIndex].func; postHookFunc(st); } @@ -61661,14 +72734,14 @@ void HP_script_reportsrc(struct script_state *st) { } void HP_script_reportdata(struct script_data *data) { int hIndex = 0; - if( HPMHooks.count.HP_script_reportdata_pre ) { - void (*preHookFunc) (struct script_data *data); + if (HPMHooks.count.HP_script_reportdata_pre > 0) { + void (*preHookFunc) (struct script_data **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_reportdata_pre[hIndex].func; - preHookFunc(data); + preHookFunc(&data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61676,9 +72749,9 @@ void HP_script_reportdata(struct script_data *data) { { HPMHooks.source.script.reportdata(data); } - if( HPMHooks.count.HP_script_reportdata_post ) { + if (HPMHooks.count.HP_script_reportdata_post > 0) { void (*postHookFunc) (struct script_data *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reportdata_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_reportdata_post[hIndex].func; postHookFunc(data); } @@ -61687,14 +72760,14 @@ void HP_script_reportdata(struct script_data *data) { } void HP_script_reportfunc(struct script_state *st) { int hIndex = 0; - if( HPMHooks.count.HP_script_reportfunc_pre ) { - void (*preHookFunc) (struct script_state *st); + if (HPMHooks.count.HP_script_reportfunc_pre > 0) { + void (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_reportfunc_pre[hIndex].func; - preHookFunc(st); + preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61702,9 +72775,9 @@ void HP_script_reportfunc(struct script_state *st) { { HPMHooks.source.script.reportfunc(st); } - if( HPMHooks.count.HP_script_reportfunc_post ) { + if (HPMHooks.count.HP_script_reportfunc_post > 0) { void (*postHookFunc) (struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reportfunc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_reportfunc_post[hIndex].func; postHookFunc(st); } @@ -61713,14 +72786,14 @@ void HP_script_reportfunc(struct script_state *st) { } 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); + if (HPMHooks.count.HP_script_disp_warning_message_pre > 0) { + void (*preHookFunc) (const char **mes, const char **pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_pre; hIndex++ ) { + 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); + preHookFunc(&mes, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61728,9 +72801,9 @@ void HP_script_disp_warning_message(const char *mes, const char *pos) { { HPMHooks.source.script.disp_warning_message(mes, pos); } - if( HPMHooks.count.HP_script_disp_warning_message_post ) { + if (HPMHooks.count.HP_script_disp_warning_message_post > 0) { void (*postHookFunc) (const char *mes, const char *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_disp_warning_message_post; hIndex++ ) { + 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); } @@ -61739,14 +72812,14 @@ void HP_script_disp_warning_message(const char *mes, const char *pos) { } 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); + if (HPMHooks.count.HP_script_check_event_pre > 0) { + void (*preHookFunc) (struct script_state **st, const char **evt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_pre; hIndex++ ) { + 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); + preHookFunc(&st, &evt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61754,9 +72827,9 @@ void HP_script_check_event(struct script_state *st, const char *evt) { { HPMHooks.source.script.check_event(st, evt); } - if( HPMHooks.count.HP_script_check_event_post ) { + if (HPMHooks.count.HP_script_check_event_post > 0) { void (*postHookFunc) (struct script_state *st, const char *evt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_event_post; hIndex++ ) { + 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); } @@ -61766,14 +72839,14 @@ void HP_script_check_event(struct script_state *st, const char *evt) { unsigned int HP_script_calc_hash(const char *p) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_calc_hash_pre ) { - unsigned int (*preHookFunc) (const char *p); + if (HPMHooks.count.HP_script_calc_hash_pre > 0) { + unsigned int (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61781,9 +72854,9 @@ unsigned int HP_script_calc_hash(const char *p) { { retVal___ = HPMHooks.source.script.calc_hash(p); } - if( HPMHooks.count.HP_script_calc_hash_post ) { + if (HPMHooks.count.HP_script_calc_hash_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_post; hIndex++ ) { + 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); } @@ -61792,14 +72865,14 @@ unsigned int HP_script_calc_hash(const char *p) { } void HP_script_addb(int a) { int hIndex = 0; - if( HPMHooks.count.HP_script_addb_pre ) { + if (HPMHooks.count.HP_script_addb_pre > 0) { void (*preHookFunc) (int *a); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61807,25 +72880,25 @@ void HP_script_addb(int a) { { 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++ ) { + if (HPMHooks.count.HP_script_addb_post > 0) { + 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); + postHookFunc(a); } } return; } void HP_script_addc(int a) { int hIndex = 0; - if( HPMHooks.count.HP_script_addc_pre ) { + if (HPMHooks.count.HP_script_addc_pre > 0) { void (*preHookFunc) (int *a); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61833,25 +72906,25 @@ void HP_script_addc(int a) { { 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++ ) { + if (HPMHooks.count.HP_script_addc_post > 0) { + 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); + postHookFunc(a); } } return; } void HP_script_addi(int a) { int hIndex = 0; - if( HPMHooks.count.HP_script_addi_pre ) { + if (HPMHooks.count.HP_script_addi_pre > 0) { void (*preHookFunc) (int *a); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addi_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61859,25 +72932,25 @@ void HP_script_addi(int a) { { 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++ ) { + if (HPMHooks.count.HP_script_addi_post > 0) { + 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); + postHookFunc(a); } } return; } void HP_script_addl(int l) { int hIndex = 0; - if( HPMHooks.count.HP_script_addl_pre ) { + if (HPMHooks.count.HP_script_addl_pre > 0) { void (*preHookFunc) (int *l); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_addl_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61885,25 +72958,25 @@ void HP_script_addl(int l) { { 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++ ) { + if (HPMHooks.count.HP_script_addl_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_set_label_pre > 0) { + void (*preHookFunc) (int *l, int *pos, const char **script_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_label_pre; hIndex++ ) { + 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); + preHookFunc(&l, &pos, &script_pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -61911,11 +72984,11 @@ void HP_script_set_label(int l, int pos, const char *script_pos) { { 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++ ) { + if (HPMHooks.count.HP_script_set_label_post > 0) { + 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); + postHookFunc(l, pos, script_pos); } } return; @@ -61923,14 +72996,14 @@ void HP_script_set_label(int l, int pos, const char *script_pos) { 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); + if (HPMHooks.count.HP_script_skip_word_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61938,9 +73011,9 @@ const char* HP_script_skip_word(const char *p) { { retVal___ = HPMHooks.source.script.skip_word(p); } - if( HPMHooks.count.HP_script_skip_word_post ) { + if (HPMHooks.count.HP_script_skip_word_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_skip_word_post; hIndex++ ) { + 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); } @@ -61950,14 +73023,14 @@ const char* HP_script_skip_word(const char *p) { int HP_script_add_word(const char *p) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_add_word_pre ) { - int (*preHookFunc) (const char *p); + if (HPMHooks.count.HP_script_add_word_pre > 0) { + int (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61965,9 +73038,9 @@ int HP_script_add_word(const char *p) { { retVal___ = HPMHooks.source.script.add_word(p); } - if( HPMHooks.count.HP_script_add_word_post ) { + if (HPMHooks.count.HP_script_add_word_post > 0) { int (*postHookFunc) (int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_word_post; hIndex++ ) { + 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); } @@ -61977,14 +73050,14 @@ int HP_script_add_word(const char *p) { 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); + if (HPMHooks.count.HP_script_parse_callfunc_pre > 0) { + const char* (*preHookFunc) (const char **p, int *require_paren, int *is_custom); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_callfunc_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p, &require_paren, &is_custom); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -61992,25 +73065,25 @@ const char* HP_script_parse_callfunc(const char *p, int require_paren, int is_cu { 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++ ) { + if (HPMHooks.count.HP_script_parse_callfunc_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_parse_nextline_pre > 0) { + void (*preHookFunc) (bool *first, const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_nextline_pre; hIndex++ ) { + 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); + preHookFunc(&first, &p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62018,11 +73091,11 @@ void HP_script_parse_nextline(bool first, const char *p) { { 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++ ) { + if (HPMHooks.count.HP_script_parse_nextline_post > 0) { + 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); + postHookFunc(first, p); } } return; @@ -62030,14 +73103,14 @@ void HP_script_parse_nextline(bool first, const char *p) { 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); + if (HPMHooks.count.HP_script_parse_variable_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62045,9 +73118,9 @@ const char* HP_script_parse_variable(const char *p) { { retVal___ = HPMHooks.source.script.parse_variable(p); } - if( HPMHooks.count.HP_script_parse_variable_post ) { + if (HPMHooks.count.HP_script_parse_variable_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_variable_post; hIndex++ ) { + 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); } @@ -62057,14 +73130,14 @@ const char* HP_script_parse_variable(const char *p) { 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); + if (HPMHooks.count.HP_script_parse_simpleexpr_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62072,26 +73145,160 @@ const char* HP_script_parse_simpleexpr(const char *p) { { retVal___ = HPMHooks.source.script.parse_simpleexpr(p); } - if( HPMHooks.count.HP_script_parse_simpleexpr_post ) { + if (HPMHooks.count.HP_script_parse_simpleexpr_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_post; hIndex++ ) { + 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_simpleexpr_paren(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if (HPMHooks.count.HP_script_parse_simpleexpr_paren_pre > 0) { + const char* (*preHookFunc) (const char **p); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_paren_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_paren_pre[hIndex].func; + retVal___ = preHookFunc(&p); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_simpleexpr_paren(p); + } + if (HPMHooks.count.HP_script_parse_simpleexpr_paren_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_paren_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_paren_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +const char* HP_script_parse_simpleexpr_number(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if (HPMHooks.count.HP_script_parse_simpleexpr_number_pre > 0) { + const char* (*preHookFunc) (const char **p); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_number_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_number_pre[hIndex].func; + retVal___ = preHookFunc(&p); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_simpleexpr_number(p); + } + if (HPMHooks.count.HP_script_parse_simpleexpr_number_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_number_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_number_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +const char* HP_script_parse_simpleexpr_string(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if (HPMHooks.count.HP_script_parse_simpleexpr_string_pre > 0) { + const char* (*preHookFunc) (const char **p); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_string_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_string_pre[hIndex].func; + retVal___ = preHookFunc(&p); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_simpleexpr_string(p); + } + if (HPMHooks.count.HP_script_parse_simpleexpr_string_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_string_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_string_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +const char* HP_script_parse_simpleexpr_name(const char *p) { + int hIndex = 0; + const char* retVal___ = NULL; + if (HPMHooks.count.HP_script_parse_simpleexpr_name_pre > 0) { + const char* (*preHookFunc) (const char **p); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_name_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_name_pre[hIndex].func; + retVal___ = preHookFunc(&p); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.parse_simpleexpr_name(p); + } + if (HPMHooks.count.HP_script_parse_simpleexpr_name_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const char *p); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_simpleexpr_name_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_parse_simpleexpr_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, p); + } + } + return retVal___; +} +void HP_script_add_translatable_string(const struct script_string_buf *string, const char *start_point) { + int hIndex = 0; + if (HPMHooks.count.HP_script_add_translatable_string_pre > 0) { + void (*preHookFunc) (const struct script_string_buf **string, const char **start_point); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_translatable_string_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_add_translatable_string_pre[hIndex].func; + preHookFunc(&string, &start_point); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.add_translatable_string(string, start_point); + } + if (HPMHooks.count.HP_script_add_translatable_string_post > 0) { + void (*postHookFunc) (const struct script_string_buf *string, const char *start_point); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_translatable_string_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_add_translatable_string_post[hIndex].func; + postHookFunc(string, start_point); + } + } + return; +} 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); + if (HPMHooks.count.HP_script_parse_expr_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62099,9 +73306,9 @@ const char* HP_script_parse_expr(const char *p) { { retVal___ = HPMHooks.source.script.parse_expr(p); } - if( HPMHooks.count.HP_script_parse_expr_post ) { + if (HPMHooks.count.HP_script_parse_expr_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_expr_post; hIndex++ ) { + 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); } @@ -62111,14 +73318,14 @@ const char* HP_script_parse_expr(const char *p) { 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); + if (HPMHooks.count.HP_script_parse_line_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62126,51 +73333,51 @@ const char* HP_script_parse_line(const char *p) { { retVal___ = HPMHooks.source.script.parse_line(p); } - if( HPMHooks.count.HP_script_parse_line_post ) { + if (HPMHooks.count.HP_script_parse_line_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_line_post; hIndex++ ) { + 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) { +void HP_script_read_constdb(bool reload) { int hIndex = 0; - if( HPMHooks.count.HP_script_read_constdb_pre ) { - void (*preHookFunc) (void); + if (HPMHooks.count.HP_script_read_constdb_pre > 0) { + void (*preHookFunc) (bool *reload); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_read_constdb_pre[hIndex].func; - preHookFunc(); + preHookFunc(&reload); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } } { - HPMHooks.source.script.read_constdb(); + HPMHooks.source.script.read_constdb(reload); } - if( HPMHooks.count.HP_script_read_constdb_post ) { - void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_post; hIndex++ ) { + if (HPMHooks.count.HP_script_read_constdb_post > 0) { + void (*postHookFunc) (bool reload); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_read_constdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_read_constdb_post[hIndex].func; - postHookFunc(); + postHookFunc(reload); } } return; } void HP_script_constdb_comment(const char *comment) { int hIndex = 0; - if( HPMHooks.count.HP_script_constdb_comment_pre ) { - void (*preHookFunc) (const char *comment); + if (HPMHooks.count.HP_script_constdb_comment_pre > 0) { + void (*preHookFunc) (const char **comment); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_constdb_comment_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_constdb_comment_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_constdb_comment_pre[hIndex].func; - preHookFunc(comment); + preHookFunc(&comment); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62178,9 +73385,9 @@ void HP_script_constdb_comment(const char *comment) { { HPMHooks.source.script.constdb_comment(comment); } - if( HPMHooks.count.HP_script_constdb_comment_post ) { + if (HPMHooks.count.HP_script_constdb_comment_post > 0) { void (*postHookFunc) (const char *comment); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_constdb_comment_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_constdb_comment_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_constdb_comment_post[hIndex].func; postHookFunc(comment); } @@ -62189,14 +73396,14 @@ void HP_script_constdb_comment(const char *comment) { } void HP_script_load_parameters(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_load_parameters_pre ) { + if (HPMHooks.count.HP_script_load_parameters_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_parameters_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_parameters_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_load_parameters_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62204,9 +73411,9 @@ void HP_script_load_parameters(void) { { HPMHooks.source.script.load_parameters(); } - if( HPMHooks.count.HP_script_load_parameters_post ) { + if (HPMHooks.count.HP_script_load_parameters_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_parameters_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_parameters_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_load_parameters_post[hIndex].func; postHookFunc(); } @@ -62216,14 +73423,14 @@ void HP_script_load_parameters(void) { 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); + if (HPMHooks.count.HP_script_print_line_pre > 0) { + const char* (*preHookFunc) (StringBuf **buf, const char **p, const char **mark, int *line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_print_line_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&buf, &p, &mark, &line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62231,25 +73438,25 @@ const char* HP_script_print_line(StringBuf *buf, const char *p, const char *mark { 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++ ) { + if (HPMHooks.count.HP_script_print_line_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_errorwarning_sub_pre > 0) { + void (*preHookFunc) (StringBuf **buf, const char **src, const char **file, int *start_line, const char **error_msg, const char **error_pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_errorwarning_sub_pre; hIndex++ ) { + 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); + preHookFunc(&buf, &src, &file, &start_line, &error_msg, &error_pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62257,11 +73464,11 @@ void HP_script_errorwarning_sub(StringBuf *buf, const char *src, const char *fil { 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++ ) { + if (HPMHooks.count.HP_script_errorwarning_sub_post > 0) { + 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); + postHookFunc(buf, src, file, start_line, error_msg, error_pos); } } return; @@ -62269,14 +73476,14 @@ void HP_script_errorwarning_sub(StringBuf *buf, const char *src, const char *fil int HP_script_set_reg(struct script_state *st, struct map_session_data *sd, int64 num, const char *name, const void *value, struct reg_db *ref) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_set_reg_pre ) { - int (*preHookFunc) (struct script_state *st, struct map_session_data *sd, int64 *num, const char *name, const void *value, struct reg_db *ref); + if (HPMHooks.count.HP_script_set_reg_pre > 0) { + int (*preHookFunc) (struct script_state **st, struct map_session_data **sd, int64 *num, const char **name, const void **value, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&st, &sd, &num, &name, &value, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62284,25 +73491,25 @@ int HP_script_set_reg(struct script_state *st, struct map_session_data *sd, int6 { 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, struct map_session_data *sd, int64 *num, const char *name, const void *value, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_post; hIndex++ ) { + if (HPMHooks.count.HP_script_set_reg_post > 0) { + int (*postHookFunc) (int retVal___, struct script_state *st, struct map_session_data *sd, int64 num, const char *name, const void *value, struct reg_db *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); + retVal___ = postHookFunc(retVal___, st, sd, num, name, value, ref); } } return retVal___; } void HP_script_set_reg_ref_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_ref_str_pre ) { - void (*preHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, const char *str); + if (HPMHooks.count.HP_script_set_reg_ref_str_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_ref_str_pre[hIndex].func; - preHookFunc(st, n, &num, name, str); + preHookFunc(&st, &n, &num, &name, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62310,25 +73517,51 @@ void HP_script_set_reg_ref_str(struct script_state *st, struct reg_db *n, int64 { HPMHooks.source.script.set_reg_ref_str(st, n, num, name, str); } - if( HPMHooks.count.HP_script_set_reg_ref_str_post ) { - void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_str_post; hIndex++ ) { + if (HPMHooks.count.HP_script_set_reg_ref_str_post > 0) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_ref_str_post[hIndex].func; - postHookFunc(st, n, &num, name, str); + postHookFunc(st, n, num, name, str); + } + } + return; +} +void HP_script_set_reg_pc_ref_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) { + int hIndex = 0; + if (HPMHooks.count.HP_script_set_reg_pc_ref_str_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_str_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_str_pre[hIndex].func; + preHookFunc(&st, &n, &num, &name, &str); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.set_reg_pc_ref_str(st, n, num, name, str); + } + if (HPMHooks.count.HP_script_set_reg_pc_ref_str_post > 0) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_str_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_str_post[hIndex].func; + postHookFunc(st, n, num, name, str); } } return; } void HP_script_set_reg_scope_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_scope_str_pre ) { - void (*preHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, const char *str); + if (HPMHooks.count.HP_script_set_reg_scope_str_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_scope_str_pre[hIndex].func; - preHookFunc(st, n, &num, name, str); + preHookFunc(&st, &n, &num, &name, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62336,25 +73569,25 @@ void HP_script_set_reg_scope_str(struct script_state *st, struct reg_db *n, int6 { HPMHooks.source.script.set_reg_scope_str(st, n, num, name, str); } - if( HPMHooks.count.HP_script_set_reg_scope_str_post ) { - void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_str_post; hIndex++ ) { + if (HPMHooks.count.HP_script_set_reg_scope_str_post > 0) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_scope_str_post[hIndex].func; - postHookFunc(st, n, &num, name, str); + postHookFunc(st, n, num, name, str); } } return; } void HP_script_set_reg_npc_str(struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_npc_str_pre ) { - void (*preHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, const char *str); + if (HPMHooks.count.HP_script_set_reg_npc_str_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_npc_str_pre[hIndex].func; - preHookFunc(st, n, &num, name, str); + preHookFunc(&st, &n, &num, &name, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62362,25 +73595,25 @@ void HP_script_set_reg_npc_str(struct script_state *st, struct reg_db *n, int64 { HPMHooks.source.script.set_reg_npc_str(st, n, num, name, str); } - if( HPMHooks.count.HP_script_set_reg_npc_str_post ) { - void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_str_post; hIndex++ ) { + if (HPMHooks.count.HP_script_set_reg_npc_str_post > 0) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, const char *str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_npc_str_post[hIndex].func; - postHookFunc(st, n, &num, name, str); + postHookFunc(st, n, num, name, str); } } return; } void HP_script_set_reg_instance_str(struct script_state *st, int64 num, const char *name, const char *str) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_instance_str_pre ) { - void (*preHookFunc) (struct script_state *st, int64 *num, const char *name, const char *str); + if (HPMHooks.count.HP_script_set_reg_instance_str_pre > 0) { + void (*preHookFunc) (struct script_state **st, int64 *num, const char **name, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_instance_str_pre[hIndex].func; - preHookFunc(st, &num, name, str); + preHookFunc(&st, &num, &name, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62388,25 +73621,25 @@ void HP_script_set_reg_instance_str(struct script_state *st, int64 num, const ch { HPMHooks.source.script.set_reg_instance_str(st, num, name, str); } - if( HPMHooks.count.HP_script_set_reg_instance_str_post ) { - void (*postHookFunc) (struct script_state *st, int64 *num, const char *name, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_str_post; hIndex++ ) { + if (HPMHooks.count.HP_script_set_reg_instance_str_post > 0) { + void (*postHookFunc) (struct script_state *st, int64 num, const char *name, const char *str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_instance_str_post[hIndex].func; - postHookFunc(st, &num, name, str); + postHookFunc(st, num, name, str); } } return; } void HP_script_set_reg_ref_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_ref_num_pre ) { - void (*preHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, int *val); + if (HPMHooks.count.HP_script_set_reg_ref_num_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_ref_num_pre[hIndex].func; - preHookFunc(st, n, &num, name, &val); + preHookFunc(&st, &n, &num, &name, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62414,25 +73647,51 @@ void HP_script_set_reg_ref_num(struct script_state *st, struct reg_db *n, int64 { HPMHooks.source.script.set_reg_ref_num(st, n, num, name, val); } - if( HPMHooks.count.HP_script_set_reg_ref_num_post ) { - void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_num_post; hIndex++ ) { + if (HPMHooks.count.HP_script_set_reg_ref_num_post > 0) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_ref_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_ref_num_post[hIndex].func; - postHookFunc(st, n, &num, name, &val); + postHookFunc(st, n, num, name, val); + } + } + return; +} +void HP_script_set_reg_pc_ref_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) { + int hIndex = 0; + if (HPMHooks.count.HP_script_set_reg_pc_ref_num_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_num_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_num_pre[hIndex].func; + preHookFunc(&st, &n, &num, &name, &val); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.set_reg_pc_ref_num(st, n, num, name, val); + } + if (HPMHooks.count.HP_script_set_reg_pc_ref_num_post > 0) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_pc_ref_num_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_set_reg_pc_ref_num_post[hIndex].func; + postHookFunc(st, n, num, name, val); } } return; } void HP_script_set_reg_scope_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_scope_num_pre ) { - void (*preHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, int *val); + if (HPMHooks.count.HP_script_set_reg_scope_num_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_scope_num_pre[hIndex].func; - preHookFunc(st, n, &num, name, &val); + preHookFunc(&st, &n, &num, &name, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62440,25 +73699,25 @@ void HP_script_set_reg_scope_num(struct script_state *st, struct reg_db *n, int6 { HPMHooks.source.script.set_reg_scope_num(st, n, num, name, val); } - if( HPMHooks.count.HP_script_set_reg_scope_num_post ) { - void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_num_post; hIndex++ ) { + if (HPMHooks.count.HP_script_set_reg_scope_num_post > 0) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_scope_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_scope_num_post[hIndex].func; - postHookFunc(st, n, &num, name, &val); + postHookFunc(st, n, num, name, val); } } return; } void HP_script_set_reg_npc_num(struct script_state *st, struct reg_db *n, int64 num, const char *name, int val) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_npc_num_pre ) { - void (*preHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, int *val); + if (HPMHooks.count.HP_script_set_reg_npc_num_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct reg_db **n, int64 *num, const char **name, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_npc_num_pre[hIndex].func; - preHookFunc(st, n, &num, name, &val); + preHookFunc(&st, &n, &num, &name, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62466,25 +73725,25 @@ void HP_script_set_reg_npc_num(struct script_state *st, struct reg_db *n, int64 { HPMHooks.source.script.set_reg_npc_num(st, n, num, name, val); } - if( HPMHooks.count.HP_script_set_reg_npc_num_post ) { - void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 *num, const char *name, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_num_post; hIndex++ ) { + if (HPMHooks.count.HP_script_set_reg_npc_num_post > 0) { + void (*postHookFunc) (struct script_state *st, struct reg_db *n, int64 num, const char *name, int val); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_npc_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_npc_num_post[hIndex].func; - postHookFunc(st, n, &num, name, &val); + postHookFunc(st, n, num, name, val); } } return; } void HP_script_set_reg_instance_num(struct script_state *st, int64 num, const char *name, int val) { int hIndex = 0; - if( HPMHooks.count.HP_script_set_reg_instance_num_pre ) { - void (*preHookFunc) (struct script_state *st, int64 *num, const char *name, int *val); + if (HPMHooks.count.HP_script_set_reg_instance_num_pre > 0) { + void (*preHookFunc) (struct script_state **st, int64 *num, const char **name, int *val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_num_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_num_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_set_reg_instance_num_pre[hIndex].func; - preHookFunc(st, &num, name, &val); + preHookFunc(&st, &num, &name, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62492,25 +73751,25 @@ void HP_script_set_reg_instance_num(struct script_state *st, int64 num, const ch { HPMHooks.source.script.set_reg_instance_num(st, num, name, val); } - if( HPMHooks.count.HP_script_set_reg_instance_num_post ) { - void (*postHookFunc) (struct script_state *st, int64 *num, const char *name, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_num_post; hIndex++ ) { + if (HPMHooks.count.HP_script_set_reg_instance_num_post > 0) { + void (*postHookFunc) (struct script_state *st, int64 num, const char *name, int val); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_set_reg_instance_num_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_set_reg_instance_num_post[hIndex].func; - postHookFunc(st, &num, name, &val); + postHookFunc(st, num, name, val); } } return; } 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); + if (HPMHooks.count.HP_script_stack_expand_pre > 0) { + void (*preHookFunc) (struct script_stack **stack); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_stack_expand_pre[hIndex].func; - preHookFunc(stack); + preHookFunc(&stack); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62518,9 +73777,9 @@ void HP_script_stack_expand(struct script_stack *stack) { { HPMHooks.source.script.stack_expand(stack); } - if( HPMHooks.count.HP_script_stack_expand_post ) { + if (HPMHooks.count.HP_script_stack_expand_post > 0) { void (*postHookFunc) (struct script_stack *stack); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_stack_expand_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_stack_expand_post[hIndex].func; postHookFunc(stack); } @@ -62530,14 +73789,14 @@ void HP_script_stack_expand(struct script_stack *stack) { struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct script_retinfo *ri, struct reg_db *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, struct reg_db *ref); + if (HPMHooks.count.HP_script_push_retinfo_pre > 0) { + struct script_data* (*preHookFunc) (struct script_stack **stack, struct script_retinfo **ri, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&stack, &ri, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62545,9 +73804,9 @@ struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct sc { retVal___ = HPMHooks.source.script.push_retinfo(stack, ri, ref); } - if( HPMHooks.count.HP_script_push_retinfo_post ) { + if (HPMHooks.count.HP_script_push_retinfo_post > 0) { struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_stack *stack, struct script_retinfo *ri, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_push_retinfo_post; hIndex++ ) { + 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); } @@ -62556,14 +73815,14 @@ struct script_data* HP_script_push_retinfo(struct script_stack *stack, struct sc } 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); + if (HPMHooks.count.HP_script_op_3_pre > 0) { + void (*preHookFunc) (struct script_state **st, int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_3_pre; hIndex++ ) { + 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); + preHookFunc(&st, &op); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62571,25 +73830,25 @@ void HP_script_op_3(struct script_state *st, int op) { { 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++ ) { + if (HPMHooks.count.HP_script_op_3_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_op_2str_pre > 0) { + void (*preHookFunc) (struct script_state **st, int *op, const char **s1, const char **s2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2str_pre; hIndex++ ) { + 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); + preHookFunc(&st, &op, &s1, &s2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62597,25 +73856,25 @@ void HP_script_op_2str(struct script_state *st, int op, const char *s1, const ch { 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++ ) { + if (HPMHooks.count.HP_script_op_2str_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_op_2num_pre > 0) { + void (*preHookFunc) (struct script_state **st, int *op, int *i1, int *i2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2num_pre; hIndex++ ) { + 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); + preHookFunc(&st, &op, &i1, &i2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62623,25 +73882,25 @@ void HP_script_op_2num(struct script_state *st, int op, int i1, int i2) { { 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++ ) { + if (HPMHooks.count.HP_script_op_2num_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_op_2_pre > 0) { + void (*preHookFunc) (struct script_state **st, int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_2_pre; hIndex++ ) { + 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); + preHookFunc(&st, &op); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62649,25 +73908,25 @@ void HP_script_op_2(struct script_state *st, int op) { { 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++ ) { + if (HPMHooks.count.HP_script_op_2_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_script_op_1_pre > 0) { + void (*preHookFunc) (struct script_state **st, int *op); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_op_1_pre; hIndex++ ) { + 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); + preHookFunc(&st, &op); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62675,51 +73934,52 @@ void HP_script_op_1(struct script_state *st, int op) { { 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++ ) { + if (HPMHooks.count.HP_script_op_1_post > 0) { + 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); + postHookFunc(st, op); } } return; } -void HP_script_check_buildin_argtype(struct script_state *st, int func) { +bool 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); + bool retVal___ = false; + if (HPMHooks.count.HP_script_check_buildin_argtype_pre > 0) { + bool (*preHookFunc) (struct script_state **st, int *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_check_buildin_argtype_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&st, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.check_buildin_argtype(st, func); + retVal___ = 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++ ) { + if (HPMHooks.count.HP_script_check_buildin_argtype_post > 0) { + bool (*postHookFunc) (bool retVal___, 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); + retVal___ = postHookFunc(retVal___, st, func); } } - return; + return retVal___; } 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); + if (HPMHooks.count.HP_script_detach_state_pre > 0) { + void (*preHookFunc) (struct script_state **st, bool *dequeue_event); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_detach_state_pre; hIndex++ ) { + 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); + preHookFunc(&st, &dequeue_event); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62727,11 +73987,11 @@ void HP_script_detach_state(struct script_state *st, bool dequeue_event) { { 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++ ) { + if (HPMHooks.count.HP_script_detach_state_post > 0) { + 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); + postHookFunc(st, dequeue_event); } } return; @@ -62739,16 +73999,16 @@ void HP_script_detach_state(struct script_state *st, bool dequeue_event) { int HP_script_db_free_code_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_db_free_code_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_script_db_free_code_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62758,12 +74018,12 @@ int HP_script_db_free_code_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_db_free_code_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_script_db_free_code_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -62771,14 +74031,14 @@ int HP_script_db_free_code_sub(union DBKey key, struct DBData *data, va_list ap) } void HP_script_add_autobonus(const char *autobonus) { int hIndex = 0; - if( HPMHooks.count.HP_script_add_autobonus_pre ) { - void (*preHookFunc) (const char *autobonus); + if (HPMHooks.count.HP_script_add_autobonus_pre > 0) { + void (*preHookFunc) (const char **autobonus); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_add_autobonus_pre[hIndex].func; - preHookFunc(autobonus); + preHookFunc(&autobonus); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62786,9 +74046,9 @@ void HP_script_add_autobonus(const char *autobonus) { { HPMHooks.source.script.add_autobonus(autobonus); } - if( HPMHooks.count.HP_script_add_autobonus_post ) { + if (HPMHooks.count.HP_script_add_autobonus_post > 0) { void (*postHookFunc) (const char *autobonus); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_autobonus_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_add_autobonus_post[hIndex].func; postHookFunc(autobonus); } @@ -62798,14 +74058,14 @@ void HP_script_add_autobonus(const char *autobonus) { int HP_script_menu_countoptions(const char *str, int max_count, int *total) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_menu_countoptions_pre ) { - int (*preHookFunc) (const char *str, int *max_count, int *total); + if (HPMHooks.count.HP_script_menu_countoptions_pre > 0) { + int (*preHookFunc) (const char **str, int *max_count, int **total); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_menu_countoptions_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&str, &max_count, &total); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62813,11 +74073,104 @@ int HP_script_menu_countoptions(const char *str, int max_count, int *total) { { 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++ ) { + if (HPMHooks.count.HP_script_menu_countoptions_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, str, max_count, total); + } + } + return retVal___; +} +int HP_script_buildin_recovery_sub(struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_buildin_recovery_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_buildin_recovery_sub_pre[hIndex].func; + retVal___ = preHookFunc(&sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.buildin_recovery_sub(sd); + } + if (HPMHooks.count.HP_script_buildin_recovery_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_buildin_recovery_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd); + } + } + return retVal___; +} +int HP_script_buildin_recovery_pc_sub(struct map_session_data *sd, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_buildin_recovery_pc_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_pc_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_recovery_pc_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.script.buildin_recovery_pc_sub(sd, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_script_buildin_recovery_pc_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_pc_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_recovery_pc_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_script_buildin_recovery_bl_sub(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_buildin_recovery_bl_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_bl_sub_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_script_buildin_recovery_bl_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_recovery_bl_sub(bl, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_script_buildin_recovery_bl_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_recovery_bl_sub_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_script_buildin_recovery_bl_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); } } return retVal___; @@ -62825,16 +74178,16 @@ int HP_script_menu_countoptions(const char *str, int max_count, int *total) { int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_areawarp_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_areawarp_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62844,9 +74197,9 @@ int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_areawarp_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_areawarp_sub_post ) { + if (HPMHooks.count.HP_script_buildin_areawarp_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areawarp_sub_post; hIndex++ ) { + 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); @@ -62858,16 +74211,16 @@ int HP_script_buildin_areawarp_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62877,9 +74230,9 @@ int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_areapercentheal_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_areapercentheal_sub_post ) { + if (HPMHooks.count.HP_script_buildin_areapercentheal_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_areapercentheal_sub_post; hIndex++ ) { + 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); @@ -62890,14 +74243,14 @@ int HP_script_buildin_areapercentheal_sub(struct block_list *bl, va_list ap) { } 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); + if (HPMHooks.count.HP_script_buildin_delitem_delete_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *idx, int **amount, bool *delete_items); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_delete_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &idx, &amount, &delete_items); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -62905,11 +74258,11 @@ void HP_script_buildin_delitem_delete(struct map_session_data *sd, int idx, int { 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++ ) { + if (HPMHooks.count.HP_script_buildin_delitem_delete_post > 0) { + 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); + postHookFunc(sd, idx, amount, delete_items); } } return; @@ -62917,14 +74270,14 @@ void HP_script_buildin_delitem_delete(struct map_session_data *sd, int idx, int bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item *it, bool exact_match) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_script_buildin_delitem_search_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, struct item *it, bool *exact_match); + if (HPMHooks.count.HP_script_buildin_delitem_search_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, struct item **it, bool *exact_match); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_delitem_search_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &it, &exact_match); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62932,11 +74285,11 @@ bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item * { 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++ ) { + if (HPMHooks.count.HP_script_buildin_delitem_search_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, it, exact_match); } } return retVal___; @@ -62944,16 +74297,16 @@ bool HP_script_buildin_delitem_search(struct map_session_data *sd, struct item * int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_strip_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62963,9 +74316,9 @@ int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_script_buildin_killmonster_sub_strip_post > 0) { 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++ ) { + 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); @@ -62977,16 +74330,16 @@ int HP_script_buildin_killmonster_sub_strip(struct block_list *bl, va_list ap) { int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonster_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_killmonster_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -62996,9 +74349,9 @@ int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_killmonster_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_killmonster_sub_post ) { + if (HPMHooks.count.HP_script_buildin_killmonster_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonster_sub_post; hIndex++ ) { + 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); @@ -63010,16 +74363,16 @@ int HP_script_buildin_killmonster_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63029,9 +74382,9 @@ int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_script_buildin_killmonsterall_sub_strip_post > 0) { 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++ ) { + 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); @@ -63043,16 +74396,16 @@ int HP_script_buildin_killmonsterall_sub_strip(struct block_list *bl, va_list ap int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63062,9 +74415,9 @@ int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_killmonsterall_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_killmonsterall_sub_post ) { + if (HPMHooks.count.HP_script_buildin_killmonsterall_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_killmonsterall_sub_post; hIndex++ ) { + 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); @@ -63076,16 +74429,16 @@ int HP_script_buildin_killmonsterall_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_announce_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_announce_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63095,9 +74448,9 @@ int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_announce_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_announce_sub_post ) { + if (HPMHooks.count.HP_script_buildin_announce_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_announce_sub_post; hIndex++ ) { + 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); @@ -63109,16 +74462,16 @@ int HP_script_buildin_announce_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_getareausers_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_getareausers_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63128,9 +74481,9 @@ int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_getareausers_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_getareausers_sub_post ) { + if (HPMHooks.count.HP_script_buildin_getareausers_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareausers_sub_post; hIndex++ ) { + 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); @@ -63142,16 +74495,16 @@ int HP_script_buildin_getareausers_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63161,9 +74514,9 @@ int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_getareadropitem_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_getareadropitem_sub_post ) { + if (HPMHooks.count.HP_script_buildin_getareadropitem_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_getareadropitem_sub_post; hIndex++ ) { + 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); @@ -63175,16 +74528,16 @@ int HP_script_buildin_getareadropitem_sub(struct block_list *bl, va_list ap) { int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_mapflag_pvp_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_mapflag_pvp_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63194,9 +74547,9 @@ int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.mapflag_pvp_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_mapflag_pvp_sub_post ) { + if (HPMHooks.count.HP_script_mapflag_pvp_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapflag_pvp_sub_post; hIndex++ ) { + 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); @@ -63208,16 +74561,16 @@ int HP_script_mapflag_pvp_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_pvpoff_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_pvpoff_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63227,9 +74580,9 @@ int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_pvpoff_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_pvpoff_sub_post ) { + if (HPMHooks.count.HP_script_buildin_pvpoff_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_pvpoff_sub_post; hIndex++ ) { + 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); @@ -63241,16 +74594,16 @@ int HP_script_buildin_pvpoff_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list ap); + if (HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63260,9 +74613,9 @@ int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_l 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 ) { + if (HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_pc_post > 0) { 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++ ) { + 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); @@ -63274,16 +74627,16 @@ int HP_script_buildin_maprespawnguildid_sub_pc(struct map_session_data *sd, va_l int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63293,9 +74646,9 @@ int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list a 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 ) { + if (HPMHooks.count.HP_script_buildin_maprespawnguildid_sub_mob_post > 0) { 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++ ) { + 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); @@ -63307,16 +74660,16 @@ int HP_script_buildin_maprespawnguildid_sub_mob(struct block_list *bl, va_list a int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_mobcount_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_mobcount_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63326,9 +74679,9 @@ int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_mobcount_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_mobcount_sub_post ) { + if (HPMHooks.count.HP_script_buildin_mobcount_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobcount_sub_post; hIndex++ ) { + 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); @@ -63340,16 +74693,16 @@ int HP_script_buildin_mobcount_sub(struct block_list *bl, va_list ap) { int HP_script_playbgm_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_playbgm_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_playbgm_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63359,9 +74712,9 @@ int HP_script_playbgm_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.playbgm_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_playbgm_sub_post ) { + if (HPMHooks.count.HP_script_playbgm_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_sub_post; hIndex++ ) { + 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); @@ -63373,16 +74726,16 @@ int HP_script_playbgm_sub(struct block_list *bl, va_list ap) { int HP_script_playbgm_foreachpc_sub(struct map_session_data *sd, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre ) { - int (*preHookFunc) (struct map_session_data *sd, va_list args); + if (HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_playbgm_foreachpc_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63392,9 +74745,9 @@ int HP_script_playbgm_foreachpc_sub(struct map_session_data *sd, va_list args) { retVal___ = HPMHooks.source.script.playbgm_foreachpc_sub(sd, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_script_playbgm_foreachpc_sub_post ) { + if (HPMHooks.count.HP_script_playbgm_foreachpc_sub_post > 0) { 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++ ) { + 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); @@ -63406,16 +74759,16 @@ int HP_script_playbgm_foreachpc_sub(struct map_session_data *sd, va_list args) { int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_soundeffect_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_soundeffect_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63425,9 +74778,9 @@ int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.soundeffect_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_soundeffect_sub_post ) { + if (HPMHooks.count.HP_script_soundeffect_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_soundeffect_sub_post; hIndex++ ) { + 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); @@ -63439,14 +74792,14 @@ int HP_script_soundeffect_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_query_sql_sub(struct script_state *st, struct Sql *handle) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_query_sql_sub_pre ) { - int (*preHookFunc) (struct script_state *st, struct Sql *handle); + if (HPMHooks.count.HP_script_buildin_query_sql_sub_pre > 0) { + int (*preHookFunc) (struct script_state **st, struct Sql **handle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&st, &handle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63454,9 +74807,9 @@ int HP_script_buildin_query_sql_sub(struct script_state *st, struct Sql *handle) { retVal___ = HPMHooks.source.script.buildin_query_sql_sub(st, handle); } - if( HPMHooks.count.HP_script_buildin_query_sql_sub_post ) { + if (HPMHooks.count.HP_script_buildin_query_sql_sub_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st, struct Sql *handle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_query_sql_sub_post; hIndex++ ) { + 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); } @@ -63466,16 +74819,16 @@ int HP_script_buildin_query_sql_sub(struct script_state *st, struct Sql *handle) int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_instance_warpall_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63485,9 +74838,9 @@ int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_script_buildin_instance_warpall_sub_post > 0) { 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++ ) { + 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); @@ -63499,16 +74852,16 @@ int HP_script_buildin_instance_warpall_sub(struct block_list *bl, va_list ap) { int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63518,9 +74871,9 @@ int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.buildin_mobuseskill_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_buildin_mobuseskill_sub_post ) { + if (HPMHooks.count.HP_script_buildin_mobuseskill_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_buildin_mobuseskill_sub_post; hIndex++ ) { + 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); @@ -63532,16 +74885,16 @@ int HP_script_buildin_mobuseskill_sub(struct block_list *bl, va_list ap) { int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_cleanfloor_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_script_cleanfloor_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63551,9 +74904,9 @@ int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.script.cleanfloor_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_cleanfloor_sub_post ) { + if (HPMHooks.count.HP_script_cleanfloor_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_cleanfloor_sub_post; hIndex++ ) { + 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); @@ -63565,14 +74918,14 @@ int HP_script_cleanfloor_sub(struct block_list *bl, va_list ap) { int HP_script_run_func(struct script_state *st) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_run_func_pre ) { - int (*preHookFunc) (struct script_state *st); + if (HPMHooks.count.HP_script_run_func_pre > 0) { + int (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63580,26 +74933,53 @@ int HP_script_run_func(struct script_state *st) { { retVal___ = HPMHooks.source.script.run_func(st); } - if( HPMHooks.count.HP_script_run_func_post ) { + if (HPMHooks.count.HP_script_run_func_post > 0) { int (*postHookFunc) (int retVal___, struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_func_post; hIndex++ ) { + 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___; } +bool HP_script_sprintf_helper(struct script_state *st, int start, struct StringBuf *out) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_script_sprintf_helper_pre > 0) { + bool (*preHookFunc) (struct script_state **st, int *start, struct StringBuf **out); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_sprintf_helper_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_sprintf_helper_pre[hIndex].func; + retVal___ = preHookFunc(&st, &start, &out); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.sprintf_helper(st, start, out); + } + if (HPMHooks.count.HP_script_sprintf_helper_post > 0) { + bool (*postHookFunc) (bool retVal___, struct script_state *st, int start, struct StringBuf *out); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_sprintf_helper_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_sprintf_helper_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st, start, out); + } + } + return retVal___; +} const char* HP_script_getfuncname(struct script_state *st) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_getfuncname_pre ) { - const char* (*preHookFunc) (struct script_state *st); + if (HPMHooks.count.HP_script_getfuncname_pre > 0) { + const char* (*preHookFunc) (struct script_state **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_getfuncname_pre[hIndex].func; - retVal___ = preHookFunc(st); + retVal___ = preHookFunc(&st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63607,9 +74987,9 @@ const char* HP_script_getfuncname(struct script_state *st) { { retVal___ = HPMHooks.source.script.getfuncname(st); } - if( HPMHooks.count.HP_script_getfuncname_post ) { + if (HPMHooks.count.HP_script_getfuncname_post > 0) { const char* (*postHookFunc) (const char* retVal___, struct script_state *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_getfuncname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_getfuncname_post[hIndex].func; retVal___ = postHookFunc(retVal___, st); } @@ -63619,14 +74999,14 @@ const char* HP_script_getfuncname(struct script_state *st) { unsigned int HP_script_calc_hash_ci(const char *p) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_calc_hash_ci_pre ) { - unsigned int (*preHookFunc) (const char *p); + if (HPMHooks.count.HP_script_calc_hash_ci_pre > 0) { + unsigned int (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_calc_hash_ci_pre[hIndex].func; - retVal___ = preHookFunc(p); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63634,9 +75014,9 @@ unsigned int HP_script_calc_hash_ci(const char *p) { { retVal___ = HPMHooks.source.script.calc_hash_ci(p); } - if( HPMHooks.count.HP_script_calc_hash_ci_post ) { + if (HPMHooks.count.HP_script_calc_hash_ci_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_calc_hash_ci_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_calc_hash_ci_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -63646,14 +75026,14 @@ unsigned int HP_script_calc_hash_ci(const char *p) { struct reg_db* HP_script_array_src(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { int hIndex = 0; struct reg_db* retVal___ = NULL; - if( HPMHooks.count.HP_script_array_src_pre ) { - struct reg_db* (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); + if (HPMHooks.count.HP_script_array_src_pre > 0) { + struct reg_db* (*preHookFunc) (struct script_state **st, struct map_session_data **sd, const char **name, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_src_pre[hIndex].func; - retVal___ = preHookFunc(st, sd, name, ref); + retVal___ = preHookFunc(&st, &sd, &name, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63661,9 +75041,9 @@ struct reg_db* HP_script_array_src(struct script_state *st, struct map_session_d { retVal___ = HPMHooks.source.script.array_src(st, sd, name, ref); } - if( HPMHooks.count.HP_script_array_src_post ) { + if (HPMHooks.count.HP_script_array_src_post > 0) { struct reg_db* (*postHookFunc) (struct reg_db* retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_src_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, sd, name, ref); } @@ -63672,14 +75052,14 @@ struct reg_db* HP_script_array_src(struct script_state *st, struct map_session_d } void HP_script_array_update(struct reg_db *src, int64 num, bool empty) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_update_pre ) { - void (*preHookFunc) (struct reg_db *src, int64 *num, bool *empty); + if (HPMHooks.count.HP_script_array_update_pre > 0) { + void (*preHookFunc) (struct reg_db **src, int64 *num, bool *empty); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_update_pre[hIndex].func; - preHookFunc(src, &num, &empty); + preHookFunc(&src, &num, &empty); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63687,25 +75067,25 @@ void HP_script_array_update(struct reg_db *src, int64 num, bool empty) { { HPMHooks.source.script.array_update(src, num, empty); } - if( HPMHooks.count.HP_script_array_update_post ) { - void (*postHookFunc) (struct reg_db *src, int64 *num, bool *empty); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_post; hIndex++ ) { + if (HPMHooks.count.HP_script_array_update_post > 0) { + void (*postHookFunc) (struct reg_db *src, int64 num, bool empty); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_update_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_update_post[hIndex].func; - postHookFunc(src, &num, &empty); + postHookFunc(src, num, empty); } } return; } void HP_script_array_delete(struct reg_db *src, struct script_array *sa) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_delete_pre ) { - void (*preHookFunc) (struct reg_db *src, struct script_array *sa); + if (HPMHooks.count.HP_script_array_delete_pre > 0) { + void (*preHookFunc) (struct reg_db **src, struct script_array **sa); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_delete_pre[hIndex].func; - preHookFunc(src, sa); + preHookFunc(&src, &sa); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63713,9 +75093,9 @@ void HP_script_array_delete(struct reg_db *src, struct script_array *sa) { { HPMHooks.source.script.array_delete(src, sa); } - if( HPMHooks.count.HP_script_array_delete_post ) { + if (HPMHooks.count.HP_script_array_delete_post > 0) { void (*postHookFunc) (struct reg_db *src, struct script_array *sa); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_delete_post[hIndex].func; postHookFunc(src, sa); } @@ -63724,14 +75104,14 @@ void HP_script_array_delete(struct reg_db *src, struct script_array *sa) { } void HP_script_array_remove_member(struct reg_db *src, struct script_array *sa, unsigned int idx) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_remove_member_pre ) { - void (*preHookFunc) (struct reg_db *src, struct script_array *sa, unsigned int *idx); + if (HPMHooks.count.HP_script_array_remove_member_pre > 0) { + void (*preHookFunc) (struct reg_db **src, struct script_array **sa, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_remove_member_pre[hIndex].func; - preHookFunc(src, sa, &idx); + preHookFunc(&src, &sa, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63739,25 +75119,25 @@ void HP_script_array_remove_member(struct reg_db *src, struct script_array *sa, { HPMHooks.source.script.array_remove_member(src, sa, idx); } - if( HPMHooks.count.HP_script_array_remove_member_post ) { - void (*postHookFunc) (struct reg_db *src, struct script_array *sa, unsigned int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_post; hIndex++ ) { + if (HPMHooks.count.HP_script_array_remove_member_post > 0) { + void (*postHookFunc) (struct reg_db *src, struct script_array *sa, unsigned int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_remove_member_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_remove_member_post[hIndex].func; - postHookFunc(src, sa, &idx); + postHookFunc(src, sa, idx); } } return; } void HP_script_array_add_member(struct script_array *sa, unsigned int idx) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_add_member_pre ) { - void (*preHookFunc) (struct script_array *sa, unsigned int *idx); + if (HPMHooks.count.HP_script_array_add_member_pre > 0) { + void (*preHookFunc) (struct script_array **sa, unsigned int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_add_member_pre[hIndex].func; - preHookFunc(sa, &idx); + preHookFunc(&sa, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63765,11 +75145,11 @@ void HP_script_array_add_member(struct script_array *sa, unsigned int idx) { { HPMHooks.source.script.array_add_member(sa, idx); } - if( HPMHooks.count.HP_script_array_add_member_post ) { - void (*postHookFunc) (struct script_array *sa, unsigned int *idx); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_post; hIndex++ ) { + if (HPMHooks.count.HP_script_array_add_member_post > 0) { + void (*postHookFunc) (struct script_array *sa, unsigned int idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_add_member_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_add_member_post[hIndex].func; - postHookFunc(sa, &idx); + postHookFunc(sa, idx); } } return; @@ -63777,14 +75157,14 @@ void HP_script_array_add_member(struct script_array *sa, unsigned int idx) { unsigned int HP_script_array_size(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_array_size_pre ) { - unsigned int (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); + if (HPMHooks.count.HP_script_array_size_pre > 0) { + unsigned int (*preHookFunc) (struct script_state **st, struct map_session_data **sd, const char **name, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_size_pre[hIndex].func; - retVal___ = preHookFunc(st, sd, name, ref); + retVal___ = preHookFunc(&st, &sd, &name, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63792,9 +75172,9 @@ unsigned int HP_script_array_size(struct script_state *st, struct map_session_da { retVal___ = HPMHooks.source.script.array_size(st, sd, name, ref); } - if( HPMHooks.count.HP_script_array_size_post ) { + if (HPMHooks.count.HP_script_array_size_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_size_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_size_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, sd, name, ref); } @@ -63804,14 +75184,14 @@ unsigned int HP_script_array_size(struct script_state *st, struct map_session_da unsigned int HP_script_array_highest_key(struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_script_array_highest_key_pre ) { - unsigned int (*preHookFunc) (struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); + if (HPMHooks.count.HP_script_array_highest_key_pre > 0) { + unsigned int (*preHookFunc) (struct script_state **st, struct map_session_data **sd, const char **name, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_highest_key_pre[hIndex].func; - retVal___ = preHookFunc(st, sd, name, ref); + retVal___ = preHookFunc(&st, &sd, &name, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63819,9 +75199,9 @@ unsigned int HP_script_array_highest_key(struct script_state *st, struct map_ses { retVal___ = HPMHooks.source.script.array_highest_key(st, sd, name, ref); } - if( HPMHooks.count.HP_script_array_highest_key_post ) { + if (HPMHooks.count.HP_script_array_highest_key_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, struct script_state *st, struct map_session_data *sd, const char *name, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_highest_key_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_highest_key_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, sd, name, ref); } @@ -63831,16 +75211,16 @@ unsigned int HP_script_array_highest_key(struct script_state *st, struct map_ses int HP_script_array_free_db(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_array_free_db_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_script_array_free_db_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_script_array_free_db_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63850,12 +75230,12 @@ int HP_script_array_free_db(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.script.array_free_db(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_array_free_db_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_post; hIndex++ ) { + if (HPMHooks.count.HP_script_array_free_db_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_free_db_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_script_array_free_db_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -63863,14 +75243,14 @@ int HP_script_array_free_db(union DBKey key, struct DBData *data, va_list ap) { } void HP_script_array_ensure_zero(struct script_state *st, struct map_session_data *sd, int64 uid, struct reg_db *ref) { int hIndex = 0; - if( HPMHooks.count.HP_script_array_ensure_zero_pre ) { - void (*preHookFunc) (struct script_state *st, struct map_session_data *sd, int64 *uid, struct reg_db *ref); + if (HPMHooks.count.HP_script_array_ensure_zero_pre > 0) { + void (*preHookFunc) (struct script_state **st, struct map_session_data **sd, int64 *uid, struct reg_db **ref); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_ensure_zero_pre[hIndex].func; - preHookFunc(st, sd, &uid, ref); + preHookFunc(&st, &sd, &uid, &ref); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63878,25 +75258,25 @@ void HP_script_array_ensure_zero(struct script_state *st, struct map_session_dat { HPMHooks.source.script.array_ensure_zero(st, sd, uid, ref); } - if( HPMHooks.count.HP_script_array_ensure_zero_post ) { - void (*postHookFunc) (struct script_state *st, struct map_session_data *sd, int64 *uid, struct reg_db *ref); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_post; hIndex++ ) { + if (HPMHooks.count.HP_script_array_ensure_zero_post > 0) { + void (*postHookFunc) (struct script_state *st, struct map_session_data *sd, int64 uid, struct reg_db *ref); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_ensure_zero_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_ensure_zero_post[hIndex].func; - postHookFunc(st, sd, &uid, ref); + postHookFunc(st, sd, uid, ref); } } return; } void HP_script_reg_destroy_single(struct map_session_data *sd, int64 reg, struct script_reg_state *data) { int hIndex = 0; - if( HPMHooks.count.HP_script_reg_destroy_single_pre ) { - void (*preHookFunc) (struct map_session_data *sd, int64 *reg, struct script_reg_state *data); + if (HPMHooks.count.HP_script_reg_destroy_single_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int64 *reg, struct script_reg_state **data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_reg_destroy_single_pre[hIndex].func; - preHookFunc(sd, ®, data); + preHookFunc(&sd, ®, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63904,11 +75284,11 @@ void HP_script_reg_destroy_single(struct map_session_data *sd, int64 reg, struct { HPMHooks.source.script.reg_destroy_single(sd, reg, data); } - if( HPMHooks.count.HP_script_reg_destroy_single_post ) { - void (*postHookFunc) (struct map_session_data *sd, int64 *reg, struct script_reg_state *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_post; hIndex++ ) { + if (HPMHooks.count.HP_script_reg_destroy_single_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int64 reg, struct script_reg_state *data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_single_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_reg_destroy_single_post[hIndex].func; - postHookFunc(sd, ®, data); + postHookFunc(sd, reg, data); } } return; @@ -63916,16 +75296,16 @@ void HP_script_reg_destroy_single(struct map_session_data *sd, int64 reg, struct int HP_script_reg_destroy(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_reg_destroy_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_script_reg_destroy_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_script_reg_destroy_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63935,12 +75315,12 @@ int HP_script_reg_destroy(union DBKey key, struct DBData *data, va_list ap) { retVal___ = HPMHooks.source.script.reg_destroy(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_reg_destroy_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_post; hIndex++ ) { + if (HPMHooks.count.HP_script_reg_destroy_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_reg_destroy_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_script_reg_destroy_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -63948,14 +75328,14 @@ int HP_script_reg_destroy(union DBKey key, struct DBData *data, va_list ap) { } void HP_script_generic_ui_array_expand(unsigned int plus) { int hIndex = 0; - if( HPMHooks.count.HP_script_generic_ui_array_expand_pre ) { + if (HPMHooks.count.HP_script_generic_ui_array_expand_pre > 0) { void (*preHookFunc) (unsigned int *plus); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_generic_ui_array_expand_pre[hIndex].func; preHookFunc(&plus); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -63963,11 +75343,11 @@ void HP_script_generic_ui_array_expand(unsigned int plus) { { HPMHooks.source.script.generic_ui_array_expand(plus); } - if( HPMHooks.count.HP_script_generic_ui_array_expand_post ) { - void (*postHookFunc) (unsigned int *plus); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_post; hIndex++ ) { + if (HPMHooks.count.HP_script_generic_ui_array_expand_post > 0) { + void (*postHookFunc) (unsigned int plus); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_generic_ui_array_expand_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_generic_ui_array_expand_post[hIndex].func; - postHookFunc(&plus); + postHookFunc(plus); } } return; @@ -63975,14 +75355,14 @@ void HP_script_generic_ui_array_expand(unsigned int plus) { unsigned int* HP_script_array_cpy_list(struct script_array *sa) { int hIndex = 0; unsigned int* retVal___ = NULL; - if( HPMHooks.count.HP_script_array_cpy_list_pre ) { - unsigned int* (*preHookFunc) (struct script_array *sa); + if (HPMHooks.count.HP_script_array_cpy_list_pre > 0) { + unsigned int* (*preHookFunc) (struct script_array **sa); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_array_cpy_list_pre[hIndex].func; - retVal___ = preHookFunc(sa); + retVal___ = preHookFunc(&sa); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -63990,9 +75370,9 @@ unsigned int* HP_script_array_cpy_list(struct script_array *sa) { { retVal___ = HPMHooks.source.script.array_cpy_list(sa); } - if( HPMHooks.count.HP_script_array_cpy_list_post ) { + if (HPMHooks.count.HP_script_array_cpy_list_post > 0) { unsigned int* (*postHookFunc) (unsigned int* retVal___, struct script_array *sa); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_array_cpy_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_array_cpy_list_post[hIndex].func; retVal___ = postHookFunc(retVal___, sa); } @@ -64001,14 +75381,14 @@ unsigned int* HP_script_array_cpy_list(struct script_array *sa) { } void HP_script_hardcoded_constants(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_hardcoded_constants_pre ) { + if (HPMHooks.count.HP_script_hardcoded_constants_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_hardcoded_constants_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64016,9 +75396,9 @@ void HP_script_hardcoded_constants(void) { { HPMHooks.source.script.hardcoded_constants(); } - if( HPMHooks.count.HP_script_hardcoded_constants_post ) { + if (HPMHooks.count.HP_script_hardcoded_constants_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_hardcoded_constants_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_hardcoded_constants_post[hIndex].func; postHookFunc(); } @@ -64028,14 +75408,14 @@ void HP_script_hardcoded_constants(void) { unsigned short HP_script_mapindexname2id(struct script_state *st, const char *name) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_script_mapindexname2id_pre ) { - unsigned short (*preHookFunc) (struct script_state *st, const char *name); + if (HPMHooks.count.HP_script_mapindexname2id_pre > 0) { + unsigned short (*preHookFunc) (struct script_state **st, const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_mapindexname2id_pre[hIndex].func; - retVal___ = preHookFunc(st, name); + retVal___ = preHookFunc(&st, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64043,9 +75423,9 @@ unsigned short HP_script_mapindexname2id(struct script_state *st, const char *na { retVal___ = HPMHooks.source.script.mapindexname2id(st, name); } - if( HPMHooks.count.HP_script_mapindexname2id_post ) { + if (HPMHooks.count.HP_script_mapindexname2id_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, struct script_state *st, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_mapindexname2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_mapindexname2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, st, name); } @@ -64055,14 +75435,14 @@ unsigned short HP_script_mapindexname2id(struct script_state *st, const char *na int HP_script_string_dup(char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_string_dup_pre ) { - int (*preHookFunc) (char *str); + if (HPMHooks.count.HP_script_string_dup_pre > 0) { + int (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_string_dup_pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64070,9 +75450,9 @@ int HP_script_string_dup(char *str) { { retVal___ = HPMHooks.source.script.string_dup(str); } - if( HPMHooks.count.HP_script_string_dup_post ) { + if (HPMHooks.count.HP_script_string_dup_post > 0) { int (*postHookFunc) (int retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_string_dup_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_string_dup_post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -64081,14 +75461,14 @@ int HP_script_string_dup(char *str) { } void HP_script_load_translations(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_load_translations_pre ) { + if (HPMHooks.count.HP_script_load_translations_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_load_translations_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64096,54 +75476,109 @@ void HP_script_load_translations(void) { { HPMHooks.source.script.load_translations(); } - if( HPMHooks.count.HP_script_load_translations_post ) { + if (HPMHooks.count.HP_script_load_translations_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translations_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_load_translations_post[hIndex].func; postHookFunc(); } } return; } -void HP_script_load_translation(const char *file, uint8 lang_id, uint32 *total) { +bool HP_script_load_translation_addstring(const char *file, uint8 lang_id, const char *msgctxt, const struct script_string_buf *msgid, const struct script_string_buf *msgstr) { int hIndex = 0; - if( HPMHooks.count.HP_script_load_translation_pre ) { - void (*preHookFunc) (const char *file, uint8 *lang_id, uint32 *total); + bool retVal___ = false; + if (HPMHooks.count.HP_script_load_translation_addstring_pre > 0) { + bool (*preHookFunc) (const char **file, uint8 *lang_id, const char **msgctxt, const struct script_string_buf **msgid, const struct script_string_buf **msgstr); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_addstring_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_load_translation_addstring_pre[hIndex].func; + retVal___ = preHookFunc(&file, &lang_id, &msgctxt, &msgid, &msgstr); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.load_translation_addstring(file, lang_id, msgctxt, msgid, msgstr); + } + if (HPMHooks.count.HP_script_load_translation_addstring_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *file, uint8 lang_id, const char *msgctxt, const struct script_string_buf *msgid, const struct script_string_buf *msgstr); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_addstring_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_load_translation_addstring_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file, lang_id, msgctxt, msgid, msgstr); + } + } + return retVal___; +} +int HP_script_load_translation_file(const char *file, uint8 lang_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_load_translation_file_pre > 0) { + int (*preHookFunc) (const char **file, uint8 *lang_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_file_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_load_translation_file_pre[hIndex].func; + retVal___ = preHookFunc(&file, &lang_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.load_translation_file(file, lang_id); + } + if (HPMHooks.count.HP_script_load_translation_file_post > 0) { + int (*postHookFunc) (int retVal___, const char *file, uint8 lang_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_file_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_load_translation_file_post[hIndex].func; + retVal___ = postHookFunc(retVal___, file, lang_id); + } + } + return retVal___; +} +int HP_script_load_translation(const char *directory, uint8 lang_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_script_load_translation_pre > 0) { + int (*preHookFunc) (const char **directory, uint8 *lang_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_load_translation_pre[hIndex].func; - preHookFunc(file, &lang_id, total); + retVal___ = preHookFunc(&directory, &lang_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.script.load_translation(file, lang_id, total); + retVal___ = HPMHooks.source.script.load_translation(directory, lang_id); } - if( HPMHooks.count.HP_script_load_translation_post ) { - void (*postHookFunc) (const char *file, uint8 *lang_id, uint32 *total); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_post; hIndex++ ) { + if (HPMHooks.count.HP_script_load_translation_post > 0) { + int (*postHookFunc) (int retVal___, const char *directory, uint8 lang_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_load_translation_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_load_translation_post[hIndex].func; - postHookFunc(file, &lang_id, total); + retVal___ = postHookFunc(retVal___, directory, lang_id); } } - return; + return retVal___; } int HP_script_translation_db_destroyer(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_translation_db_destroyer_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_script_translation_db_destroyer_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_script_translation_db_destroyer_pre[hIndex].func; - retVal___ = preHookFunc(&key, data, ap___copy); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64153,12 +75588,12 @@ int HP_script_translation_db_destroyer(union DBKey key, struct DBData *data, va_ retVal___ = HPMHooks.source.script.translation_db_destroyer(key, data, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_script_translation_db_destroyer_post ) { - int (*postHookFunc) (int retVal___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_post; hIndex++ ) { + if (HPMHooks.count.HP_script_translation_db_destroyer_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct DBData *data, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_translation_db_destroyer_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_script_translation_db_destroyer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &key, data, ap___copy); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -64166,14 +75601,14 @@ int HP_script_translation_db_destroyer(union DBKey key, struct DBData *data, va_ } void HP_script_clear_translations(bool reload) { int hIndex = 0; - if( HPMHooks.count.HP_script_clear_translations_pre ) { + if (HPMHooks.count.HP_script_clear_translations_pre > 0) { void (*preHookFunc) (bool *reload); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_clear_translations_pre[hIndex].func; preHookFunc(&reload); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64181,11 +75616,11 @@ void HP_script_clear_translations(bool reload) { { HPMHooks.source.script.clear_translations(reload); } - if( HPMHooks.count.HP_script_clear_translations_post ) { - void (*postHookFunc) (bool *reload); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_post; hIndex++ ) { + if (HPMHooks.count.HP_script_clear_translations_post > 0) { + void (*postHookFunc) (bool reload); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_clear_translations_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_clear_translations_post[hIndex].func; - postHookFunc(&reload); + postHookFunc(reload); } } return; @@ -64193,14 +75628,14 @@ void HP_script_clear_translations(bool reload) { int HP_script_parse_cleanup_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_script_parse_cleanup_timer_pre ) { + if (HPMHooks.count.HP_script_parse_cleanup_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_parse_cleanup_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64208,11 +75643,11 @@ int HP_script_parse_cleanup_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.script.parse_cleanup_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_script_parse_cleanup_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_script_parse_cleanup_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parse_cleanup_timer_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_parse_cleanup_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -64220,14 +75655,14 @@ int HP_script_parse_cleanup_timer(int tid, int64 tick, int id, intptr_t data) { uint8 HP_script_add_language(const char *name) { int hIndex = 0; uint8 retVal___ = 0; - if( HPMHooks.count.HP_script_add_language_pre ) { - uint8 (*preHookFunc) (const char *name); + if (HPMHooks.count.HP_script_add_language_pre > 0) { + uint8 (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_add_language_pre[hIndex].func; - retVal___ = preHookFunc(name); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64235,52 +75670,52 @@ uint8 HP_script_add_language(const char *name) { { retVal___ = HPMHooks.source.script.add_language(name); } - if( HPMHooks.count.HP_script_add_language_post ) { + if (HPMHooks.count.HP_script_add_language_post > 0) { uint8 (*postHookFunc) (uint8 retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_add_language_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_add_language_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } } return retVal___; } -const char* HP_script_get_translation_file_name(const char *file) { +const char* HP_script_get_translation_dir_name(const char *directory) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_script_get_translation_file_name_pre ) { - const char* (*preHookFunc) (const char *file); + if (HPMHooks.count.HP_script_get_translation_dir_name_pre > 0) { + const char* (*preHookFunc) (const char **directory); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_script_get_translation_file_name_pre[hIndex].func; - retVal___ = preHookFunc(file); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_dir_name_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_get_translation_dir_name_pre[hIndex].func; + retVal___ = preHookFunc(&directory); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.script.get_translation_file_name(file); + retVal___ = HPMHooks.source.script.get_translation_dir_name(directory); } - if( HPMHooks.count.HP_script_get_translation_file_name_post ) { - const char* (*postHookFunc) (const char* retVal___, const char *file); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_file_name_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_script_get_translation_file_name_post[hIndex].func; - retVal___ = postHookFunc(retVal___, file); + if (HPMHooks.count.HP_script_get_translation_dir_name_post > 0) { + const char* (*postHookFunc) (const char* retVal___, const char *directory); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_get_translation_dir_name_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_get_translation_dir_name_post[hIndex].func; + retVal___ = postHookFunc(retVal___, directory); } } return retVal___; } void HP_script_parser_clean_leftovers(void) { int hIndex = 0; - if( HPMHooks.count.HP_script_parser_clean_leftovers_pre ) { + if (HPMHooks.count.HP_script_parser_clean_leftovers_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_parser_clean_leftovers_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64288,9 +75723,9 @@ void HP_script_parser_clean_leftovers(void) { { HPMHooks.source.script.parser_clean_leftovers(); } - if( HPMHooks.count.HP_script_parser_clean_leftovers_post ) { + if (HPMHooks.count.HP_script_parser_clean_leftovers_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_parser_clean_leftovers_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_parser_clean_leftovers_post[hIndex].func; postHookFunc(); } @@ -64299,14 +75734,14 @@ void HP_script_parser_clean_leftovers(void) { } void HP_script_run_use_script(struct map_session_data *sd, struct item_data *data, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_use_script_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); + if (HPMHooks.count.HP_script_run_use_script_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_run_use_script_pre[hIndex].func; - preHookFunc(sd, data, &oid); + preHookFunc(&sd, &data, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64314,25 +75749,25 @@ void HP_script_run_use_script(struct map_session_data *sd, struct item_data *dat { HPMHooks.source.script.run_use_script(sd, data, oid); } - if( HPMHooks.count.HP_script_run_use_script_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_post; hIndex++ ) { + if (HPMHooks.count.HP_script_run_use_script_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_use_script_post[hIndex].func; - postHookFunc(sd, data, &oid); + postHookFunc(sd, data, oid); } } return; } void HP_script_run_item_equip_script(struct map_session_data *sd, struct item_data *data, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_item_equip_script_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); + if (HPMHooks.count.HP_script_run_item_equip_script_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_run_item_equip_script_pre[hIndex].func; - preHookFunc(sd, data, &oid); + preHookFunc(&sd, &data, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64340,25 +75775,25 @@ void HP_script_run_item_equip_script(struct map_session_data *sd, struct item_da { HPMHooks.source.script.run_item_equip_script(sd, data, oid); } - if( HPMHooks.count.HP_script_run_item_equip_script_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_post; hIndex++ ) { + if (HPMHooks.count.HP_script_run_item_equip_script_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_item_equip_script_post[hIndex].func; - postHookFunc(sd, data, &oid); + postHookFunc(sd, data, oid); } } return; } void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_data *data, int oid) { int hIndex = 0; - if( HPMHooks.count.HP_script_run_item_unequip_script_pre ) { - void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); + if (HPMHooks.count.HP_script_run_item_unequip_script_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_pre[hIndex].func; - preHookFunc(sd, data, &oid); + preHookFunc(&sd, &data, &oid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64366,27 +75801,132 @@ void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_ { HPMHooks.source.script.run_item_unequip_script(sd, data, oid); } - if( HPMHooks.count.HP_script_run_item_unequip_script_post ) { - void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_post; hIndex++ ) { + if (HPMHooks.count.HP_script_run_item_unequip_script_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_post; hIndex++) { postHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_post[hIndex].func; - postHookFunc(sd, data, &oid); + postHookFunc(sd, data, oid); + } + } + return; +} +void HP_script_run_item_rental_end_script(struct map_session_data *sd, struct item_data *data, int oid) { + int hIndex = 0; + if (HPMHooks.count.HP_script_run_item_rental_end_script_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_end_script_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_run_item_rental_end_script_pre[hIndex].func; + preHookFunc(&sd, &data, &oid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.run_item_rental_end_script(sd, data, oid); + } + if (HPMHooks.count.HP_script_run_item_rental_end_script_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_end_script_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_run_item_rental_end_script_post[hIndex].func; + postHookFunc(sd, data, oid); + } + } + return; +} +void HP_script_run_item_rental_start_script(struct map_session_data *sd, struct item_data *data, int oid) { + int hIndex = 0; + if (HPMHooks.count.HP_script_run_item_rental_start_script_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_start_script_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_run_item_rental_start_script_pre[hIndex].func; + preHookFunc(&sd, &data, &oid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.run_item_rental_start_script(sd, data, oid); + } + if (HPMHooks.count.HP_script_run_item_rental_start_script_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_rental_start_script_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_run_item_rental_start_script_post[hIndex].func; + postHookFunc(sd, data, oid); + } + } + return; +} +void HP_script_run_item_lapineddukddak_script(struct map_session_data *sd, struct item_data *data, int oid) { + int hIndex = 0; + if (HPMHooks.count.HP_script_run_item_lapineddukddak_script_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct item_data **data, int *oid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_lapineddukddak_script_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_run_item_lapineddukddak_script_pre[hIndex].func; + preHookFunc(&sd, &data, &oid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.script.run_item_lapineddukddak_script(sd, data, oid); + } + if (HPMHooks.count.HP_script_run_item_lapineddukddak_script_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int oid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_lapineddukddak_script_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_run_item_lapineddukddak_script_post[hIndex].func; + postHookFunc(sd, data, oid); } } return; } -/* searchstore */ +bool HP_script_sellitemcurrency_add(struct npc_data *nd, struct script_state *st, int argIndex) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_script_sellitemcurrency_add_pre > 0) { + bool (*preHookFunc) (struct npc_data **nd, struct script_state **st, int *argIndex); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_sellitemcurrency_add_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_script_sellitemcurrency_add_pre[hIndex].func; + retVal___ = preHookFunc(&nd, &st, &argIndex); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.script.sellitemcurrency_add(nd, st, argIndex); + } + if (HPMHooks.count.HP_script_sellitemcurrency_add_post > 0) { + bool (*postHookFunc) (bool retVal___, struct npc_data *nd, struct script_state *st, int argIndex); + for (hIndex = 0; hIndex < HPMHooks.count.HP_script_sellitemcurrency_add_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_script_sellitemcurrency_add_post[hIndex].func; + retVal___ = postHookFunc(retVal___, nd, st, argIndex); + } + } + return retVal___; +} +/* searchstore_interface */ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_searchstore_open_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, unsigned int *uses, unsigned short *effect); + if (HPMHooks.count.HP_searchstore_open_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, unsigned int *uses, unsigned short *effect); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_open_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &uses, &effect); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64394,25 +75934,25 @@ bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigne { 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++ ) { + if (HPMHooks.count.HP_searchstore_open_post > 0) { + 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); + 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) { +void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const uint32 *itemlist, unsigned int item_count, const uint32 *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); + if (HPMHooks.count.HP_searchstore_query_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned char *type, unsigned int *min_price, unsigned int *max_price, const uint32 **itemlist, unsigned int *item_count, const uint32 **cardlist, unsigned int *card_count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_query_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type, &min_price, &max_price, &itemlist, &item_count, &cardlist, &card_count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64420,11 +75960,11 @@ void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsig { 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++ ) { + if (HPMHooks.count.HP_searchstore_query_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, unsigned char type, unsigned int min_price, unsigned int max_price, const uint32 *itemlist, unsigned int item_count, const uint32 *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); + postHookFunc(sd, type, min_price, max_price, itemlist, item_count, cardlist, card_count); } } return; @@ -64432,14 +75972,14 @@ void HP_searchstore_query(struct map_session_data *sd, unsigned char type, unsig bool HP_searchstore_querynext(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_searchstore_querynext_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_searchstore_querynext_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_searchstore_querynext_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64447,9 +75987,9 @@ bool HP_searchstore_querynext(struct map_session_data *sd) { { retVal___ = HPMHooks.source.searchstore.querynext(sd); } - if( HPMHooks.count.HP_searchstore_querynext_post ) { + if (HPMHooks.count.HP_searchstore_querynext_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_querynext_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_querynext_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -64458,14 +75998,14 @@ bool HP_searchstore_querynext(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_searchstore_next_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_searchstore_next_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64473,9 +76013,9 @@ void HP_searchstore_next(struct map_session_data *sd) { { HPMHooks.source.searchstore.next(sd); } - if( HPMHooks.count.HP_searchstore_next_post ) { + if (HPMHooks.count.HP_searchstore_next_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_next_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_next_post[hIndex].func; postHookFunc(sd); } @@ -64484,14 +76024,14 @@ void HP_searchstore_next(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_searchstore_clear_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_searchstore_clear_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64499,9 +76039,9 @@ void HP_searchstore_clear(struct map_session_data *sd) { { HPMHooks.source.searchstore.clear(sd); } - if( HPMHooks.count.HP_searchstore_clear_post ) { + if (HPMHooks.count.HP_searchstore_clear_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_searchstore_clear_post[hIndex].func; postHookFunc(sd); } @@ -64510,14 +76050,14 @@ void HP_searchstore_clear(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_searchstore_close_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_searchstore_close_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64525,25 +76065,25 @@ void HP_searchstore_close(struct map_session_data *sd) { { HPMHooks.source.searchstore.close(sd); } - if( HPMHooks.count.HP_searchstore_close_post ) { + if (HPMHooks.count.HP_searchstore_close_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_close_post; hIndex++ ) { + 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) { +void HP_searchstore_click(struct map_session_data *sd, int account_id, int store_id, int 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); + if (HPMHooks.count.HP_searchstore_click_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *account_id, int *store_id, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_click_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &account_id, &store_id, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64551,11 +76091,11 @@ void HP_searchstore_click(struct map_session_data *sd, int account_id, int store { 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++ ) { + if (HPMHooks.count.HP_searchstore_click_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int account_id, int store_id, int 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); + postHookFunc(sd, account_id, store_id, nameid); } } return; @@ -64563,14 +76103,14 @@ void HP_searchstore_click(struct map_session_data *sd, int account_id, int store bool HP_searchstore_queryremote(struct map_session_data *sd, int account_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_searchstore_queryremote_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, int *account_id); + if (HPMHooks.count.HP_searchstore_queryremote_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *account_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_queryremote_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &account_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64578,25 +76118,25 @@ bool HP_searchstore_queryremote(struct map_session_data *sd, int account_id) { { 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++ ) { + if (HPMHooks.count.HP_searchstore_queryremote_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_searchstore_clearremote_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_searchstore_clearremote_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64604,53 +76144,53 @@ void HP_searchstore_clearremote(struct map_session_data *sd) { { HPMHooks.source.searchstore.clearremote(sd); } - if( HPMHooks.count.HP_searchstore_clearremote_post ) { + if (HPMHooks.count.HP_searchstore_clearremote_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_clearremote_post; hIndex++ ) { + 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) { +bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option) { int hIndex = 0; bool retVal___ = false; - 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); + if (HPMHooks.count.HP_searchstore_result_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, unsigned int *store_id, int *account_id, const char **store_name, int *nameid, unsigned short *amount, unsigned int *price, const int **card, unsigned char *refine_level, const struct item_option **option); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_searchstore_result_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &store_id, &account_id, &store_name, &nameid, &amount, &price, &card, &refine_level, &option); } - if( *HPMforce_return ) { + 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); + retVal___ = HPMHooks.source.searchstore.result(sd, store_id, account_id, store_name, nameid, amount, price, card, refine_level, option); } - 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++ ) { + if (HPMHooks.count.HP_searchstore_result_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, unsigned int store_id, int account_id, const char *store_name, int nameid, unsigned short amount, unsigned int price, const int *card, unsigned char refine_level, const struct item_option *option); + 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); + retVal___ = postHookFunc(retVal___, sd, store_id, account_id, store_name, nameid, amount, price, card, refine_level, option); } } return retVal___; } -/* showmsg */ +/* showmsg_interface */ void HP_showmsg_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_init_pre ) { + if (HPMHooks.count.HP_showmsg_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64658,9 +76198,9 @@ void HP_showmsg_init(void) { { HPMHooks.source.showmsg.init(); } - if( HPMHooks.count.HP_showmsg_init_post ) { + if (HPMHooks.count.HP_showmsg_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func; postHookFunc(); } @@ -64669,14 +76209,14 @@ void HP_showmsg_init(void) { } void HP_showmsg_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_final_pre ) { + if (HPMHooks.count.HP_showmsg_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64684,9 +76224,9 @@ void HP_showmsg_final(void) { { HPMHooks.source.showmsg.final(); } - if( HPMHooks.count.HP_showmsg_final_post ) { + if (HPMHooks.count.HP_showmsg_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func; postHookFunc(); } @@ -64695,14 +76235,14 @@ void HP_showmsg_final(void) { } void HP_showmsg_clearScreen(void) { int hIndex = 0; - if( HPMHooks.count.HP_showmsg_clearScreen_pre ) { + if (HPMHooks.count.HP_showmsg_clearScreen_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64710,9 +76250,9 @@ void HP_showmsg_clearScreen(void) { { HPMHooks.source.showmsg.clearScreen(); } - if( HPMHooks.count.HP_showmsg_clearScreen_post ) { + if (HPMHooks.count.HP_showmsg_clearScreen_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func; postHookFunc(); } @@ -64722,16 +76262,16 @@ void HP_showmsg_clearScreen(void) { int HP_showmsg_showMessageV(const char *string, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_showmsg_showMessageV_pre ) { - int (*preHookFunc) (const char *string, va_list ap); + if (HPMHooks.count.HP_showmsg_showMessageV_pre > 0) { + int (*preHookFunc) (const char **string, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func; - retVal___ = preHookFunc(string, ap___copy); + retVal___ = preHookFunc(&string, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64741,9 +76281,9 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { retVal___ = HPMHooks.source.showmsg.showMessageV(string, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_showmsg_showMessageV_post ) { + if (HPMHooks.count.HP_showmsg_showMessageV_post > 0) { int (*postHookFunc) (int retVal___, const char *string, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func; retVal___ = postHookFunc(retVal___, string, ap___copy); @@ -64752,18 +76292,18 @@ int HP_showmsg_showMessageV(const char *string, va_list ap) { } return retVal___; } -/* skill */ +/* skill_interface */ int HP_skill_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_init_pre ) { + if (HPMHooks.count.HP_skill_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64771,11 +76311,11 @@ int HP_skill_init(bool minimal) { { retVal___ = HPMHooks.source.skill.init(minimal); } - if( HPMHooks.count.HP_skill_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_init_post > 0) { + int (*postHookFunc) (int retVal___, bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + retVal___ = postHookFunc(retVal___, minimal); } } return retVal___; @@ -64783,14 +76323,14 @@ int HP_skill_init(bool minimal) { int HP_skill_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_final_pre ) { + if (HPMHooks.count.HP_skill_final_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64798,9 +76338,9 @@ int HP_skill_final(void) { { retVal___ = HPMHooks.source.skill.final(); } - if( HPMHooks.count.HP_skill_final_post ) { + if (HPMHooks.count.HP_skill_final_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_final_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -64809,14 +76349,14 @@ int HP_skill_final(void) { } void HP_skill_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_skill_reload_pre ) { + if (HPMHooks.count.HP_skill_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64824,9 +76364,9 @@ void HP_skill_reload(void) { { HPMHooks.source.skill.reload(); } - if( HPMHooks.count.HP_skill_reload_post ) { + if (HPMHooks.count.HP_skill_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_reload_post[hIndex].func; postHookFunc(); } @@ -64835,14 +76375,14 @@ void HP_skill_reload(void) { } void HP_skill_read_db(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_skill_read_db_pre ) { + if (HPMHooks.count.HP_skill_read_db_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_read_db_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -64850,26 +76390,26 @@ void HP_skill_read_db(bool minimal) { { HPMHooks.source.skill.read_db(minimal); } - if( HPMHooks.count.HP_skill_read_db_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_read_db_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_read_db_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } -int HP_skill_get_index(uint16 skill_id) { +int HP_skill_get_index(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_index_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_index_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_index_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64877,26 +76417,26 @@ int HP_skill_get_index(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_index_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_type(uint16 skill_id) { +int HP_skill_get_type(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_type_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_type_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64904,26 +76444,26 @@ int HP_skill_get_type(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_type_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_hit(uint16 skill_id) { +int HP_skill_get_hit(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_hit_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_hit_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hit_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64931,26 +76471,26 @@ int HP_skill_get_hit(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_hit_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_inf(uint16 skill_id) { +int HP_skill_get_inf(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_inf_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_inf_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64958,26 +76498,26 @@ int HP_skill_get_inf(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_inf_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_ele(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_ele_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_ele_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ele_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -64985,26 +76525,26 @@ int HP_skill_get_ele(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_ele_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_nk(uint16 skill_id) { +int HP_skill_get_nk(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_nk_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_nk_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_nk_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65012,26 +76552,26 @@ int HP_skill_get_nk(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_nk_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_max(uint16 skill_id) { +int HP_skill_get_max(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_max_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_max_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_max_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65039,26 +76579,26 @@ int HP_skill_get_max(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_max_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_range(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_range_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_range_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65066,26 +76606,26 @@ int HP_skill_get_range(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_range_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + 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 HP_skill_get_range2(struct block_list *bl, int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_range2_pre ) { - int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_range2_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_range2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65093,26 +76633,26 @@ int HP_skill_get_range2(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { 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++ ) { + if (HPMHooks.count.HP_skill_get_range2_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, bl, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_splash(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_splash_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_splash_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_splash_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65120,26 +76660,26 @@ int HP_skill_get_splash(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_splash_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_hp(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_hp_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_hp_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65147,26 +76687,26 @@ int HP_skill_get_hp(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_hp_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_mhp(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_mhp_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_mhp_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_mhp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65174,26 +76714,26 @@ int HP_skill_get_mhp(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_mhp_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_sp(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_sp_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_sp_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65201,26 +76741,80 @@ int HP_skill_get_sp(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_sp_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_state(uint16 skill_id) { +int HP_skill_get_hp_rate(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_state_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_hp_rate_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_state_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_rate_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_get_hp_rate_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_hp_rate(skill_id, skill_lv); + } + if (HPMHooks.count.HP_skill_get_hp_rate_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int skill_lv); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_hp_rate_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_get_hp_rate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); + } + } + return retVal___; +} +int HP_skill_get_sp_rate(int skill_id, int skill_lv) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_get_sp_rate_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_rate_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_get_sp_rate_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &skill_lv); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_sp_rate(skill_id, skill_lv); + } + if (HPMHooks.count.HP_skill_get_sp_rate_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int skill_lv); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_sp_rate_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_get_sp_rate_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); + } + } + return retVal___; +} +int HP_skill_get_state(int skill_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_get_state_pre > 0) { + int (*preHookFunc) (int *skill_id); + *HPMforce_return = false; + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65228,26 +76822,26 @@ int HP_skill_get_state(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_state_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_spiritball(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_spiritball_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_spiritball_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_spiritball_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65255,26 +76849,80 @@ int HP_skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_spiritball_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_itemid(int skill_id, int item_idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_zeny_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_itemid_pre > 0) { + int (*preHookFunc) (int *skill_id, int *item_idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_itemid_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_get_itemid_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &item_idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_itemid(skill_id, item_idx); + } + if (HPMHooks.count.HP_skill_get_itemid_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int item_idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_itemid_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_get_itemid_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skill_id, item_idx); + } + } + return retVal___; +} +int HP_skill_get_itemqty(int skill_id, int item_idx) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_get_itemqty_pre > 0) { + int (*preHookFunc) (int *skill_id, int *item_idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_zeny_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_itemqty_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_get_itemqty_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &item_idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_itemqty(skill_id, item_idx); + } + if (HPMHooks.count.HP_skill_get_itemqty_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int item_idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_itemqty_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_get_itemqty_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skill_id, item_idx); + } + } + return retVal___; +} +int HP_skill_get_zeny(int skill_id, int skill_lv) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_get_zeny_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); + *HPMforce_return = false; + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65282,26 +76930,26 @@ int HP_skill_get_zeny(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_zeny_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_num(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_num_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_num_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_num_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65309,26 +76957,26 @@ int HP_skill_get_num(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_num_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_cast(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_cast_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_cast_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cast_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65336,26 +76984,26 @@ int HP_skill_get_cast(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_cast_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_delay(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_delay_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_delay_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delay_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65363,26 +77011,26 @@ int HP_skill_get_delay(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_delay_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_walkdelay(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_walkdelay_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_walkdelay_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_walkdelay_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65390,26 +77038,26 @@ int HP_skill_get_walkdelay(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_walkdelay_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_time(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_time_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_time_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65417,26 +77065,26 @@ int HP_skill_get_time(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_time_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_time2(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_time2_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_time2_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_time2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65444,26 +77092,26 @@ int HP_skill_get_time2(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_time2_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_castnodex(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_castnodex_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_castnodex_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castnodex_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65471,26 +77119,26 @@ int HP_skill_get_castnodex(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_castnodex_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_delaynodex(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_delaynodex_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_delaynodex_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_delaynodex_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65498,26 +77146,26 @@ int HP_skill_get_delaynodex(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_delaynodex_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_castdef(uint16 skill_id) { +int HP_skill_get_castdef(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_castdef_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_castdef_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castdef_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65525,26 +77173,26 @@ int HP_skill_get_castdef(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_castdef_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_weapontype(uint16 skill_id) { +int HP_skill_get_weapontype(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_weapontype_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_weapontype_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_weapontype_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65552,26 +77200,26 @@ int HP_skill_get_weapontype(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_weapontype_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_ammotype(uint16 skill_id) { +int HP_skill_get_ammotype(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_ammotype_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_ammotype_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammotype_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65579,26 +77227,26 @@ int HP_skill_get_ammotype(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_ammotype_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_ammo_qty(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_ammo_qty_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_ammo_qty_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_ammo_qty_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65606,26 +77254,26 @@ int HP_skill_get_ammo_qty(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_ammo_qty_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_unit_id(uint16 skill_id, int flag) { +int HP_skill_get_unit_id(int skill_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_id_pre ) { - int (*preHookFunc) (uint16 *skill_id, int *flag); + if (HPMHooks.count.HP_skill_get_unit_id_pre > 0) { + int (*preHookFunc) (int *skill_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65633,26 +77281,26 @@ int HP_skill_get_unit_id(uint16 skill_id, int flag) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_unit_id_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id, flag); } } return retVal___; } -int HP_skill_get_inf2(uint16 skill_id) { +int HP_skill_get_inf2(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_inf2_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_inf2_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_inf2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65660,26 +77308,26 @@ int HP_skill_get_inf2(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_inf2_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_castcancel(uint16 skill_id) { +int HP_skill_get_castcancel(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_castcancel_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_castcancel_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_castcancel_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65687,26 +77335,26 @@ int HP_skill_get_castcancel(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_castcancel_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_maxcount(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_maxcount_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_maxcount_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_maxcount_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65714,26 +77362,26 @@ int HP_skill_get_maxcount(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_maxcount_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_blewcount(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_blewcount_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_blewcount_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_blewcount_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65741,26 +77389,26 @@ int HP_skill_get_blewcount(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_blewcount_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_unit_flag(uint16 skill_id) { +int HP_skill_get_unit_flag(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_flag_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_unit_flag_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_flag_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65768,26 +77416,26 @@ int HP_skill_get_unit_flag(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_unit_flag_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_unit_target(uint16 skill_id) { +int HP_skill_get_unit_target(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_target_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_unit_target_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_target_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65795,26 +77443,26 @@ int HP_skill_get_unit_target(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_unit_target_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_unit_interval(uint16 skill_id) { +int HP_skill_get_unit_interval(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_interval_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_unit_interval_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_interval_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65822,26 +77470,26 @@ int HP_skill_get_unit_interval(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_unit_interval_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_unit_bl_target(uint16 skill_id) { +int HP_skill_get_unit_bl_target(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_bl_target_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_unit_bl_target_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_bl_target_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65849,26 +77497,26 @@ int HP_skill_get_unit_bl_target(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_unit_bl_target_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_unit_layout_type(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_layout_type_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_unit_layout_type_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65876,26 +77524,26 @@ int HP_skill_get_unit_layout_type(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_unit_layout_type_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_unit_range(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_unit_range_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_unit_range_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_range_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65903,26 +77551,26 @@ int HP_skill_get_unit_range(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_unit_range_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_cooldown(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_cooldown_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_cooldown_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_cooldown_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65930,53 +77578,53 @@ int HP_skill_get_cooldown(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_cooldown_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; } -int HP_skill_tree_get_max(uint16 skill_id, int b_class) { +int HP_skill_tree_get_max(int skill_id, int class) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_tree_get_max_pre ) { - int (*preHookFunc) (uint16 *skill_id, int *b_class); + if (HPMHooks.count.HP_skill_tree_get_max_pre > 0) { + int (*preHookFunc) (int *skill_id, int *class); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_tree_get_max_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&skill_id, &class); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.skill.tree_get_max(skill_id, b_class); + retVal___ = HPMHooks.source.skill.tree_get_max(skill_id, 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++ ) { + if (HPMHooks.count.HP_skill_tree_get_max_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, class); } } return retVal___; } -const char* HP_skill_get_name(uint16 skill_id) { +const char* HP_skill_get_name(int skill_id) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_skill_get_name_pre ) { - const char* (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_name_pre > 0) { + const char* (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_name_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -65984,26 +77632,26 @@ const char* HP_skill_get_name(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_name_post > 0) { + const char* (*postHookFunc) (const char* retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -const char* HP_skill_get_desc(uint16 skill_id) { +const char* HP_skill_get_desc(int skill_id) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_skill_get_desc_pre ) { - const char* (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_desc_pre > 0) { + const char* (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_desc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66011,52 +77659,26 @@ const char* HP_skill_get_desc(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_desc_post > 0) { + const char* (*postHookFunc) (const char* retVal___, int 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); + 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); - *HPMforce_return = false; - 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 HP_skill_get_casttype(int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_casttype_pre ) { - int (*preHookFunc) (uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_casttype_pre > 0) { + int (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66064,26 +77686,26 @@ int HP_skill_get_casttype(uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_casttype_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; } -int HP_skill_get_casttype2(uint16 index) { +int HP_skill_get_casttype2(int index) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_casttype2_pre ) { - int (*preHookFunc) (uint16 *index); + if (HPMHooks.count.HP_skill_get_casttype2_pre > 0) { + int (*preHookFunc) (int *index); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_casttype2_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66091,11 +77713,11 @@ int HP_skill_get_casttype2(uint16 index) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_casttype2_post > 0) { + int (*postHookFunc) (int retVal___, int 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); + retVal___ = postHookFunc(retVal___, index); } } return retVal___; @@ -66103,14 +77725,14 @@ int HP_skill_get_casttype2(uint16 index) { bool HP_skill_is_combo(int skill_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_is_combo_pre ) { + if (HPMHooks.count.HP_skill_is_combo_pre > 0) { bool (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_is_combo_pre[hIndex].func; retVal___ = preHookFunc(&skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66118,11 +77740,11 @@ bool HP_skill_is_combo(int skill_id) { { retVal___ = HPMHooks.source.skill.is_combo(skill_id); } - if( HPMHooks.count.HP_skill_is_combo_post ) { - bool (*postHookFunc) (bool retVal___, int *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_is_combo_post > 0) { + bool (*postHookFunc) (bool retVal___, int skill_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_combo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_is_combo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; @@ -66130,14 +77752,14 @@ bool HP_skill_is_combo(int skill_id) { int HP_skill_name2id(const char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_name2id_pre ) { - int (*preHookFunc) (const char *name); + if (HPMHooks.count.HP_skill_name2id_pre > 0) { + int (*preHookFunc) (const char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_name2id_pre[hIndex].func; - retVal___ = preHookFunc(name); + retVal___ = preHookFunc(&name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66145,9 +77767,9 @@ int HP_skill_name2id(const char *name) { { retVal___ = HPMHooks.source.skill.name2id(name); } - if( HPMHooks.count.HP_skill_name2id_post ) { + if (HPMHooks.count.HP_skill_name2id_post > 0) { int (*postHookFunc) (int retVal___, const char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_name2id_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_name2id_post[hIndex].func; retVal___ = postHookFunc(retVal___, name); } @@ -66157,14 +77779,14 @@ int HP_skill_name2id(const char *name) { int HP_skill_isammotype(struct map_session_data *sd, int skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_isammotype_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *skill_id); + if (HPMHooks.count.HP_skill_isammotype_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_isammotype_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_id); + retVal___ = preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66172,11 +77794,11 @@ int HP_skill_isammotype(struct map_session_data *sd, int skill_id) { { retVal___ = HPMHooks.source.skill.isammotype(sd, skill_id); } - if( HPMHooks.count.HP_skill_isammotype_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, int *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_isammotype_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_isammotype_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, int skill_id); + 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_id); + retVal___ = postHookFunc(retVal___, sd, skill_id); } } return retVal___; @@ -66184,14 +77806,14 @@ int HP_skill_isammotype(struct map_session_data *sd, int skill_id) { int HP_skill_castend_id(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_id_pre ) { + if (HPMHooks.count.HP_skill_castend_id_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66199,11 +77821,11 @@ int HP_skill_castend_id(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.castend_id(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_castend_id_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_castend_id_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -66211,14 +77833,14 @@ int HP_skill_castend_id(int tid, int64 tick, int id, intptr_t data) { int HP_skill_castend_pos(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_pos_pre ) { + if (HPMHooks.count.HP_skill_castend_pos_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66226,11 +77848,11 @@ int HP_skill_castend_pos(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.castend_pos(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_castend_pos_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_castend_pos_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -66238,14 +77860,14 @@ int HP_skill_castend_pos(int tid, int64 tick, int id, intptr_t data) { int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const char *mapname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_map_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, const char *mapname); + if (HPMHooks.count.HP_skill_castend_map_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, const char **mapname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_map_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id, &mapname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66253,11 +77875,11 @@ int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const cha { 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++ ) { + if (HPMHooks.count.HP_skill_castend_map_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id, mapname); } } return retVal___; @@ -66265,14 +77887,14 @@ int HP_skill_castend_map(struct map_session_data *sd, uint16 skill_id, const cha int HP_skill_cleartimerskill(struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_cleartimerskill_pre ) { - int (*preHookFunc) (struct block_list *src); + if (HPMHooks.count.HP_skill_cleartimerskill_pre > 0) { + int (*preHookFunc) (struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_cleartimerskill_pre[hIndex].func; - retVal___ = preHookFunc(src); + retVal___ = preHookFunc(&src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66280,9 +77902,9 @@ int HP_skill_cleartimerskill(struct block_list *src) { { retVal___ = HPMHooks.source.skill.cleartimerskill(src); } - if( HPMHooks.count.HP_skill_cleartimerskill_post ) { + if (HPMHooks.count.HP_skill_cleartimerskill_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_cleartimerskill_post[hIndex].func; retVal___ = postHookFunc(retVal___, src); } @@ -66292,14 +77914,14 @@ int HP_skill_cleartimerskill(struct block_list *src) { int HP_skill_addtimerskill(struct block_list *src, int64 tick, int target, int x, int y, uint16 skill_id, uint16 skill_lv, int type, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_addtimerskill_pre ) { - int (*preHookFunc) (struct block_list *src, int64 *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag); + if (HPMHooks.count.HP_skill_addtimerskill_pre > 0) { + int (*preHookFunc) (struct block_list **src, int64 *tick, int *target, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int *type, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_addtimerskill_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &tick, &target, &x, &y, &skill_id, &skill_lv, &type, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66307,11 +77929,11 @@ int HP_skill_addtimerskill(struct block_list *src, int64 tick, int target, int x { 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, int64 *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++ ) { + if (HPMHooks.count.HP_skill_addtimerskill_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, int64 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); + retVal___ = postHookFunc(retVal___, src, tick, target, x, y, skill_id, skill_lv, type, flag); } } return retVal___; @@ -66319,14 +77941,14 @@ int HP_skill_addtimerskill(struct block_list *src, int64 tick, int target, int x 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, int64 tick) { int hIndex = 0; int retVal___ = 0; - 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, int64 *tick); + if (HPMHooks.count.HP_skill_additional_effect_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66334,11 +77956,11 @@ int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, ui { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_additional_effect_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int dmg_lv, int64 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); + retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); } } return retVal___; @@ -66346,14 +77968,14 @@ int HP_skill_additional_effect(struct block_list *src, struct block_list *bl, ui int HP_skill_counter_additional_effect(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 tick) { int hIndex = 0; int retVal___ = 0; - 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, int64 *tick); + if (HPMHooks.count.HP_skill_counter_additional_effect_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &attack_type, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66361,26 +77983,26 @@ int HP_skill_counter_additional_effect(struct block_list *src, struct block_list { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_counter_additional_effect_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int attack_type, int64 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); + 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 HP_skill_blown(struct block_list *src, struct block_list *target, int count, enum unit_dir dir, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blown_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target, int *count, int8 *dir, int *flag); + if (HPMHooks.count.HP_skill_blown_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **target, int *count, enum unit_dir *dir, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blown_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &count, &dir, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66388,11 +78010,11 @@ int HP_skill_blown(struct block_list *src, struct block_list *target, int count, { 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++ ) { + if (HPMHooks.count.HP_skill_blown_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int count, enum unit_dir 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); + retVal___ = postHookFunc(retVal___, src, target, count, dir, flag); } } return retVal___; @@ -66400,14 +78022,14 @@ int HP_skill_blown(struct block_list *src, struct block_list *target, int count, int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_break_equip_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *flag); + if (HPMHooks.count.HP_skill_break_equip_pre > 0) { + int (*preHookFunc) (struct block_list **bl, unsigned short *where, int *rate, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_break_equip_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &where, &rate, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66415,11 +78037,11 @@ int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate, { 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++ ) { + if (HPMHooks.count.HP_skill_break_equip_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, where, rate, flag); } } return retVal___; @@ -66427,14 +78049,14 @@ int HP_skill_break_equip(struct block_list *bl, unsigned short where, int rate, int HP_skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int lv, int time) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_strip_equip_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned short *where, int *rate, int *lv, int *time); + if (HPMHooks.count.HP_skill_strip_equip_pre > 0) { + int (*preHookFunc) (struct block_list **bl, unsigned short *where, int *rate, int *lv, int *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_strip_equip_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &where, &rate, &lv, &time); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66442,11 +78064,11 @@ int HP_skill_strip_equip(struct block_list *bl, unsigned short where, int rate, { 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++ ) { + if (HPMHooks.count.HP_skill_strip_equip_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, where, rate, lv, time); } } return retVal___; @@ -66454,14 +78076,14 @@ int HP_skill_strip_equip(struct block_list *bl, unsigned short where, int rate, 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 ) { + if (HPMHooks.count.HP_skill_id2group_pre > 0) { struct skill_unit_group* (*preHookFunc) (int *group_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_id2group_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66469,11 +78091,11 @@ struct skill_unit_group* HP_skill_id2group(int group_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_id2group_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, group_id); } } return retVal___; @@ -66481,14 +78103,14 @@ struct skill_unit_group* HP_skill_id2group(int group_id) { 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); + if (HPMHooks.count.HP_skill_unitsetting_pre > 0) { + struct skill_unit_group* (*preHookFunc) (struct block_list **src, uint16 *skill_id, uint16 *skill_lv, short *x, short *y, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &skill_id, &skill_lv, &x, &y, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66496,11 +78118,11 @@ struct skill_unit_group* HP_skill_unitsetting(struct block_list *src, uint16 ski { 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++ ) { + if (HPMHooks.count.HP_skill_unitsetting_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, skill_id, skill_lv, x, y, flag); } } return retVal___; @@ -66508,14 +78130,14 @@ struct skill_unit_group* HP_skill_unitsetting(struct block_list *src, uint16 ski 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); + if (HPMHooks.count.HP_skill_initunit_pre > 0) { + struct skill_unit* (*preHookFunc) (struct skill_unit_group **group, int *idx, int *x, int *y, int *val1, int *val2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_initunit_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&group, &idx, &x, &y, &val1, &val2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66523,11 +78145,11 @@ struct skill_unit* HP_skill_initunit(struct skill_unit_group *group, int idx, in { 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++ ) { + if (HPMHooks.count.HP_skill_initunit_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, group, idx, x, y, val1, val2); } } return retVal___; @@ -66535,14 +78157,14 @@ struct skill_unit* HP_skill_initunit(struct skill_unit_group *group, int idx, in int HP_skill_delunit(struct skill_unit *su) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_delunit_pre ) { - int (*preHookFunc) (struct skill_unit *su); + if (HPMHooks.count.HP_skill_delunit_pre > 0) { + int (*preHookFunc) (struct skill_unit **su); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_delunit_pre[hIndex].func; - retVal___ = preHookFunc(su); + retVal___ = preHookFunc(&su); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66550,9 +78172,9 @@ int HP_skill_delunit(struct skill_unit *su) { { retVal___ = HPMHooks.source.skill.delunit(su); } - if( HPMHooks.count.HP_skill_delunit_post ) { + if (HPMHooks.count.HP_skill_delunit_post > 0) { int (*postHookFunc) (int retVal___, struct skill_unit *su); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_delunit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_delunit_post[hIndex].func; retVal___ = postHookFunc(retVal___, su); } @@ -66562,14 +78184,14 @@ int HP_skill_delunit(struct skill_unit *su) { 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); + if (HPMHooks.count.HP_skill_init_unitgroup_pre > 0) { + struct skill_unit_group* (*preHookFunc) (struct block_list **src, int *count, uint16 *skill_id, uint16 *skill_lv, int *unit_id, int *limit, int *interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unitgroup_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &count, &skill_id, &skill_lv, &unit_id, &limit, &interval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66577,11 +78199,11 @@ struct skill_unit_group* HP_skill_init_unitgroup(struct block_list *src, int cou { 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++ ) { + if (HPMHooks.count.HP_skill_init_unitgroup_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, count, skill_id, skill_lv, unit_id, limit, interval); } } return retVal___; @@ -66589,14 +78211,14 @@ struct skill_unit_group* HP_skill_init_unitgroup(struct block_list *src, int cou int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int line, const char *func) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_del_unitgroup_pre ) { - int (*preHookFunc) (struct skill_unit_group *group, const char *file, int *line, const char *func); + if (HPMHooks.count.HP_skill_del_unitgroup_pre > 0) { + int (*preHookFunc) (struct skill_unit_group **group, const char **file, int *line, const char **func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_del_unitgroup_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&group, &file, &line, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66604,11 +78226,11 @@ int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int { 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++ ) { + if (HPMHooks.count.HP_skill_del_unitgroup_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, group, file, line, func); } } return retVal___; @@ -66616,14 +78238,14 @@ int HP_skill_del_unitgroup(struct skill_unit_group *group, const char *file, int int HP_skill_clear_unitgroup(struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_clear_unitgroup_pre ) { - int (*preHookFunc) (struct block_list *src); + if (HPMHooks.count.HP_skill_clear_unitgroup_pre > 0) { + int (*preHookFunc) (struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66631,9 +78253,9 @@ int HP_skill_clear_unitgroup(struct block_list *src) { { retVal___ = HPMHooks.source.skill.clear_unitgroup(src); } - if( HPMHooks.count.HP_skill_clear_unitgroup_post ) { + if (HPMHooks.count.HP_skill_clear_unitgroup_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_unitgroup_post; hIndex++ ) { + 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); } @@ -66643,14 +78265,14 @@ int HP_skill_clear_unitgroup(struct block_list *src) { int HP_skill_clear_group(struct block_list *bl, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_clear_group_pre ) { - int (*preHookFunc) (struct block_list *bl, int *flag); + if (HPMHooks.count.HP_skill_clear_group_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_clear_group_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66658,11 +78280,11 @@ int HP_skill_clear_group(struct block_list *bl, int flag) { { 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++ ) { + if (HPMHooks.count.HP_skill_clear_group_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, flag); } } return retVal___; @@ -66670,14 +78292,14 @@ int HP_skill_clear_group(struct block_list *bl, int flag) { int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onplace_pre ) { - int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); + if (HPMHooks.count.HP_skill_unit_onplace_pre > 0) { + int (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66685,11 +78307,11 @@ int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 t { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_unit_onplace_post > 0) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 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); + retVal___ = postHookFunc(retVal___, src, bl, tick); } } return retVal___; @@ -66697,14 +78319,14 @@ int HP_skill_unit_onplace(struct skill_unit *src, struct block_list *bl, int64 t int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 damage, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_ondamaged_pre ) { - int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *damage, int64 *tick); + if (HPMHooks.count.HP_skill_unit_ondamaged_pre > 0) { + int (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 *damage, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &damage, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66712,11 +78334,11 @@ int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_ondamaged_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_unit_ondamaged_post > 0) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 damage, int64 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); + retVal___ = postHookFunc(retVal___, src, bl, damage, tick); } } return retVal___; @@ -66724,14 +78346,14 @@ int HP_skill_unit_ondamaged(struct skill_unit *src, struct block_list *bl, int64 int HP_skill_cast_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_cast_fix_pre ) { - int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_cast_fix_pre > 0) { + int (*preHookFunc) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66739,11 +78361,11 @@ int HP_skill_cast_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_cast_fix_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, skill_id, skill_lv); } } return retVal___; @@ -66751,14 +78373,14 @@ int HP_skill_cast_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { int HP_skill_cast_fix_sc(struct block_list *bl, int time) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_cast_fix_sc_pre ) { - int (*preHookFunc) (struct block_list *bl, int *time); + if (HPMHooks.count.HP_skill_cast_fix_sc_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *time); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cast_fix_sc_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &time); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66766,11 +78388,11 @@ int HP_skill_cast_fix_sc(struct block_list *bl, int time) { { 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++ ) { + if (HPMHooks.count.HP_skill_cast_fix_sc_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, time); } } return retVal___; @@ -66778,14 +78400,14 @@ int HP_skill_cast_fix_sc(struct block_list *bl, int time) { int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_vf_cast_fix_pre ) { - int (*preHookFunc) (struct block_list *bl, double *time, uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_vf_cast_fix_pre > 0) { + int (*preHookFunc) (struct block_list **bl, double *time, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_vf_cast_fix_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &time, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66793,11 +78415,11 @@ int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, ui { 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++ ) { + if (HPMHooks.count.HP_skill_vf_cast_fix_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, time, skill_id, skill_lv); } } return retVal___; @@ -66805,14 +78427,14 @@ int HP_skill_vf_cast_fix(struct block_list *bl, double time, uint16 skill_id, ui int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_delay_fix_pre ) { - int (*preHookFunc) (struct block_list *bl, uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_delay_fix_pre > 0) { + int (*preHookFunc) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_delay_fix_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66820,11 +78442,11 @@ int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) { 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++ ) { + if (HPMHooks.count.HP_skill_delay_fix_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, skill_id, skill_lv); } } return retVal___; @@ -66832,14 +78454,14 @@ int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv) int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_check_condition_castbegin_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66847,11 +78469,11 @@ int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill { 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++ ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv); } } return retVal___; @@ -66859,14 +78481,14 @@ int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castend_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_check_condition_castend_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66874,11 +78496,11 @@ int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_i { 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++ ) { + if (HPMHooks.count.HP_skill_check_condition_castend_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv); } } return retVal___; @@ -66886,14 +78508,14 @@ int HP_skill_check_condition_castend(struct map_session_data *sd, uint16 skill_i int HP_skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_consume_requirement_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, short *type); + if (HPMHooks.count.HP_skill_consume_requirement_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv, short *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_consume_requirement_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id, &skill_lv, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66901,27 +78523,26 @@ int HP_skill_consume_requirement(struct map_session_data *sd, uint16 skill_id, u { 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++ ) { + if (HPMHooks.count.HP_skill_consume_requirement_post > 0) { + 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); + 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); + struct skill_condition retVal___ = { 0 }; + if (HPMHooks.count.HP_skill_get_requirement_pre > 0) { + struct skill_condition (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66929,11 +78550,11 @@ struct skill_condition HP_skill_get_requirement(struct map_session_data *sd, uin { 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++ ) { + if (HPMHooks.count.HP_skill_get_requirement_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv); } } return retVal___; @@ -66941,14 +78562,14 @@ struct skill_condition HP_skill_get_requirement(struct map_session_data *sd, uin 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___ = 0; - 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); + if (HPMHooks.count.HP_skill_check_pc_partner_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 **skill_lv, int *range, int *cast_flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_pc_partner_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id, &skill_lv, &range, &cast_flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66956,11 +78577,11 @@ int HP_skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, uint { 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++ ) { + if (HPMHooks.count.HP_skill_check_pc_partner_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv, range, cast_flag); } } return retVal___; @@ -66968,14 +78589,14 @@ int HP_skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, uint int HP_skill_unit_move(struct block_list *bl, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_move_pre ) { - int (*preHookFunc) (struct block_list *bl, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_unit_move_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -66983,11 +78604,11 @@ int HP_skill_unit_move(struct block_list *bl, int64 tick, int flag) { { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_unit_move_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int64 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); + retVal___ = postHookFunc(retVal___, bl, tick, flag); } } return retVal___; @@ -66995,14 +78616,14 @@ int HP_skill_unit_move(struct block_list *bl, int64 tick, int flag) { int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onleft_pre ) { - int (*preHookFunc) (uint16 *skill_id, struct block_list *bl, int64 *tick); + if (HPMHooks.count.HP_skill_unit_onleft_pre > 0) { + int (*preHookFunc) (uint16 *skill_id, struct block_list **bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&skill_id, &bl, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67010,11 +78631,11 @@ int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onleft_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_unit_onleft_post > 0) { + int (*postHookFunc) (int retVal___, uint16 skill_id, struct block_list *bl, int64 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); + retVal___ = postHookFunc(retVal___, skill_id, bl, tick); } } return retVal___; @@ -67022,14 +78643,14 @@ int HP_skill_unit_onleft(uint16 skill_id, struct block_list *bl, int64 tick) { int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onout_pre ) { - int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); + if (HPMHooks.count.HP_skill_unit_onout_pre > 0) { + int (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67037,11 +78658,11 @@ int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tic { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onout_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_unit_onout_post > 0) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 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); + retVal___ = postHookFunc(retVal___, src, bl, tick); } } return retVal___; @@ -67049,14 +78670,14 @@ int HP_skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tic int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 dx, int16 dy) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_move_unit_group_pre ) { - int (*preHookFunc) (struct skill_unit_group *group, int16 *m, int16 *dx, int16 *dy); + if (HPMHooks.count.HP_skill_unit_move_unit_group_pre > 0) { + int (*preHookFunc) (struct skill_unit_group **group, int16 *m, int16 *dx, int16 *dy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_unit_group_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&group, &m, &dx, &dy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67064,11 +78685,11 @@ int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 { 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++ ) { + if (HPMHooks.count.HP_skill_unit_move_unit_group_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, group, m, dx, dy); } } return retVal___; @@ -67076,14 +78697,14 @@ int HP_skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 int HP_skill_sit(struct map_session_data *sd, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *type); + if (HPMHooks.count.HP_skill_sit_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_sit_pre[hIndex].func; - retVal___ = preHookFunc(sd, &type); + retVal___ = preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67091,25 +78712,25 @@ int HP_skill_sit(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_skill_sit_post > 0) { + 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); + 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, int64 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, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_brandishspear_pre > 0) { + void (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_pre; hIndex++ ) { + 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); + preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -67117,25 +78738,25 @@ void HP_skill_brandishspear(struct block_list *src, struct block_list *bl, uint1 { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_brandishspear_post > 0) { + void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 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); + 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); + if (HPMHooks.count.HP_skill_repairweapon_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_repairweapon_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_repairweapon_pre[hIndex].func; - preHookFunc(sd, &idx); + preHookFunc(&sd, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -67143,25 +78764,25 @@ void HP_skill_repairweapon(struct map_session_data *sd, int idx) { { 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++ ) { + if (HPMHooks.count.HP_skill_repairweapon_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_skill_identify_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_identify_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_identify_pre[hIndex].func; - preHookFunc(sd, &idx); + preHookFunc(&sd, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -67169,25 +78790,25 @@ void HP_skill_identify(struct map_session_data *sd, int idx) { { 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++ ) { + if (HPMHooks.count.HP_skill_identify_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_skill_weaponrefine_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_weaponrefine_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_weaponrefine_pre[hIndex].func; - preHookFunc(sd, &idx); + preHookFunc(&sd, &idx); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -67195,11 +78816,11 @@ void HP_skill_weaponrefine(struct map_session_data *sd, int idx) { { 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++ ) { + if (HPMHooks.count.HP_skill_weaponrefine_post > 0) { + 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); + postHookFunc(sd, idx); } } return; @@ -67207,14 +78828,14 @@ void HP_skill_weaponrefine(struct map_session_data *sd, int idx) { int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_autospell_pre ) { - int (*preHookFunc) (struct map_session_data *md, uint16 *skill_id); + if (HPMHooks.count.HP_skill_autospell_pre > 0) { + int (*preHookFunc) (struct map_session_data **md, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_autospell_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67222,11 +78843,11 @@ int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_autospell_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, md, skill_id); } } return retVal___; @@ -67234,14 +78855,14 @@ int HP_skill_autospell(struct map_session_data *md, uint16 skill_id) { 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___ = 0; - 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); + if (HPMHooks.count.HP_skill_calc_heal_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, bool *heal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_calc_heal_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &skill_id, &skill_lv, &heal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67249,11 +78870,11 @@ int HP_skill_calc_heal(struct block_list *src, struct block_list *target, uint16 { 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++ ) { + if (HPMHooks.count.HP_skill_calc_heal_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target, skill_id, skill_lv, heal); } } return retVal___; @@ -67261,14 +78882,14 @@ int HP_skill_calc_heal(struct block_list *src, struct block_list *target, uint16 bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_check_cloaking_pre ) { - bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce); + if (HPMHooks.count.HP_skill_check_cloaking_pre > 0) { + bool (*preHookFunc) (struct block_list **bl, struct status_change_entry **sce); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sce); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67276,9 +78897,9 @@ bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry * { retVal___ = HPMHooks.source.skill.check_cloaking(bl, sce); } - if( HPMHooks.count.HP_skill_check_cloaking_post ) { + if (HPMHooks.count.HP_skill_check_cloaking_post > 0) { 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++ ) { + 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); } @@ -67288,16 +78909,16 @@ bool HP_skill_check_cloaking(struct block_list *bl, struct status_change_entry * int HP_skill_check_cloaking_end(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_cloaking_end_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_check_cloaking_end_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_pre; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); preHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_pre[hIndex].func; - retVal___ = preHookFunc(bl, ap___copy); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67307,9 +78928,9 @@ int HP_skill_check_cloaking_end(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.check_cloaking_end(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_check_cloaking_end_post ) { + if (HPMHooks.count.HP_skill_check_cloaking_end_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_cloaking_end_post; hIndex++) { va_list ap___copy; va_copy(ap___copy, ap); postHookFunc = HPMHooks.list.HP_skill_check_cloaking_end_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl, ap___copy); @@ -67321,14 +78942,14 @@ int HP_skill_check_cloaking_end(struct block_list *bl, va_list ap) { bool HP_skill_can_cloak(struct map_session_data *sd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_can_cloak_pre ) { - bool (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_skill_can_cloak_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_can_cloak_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67336,9 +78957,9 @@ bool HP_skill_can_cloak(struct map_session_data *sd) { { retVal___ = HPMHooks.source.skill.can_cloak(sd); } - if( HPMHooks.count.HP_skill_can_cloak_post ) { + if (HPMHooks.count.HP_skill_can_cloak_post > 0) { bool (*postHookFunc) (bool retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_cloak_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_can_cloak_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -67348,14 +78969,14 @@ bool HP_skill_can_cloak(struct map_session_data *sd) { int HP_skill_enchant_elemental_end(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_enchant_elemental_end_pre ) { - int (*preHookFunc) (struct block_list *bl, int *type); + if (HPMHooks.count.HP_skill_enchant_elemental_end_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_enchant_elemental_end_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67363,11 +78984,11 @@ int HP_skill_enchant_elemental_end(struct block_list *bl, int type) { { 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++ ) { + if (HPMHooks.count.HP_skill_enchant_elemental_end_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, type); } } return retVal___; @@ -67375,14 +78996,14 @@ int HP_skill_enchant_elemental_end(struct block_list *bl, int type) { int HP_skill_not_ok(uint16 skill_id, struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_not_ok_pre ) { - int (*preHookFunc) (uint16 *skill_id, struct map_session_data *sd); + if (HPMHooks.count.HP_skill_not_ok_pre > 0) { + int (*preHookFunc) (uint16 *skill_id, struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&skill_id, &sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67390,11 +79011,38 @@ int HP_skill_not_ok(uint16 skill_id, struct map_session_data *sd) { { 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++ ) { + if (HPMHooks.count.HP_skill_not_ok_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, skill_id, sd); + } + } + return retVal___; +} +int HP_skill_not_ok_unknown(uint16 skill_id, struct map_session_data *sd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_not_ok_unknown_pre > 0) { + int (*preHookFunc) (uint16 *skill_id, struct map_session_data **sd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_unknown_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_not_ok_unknown_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &sd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.not_ok_unknown(skill_id, sd); + } + if (HPMHooks.count.HP_skill_not_ok_unknown_post > 0) { + int (*postHookFunc) (int retVal___, uint16 skill_id, struct map_session_data *sd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_unknown_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_not_ok_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skill_id, sd); } } return retVal___; @@ -67402,14 +79050,14 @@ int HP_skill_not_ok(uint16 skill_id, struct map_session_data *sd) { int HP_skill_not_ok_hom(uint16 skill_id, struct homun_data *hd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_not_ok_hom_pre ) { - int (*preHookFunc) (uint16 *skill_id, struct homun_data *hd); + if (HPMHooks.count.HP_skill_not_ok_hom_pre > 0) { + int (*preHookFunc) (uint16 *skill_id, struct homun_data **hd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&skill_id, &hd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67417,11 +79065,38 @@ int HP_skill_not_ok_hom(uint16 skill_id, struct homun_data *hd) { { 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++ ) { + if (HPMHooks.count.HP_skill_not_ok_hom_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, skill_id, hd); + } + } + return retVal___; +} +int HP_skill_not_ok_hom_unknown(uint16 skill_id, struct homun_data *hd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_not_ok_hom_unknown_pre > 0) { + int (*preHookFunc) (uint16 *skill_id, struct homun_data **hd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_unknown_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_not_ok_hom_unknown_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id, &hd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.not_ok_hom_unknown(skill_id, hd); + } + if (HPMHooks.count.HP_skill_not_ok_hom_unknown_post > 0) { + int (*postHookFunc) (int retVal___, uint16 skill_id, struct homun_data *hd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_hom_unknown_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_not_ok_hom_unknown_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skill_id, hd); } } return retVal___; @@ -67429,14 +79104,14 @@ int HP_skill_not_ok_hom(uint16 skill_id, struct homun_data *hd) { int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_not_ok_mercenary_pre ) { - int (*preHookFunc) (uint16 *skill_id, struct mercenary_data *md); + if (HPMHooks.count.HP_skill_not_ok_mercenary_pre > 0) { + int (*preHookFunc) (uint16 *skill_id, struct mercenary_data **md); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_not_ok_mercenary_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&skill_id, &md); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67444,28 +79119,54 @@ int HP_skill_not_ok_mercenary(uint16 skill_id, struct mercenary_data *md) { { 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++ ) { + if (HPMHooks.count.HP_skill_not_ok_mercenary_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, skill_id, md); } } return retVal___; } +void HP_skill_validate_autocast_data(struct map_session_data *sd, int skill_id, int skill_lv) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_autocast_data_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *skill_lv); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_autocast_data_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_autocast_data_pre[hIndex].func; + preHookFunc(&sd, &skill_id, &skill_lv); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_autocast_data(sd, skill_id, skill_lv); + } + if (HPMHooks.count.HP_skill_validate_autocast_data_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int skill_id, int skill_lv); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_autocast_data_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_autocast_data_post[hIndex].func; + postHookFunc(sd, skill_id, skill_lv); + } + } + return; +} int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_chastle_mob_changetarget_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_chastle_mob_changetarget_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67475,9 +79176,9 @@ int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.chastle_mob_changetarget(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_chastle_mob_changetarget_post ) { + if (HPMHooks.count.HP_skill_chastle_mob_changetarget_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_chastle_mob_changetarget_post; hIndex++ ) { + 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); @@ -67489,14 +79190,14 @@ int HP_skill_chastle_mob_changetarget(struct block_list *bl, va_list ap) { int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigger, int qty) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_can_produce_mix_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid, int *trigger, int *qty); + if (HPMHooks.count.HP_skill_can_produce_mix_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *nameid, int *trigger, int *qty); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_can_produce_mix_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &nameid, &trigger, &qty); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67504,11 +79205,11 @@ int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigge { 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++ ) { + if (HPMHooks.count.HP_skill_can_produce_mix_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, nameid, trigger, qty); } } return retVal___; @@ -67516,14 +79217,14 @@ int HP_skill_can_produce_mix(struct map_session_data *sd, int nameid, int trigge 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___ = 0; - 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); + if (HPMHooks.count.HP_skill_produce_mix_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, int *nameid, int *slot1, int *slot2, int *slot3, int *qty); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_produce_mix_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id, &nameid, &slot1, &slot2, &slot3, &qty); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67531,11 +79232,11 @@ int HP_skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int namei { 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++ ) { + if (HPMHooks.count.HP_skill_produce_mix_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id, nameid, slot1, slot2, slot3, qty); } } return retVal___; @@ -67543,14 +79244,14 @@ int HP_skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int namei int HP_skill_arrow_create(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_arrow_create_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid); + if (HPMHooks.count.HP_skill_arrow_create_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_arrow_create_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67558,26 +79259,52 @@ int HP_skill_arrow_create(struct map_session_data *sd, int nameid) { { 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++ ) { + if (HPMHooks.count.HP_skill_arrow_create_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, nameid); } } return retVal___; } +void HP_skill_castend_type(int type, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_castend_type_pre > 0) { + void (*preHookFunc) (int *type, struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_type_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_castend_type_pre[hIndex].func; + preHookFunc(&type, &src, &bl, &skill_id, &skill_lv, &tick, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.castend_type(type, src, bl, skill_id, skill_lv, tick, flag); + } + if (HPMHooks.count.HP_skill_castend_type_post > 0) { + void (*postHookFunc) (int type, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_type_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_castend_type_post[hIndex].func; + postHookFunc(type, src, bl, skill_id, skill_lv, tick, flag); + } + } + return; +} int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - 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, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_castend_nodamage_id_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67585,11 +79312,11 @@ int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 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); + retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } } return retVal___; @@ -67597,14 +79324,14 @@ int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - 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, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_castend_damage_id_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67612,11 +79339,11 @@ int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, ui { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_castend_damage_id_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 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); + retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } } return retVal___; @@ -67624,14 +79351,14 @@ int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, ui int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_castend_pos2_pre ) { - int (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_castend_pos2_pre > 0) { + int (*preHookFunc) (struct block_list **src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &x, &y, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67639,11 +79366,11 @@ int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_castend_pos2_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 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); + retVal___ = postHookFunc(retVal___, src, x, y, skill_id, skill_lv, tick, flag); } } return retVal___; @@ -67651,14 +79378,14 @@ int HP_skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill_id, int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockpc_start_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, int *tick); + if (HPMHooks.count.HP_skill_blockpc_start_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67666,11 +79393,11 @@ int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tic { retVal___ = HPMHooks.source.skill.blockpc_start(sd, skill_id, tick); } - if( HPMHooks.count.HP_skill_blockpc_start_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_id, int *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_start_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_blockpc_start_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_id, int tick); + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id, tick); } } return retVal___; @@ -67678,14 +79405,14 @@ int HP_skill_blockpc_start(struct map_session_data *sd, uint16 skill_id, int tic int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockhomun_start_pre ) { - int (*preHookFunc) (struct homun_data *hd, uint16 *skill_id, int *tick); + if (HPMHooks.count.HP_skill_blockhomun_start_pre > 0) { + int (*preHookFunc) (struct homun_data **hd, uint16 *skill_id, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_start_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&hd, &skill_id, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67693,11 +79420,11 @@ int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) { 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++ ) { + if (HPMHooks.count.HP_skill_blockhomun_start_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, hd, skill_id, tick); } } return retVal___; @@ -67705,14 +79432,14 @@ int HP_skill_blockhomun_start(struct homun_data *hd, uint16 skill_id, int tick) int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockmerc_start_pre ) { - int (*preHookFunc) (struct mercenary_data *md, uint16 *skill_id, int *tick); + if (HPMHooks.count.HP_skill_blockmerc_start_pre > 0) { + int (*preHookFunc) (struct mercenary_data **md, uint16 *skill_id, int *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_start_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&md, &skill_id, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67720,11 +79447,11 @@ int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tic { 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++ ) { + if (HPMHooks.count.HP_skill_blockmerc_start_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, md, skill_id, tick); } } return retVal___; @@ -67732,14 +79459,14 @@ int HP_skill_blockmerc_start(struct mercenary_data *md, uint16 skill_id, int tic 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, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - 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, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_attack_pre > 0) { + int (*preHookFunc) (int *attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67747,11 +79474,11 @@ int HP_skill_attack(int attack_type, struct block_list *src, struct block_list * { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_attack_post > 0) { + 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, int64 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); + retVal___ = postHookFunc(retVal___, attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } } return retVal___; @@ -67759,16 +79486,16 @@ int HP_skill_attack(int attack_type, struct block_list *src, struct block_list * int HP_skill_attack_area(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_attack_area_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_attack_area_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67778,9 +79505,9 @@ int HP_skill_attack_area(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.attack_area(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_attack_area_post ) { + if (HPMHooks.count.HP_skill_attack_area_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_area_post; hIndex++ ) { + 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); @@ -67792,16 +79519,16 @@ int HP_skill_attack_area(struct block_list *bl, va_list ap) { int HP_skill_area_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_area_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_area_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67811,9 +79538,9 @@ int HP_skill_area_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.area_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_area_sub_post ) { + if (HPMHooks.count.HP_skill_area_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_post; hIndex++ ) { + 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); @@ -67825,14 +79552,14 @@ int HP_skill_area_sub(struct block_list *bl, va_list ap) { int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; - 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, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_area_sub_count_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67840,11 +79567,11 @@ int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, u { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_area_sub_count_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_area_sub_count_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 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); + retVal___ = postHookFunc(retVal___, src, target, skill_id, skill_lv, tick, flag); } } return retVal___; @@ -67852,14 +79579,14 @@ int HP_skill_area_sub_count(struct block_list *src, struct block_list *target, u 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___ = 0; - 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); + if (HPMHooks.count.HP_skill_check_unit_range_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &x, &y, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67867,11 +79594,11 @@ int HP_skill_check_unit_range(struct block_list *bl, int x, int y, uint16 skill_ { 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++ ) { + if (HPMHooks.count.HP_skill_check_unit_range_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, x, y, skill_id, skill_lv); } } return retVal___; @@ -67879,16 +79606,16 @@ int HP_skill_check_unit_range(struct block_list *bl, int x, int y, uint16 skill_ int HP_skill_check_unit_range_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_unit_range_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_check_unit_range_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67898,9 +79625,9 @@ int HP_skill_check_unit_range_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_skill_check_unit_range_sub_post > 0) { 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++ ) { + 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); @@ -67912,14 +79639,14 @@ int HP_skill_check_unit_range_sub(struct block_list *bl, va_list ap) { 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___ = 0; - 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); + if (HPMHooks.count.HP_skill_check_unit_range2_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *x, int *y, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &x, &y, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67927,11 +79654,11 @@ int HP_skill_check_unit_range2(struct block_list *bl, int x, int y, uint16 skill { 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++ ) { + if (HPMHooks.count.HP_skill_check_unit_range2_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, x, y, skill_id, skill_lv); } } return retVal___; @@ -67939,16 +79666,16 @@ int HP_skill_check_unit_range2(struct block_list *bl, int x, int y, uint16 skill int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_unit_range2_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_check_unit_range2_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_unit_range2_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -67958,9 +79685,9 @@ int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_skill_check_unit_range2_sub_post > 0) { 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++ ) { + 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); @@ -67971,14 +79698,14 @@ int HP_skill_check_unit_range2_sub(struct block_list *bl, va_list ap) { } 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); + if (HPMHooks.count.HP_skill_toggle_magicpower_pre > 0) { + void (*preHookFunc) (struct block_list **bl, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_toggle_magicpower_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -67986,11 +79713,11 @@ void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_toggle_magicpower_post > 0) { + 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); + postHookFunc(bl, skill_id); } } return; @@ -67998,14 +79725,14 @@ void HP_skill_toggle_magicpower(struct block_list *bl, uint16 skill_id) { int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_magic_reflect_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl, int *type); + if (HPMHooks.count.HP_skill_magic_reflect_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magic_reflect_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68013,11 +79740,11 @@ int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int ty { 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++ ) { + if (HPMHooks.count.HP_skill_magic_reflect_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, bl, type); } } return retVal___; @@ -68025,14 +79752,14 @@ int HP_skill_magic_reflect(struct block_list *src, struct block_list *bl, int ty int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, uint16 skill_id, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_onskillusage_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct block_list *bl, uint16 *skill_id, int64 *tick); + if (HPMHooks.count.HP_skill_onskillusage_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct block_list **bl, uint16 *skill_id, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &bl, &skill_id, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68040,11 +79767,11 @@ int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, ui { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_onskillusage_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_onskillusage_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, struct block_list *bl, uint16 skill_id, int64 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); + retVal___ = postHookFunc(retVal___, sd, bl, skill_id, tick); } } return retVal___; @@ -68052,16 +79779,16 @@ int HP_skill_onskillusage(struct map_session_data *sd, struct block_list *bl, ui int HP_skill_cell_overlap(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_cell_overlap_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_cell_overlap_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68071,9 +79798,9 @@ int HP_skill_cell_overlap(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.cell_overlap(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_cell_overlap_post ) { + if (HPMHooks.count.HP_skill_cell_overlap_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cell_overlap_post; hIndex++ ) { + 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); @@ -68085,14 +79812,14 @@ int HP_skill_cell_overlap(struct block_list *bl, va_list ap) { int HP_skill_timerskill(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_timerskill_pre ) { + if (HPMHooks.count.HP_skill_timerskill_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68100,28 +79827,54 @@ int HP_skill_timerskill(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.timerskill(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_timerskill_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_timerskill_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } +void HP_skill_trap_do_splash(struct block_list *bl, uint16 skill_id, uint16 skill_lv, int bl_flag, int64 tick) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_trap_do_splash_pre > 0) { + void (*preHookFunc) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int *bl_flag, int64 *tick); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_do_splash_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_trap_do_splash_pre[hIndex].func; + preHookFunc(&bl, &skill_id, &skill_lv, &bl_flag, &tick); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.trap_do_splash(bl, skill_id, skill_lv, bl_flag, tick); + } + if (HPMHooks.count.HP_skill_trap_do_splash_post > 0) { + void (*postHookFunc) (struct block_list *bl, uint16 skill_id, uint16 skill_lv, int bl_flag, int64 tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_do_splash_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_trap_do_splash_post[hIndex].func; + postHookFunc(bl, skill_id, skill_lv, bl_flag, tick); + } + } + return; +} int HP_skill_trap_splash(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_trap_splash_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_trap_splash_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68131,9 +79884,9 @@ int HP_skill_trap_splash(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.trap_splash(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_trap_splash_post ) { + if (HPMHooks.count.HP_skill_trap_splash_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_trap_splash_post; hIndex++ ) { + 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); @@ -68145,14 +79898,14 @@ int HP_skill_trap_splash(struct block_list *bl, va_list ap) { int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_mercenary_pre ) { - int (*preHookFunc) (struct block_list *bl, int *skill_id, int *lv, int *type); + if (HPMHooks.count.HP_skill_check_condition_mercenary_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *skill_id, int *lv, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mercenary_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &skill_id, &lv, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68160,11 +79913,11 @@ int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int { 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++ ) { + if (HPMHooks.count.HP_skill_check_condition_mercenary_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, skill_id, lv, type); } } return retVal___; @@ -68172,14 +79925,14 @@ int HP_skill_check_condition_mercenary(struct block_list *bl, int skill_id, int 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); + if (HPMHooks.count.HP_skill_locate_element_field_pre > 0) { + struct skill_unit_group* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_locate_element_field_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68187,9 +79940,9 @@ struct skill_unit_group* HP_skill_locate_element_field(struct block_list *bl) { { retVal___ = HPMHooks.source.skill.locate_element_field(bl); } - if( HPMHooks.count.HP_skill_locate_element_field_post ) { + if (HPMHooks.count.HP_skill_locate_element_field_post > 0) { 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++ ) { + 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); } @@ -68199,16 +79952,16 @@ struct skill_unit_group* HP_skill_locate_element_field(struct block_list *bl) { int HP_skill_graffitiremover(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_graffitiremover_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_graffitiremover_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68218,9 +79971,9 @@ int HP_skill_graffitiremover(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.graffitiremover(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_graffitiremover_post ) { + if (HPMHooks.count.HP_skill_graffitiremover_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_graffitiremover_post; hIndex++ ) { + 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); @@ -68232,16 +79985,16 @@ int HP_skill_graffitiremover(struct block_list *bl, va_list ap) { int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_activate_reverberation_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_activate_reverberation_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68251,9 +80004,9 @@ int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.activate_reverberation(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_activate_reverberation_post ) { + if (HPMHooks.count.HP_skill_activate_reverberation_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_activate_reverberation_post; hIndex++ ) { + 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); @@ -68265,16 +80018,16 @@ int HP_skill_activate_reverberation(struct block_list *bl, va_list ap) { int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_dance_overlap_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_dance_overlap_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68284,9 +80037,9 @@ int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.dance_overlap_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_dance_overlap_sub_post ) { + if (HPMHooks.count.HP_skill_dance_overlap_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_sub_post; hIndex++ ) { + 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); @@ -68298,14 +80051,14 @@ int HP_skill_dance_overlap_sub(struct block_list *bl, va_list ap) { int HP_skill_dance_overlap(struct skill_unit *su, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_dance_overlap_pre ) { - int (*preHookFunc) (struct skill_unit *su, int *flag); + if (HPMHooks.count.HP_skill_dance_overlap_pre > 0) { + int (*preHookFunc) (struct skill_unit **su, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_overlap_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&su, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68313,11 +80066,11 @@ int HP_skill_dance_overlap(struct skill_unit *su, int flag) { { 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++ ) { + if (HPMHooks.count.HP_skill_dance_overlap_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, su, flag); } } return retVal___; @@ -68325,14 +80078,14 @@ int HP_skill_dance_overlap(struct skill_unit *su, int flag) { 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); + if (HPMHooks.count.HP_skill_get_unit_layout_pre > 0) { + struct s_skill_unit_layout* (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv, struct block_list **src, int *x, int *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_unit_layout_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&skill_id, &skill_lv, &src, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68340,11 +80093,11 @@ struct s_skill_unit_layout* HP_skill_get_unit_layout(uint16 skill_id, uint16 ski { 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++ ) { + if (HPMHooks.count.HP_skill_get_unit_layout_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv, src, x, y); } } return retVal___; @@ -68352,16 +80105,16 @@ struct s_skill_unit_layout* HP_skill_get_unit_layout(uint16 skill_id, uint16 ski int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_frostjoke_scream_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_frostjoke_scream_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68371,9 +80124,9 @@ int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.frostjoke_scream(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_frostjoke_scream_post ) { + if (HPMHooks.count.HP_skill_frostjoke_scream_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_frostjoke_scream_post; hIndex++ ) { + 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); @@ -68385,16 +80138,16 @@ int HP_skill_frostjoke_scream(struct block_list *bl, va_list ap) { int HP_skill_greed(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_greed_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_greed_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68404,9 +80157,9 @@ int HP_skill_greed(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.greed(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_greed_post ) { + if (HPMHooks.count.HP_skill_greed_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_greed_post; hIndex++ ) { + 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); @@ -68418,16 +80171,16 @@ int HP_skill_greed(struct block_list *bl, va_list ap) { int HP_skill_destroy_trap(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_destroy_trap_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_destroy_trap_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68437,9 +80190,9 @@ int HP_skill_destroy_trap(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.destroy_trap(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_destroy_trap_post ) { + if (HPMHooks.count.HP_skill_destroy_trap_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_destroy_trap_post; hIndex++ ) { + 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); @@ -68451,14 +80204,14 @@ int HP_skill_destroy_trap(struct block_list *bl, va_list ap) { struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_list *bl, struct skill_unit_group *group, int64 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, int64 *tick); + if (HPMHooks.count.HP_skill_unitgrouptickset_search_pre > 0) { + struct skill_unit_group_tickset* (*preHookFunc) (struct block_list **bl, struct skill_unit_group **group, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &group, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68466,11 +80219,11 @@ struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_l { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitgrouptickset_search_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_unitgrouptickset_search_post > 0) { + struct skill_unit_group_tickset* (*postHookFunc) (struct skill_unit_group_tickset* retVal___, struct block_list *bl, struct skill_unit_group *group, int64 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); + retVal___ = postHookFunc(retVal___, bl, group, tick); } } return retVal___; @@ -68478,14 +80231,14 @@ struct skill_unit_group_tickset* HP_skill_unitgrouptickset_search(struct block_l bool HP_skill_dance_switch(struct skill_unit *su, int flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_dance_switch_pre ) { - bool (*preHookFunc) (struct skill_unit *su, int *flag); + if (HPMHooks.count.HP_skill_dance_switch_pre > 0) { + bool (*preHookFunc) (struct skill_unit **su, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_dance_switch_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&su, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68493,11 +80246,11 @@ bool HP_skill_dance_switch(struct skill_unit *su, int flag) { { 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++ ) { + if (HPMHooks.count.HP_skill_dance_switch_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, su, flag); } } return retVal___; @@ -68505,16 +80258,16 @@ bool HP_skill_dance_switch(struct skill_unit *su, int flag) { int HP_skill_check_condition_char_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_char_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_check_condition_char_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_char_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68524,9 +80277,9 @@ int HP_skill_check_condition_char_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_skill_check_condition_char_sub_post > 0) { 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++ ) { + 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); @@ -68538,16 +80291,16 @@ int HP_skill_check_condition_char_sub(struct block_list *bl, va_list ap) { int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_mob_master_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68557,9 +80310,9 @@ int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_skill_check_condition_mob_master_sub_post > 0) { 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++ ) { + 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); @@ -68568,16 +80321,16 @@ int HP_skill_check_condition_mob_master_sub(struct block_list *bl, va_list ap) { } return retVal___; } -void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y) { +void HP_skill_brandishspear_first(struct square *tc, enum unit_dir 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); + if (HPMHooks.count.HP_skill_brandishspear_first_pre > 0) { + void (*preHookFunc) (struct square **tc, enum unit_dir *dir, int16 *x, int16 *y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_first_pre; hIndex++ ) { + 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); + preHookFunc(&tc, &dir, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -68585,25 +80338,25 @@ void HP_skill_brandishspear_first(struct square *tc, uint8 dir, int16 x, int16 y { 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++ ) { + if (HPMHooks.count.HP_skill_brandishspear_first_post > 0) { + void (*postHookFunc) (struct square *tc, enum unit_dir 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); + postHookFunc(tc, dir, x, y); } } return; } -void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) { +void HP_skill_brandishspear_dir(struct square *tc, enum unit_dir dir, int are) { int hIndex = 0; - if( HPMHooks.count.HP_skill_brandishspear_dir_pre ) { - void (*preHookFunc) (struct square *tc, uint8 *dir, int *are); + if (HPMHooks.count.HP_skill_brandishspear_dir_pre > 0) { + void (*preHookFunc) (struct square **tc, enum unit_dir *dir, int *are); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_brandishspear_dir_pre; hIndex++ ) { + 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); + preHookFunc(&tc, &dir, &are); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -68611,26 +80364,26 @@ void HP_skill_brandishspear_dir(struct square *tc, uint8 dir, int are) { { 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++ ) { + if (HPMHooks.count.HP_skill_brandishspear_dir_post > 0) { + void (*postHookFunc) (struct square *tc, enum unit_dir 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); + postHookFunc(tc, dir, are); } } return; } -int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) { +int HP_skill_get_fixed_cast(int skill_id, int skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_fixed_cast_pre ) { - int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_skill_get_fixed_cast_pre > 0) { + int (*preHookFunc) (int *skill_id, int *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_fixed_cast_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68638,11 +80391,11 @@ int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_fixed_cast_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id, int 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); + retVal___ = postHookFunc(retVal___, skill_id, skill_lv); } } return retVal___; @@ -68650,16 +80403,16 @@ int HP_skill_get_fixed_cast(uint16 skill_id, uint16 skill_lv) { int HP_skill_sit_count(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_count_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_sit_count_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68669,9 +80422,9 @@ int HP_skill_sit_count(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.sit_count(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_sit_count_post ) { + if (HPMHooks.count.HP_skill_sit_count_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_count_post; hIndex++ ) { + 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); @@ -68683,16 +80436,16 @@ int HP_skill_sit_count(struct block_list *bl, va_list ap) { int HP_skill_sit_in(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_in_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_sit_in_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68702,9 +80455,9 @@ int HP_skill_sit_in(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.sit_in(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_sit_in_post ) { + if (HPMHooks.count.HP_skill_sit_in_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_in_post; hIndex++ ) { + 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); @@ -68716,16 +80469,16 @@ int HP_skill_sit_in(struct block_list *bl, va_list ap) { int HP_skill_sit_out(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_sit_out_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_sit_out_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68735,9 +80488,9 @@ int HP_skill_sit_out(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.sit_out(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_sit_out_post ) { + if (HPMHooks.count.HP_skill_sit_out_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_sit_out_post; hIndex++ ) { + 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); @@ -68748,14 +80501,14 @@ int HP_skill_sit_out(struct block_list *bl, va_list ap) { } 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); + if (HPMHooks.count.HP_skill_unitsetmapcell_pre > 0) { + void (*preHookFunc) (struct skill_unit **src, uint16 *skill_id, uint16 *skill_lv, cell_t *cell, bool *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetmapcell_pre; hIndex++ ) { + 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); + preHookFunc(&src, &skill_id, &skill_lv, &cell, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -68763,11 +80516,11 @@ void HP_skill_unitsetmapcell(struct skill_unit *src, uint16 skill_id, uint16 ski { 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++ ) { + if (HPMHooks.count.HP_skill_unitsetmapcell_post > 0) { + 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); + postHookFunc(src, skill_id, skill_lv, cell, flag); } } return; @@ -68775,14 +80528,14 @@ void HP_skill_unitsetmapcell(struct skill_unit *src, uint16 skill_id, uint16 ski int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_onplace_timer_pre ) { - int (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); + if (HPMHooks.count.HP_skill_unit_onplace_timer_pre > 0) { + int (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68790,28 +80543,54 @@ int HP_skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, i { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_unit_onplace_timer_post > 0) { + int (*postHookFunc) (int retVal___, struct skill_unit *src, struct block_list *bl, int64 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); + retVal___ = postHookFunc(retVal___, src, bl, tick); } } return retVal___; } +void HP_skill_unit_onplace_timer_unknown(struct skill_unit *src, struct block_list *bl, int64 *tick) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_unit_onplace_timer_unknown_pre > 0) { + void (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 **tick); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_unknown_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_unknown_pre[hIndex].func; + preHookFunc(&src, &bl, &tick); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.unit_onplace_timer_unknown(src, bl, tick); + } + if (HPMHooks.count.HP_skill_unit_onplace_timer_unknown_post > 0) { + void (*postHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_timer_unknown_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_unit_onplace_timer_unknown_post[hIndex].func; + postHookFunc(src, bl, tick); + } + } + return; +} int HP_skill_unit_effect(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_effect_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_unit_effect_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68821,9 +80600,9 @@ int HP_skill_unit_effect(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.unit_effect(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_unit_effect_post ) { + if (HPMHooks.count.HP_skill_unit_effect_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_effect_post; hIndex++ ) { + 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); @@ -68835,16 +80614,16 @@ int HP_skill_unit_effect(struct block_list *bl, va_list ap) { int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_onplace_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68854,9 +80633,9 @@ int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list 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 ) { + if (HPMHooks.count.HP_skill_unit_timer_sub_onplace_post > 0) { 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++ ) { + 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); @@ -68868,16 +80647,16 @@ int HP_skill_unit_timer_sub_onplace(struct block_list *bl, va_list ap) { int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_move_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_unit_move_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68887,9 +80666,9 @@ int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.unit_move_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_unit_move_sub_post ) { + if (HPMHooks.count.HP_skill_unit_move_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_move_sub_post; hIndex++ ) { + 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); @@ -68901,14 +80680,14 @@ int HP_skill_unit_move_sub(struct block_list *bl, va_list ap) { int HP_skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockpc_end_pre ) { + if (HPMHooks.count.HP_skill_blockpc_end_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68916,11 +80695,11 @@ int HP_skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.blockpc_end(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_blockpc_end_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockpc_end_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_blockpc_end_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -68928,14 +80707,14 @@ int HP_skill_blockpc_end(int tid, int64 tick, int id, intptr_t data) { int HP_skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockhomun_end_pre ) { + if (HPMHooks.count.HP_skill_blockhomun_end_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68943,11 +80722,11 @@ int HP_skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.blockhomun_end(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_blockhomun_end_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockhomun_end_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_blockhomun_end_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -68955,14 +80734,14 @@ int HP_skill_blockhomun_end(int tid, int64 tick, int id, intptr_t data) { int HP_skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_blockmerc_end_pre ) { + if (HPMHooks.count.HP_skill_blockmerc_end_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68970,11 +80749,11 @@ int HP_skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.blockmerc_end(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_blockmerc_end_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_blockmerc_end_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_blockmerc_end_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -68982,14 +80761,14 @@ int HP_skill_blockmerc_end(int tid, int64 tick, int id, intptr_t data) { int HP_skill_split_atoi(char *str, int *val) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_split_atoi_pre ) { - int (*preHookFunc) (char *str, int *val); + if (HPMHooks.count.HP_skill_split_atoi_pre > 0) { + int (*preHookFunc) (char **str, int **val); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&str, &val); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -68997,9 +80776,9 @@ int HP_skill_split_atoi(char *str, int *val) { { retVal___ = HPMHooks.source.skill.split_atoi(str, val); } - if( HPMHooks.count.HP_skill_split_atoi_post ) { + if (HPMHooks.count.HP_skill_split_atoi_post > 0) { int (*postHookFunc) (int retVal___, char *str, int *val); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_split_atoi_post; hIndex++ ) { + 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); } @@ -69009,14 +80788,14 @@ int HP_skill_split_atoi(char *str, int *val) { int HP_skill_unit_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_timer_pre ) { + if (HPMHooks.count.HP_skill_unit_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69024,11 +80803,11 @@ int HP_skill_unit_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.skill.unit_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_skill_unit_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_unit_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -69036,16 +80815,16 @@ int HP_skill_unit_timer(int tid, int64 tick, int id, intptr_t data) { int HP_skill_unit_timer_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_unit_timer_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_skill_unit_timer_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69055,12 +80834,12 @@ int HP_skill_unit_timer_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_timer_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_unit_timer_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } @@ -69068,14 +80847,14 @@ int HP_skill_unit_timer_sub(union DBKey key, struct DBData *data, va_list ap) { } void HP_skill_init_unit_layout(void) { int hIndex = 0; - if( HPMHooks.count.HP_skill_init_unit_layout_pre ) { + if (HPMHooks.count.HP_skill_init_unit_layout_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -69083,161 +80862,603 @@ void HP_skill_init_unit_layout(void) { { HPMHooks.source.skill.init_unit_layout(); } - if( HPMHooks.count.HP_skill_init_unit_layout_post ) { + if (HPMHooks.count.HP_skill_init_unit_layout_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_post; hIndex++ ) { + 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) { +void HP_skill_init_unit_layout_unknown(int skill_idx, int pos) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_init_unit_layout_unknown_pre > 0) { + void (*preHookFunc) (int *skill_idx, int *pos); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_unknown_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_init_unit_layout_unknown_pre[hIndex].func; + preHookFunc(&skill_idx, &pos); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.init_unit_layout_unknown(skill_idx, pos); + } + if (HPMHooks.count.HP_skill_init_unit_layout_unknown_post > 0) { + void (*postHookFunc) (int skill_idx, int pos); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_init_unit_layout_unknown_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_init_unit_layout_unknown_post[hIndex].func; + postHookFunc(skill_idx, pos); + } + } + return; +} +void HP_skill_validate_hittype(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_hittype_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_hittype_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_hittype_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_hittype(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_hittype_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_hittype_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_hittype_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_skilltype(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_skilltype_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilltype_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_skilltype_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_skilltype(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_skilltype_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilltype_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_skilltype_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_attacktype(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_attacktype_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_attacktype_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_attacktype_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_attacktype(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_attacktype_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_attacktype_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_attacktype_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_element(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_element_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_element_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_element_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_element(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_element_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_element_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_element_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_skillinfo(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_skillinfo_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skillinfo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_skillinfo_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_skillinfo(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_skillinfo_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skillinfo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_skillinfo_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_damagetype(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_damagetype_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_damagetype_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_damagetype_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_damagetype(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_damagetype_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_damagetype_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_damagetype_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_castnodex(struct config_setting_t *conf, struct s_skill_db *sk, bool delay) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_castnodex_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk, bool *delay); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_castnodex_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_castnodex_pre[hIndex].func; + preHookFunc(&conf, &sk, &delay); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_castnodex(conf, sk, delay); + } + if (HPMHooks.count.HP_skill_validate_castnodex_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk, bool delay); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_castnodex_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_castnodex_post[hIndex].func; + postHookFunc(conf, sk, delay); + } + } + return; +} +void HP_skill_validate_weapontype(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_weapontype_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_weapontype_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_weapontype(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_weapontype_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_weapontype_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_ammotype(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_ammotype_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_ammotype_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_ammotype(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_ammotype_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_ammotype_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_state(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_state_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_state_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_state_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_state(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_state_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_state_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_state_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_item_requirements(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_item_requirements_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_item_requirements_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_item_requirements_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_item_requirements(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_item_requirements_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_item_requirements_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_item_requirements_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_unit_target(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_unit_target_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_target_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_unit_target_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_unit_target(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_unit_target_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_target_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_unit_target_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_unit_flag(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_unit_flag_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_unit_flag(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_unit_flag_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +void HP_skill_validate_additional_fields(struct config_setting_t *conf, struct s_skill_db *sk) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_validate_additional_fields_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, struct s_skill_db **sk); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_additional_fields_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_additional_fields_pre[hIndex].func; + preHookFunc(&conf, &sk); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.validate_additional_fields(conf, sk); + } + if (HPMHooks.count.HP_skill_validate_additional_fields_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_additional_fields_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_additional_fields_post[hIndex].func; + postHookFunc(conf, sk); + } + } + return; +} +bool HP_skill_validate_skilldb(struct s_skill_db *skt, const char *source) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_skilldb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + if (HPMHooks.count.HP_skill_validate_skilldb_pre > 0) { + bool (*preHookFunc) (struct s_skill_db **skt, const char **source); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilldb_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_skilldb_pre[hIndex].func; + retVal___ = preHookFunc(&skt, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.skill.parse_row_skilldb(split, columns, current); + retVal___ = HPMHooks.source.skill.validate_skilldb(skt, source); } - 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); + if (HPMHooks.count.HP_skill_validate_skilldb_post > 0) { + bool (*postHookFunc) (bool retVal___, struct s_skill_db *skt, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_skilldb_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_skilldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skt, source); } } return retVal___; } -bool HP_skill_parse_row_requiredb(char *split[], int columns, int current) { +int HP_skill_validate_weapontype_sub(const char *type, bool on, struct s_skill_db *sk) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_requiredb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + int retVal___ = 0; + if (HPMHooks.count.HP_skill_validate_weapontype_sub_pre > 0) { + int (*preHookFunc) (const char **type, bool *on, struct s_skill_db **sk); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_weapontype_sub_pre[hIndex].func; + retVal___ = preHookFunc(&type, &on, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.skill.parse_row_requiredb(split, columns, current); + retVal___ = HPMHooks.source.skill.validate_weapontype_sub(type, on, sk); } - 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); + if (HPMHooks.count.HP_skill_validate_weapontype_sub_post > 0) { + int (*postHookFunc) (int retVal___, const char *type, bool on, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_weapontype_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_weapontype_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type, on, sk); } } return retVal___; } -bool HP_skill_parse_row_castdb(char *split[], int columns, int current) { +int HP_skill_validate_ammotype_sub(const char *type, bool on, struct s_skill_db *sk) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_castdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + int retVal___ = 0; + if (HPMHooks.count.HP_skill_validate_ammotype_sub_pre > 0) { + int (*preHookFunc) (const char **type, bool *on, struct s_skill_db **sk); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_ammotype_sub_pre[hIndex].func; + retVal___ = preHookFunc(&type, &on, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.skill.parse_row_castdb(split, columns, current); + retVal___ = HPMHooks.source.skill.validate_ammotype_sub(type, on, sk); } - 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); + if (HPMHooks.count.HP_skill_validate_ammotype_sub_post > 0) { + int (*postHookFunc) (int retVal___, const char *type, bool on, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_ammotype_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_ammotype_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type, on, sk); } } return retVal___; } -bool HP_skill_parse_row_castnodexdb(char *split[], int columns, int current) { +int HP_skill_validate_unit_flag_sub(const char *type, bool on, struct s_skill_db *sk) { int hIndex = 0; - bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_castnodexdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + int retVal___ = 0; + if (HPMHooks.count.HP_skill_validate_unit_flag_sub_pre > 0) { + int (*preHookFunc) (const char **type, bool *on, struct s_skill_db **sk); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_sub_pre[hIndex].func; + retVal___ = preHookFunc(&type, &on, &sk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.skill.parse_row_castnodexdb(split, columns, current); + retVal___ = HPMHooks.source.skill.validate_unit_flag_sub(type, on, sk); } - 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); + if (HPMHooks.count.HP_skill_validate_unit_flag_sub_post > 0) { + int (*postHookFunc) (int retVal___, const char *type, bool on, struct s_skill_db *sk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_validate_unit_flag_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_validate_unit_flag_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type, on, sk); } } return retVal___; } -bool HP_skill_parse_row_unitdb(char *split[], int columns, int current) { +bool HP_skill_read_skilldb(const char *filename) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_unitdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + if (HPMHooks.count.HP_skill_read_skilldb_pre > 0) { + bool (*preHookFunc) (const char **filename); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_skilldb_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_read_skilldb_pre[hIndex].func; + retVal___ = preHookFunc(&filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.skill.parse_row_unitdb(split, columns, current); + retVal___ = HPMHooks.source.skill.read_skilldb(filename); } - 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); + if (HPMHooks.count.HP_skill_read_skilldb_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *filename); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_read_skilldb_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_read_skilldb_post[hIndex].func; + retVal___ = postHookFunc(retVal___, filename); } } return retVal___; } +void HP_skill_config_set_level(struct config_setting_t *conf, int *arr) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_config_set_level_pre > 0) { + void (*preHookFunc) (struct config_setting_t **conf, int **arr); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_config_set_level_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_config_set_level_pre[hIndex].func; + preHookFunc(&conf, &arr); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.config_set_level(conf, arr); + } + if (HPMHooks.count.HP_skill_config_set_level_post > 0) { + void (*postHookFunc) (struct config_setting_t *conf, int *arr); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_config_set_level_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_config_set_level_post[hIndex].func; + postHookFunc(conf, arr); + } + } + return; +} +void HP_skill_level_set_value(int *arr, int value) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_level_set_value_pre > 0) { + void (*preHookFunc) (int **arr, int *value); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_level_set_value_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_level_set_value_pre[hIndex].func; + preHookFunc(&arr, &value); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.level_set_value(arr, value); + } + if (HPMHooks.count.HP_skill_level_set_value_post > 0) { + void (*postHookFunc) (int *arr, int value); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_level_set_value_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_level_set_value_post[hIndex].func; + postHookFunc(arr, value); + } + } + return; +} bool HP_skill_parse_row_producedb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_producedb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + if (HPMHooks.count.HP_skill_parse_row_producedb_pre > 0) { + bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_producedb_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&split, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69245,11 +81466,11 @@ bool HP_skill_parse_row_producedb(char *split[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_skill_parse_row_producedb_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, split, columns, current); } } return retVal___; @@ -69257,14 +81478,14 @@ bool HP_skill_parse_row_producedb(char *split[], int columns, int current) { bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_createarrowdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + if (HPMHooks.count.HP_skill_parse_row_createarrowdb_pre > 0) { + bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_createarrowdb_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&split, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69272,11 +81493,11 @@ bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_skill_parse_row_createarrowdb_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, split, columns, current); } } return retVal___; @@ -69284,14 +81505,14 @@ bool HP_skill_parse_row_createarrowdb(char *split[], int columns, int current) { bool HP_skill_parse_row_abradb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_abradb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + if (HPMHooks.count.HP_skill_parse_row_abradb_pre > 0) { + bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_abradb_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&split, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69299,11 +81520,11 @@ bool HP_skill_parse_row_abradb(char *split[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_skill_parse_row_abradb_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, split, columns, current); } } return retVal___; @@ -69311,14 +81532,14 @@ bool HP_skill_parse_row_abradb(char *split[], int columns, int current) { bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_spellbookdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + if (HPMHooks.count.HP_skill_parse_row_spellbookdb_pre > 0) { + bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_spellbookdb_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&split, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69326,11 +81547,11 @@ bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_skill_parse_row_spellbookdb_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, split, columns, current); } } return retVal___; @@ -69338,14 +81559,14 @@ bool HP_skill_parse_row_spellbookdb(char *split[], int columns, int current) { bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre ) { - bool (*preHookFunc) (char *split[], int *column, int *current); + if (HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre > 0) { + bool (*preHookFunc) (char **split[], int *column, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_magicmushroomdb_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&split, &column, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69353,38 +81574,11 @@ bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current) { 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++ ) { + if (HPMHooks.count.HP_skill_parse_row_magicmushroomdb_post > 0) { + 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___ = false; - if( HPMHooks.count.HP_skill_parse_row_reproducedb_pre ) { - bool (*preHookFunc) (char *split[], int *column, int *current); - *HPMforce_return = false; - 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); + retVal___ = postHookFunc(retVal___, split, column, current); } } return retVal___; @@ -69392,14 +81586,14 @@ bool HP_skill_parse_row_reproducedb(char *split[], int column, int current) { bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_improvisedb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + if (HPMHooks.count.HP_skill_parse_row_improvisedb_pre > 0) { + bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_improvisedb_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&split, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69407,11 +81601,11 @@ bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_skill_parse_row_improvisedb_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, split, columns, current); } } return retVal___; @@ -69419,14 +81613,14 @@ bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) { bool HP_skill_parse_row_changematerialdb(char *split[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_parse_row_changematerialdb_pre ) { - bool (*preHookFunc) (char *split[], int *columns, int *current); + if (HPMHooks.count.HP_skill_parse_row_changematerialdb_pre > 0) { + bool (*preHookFunc) (char **split[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_changematerialdb_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&split, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69434,25 +81628,25 @@ bool HP_skill_parse_row_changematerialdb(char *split[], int columns, int current { 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++ ) { + if (HPMHooks.count.HP_skill_parse_row_changematerialdb_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, split, columns, current); } } 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); + if (HPMHooks.count.HP_skill_usave_add_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_add_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -69460,25 +81654,25 @@ void HP_skill_usave_add(struct map_session_data *sd, uint16 skill_id, uint16 ski { 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++ ) { + if (HPMHooks.count.HP_skill_usave_add_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_skill_usave_trigger_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_usave_trigger_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -69486,9 +81680,9 @@ void HP_skill_usave_trigger(struct map_session_data *sd) { { HPMHooks.source.skill.usave_trigger(sd); } - if( HPMHooks.count.HP_skill_usave_trigger_post ) { + if (HPMHooks.count.HP_skill_usave_trigger_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_usave_trigger_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_usave_trigger_post[hIndex].func; postHookFunc(sd); } @@ -69497,14 +81691,14 @@ void HP_skill_usave_trigger(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_skill_cooldown_load_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_cooldown_load_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -69512,9 +81706,9 @@ void HP_skill_cooldown_load(struct map_session_data *sd) { { HPMHooks.source.skill.cooldown_load(sd); } - if( HPMHooks.count.HP_skill_cooldown_load_post ) { + if (HPMHooks.count.HP_skill_cooldown_load_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_load_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_cooldown_load_post[hIndex].func; postHookFunc(sd); } @@ -69524,14 +81718,14 @@ void HP_skill_cooldown_load(struct map_session_data *sd) { int HP_skill_spellbook(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_spellbook_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid); + if (HPMHooks.count.HP_skill_spellbook_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_spellbook_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_spellbook_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + retVal___ = preHookFunc(&sd, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69539,11 +81733,11 @@ int HP_skill_spellbook(struct map_session_data *sd, int nameid) { { 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++ ) { + if (HPMHooks.count.HP_skill_spellbook_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, nameid); } } return retVal___; @@ -69551,14 +81745,14 @@ int HP_skill_spellbook(struct map_session_data *sd, int nameid) { int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_block_check_pre ) { - int (*preHookFunc) (struct block_list *bl, enum sc_type *type, uint16 *skill_id); + if (HPMHooks.count.HP_skill_block_check_pre > 0) { + int (*preHookFunc) (struct block_list **bl, enum sc_type *type, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_block_check_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &type, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69566,11 +81760,11 @@ int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_ { 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++ ) { + if (HPMHooks.count.HP_skill_block_check_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, type, skill_id); } } return retVal___; @@ -69578,16 +81772,16 @@ int HP_skill_block_check(struct block_list *bl, enum sc_type type, uint16 skill_ int HP_skill_detonator(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_detonator_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_skill_detonator_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69597,9 +81791,9 @@ int HP_skill_detonator(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.skill.detonator(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_skill_detonator_post ) { + if (HPMHooks.count.HP_skill_detonator_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_detonator_post; hIndex++ ) { + 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); @@ -69611,14 +81805,14 @@ int HP_skill_detonator(struct block_list *bl, va_list ap) { bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry *sce) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_check_camouflage_pre ) { - bool (*preHookFunc) (struct block_list *bl, struct status_change_entry *sce); + if (HPMHooks.count.HP_skill_check_camouflage_pre > 0) { + bool (*preHookFunc) (struct block_list **bl, struct status_change_entry **sce); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_camouflage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sce); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69626,9 +81820,9 @@ bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry { retVal___ = HPMHooks.source.skill.check_camouflage(bl, sce); } - if( HPMHooks.count.HP_skill_check_camouflage_post ) { + if (HPMHooks.count.HP_skill_check_camouflage_post > 0) { 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++ ) { + 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); } @@ -69638,14 +81832,14 @@ bool HP_skill_check_camouflage(struct block_list *bl, struct status_change_entry int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_magicdecoy_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid); + if (HPMHooks.count.HP_skill_magicdecoy_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_magicdecoy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_magicdecoy_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + retVal___ = preHookFunc(&sd, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69653,11 +81847,11 @@ int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) { { 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++ ) { + if (HPMHooks.count.HP_skill_magicdecoy_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, nameid); } } return retVal___; @@ -69665,14 +81859,14 @@ int HP_skill_magicdecoy(struct map_session_data *sd, int nameid) { int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_poisoningweapon_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *nameid); + if (HPMHooks.count.HP_skill_poisoningweapon_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_poisoningweapon_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_poisoningweapon_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + retVal___ = preHookFunc(&sd, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69680,11 +81874,11 @@ int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) { { 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++ ) { + if (HPMHooks.count.HP_skill_poisoningweapon_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, nameid); } } return retVal___; @@ -69692,14 +81886,14 @@ int HP_skill_poisoningweapon(struct map_session_data *sd, int nameid) { int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_select_menu_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id); + if (HPMHooks.count.HP_skill_select_menu_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_select_menu_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69707,11 +81901,11 @@ int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) { { 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++ ) { + if (HPMHooks.count.HP_skill_select_menu_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, skill_id); } } return retVal___; @@ -69719,14 +81913,14 @@ int HP_skill_select_menu(struct map_session_data *sd, uint16 skill_id) { int HP_skill_elementalanalysis(struct map_session_data *sd, uint16 skill_lv, const struct itemlist *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_elementalanalysis_pre ) { - int (*preHookFunc) (struct map_session_data *sd, uint16 *skill_lv, const struct itemlist *item_list); + if (HPMHooks.count.HP_skill_elementalanalysis_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, uint16 *skill_lv, const struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_elementalanalysis_pre[hIndex].func; - retVal___ = preHookFunc(sd, &skill_lv, item_list); + retVal___ = preHookFunc(&sd, &skill_lv, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69734,11 +81928,11 @@ int HP_skill_elementalanalysis(struct map_session_data *sd, uint16 skill_lv, con { retVal___ = HPMHooks.source.skill.elementalanalysis(sd, skill_lv, item_list); } - if( HPMHooks.count.HP_skill_elementalanalysis_post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 *skill_lv, const struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_elementalanalysis_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_elementalanalysis_post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, uint16 skill_lv, const struct itemlist *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, &skill_lv, item_list); + retVal___ = postHookFunc(retVal___, sd, skill_lv, item_list); } } return retVal___; @@ -69746,14 +81940,14 @@ int HP_skill_elementalanalysis(struct map_session_data *sd, uint16 skill_lv, con int HP_skill_changematerial(struct map_session_data *sd, const struct itemlist *item_list) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_changematerial_pre ) { - int (*preHookFunc) (struct map_session_data *sd, const struct itemlist *item_list); + if (HPMHooks.count.HP_skill_changematerial_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, const struct itemlist **item_list); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_changematerial_pre[hIndex].func; - retVal___ = preHookFunc(sd, item_list); + retVal___ = preHookFunc(&sd, &item_list); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69761,9 +81955,9 @@ int HP_skill_changematerial(struct map_session_data *sd, const struct itemlist * { retVal___ = HPMHooks.source.skill.changematerial(sd, item_list); } - if( HPMHooks.count.HP_skill_changematerial_post ) { + if (HPMHooks.count.HP_skill_changematerial_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd, const struct itemlist *item_list); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_changematerial_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_changematerial_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, item_list); } @@ -69773,14 +81967,14 @@ int HP_skill_changematerial(struct map_session_data *sd, const struct itemlist * int HP_skill_get_elemental_type(uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_elemental_type_pre ) { + if (HPMHooks.count.HP_skill_get_elemental_type_pre > 0) { int (*preHookFunc) (uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_elemental_type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69788,25 +81982,25 @@ int HP_skill_get_elemental_type(uint16 skill_id, uint16 skill_lv) { { 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++ ) { + if (HPMHooks.count.HP_skill_get_elemental_type_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_skill_cooldown_save_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_cooldown_save_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -69814,9 +82008,9 @@ void HP_skill_cooldown_save(struct map_session_data *sd) { { HPMHooks.source.skill.cooldown_save(sd); } - if( HPMHooks.count.HP_skill_cooldown_save_post ) { + if (HPMHooks.count.HP_skill_cooldown_save_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cooldown_save_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_cooldown_save_post[hIndex].func; postHookFunc(sd); } @@ -69826,14 +82020,14 @@ void HP_skill_cooldown_save(struct map_session_data *sd) { int HP_skill_get_new_group_id(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_get_new_group_id_pre ) { + if (HPMHooks.count.HP_skill_get_new_group_id_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69841,9 +82035,9 @@ int HP_skill_get_new_group_id(void) { { retVal___ = HPMHooks.source.skill.get_new_group_id(); } - if( HPMHooks.count.HP_skill_get_new_group_id_post ) { + if (HPMHooks.count.HP_skill_get_new_group_id_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_new_group_id_post; hIndex++ ) { + 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___); } @@ -69853,14 +82047,14 @@ int HP_skill_get_new_group_id(void) { bool HP_skill_check_shadowform(struct block_list *bl, int64 damage, int hit) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_check_shadowform_pre ) { - bool (*preHookFunc) (struct block_list *bl, int64 *damage, int *hit); + if (HPMHooks.count.HP_skill_check_shadowform_pre > 0) { + bool (*preHookFunc) (struct block_list **bl, int64 *damage, int *hit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_shadowform_pre[hIndex].func; - retVal___ = preHookFunc(bl, &damage, &hit); + retVal___ = preHookFunc(&bl, &damage, &hit); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69868,11 +82062,11 @@ bool HP_skill_check_shadowform(struct block_list *bl, int64 damage, int hit) { { retVal___ = HPMHooks.source.skill.check_shadowform(bl, damage, hit); } - if( HPMHooks.count.HP_skill_check_shadowform_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *bl, int64 *damage, int *hit); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_check_shadowform_post > 0) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl, int64 damage, int hit); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_shadowform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_shadowform_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &damage, &hit); + retVal___ = postHookFunc(retVal___, bl, damage, hit); } } return retVal___; @@ -69880,14 +82074,14 @@ bool HP_skill_check_shadowform(struct block_list *bl, int64 damage, int hit) { bool HP_skill_castend_damage_id_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_damage_id_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc); + if (HPMHooks.count.HP_skill_castend_damage_id_unknown_pre > 0) { + bool (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, struct status_data **tstatus, struct status_change **sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_damage_id_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag, tstatus, sc); + retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag, &tstatus, &sc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -69895,9 +82089,9 @@ bool HP_skill_castend_damage_id_unknown(struct block_list *src, struct block_lis { retVal___ = HPMHooks.source.skill.castend_damage_id_unknown(src, bl, skill_id, skill_lv, tick, flag, tstatus, sc); } - if( HPMHooks.count.HP_skill_castend_damage_id_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_damage_id_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_data *tstatus, struct status_change *sc); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_damage_id_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_damage_id_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag, tstatus, sc); } @@ -69906,14 +82100,14 @@ bool HP_skill_castend_damage_id_unknown(struct block_list *src, struct block_lis } void HP_skill_additional_effect_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick) { int hIndex = 0; - if( HPMHooks.count.HP_skill_additional_effect_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); + if (HPMHooks.count.HP_skill_additional_effect_unknown_pre > 0) { + void (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int **attack_type, int **dmg_lv, int64 **tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_additional_effect_unknown_pre[hIndex].func; - preHookFunc(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); + preHookFunc(&src, &bl, &skill_id, &skill_lv, &attack_type, &dmg_lv, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -69921,9 +82115,9 @@ void HP_skill_additional_effect_unknown(struct block_list *src, struct block_lis { HPMHooks.source.skill.additional_effect_unknown(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); } - if( HPMHooks.count.HP_skill_additional_effect_unknown_post ) { + if (HPMHooks.count.HP_skill_additional_effect_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int *dmg_lv, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_additional_effect_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_additional_effect_unknown_post[hIndex].func; postHookFunc(src, bl, skill_id, skill_lv, attack_type, dmg_lv, tick); } @@ -69932,14 +82126,14 @@ void HP_skill_additional_effect_unknown(struct block_list *src, struct block_lis } void HP_skill_counter_additional_effect_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick) { int hIndex = 0; - if( HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); + if (HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre > 0) { + void (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int **attack_type, int64 **tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_unknown_pre[hIndex].func; - preHookFunc(src, bl, skill_id, skill_lv, attack_type, tick); + preHookFunc(&src, &bl, &skill_id, &skill_lv, &attack_type, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -69947,9 +82141,9 @@ void HP_skill_counter_additional_effect_unknown(struct block_list *src, struct b { HPMHooks.source.skill.counter_additional_effect_unknown(src, bl, skill_id, skill_lv, attack_type, tick); } - if( HPMHooks.count.HP_skill_counter_additional_effect_unknown_post ) { + if (HPMHooks.count.HP_skill_counter_additional_effect_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int *attack_type, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_counter_additional_effect_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_counter_additional_effect_unknown_post[hIndex].func; postHookFunc(src, bl, skill_id, skill_lv, attack_type, tick); } @@ -69958,14 +82152,14 @@ void HP_skill_counter_additional_effect_unknown(struct block_list *src, struct b } void HP_skill_attack_combo1_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_combo1_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo); + if (HPMHooks.count.HP_skill_attack_combo1_unknown_pre > 0) { + void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, struct status_change_entry **sce, int **combo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_combo1_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, sce, combo); + preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag, &sce, &combo); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -69973,9 +82167,9 @@ void HP_skill_attack_combo1_unknown(int *attack_type, struct block_list *src, st { HPMHooks.source.skill.attack_combo1_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, sce, combo); } - if( HPMHooks.count.HP_skill_attack_combo1_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_combo1_unknown_post > 0) { void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, struct status_change_entry *sce, int *combo); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo1_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_combo1_unknown_post[hIndex].func; postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, sce, combo); } @@ -69984,14 +82178,14 @@ void HP_skill_attack_combo1_unknown(int *attack_type, struct block_list *src, st } void HP_skill_attack_combo2_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_combo2_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo); + if (HPMHooks.count.HP_skill_attack_combo2_unknown_pre > 0) { + void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **combo); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_combo2_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, combo); + preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag, &combo); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -69999,9 +82193,9 @@ void HP_skill_attack_combo2_unknown(int *attack_type, struct block_list *src, st { HPMHooks.source.skill.attack_combo2_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, combo); } - if( HPMHooks.count.HP_skill_attack_combo2_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_combo2_unknown_post > 0) { void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *combo); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_combo2_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_combo2_unknown_post[hIndex].func; postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, combo); } @@ -70010,14 +82204,14 @@ void HP_skill_attack_combo2_unknown(int *attack_type, struct block_list *src, st } void HP_skill_attack_display_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_display_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage); + if (HPMHooks.count.HP_skill_attack_display_unknown_pre > 0) { + void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_display_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage); + preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag, &type, &dmg, &damage); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70025,9 +82219,9 @@ void HP_skill_attack_display_unknown(int *attack_type, struct block_list *src, s { HPMHooks.source.skill.attack_display_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage); } - if( HPMHooks.count.HP_skill_attack_display_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_display_unknown_post > 0) { void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_display_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_display_unknown_post[hIndex].func; postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage); } @@ -70037,14 +82231,14 @@ void HP_skill_attack_display_unknown(int *attack_type, struct block_list *src, s int HP_skill_attack_copy_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_attack_copy_unknown_pre ) { - int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_attack_copy_unknown_pre > 0) { + int (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_copy_unknown_pre[hIndex].func; - retVal___ = preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + retVal___ = preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70052,9 +82246,9 @@ int HP_skill_attack_copy_unknown(int *attack_type, struct block_list *src, struc { retVal___ = HPMHooks.source.skill.attack_copy_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_attack_copy_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_copy_unknown_post > 0) { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_copy_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_copy_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } @@ -70064,14 +82258,14 @@ int HP_skill_attack_copy_unknown(int *attack_type, struct block_list *src, struc int HP_skill_attack_dir_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_attack_dir_unknown_pre ) { - int (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_attack_dir_unknown_pre > 0) { + int (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_dir_unknown_pre[hIndex].func; - retVal___ = preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + retVal___ = preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70079,25 +82273,25 @@ int HP_skill_attack_dir_unknown(int *attack_type, struct block_list *src, struct { retVal___ = HPMHooks.source.skill.attack_dir_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_attack_dir_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_dir_unknown_post > 0) { 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, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_dir_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_dir_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } } return retVal___; } -void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir) { +void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, enum unit_dir *dir) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_blow_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir); + if (HPMHooks.count.HP_skill_attack_blow_unknown_pre > 0) { + void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag, int **type, struct Damage **dmg, int64 **damage, enum unit_dir **dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); + preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag, &type, &dmg, &damage, &dir); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70105,9 +82299,9 @@ void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, stru { HPMHooks.source.skill.attack_blow_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); } - if( HPMHooks.count.HP_skill_attack_blow_unknown_post ) { - void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_attack_blow_unknown_post > 0) { + void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, enum unit_dir *dir); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_blow_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_blow_unknown_post[hIndex].func; postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag, type, dmg, damage, dir); } @@ -70116,14 +82310,14 @@ void HP_skill_attack_blow_unknown(int *attack_type, struct block_list *src, stru } void HP_skill_attack_post_unknown(int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; - if( HPMHooks.count.HP_skill_attack_post_unknown_pre ) { - void (*preHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_attack_post_unknown_pre > 0) { + void (*preHookFunc) (int **attack_type, struct block_list **src, struct block_list **dsrc, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_attack_post_unknown_pre[hIndex].func; - preHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); + preHookFunc(&attack_type, &src, &dsrc, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70131,9 +82325,9 @@ void HP_skill_attack_post_unknown(int *attack_type, struct block_list *src, stru { HPMHooks.source.skill.attack_post_unknown(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_attack_post_unknown_post ) { + if (HPMHooks.count.HP_skill_attack_post_unknown_post > 0) { void (*postHookFunc) (int *attack_type, struct block_list *src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_attack_post_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_attack_post_unknown_post[hIndex].func; postHookFunc(attack_type, src, dsrc, bl, skill_id, skill_lv, tick, flag); } @@ -70143,14 +82337,14 @@ void HP_skill_attack_post_unknown(int *attack_type, struct block_list *src, stru bool HP_skill_timerskill_dead_unknown(struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_timerskill_dead_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); + if (HPMHooks.count.HP_skill_timerskill_dead_unknown_pre > 0) { + bool (*preHookFunc) (struct block_list **src, struct unit_data **ud, struct skill_timerskill **skl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_timerskill_dead_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, ud, skl); + retVal___ = preHookFunc(&src, &ud, &skl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70158,9 +82352,9 @@ bool HP_skill_timerskill_dead_unknown(struct block_list *src, struct unit_data * { retVal___ = HPMHooks.source.skill.timerskill_dead_unknown(src, ud, skl); } - if( HPMHooks.count.HP_skill_timerskill_dead_unknown_post ) { + if (HPMHooks.count.HP_skill_timerskill_dead_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_dead_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_timerskill_dead_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, ud, skl); } @@ -70169,14 +82363,14 @@ bool HP_skill_timerskill_dead_unknown(struct block_list *src, struct unit_data * } void HP_skill_timerskill_target_unknown(int tid, int64 tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl) { int hIndex = 0; - if( HPMHooks.count.HP_skill_timerskill_target_unknown_pre ) { - void (*preHookFunc) (int *tid, int64 *tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl); + if (HPMHooks.count.HP_skill_timerskill_target_unknown_pre > 0) { + void (*preHookFunc) (int *tid, int64 *tick, struct block_list **src, struct block_list **target, struct unit_data **ud, struct skill_timerskill **skl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_timerskill_target_unknown_pre[hIndex].func; - preHookFunc(&tid, &tick, src, target, ud, skl); + preHookFunc(&tid, &tick, &src, &target, &ud, &skl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70184,25 +82378,25 @@ void HP_skill_timerskill_target_unknown(int tid, int64 tick, struct block_list * { HPMHooks.source.skill.timerskill_target_unknown(tid, tick, src, target, ud, skl); } - if( HPMHooks.count.HP_skill_timerskill_target_unknown_post ) { - void (*postHookFunc) (int *tid, int64 *tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_timerskill_target_unknown_post > 0) { + void (*postHookFunc) (int tid, int64 tick, struct block_list *src, struct block_list *target, struct unit_data *ud, struct skill_timerskill *skl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_target_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_timerskill_target_unknown_post[hIndex].func; - postHookFunc(&tid, &tick, src, target, ud, skl); + postHookFunc(tid, tick, src, target, ud, skl); } } return; } void HP_skill_timerskill_notarget_unknown(int tid, int64 tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl) { int hIndex = 0; - if( HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre ) { - void (*preHookFunc) (int *tid, int64 *tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); + if (HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre > 0) { + void (*preHookFunc) (int *tid, int64 *tick, struct block_list **src, struct unit_data **ud, struct skill_timerskill **skl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_timerskill_notarget_unknown_pre[hIndex].func; - preHookFunc(&tid, &tick, src, ud, skl); + preHookFunc(&tid, &tick, &src, &ud, &skl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70210,11 +82404,11 @@ void HP_skill_timerskill_notarget_unknown(int tid, int64 tick, struct block_list { HPMHooks.source.skill.timerskill_notarget_unknown(tid, tick, src, ud, skl); } - if( HPMHooks.count.HP_skill_timerskill_notarget_unknown_post ) { - void (*postHookFunc) (int *tid, int64 *tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_timerskill_notarget_unknown_post > 0) { + void (*postHookFunc) (int tid, int64 tick, struct block_list *src, struct unit_data *ud, struct skill_timerskill *skl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_timerskill_notarget_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_timerskill_notarget_unknown_post[hIndex].func; - postHookFunc(&tid, &tick, src, ud, skl); + postHookFunc(tid, tick, src, ud, skl); } } return; @@ -70222,14 +82416,14 @@ void HP_skill_timerskill_notarget_unknown(int tid, int64 tick, struct block_list bool HP_skill_cleartimerskill_exception(int skill_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_cleartimerskill_exception_pre ) { + if (HPMHooks.count.HP_skill_cleartimerskill_exception_pre > 0) { bool (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_cleartimerskill_exception_pre[hIndex].func; retVal___ = preHookFunc(&skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70237,11 +82431,11 @@ bool HP_skill_cleartimerskill_exception(int skill_id) { { retVal___ = HPMHooks.source.skill.cleartimerskill_exception(skill_id); } - if( HPMHooks.count.HP_skill_cleartimerskill_exception_post ) { - bool (*postHookFunc) (bool retVal___, int *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_cleartimerskill_exception_post > 0) { + bool (*postHookFunc) (bool retVal___, int skill_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_cleartimerskill_exception_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_cleartimerskill_exception_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &skill_id); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; @@ -70249,14 +82443,14 @@ bool HP_skill_cleartimerskill_exception(int skill_id) { bool HP_skill_castend_id_unknown(struct unit_data *ud, struct block_list *src, struct block_list *target) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_id_unknown_pre ) { - bool (*preHookFunc) (struct unit_data *ud, struct block_list *src, struct block_list *target); + if (HPMHooks.count.HP_skill_castend_id_unknown_pre > 0) { + bool (*preHookFunc) (struct unit_data **ud, struct block_list **src, struct block_list **target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_id_unknown_pre[hIndex].func; - retVal___ = preHookFunc(ud, src, target); + retVal___ = preHookFunc(&ud, &src, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70264,9 +82458,9 @@ bool HP_skill_castend_id_unknown(struct unit_data *ud, struct block_list *src, s { retVal___ = HPMHooks.source.skill.castend_id_unknown(ud, src, target); } - if( HPMHooks.count.HP_skill_castend_id_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_id_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct unit_data *ud, struct block_list *src, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_id_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_id_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, ud, src, target); } @@ -70276,14 +82470,14 @@ bool HP_skill_castend_id_unknown(struct unit_data *ud, struct block_list *src, s bool HP_skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre > 0) { + bool (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_dead_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); + retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70291,9 +82485,9 @@ bool HP_skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct bl { retVal___ = HPMHooks.source.skill.castend_nodamage_id_dead_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_dead_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_dead_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } @@ -70303,14 +82497,14 @@ bool HP_skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct bl bool HP_skill_castend_nodamage_id_undead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre > 0) { + bool (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_undead_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); + retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70318,9 +82512,9 @@ bool HP_skill_castend_nodamage_id_undead_unknown(struct block_list *src, struct { retVal___ = HPMHooks.source.skill.castend_nodamage_id_undead_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_undead_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_undead_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } @@ -70330,14 +82524,14 @@ bool HP_skill_castend_nodamage_id_undead_unknown(struct block_list *src, struct bool HP_skill_castend_nodamage_id_mado_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre > 0) { + bool (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_mado_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); + retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70345,9 +82539,9 @@ bool HP_skill_castend_nodamage_id_mado_unknown(struct block_list *src, struct bl { retVal___ = HPMHooks.source.skill.castend_nodamage_id_mado_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_mado_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_mado_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } @@ -70357,14 +82551,14 @@ bool HP_skill_castend_nodamage_id_mado_unknown(struct block_list *src, struct bl bool HP_skill_castend_nodamage_id_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre > 0) { + bool (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, skill_id, skill_lv, tick, flag); + retVal___ = preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70372,9 +82566,9 @@ bool HP_skill_castend_nodamage_id_unknown(struct block_list *src, struct block_l { retVal___ = HPMHooks.source.skill.castend_nodamage_id_unknown(src, bl, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, bl, skill_id, skill_lv, tick, flag); } @@ -70383,14 +82577,14 @@ bool HP_skill_castend_nodamage_id_unknown(struct block_list *src, struct block_l } void HP_skill_castend_pos2_effect_unknown(struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; - if( HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre > 0) { + void (*preHookFunc) (struct block_list **src, int **x, int **y, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_pos2_effect_unknown_pre[hIndex].func; - preHookFunc(src, x, y, skill_id, skill_lv, tick, flag); + preHookFunc(&src, &x, &y, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70398,9 +82592,9 @@ void HP_skill_castend_pos2_effect_unknown(struct block_list *src, int *x, int *y { HPMHooks.source.skill.castend_pos2_effect_unknown(src, x, y, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_effect_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_pos2_effect_unknown_post[hIndex].func; postHookFunc(src, x, y, skill_id, skill_lv, tick, flag); } @@ -70410,14 +82604,14 @@ void HP_skill_castend_pos2_effect_unknown(struct block_list *src, int *x, int *y bool HP_skill_castend_pos2_unknown(struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_castend_pos2_unknown_pre ) { - bool (*preHookFunc) (struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + if (HPMHooks.count.HP_skill_castend_pos2_unknown_pre > 0) { + bool (*preHookFunc) (struct block_list **src, int **x, int **y, uint16 **skill_id, uint16 **skill_lv, int64 **tick, int **flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_castend_pos2_unknown_pre[hIndex].func; - retVal___ = preHookFunc(src, x, y, skill_id, skill_lv, tick, flag); + retVal___ = preHookFunc(&src, &x, &y, &skill_id, &skill_lv, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70425,9 +82619,9 @@ bool HP_skill_castend_pos2_unknown(struct block_list *src, int *x, int *y, uint1 { retVal___ = HPMHooks.source.skill.castend_pos2_unknown(src, x, y, skill_id, skill_lv, tick, flag); } - if( HPMHooks.count.HP_skill_castend_pos2_unknown_post ) { + if (HPMHooks.count.HP_skill_castend_pos2_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct block_list *src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_pos2_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_castend_pos2_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, src, x, y, skill_id, skill_lv, tick, flag); } @@ -70436,14 +82630,14 @@ bool HP_skill_castend_pos2_unknown(struct block_list *src, int *x, int *y, uint1 } void HP_skill_unitsetting1_unknown(struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3) { int hIndex = 0; - if( HPMHooks.count.HP_skill_unitsetting1_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3); + if (HPMHooks.count.HP_skill_unitsetting1_unknown_pre > 0) { + void (*preHookFunc) (struct block_list **src, uint16 **skill_id, uint16 **skill_lv, int16 **x, int16 **y, int **flag, int **val1, int **val2, int **val3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_unitsetting1_unknown_pre[hIndex].func; - preHookFunc(src, skill_id, skill_lv, x, y, flag, val1, val2, val3); + preHookFunc(&src, &skill_id, &skill_lv, &x, &y, &flag, &val1, &val2, &val3); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70451,9 +82645,9 @@ void HP_skill_unitsetting1_unknown(struct block_list *src, uint16 *skill_id, uin { HPMHooks.source.skill.unitsetting1_unknown(src, skill_id, skill_lv, x, y, flag, val1, val2, val3); } - if( HPMHooks.count.HP_skill_unitsetting1_unknown_post ) { + if (HPMHooks.count.HP_skill_unitsetting1_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *val1, int *val2, int *val3); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting1_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_unitsetting1_unknown_post[hIndex].func; postHookFunc(src, skill_id, skill_lv, x, y, flag, val1, val2, val3); } @@ -70462,14 +82656,14 @@ void HP_skill_unitsetting1_unknown(struct block_list *src, uint16 *skill_id, uin } void HP_skill_unitsetting2_unknown(struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group) { int hIndex = 0; - if( HPMHooks.count.HP_skill_unitsetting2_unknown_pre ) { - void (*preHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group); + if (HPMHooks.count.HP_skill_unitsetting2_unknown_pre > 0) { + void (*preHookFunc) (struct block_list **src, uint16 **skill_id, uint16 **skill_lv, int16 **x, int16 **y, int **flag, int **unit_flag, int **val1, int **val2, int **val3, struct skill_unit_group **group); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_unitsetting2_unknown_pre[hIndex].func; - preHookFunc(src, skill_id, skill_lv, x, y, flag, unit_flag, val1, val2, val3, group); + preHookFunc(&src, &skill_id, &skill_lv, &x, &y, &flag, &unit_flag, &val1, &val2, &val3, &group); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70477,9 +82671,9 @@ void HP_skill_unitsetting2_unknown(struct block_list *src, uint16 *skill_id, uin { HPMHooks.source.skill.unitsetting2_unknown(src, skill_id, skill_lv, x, y, flag, unit_flag, val1, val2, val3, group); } - if( HPMHooks.count.HP_skill_unitsetting2_unknown_post ) { + if (HPMHooks.count.HP_skill_unitsetting2_unknown_post > 0) { void (*postHookFunc) (struct block_list *src, uint16 *skill_id, uint16 *skill_lv, int16 *x, int16 *y, int *flag, int *unit_flag, int *val1, int *val2, int *val3, struct skill_unit_group *group); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unitsetting2_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_unitsetting2_unknown_post[hIndex].func; postHookFunc(src, skill_id, skill_lv, x, y, flag, unit_flag, val1, val2, val3, group); } @@ -70488,14 +82682,14 @@ void HP_skill_unitsetting2_unknown(struct block_list *src, uint16 *skill_id, uin } void HP_skill_unit_onplace_unknown(struct skill_unit *src, struct block_list *bl, int64 *tick) { int hIndex = 0; - if( HPMHooks.count.HP_skill_unit_onplace_unknown_pre ) { - void (*preHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); + if (HPMHooks.count.HP_skill_unit_onplace_unknown_pre > 0) { + void (*preHookFunc) (struct skill_unit **src, struct block_list **bl, int64 **tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_unit_onplace_unknown_pre[hIndex].func; - preHookFunc(src, bl, tick); + preHookFunc(&src, &bl, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70503,9 +82697,9 @@ void HP_skill_unit_onplace_unknown(struct skill_unit *src, struct block_list *bl { HPMHooks.source.skill.unit_onplace_unknown(src, bl, tick); } - if( HPMHooks.count.HP_skill_unit_onplace_unknown_post ) { + if (HPMHooks.count.HP_skill_unit_onplace_unknown_post > 0) { void (*postHookFunc) (struct skill_unit *src, struct block_list *bl, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_unit_onplace_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_unit_onplace_unknown_post[hIndex].func; postHookFunc(src, bl, tick); } @@ -70515,14 +82709,14 @@ void HP_skill_unit_onplace_unknown(struct skill_unit *src, struct block_list *bl int HP_skill_check_condition_castbegin_off_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre ) { - int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); + if (HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre > 0) { + int (*preHookFunc) (struct status_change **sc, uint16 **skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_off_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, skill_id); + retVal___ = preHookFunc(&sc, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70530,9 +82724,9 @@ int HP_skill_check_condition_castbegin_off_unknown(struct status_change *sc, uin { retVal___ = HPMHooks.source.skill.check_condition_castbegin_off_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post > 0) { int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_off_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_off_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, skill_id); } @@ -70542,14 +82736,14 @@ int HP_skill_check_condition_castbegin_off_unknown(struct status_change *sc, uin int HP_skill_check_condition_castbegin_mount_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre ) { - int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); + if (HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre > 0) { + int (*preHookFunc) (struct status_change **sc, uint16 **skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_mount_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, skill_id); + retVal___ = preHookFunc(&sc, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70557,9 +82751,9 @@ int HP_skill_check_condition_castbegin_mount_unknown(struct status_change *sc, u { retVal___ = HPMHooks.source.skill.check_condition_castbegin_mount_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post > 0) { int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_mount_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_mount_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, skill_id); } @@ -70569,14 +82763,14 @@ int HP_skill_check_condition_castbegin_mount_unknown(struct status_change *sc, u int HP_skill_check_condition_castbegin_madogear_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre ) { - int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); + if (HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre > 0) { + int (*preHookFunc) (struct status_change **sc, uint16 **skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_madogear_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, skill_id); + retVal___ = preHookFunc(&sc, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70584,9 +82778,9 @@ int HP_skill_check_condition_castbegin_madogear_unknown(struct status_change *sc { retVal___ = HPMHooks.source.skill.check_condition_castbegin_madogear_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post > 0) { int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_madogear_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_madogear_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, skill_id); } @@ -70596,14 +82790,14 @@ int HP_skill_check_condition_castbegin_madogear_unknown(struct status_change *sc int HP_skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre ) { - int (*preHookFunc) (struct status_change *sc, uint16 *skill_id); + if (HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre > 0) { + int (*preHookFunc) (struct status_change **sc, uint16 **skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, skill_id); + retVal___ = preHookFunc(&sc, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70611,52 +82805,53 @@ int HP_skill_check_condition_castbegin_unknown(struct status_change *sc, uint16 { retVal___ = HPMHooks.source.skill.check_condition_castbegin_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post ) { + if (HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post > 0) { int (*postHookFunc) (int retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castbegin_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castbegin_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, skill_id); } } return retVal___; } -void HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv) { +bool HP_skill_check_condition_castend_unknown(struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv) { int hIndex = 0; - if( HPMHooks.count.HP_skill_check_condition_castend_unknown_pre ) { - void (*preHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + bool retVal___ = false; + if (HPMHooks.count.HP_skill_check_condition_castend_unknown_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_pre[hIndex].func; - preHookFunc(sd, skill_id, skill_lv); + retVal___ = preHookFunc(&sd, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; - return; + return retVal___; } } { - HPMHooks.source.skill.check_condition_castend_unknown(sd, skill_id, skill_lv); + retVal___ = HPMHooks.source.skill.check_condition_castend_unknown(sd, skill_id, skill_lv); } - if( HPMHooks.count.HP_skill_check_condition_castend_unknown_post ) { - void (*postHookFunc) (struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_post; hIndex++ ) { + if (HPMHooks.count.HP_skill_check_condition_castend_unknown_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_condition_castend_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_check_condition_castend_unknown_post[hIndex].func; - postHookFunc(sd, skill_id, skill_lv); + retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv); } } - return; + return retVal___; } bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skill_id) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_get_requirement_off_unknown_pre ) { - bool (*preHookFunc) (struct status_change *sc, uint16 *skill_id); + if (HPMHooks.count.HP_skill_get_requirement_off_unknown_pre > 0) { + bool (*preHookFunc) (struct status_change **sc, uint16 **skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_get_requirement_off_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, skill_id); + retVal___ = preHookFunc(&sc, &skill_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70664,9 +82859,9 @@ bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skil { retVal___ = HPMHooks.source.skill.get_requirement_off_unknown(sc, skill_id); } - if( HPMHooks.count.HP_skill_get_requirement_off_unknown_post ) { + if (HPMHooks.count.HP_skill_get_requirement_off_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct status_change *sc, uint16 *skill_id); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_off_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_get_requirement_off_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, skill_id); } @@ -70676,14 +82871,14 @@ bool HP_skill_get_requirement_off_unknown(struct status_change *sc, uint16 *skil bool HP_skill_get_requirement_item_unknown(struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_skill_get_requirement_item_unknown_pre ) { - bool (*preHookFunc) (struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i); + if (HPMHooks.count.HP_skill_get_requirement_item_unknown_pre > 0) { + bool (*preHookFunc) (struct status_change **sc, struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv, uint16 **idx, int **i); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_get_requirement_item_unknown_pre[hIndex].func; - retVal___ = preHookFunc(sc, sd, skill_id, skill_lv, idx, i); + retVal___ = preHookFunc(&sc, &sd, &skill_id, &skill_lv, &idx, &i); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70691,9 +82886,9 @@ bool HP_skill_get_requirement_item_unknown(struct status_change *sc, struct map_ { retVal___ = HPMHooks.source.skill.get_requirement_item_unknown(sc, sd, skill_id, skill_lv, idx, i); } - if( HPMHooks.count.HP_skill_get_requirement_item_unknown_post ) { + if (HPMHooks.count.HP_skill_get_requirement_item_unknown_post > 0) { bool (*postHookFunc) (bool retVal___, struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_item_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_get_requirement_item_unknown_post[hIndex].func; retVal___ = postHookFunc(retVal___, sc, sd, skill_id, skill_lv, idx, i); } @@ -70702,14 +82897,14 @@ bool HP_skill_get_requirement_item_unknown(struct status_change *sc, struct map_ } void HP_skill_get_requirement_unknown(struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req) { int hIndex = 0; - if( HPMHooks.count.HP_skill_get_requirement_unknown_pre ) { - void (*preHookFunc) (struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req); + if (HPMHooks.count.HP_skill_get_requirement_unknown_pre > 0) { + void (*preHookFunc) (struct status_change **sc, struct map_session_data **sd, uint16 **skill_id, uint16 **skill_lv, struct skill_condition **req); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_skill_get_requirement_unknown_pre[hIndex].func; - preHookFunc(sc, sd, skill_id, skill_lv, req); + preHookFunc(&sc, &sd, &skill_id, &skill_lv, &req); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70717,26 +82912,146 @@ void HP_skill_get_requirement_unknown(struct status_change *sc, struct map_sessi { HPMHooks.source.skill.get_requirement_unknown(sc, sd, skill_id, skill_lv, req); } - if( HPMHooks.count.HP_skill_get_requirement_unknown_post ) { + if (HPMHooks.count.HP_skill_get_requirement_unknown_post > 0) { void (*postHookFunc) (struct status_change *sc, struct map_session_data *sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req); - for(hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_requirement_unknown_post; hIndex++) { postHookFunc = HPMHooks.list.HP_skill_get_requirement_unknown_post[hIndex].func; postHookFunc(sc, sd, skill_id, skill_lv, req); } } return; } -/* sockt */ +int HP_skill_splash_target(struct block_list *bl) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_splash_target_pre > 0) { + int (*preHookFunc) (struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_splash_target_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_splash_target_pre[hIndex].func; + retVal___ = preHookFunc(&bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.splash_target(bl); + } + if (HPMHooks.count.HP_skill_splash_target_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_splash_target_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_splash_target_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl); + } + } + return retVal___; +} +int HP_skill_check_npc_chaospanic(struct block_list *bl, va_list args) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_check_npc_chaospanic_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list args); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_npc_chaospanic_pre; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + preHookFunc = HPMHooks.list.HP_skill_check_npc_chaospanic_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.skill.check_npc_chaospanic(bl, args___copy); + va_end(args___copy); + } + if (HPMHooks.count.HP_skill_check_npc_chaospanic_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_check_npc_chaospanic_post; hIndex++) { + va_list args___copy; va_copy(args___copy, args); + postHookFunc = HPMHooks.list.HP_skill_check_npc_chaospanic_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, args___copy); + va_end(args___copy); + } + } + return retVal___; +} +int HP_skill_count_wos(struct block_list *bl, va_list ap) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_count_wos_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_count_wos_pre; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + preHookFunc = HPMHooks.list.HP_skill_count_wos_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.count_wos(bl, ap___copy); + va_end(ap___copy); + } + if (HPMHooks.count.HP_skill_count_wos_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_count_wos_post; hIndex++) { + va_list ap___copy; va_copy(ap___copy, ap); + postHookFunc = HPMHooks.list.HP_skill_count_wos_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, ap___copy); + va_end(ap___copy); + } + } + return retVal___; +} +int HP_skill_get_linked_song_dance_id(int skill_id) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_skill_get_linked_song_dance_id_pre > 0) { + int (*preHookFunc) (int *skill_id); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_linked_song_dance_id_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_get_linked_song_dance_id_pre[hIndex].func; + retVal___ = preHookFunc(&skill_id); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.skill.get_linked_song_dance_id(skill_id); + } + if (HPMHooks.count.HP_skill_get_linked_song_dance_id_post > 0) { + int (*postHookFunc) (int retVal___, int skill_id); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_get_linked_song_dance_id_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_get_linked_song_dance_id_post[hIndex].func; + retVal___ = postHookFunc(retVal___, skill_id); + } + } + return retVal___; +} +/* socket_interface */ void HP_sockt_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_init_pre ) { + if (HPMHooks.count.HP_sockt_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70744,9 +83059,9 @@ void HP_sockt_init(void) { { HPMHooks.source.sockt.init(); } - if( HPMHooks.count.HP_sockt_init_post ) { + if (HPMHooks.count.HP_sockt_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func; postHookFunc(); } @@ -70755,14 +83070,14 @@ void HP_sockt_init(void) { } void HP_sockt_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_final_pre ) { + if (HPMHooks.count.HP_sockt_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70770,9 +83085,9 @@ void HP_sockt_final(void) { { HPMHooks.source.sockt.final(); } - if( HPMHooks.count.HP_sockt_final_post ) { + if (HPMHooks.count.HP_sockt_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func; postHookFunc(); } @@ -70782,14 +83097,14 @@ void HP_sockt_final(void) { int HP_sockt_perform(int next) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_perform_pre ) { + if (HPMHooks.count.HP_sockt_perform_pre > 0) { int (*preHookFunc) (int *next); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func; retVal___ = preHookFunc(&next); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70797,25 +83112,25 @@ int HP_sockt_perform(int next) { { retVal___ = HPMHooks.source.sockt.perform(next); } - if( HPMHooks.count.HP_sockt_perform_post ) { - int (*postHookFunc) (int retVal___, int *next); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_perform_post > 0) { + int (*postHookFunc) (int retVal___, int next); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &next); + retVal___ = postHookFunc(retVal___, next); } } return retVal___; } void HP_sockt_datasync(int fd, bool send) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_datasync_pre ) { + if (HPMHooks.count.HP_sockt_datasync_pre > 0) { void (*preHookFunc) (int *fd, bool *send); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func; preHookFunc(&fd, &send); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -70823,11 +83138,11 @@ void HP_sockt_datasync(int fd, bool send) { { HPMHooks.source.sockt.datasync(fd, send); } - if( HPMHooks.count.HP_sockt_datasync_post ) { - void (*postHookFunc) (int *fd, bool *send); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_datasync_post > 0) { + void (*postHookFunc) (int fd, bool send); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func; - postHookFunc(&fd, &send); + postHookFunc(fd, send); } } return; @@ -70835,14 +83150,14 @@ void HP_sockt_datasync(int fd, bool send) { int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_pre > 0) { int (*preHookFunc) (uint32 *ip, uint16 *port); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func; retVal___ = preHookFunc(&ip, &port); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70850,11 +83165,11 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { { retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port); } - if( HPMHooks.count.HP_sockt_make_listen_bind_post ) { - int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_make_listen_bind_post > 0) { + int (*postHookFunc) (int retVal___, uint32 ip, uint16 port); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, &port); + retVal___ = postHookFunc(retVal___, ip, port); } } return retVal___; @@ -70862,14 +83177,14 @@ int HP_sockt_make_listen_bind(uint32 ip, uint16 port) { int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_make_connection_pre ) { - int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt *opt); + if (HPMHooks.count.HP_sockt_make_connection_pre > 0) { + int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt **opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func; - retVal___ = preHookFunc(&ip, &port, opt); + retVal___ = preHookFunc(&ip, &port, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70877,11 +83192,11 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { { retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt); } - if( HPMHooks.count.HP_sockt_make_connection_post ) { - int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port, struct hSockOpt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_make_connection_post > 0) { + int (*postHookFunc) (int retVal___, uint32 ip, uint16 port, struct hSockOpt *opt); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, &port, opt); + retVal___ = postHookFunc(retVal___, ip, port, opt); } } return retVal___; @@ -70889,14 +83204,14 @@ int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_pre > 0) { int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70904,11 +83219,11 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si { retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size); } - if( HPMHooks.count.HP_sockt_realloc_fifo_post ) { - int (*postHookFunc) (int retVal___, int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_realloc_fifo_post > 0) { + int (*postHookFunc) (int retVal___, int fd, unsigned int rfifo_size, unsigned int wfifo_size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &rfifo_size, &wfifo_size); + retVal___ = postHookFunc(retVal___, fd, rfifo_size, wfifo_size); } } return retVal___; @@ -70916,14 +83231,14 @@ int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_si int HP_sockt_realloc_writefifo(int fd, size_t addition) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_pre > 0) { int (*preHookFunc) (int *fd, size_t *addition); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func; retVal___ = preHookFunc(&fd, &addition); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70931,53 +83246,79 @@ int HP_sockt_realloc_writefifo(int fd, size_t addition) { { retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition); } - if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) { - int (*postHookFunc) (int retVal___, int *fd, size_t *addition); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_realloc_writefifo_post > 0) { + int (*postHookFunc) (int retVal___, int fd, size_t addition); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &addition); + retVal___ = postHookFunc(retVal___, fd, addition); } } return retVal___; } -int HP_sockt_wfifoset(int fd, size_t len) { +int HP_sockt_wfifoset(int fd, size_t len, bool validate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_wfifoset_pre ) { - int (*preHookFunc) (int *fd, size_t *len); + if (HPMHooks.count.HP_sockt_wfifoset_pre > 0) { + int (*preHookFunc) (int *fd, size_t *len, bool *validate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func; - retVal___ = preHookFunc(&fd, &len); + retVal___ = preHookFunc(&fd, &len, &validate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.sockt.wfifoset(fd, len); + retVal___ = HPMHooks.source.sockt.wfifoset(fd, len, validate); } - if( HPMHooks.count.HP_sockt_wfifoset_post ) { - int (*postHookFunc) (int retVal___, int *fd, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_wfifoset_post > 0) { + int (*postHookFunc) (int retVal___, int fd, size_t len, bool validate); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &len); + retVal___ = postHookFunc(retVal___, fd, len, validate); } } return retVal___; } +void HP_sockt_wfifohead(int fd, size_t len) { + int hIndex = 0; + if (HPMHooks.count.HP_sockt_wfifohead_pre > 0) { + void (*preHookFunc) (int *fd, size_t *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_wfifohead_pre[hIndex].func; + preHookFunc(&fd, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.wfifohead(fd, len); + } + if (HPMHooks.count.HP_sockt_wfifohead_post > 0) { + void (*postHookFunc) (int fd, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifohead_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_wfifohead_post[hIndex].func; + postHookFunc(fd, len); + } + } + return; +} int HP_sockt_rfifoskip(int fd, size_t len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_rfifoskip_pre ) { + if (HPMHooks.count.HP_sockt_rfifoskip_pre > 0) { int (*preHookFunc) (int *fd, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func; retVal___ = preHookFunc(&fd, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -70985,25 +83326,25 @@ int HP_sockt_rfifoskip(int fd, size_t len) { { retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len); } - if( HPMHooks.count.HP_sockt_rfifoskip_post ) { - int (*postHookFunc) (int retVal___, int *fd, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_rfifoskip_post > 0) { + int (*postHookFunc) (int retVal___, int fd, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd, &len); + retVal___ = postHookFunc(retVal___, fd, len); } } return retVal___; } void HP_sockt_close(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_close_pre ) { + if (HPMHooks.count.HP_sockt_close_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71011,11 +83352,37 @@ void HP_sockt_close(int fd) { { HPMHooks.source.sockt.close(fd); } - if( HPMHooks.count.HP_sockt_close_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_close_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); + } + } + return; +} +void HP_sockt_validateWfifo(int fd, size_t len) { + int hIndex = 0; + if (HPMHooks.count.HP_sockt_validateWfifo_pre > 0) { + void (*preHookFunc) (int *fd, size_t *len); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_validateWfifo_pre[hIndex].func; + preHookFunc(&fd, &len); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.sockt.validateWfifo(fd, len); + } + if (HPMHooks.count.HP_sockt_validateWfifo_post > 0) { + void (*postHookFunc) (int fd, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_validateWfifo_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_validateWfifo_post[hIndex].func; + postHookFunc(fd, len); } } return; @@ -71023,14 +83390,14 @@ void HP_sockt_close(int fd) { bool HP_sockt_session_is_valid(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_valid_pre ) { + if (HPMHooks.count.HP_sockt_session_is_valid_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71038,11 +83405,11 @@ bool HP_sockt_session_is_valid(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_valid(fd); } - if( HPMHooks.count.HP_sockt_session_is_valid_post ) { - bool (*postHookFunc) (bool retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_session_is_valid_post > 0) { + bool (*postHookFunc) (bool retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; @@ -71050,14 +83417,14 @@ bool HP_sockt_session_is_valid(int fd) { bool HP_sockt_session_is_active(int fd) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_session_is_active_pre ) { + if (HPMHooks.count.HP_sockt_session_is_active_pre > 0) { bool (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func; retVal___ = preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71065,25 +83432,25 @@ bool HP_sockt_session_is_active(int fd) { { retVal___ = HPMHooks.source.sockt.session_is_active(fd); } - if( HPMHooks.count.HP_sockt_session_is_active_post ) { - bool (*postHookFunc) (bool retVal___, int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_session_is_active_post > 0) { + bool (*postHookFunc) (bool retVal___, int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &fd); + retVal___ = postHookFunc(retVal___, fd); } } return retVal___; } void HP_sockt_flush(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_pre ) { + if (HPMHooks.count.HP_sockt_flush_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71091,25 +83458,25 @@ void HP_sockt_flush(int fd) { { HPMHooks.source.sockt.flush(fd); } - if( HPMHooks.count.HP_sockt_flush_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_flush_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; } void HP_sockt_flush_fifos(void) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_flush_fifos_pre ) { + if (HPMHooks.count.HP_sockt_flush_fifos_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71117,25 +83484,52 @@ void HP_sockt_flush_fifos(void) { { HPMHooks.source.sockt.flush_fifos(); } - if( HPMHooks.count.HP_sockt_flush_fifos_post ) { + if (HPMHooks.count.HP_sockt_flush_fifos_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func; postHookFunc(); } } return; } +int HP_sockt_connect_client(int listen_fd) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_sockt_connect_client_pre > 0) { + int (*preHookFunc) (int *listen_fd); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_sockt_connect_client_pre[hIndex].func; + retVal___ = preHookFunc(&listen_fd); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.sockt.connect_client(listen_fd); + } + if (HPMHooks.count.HP_sockt_connect_client_post > 0) { + int (*postHookFunc) (int retVal___, int listen_fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_connect_client_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_sockt_connect_client_post[hIndex].func; + retVal___ = postHookFunc(retVal___, listen_fd); + } + } + return retVal___; +} void HP_sockt_set_nonblocking(int fd, unsigned long yes) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_pre > 0) { void (*preHookFunc) (int *fd, unsigned long *yes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func; preHookFunc(&fd, &yes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71143,25 +83537,25 @@ void HP_sockt_set_nonblocking(int fd, unsigned long yes) { { HPMHooks.source.sockt.set_nonblocking(fd, yes); } - if( HPMHooks.count.HP_sockt_set_nonblocking_post ) { - void (*postHookFunc) (int *fd, unsigned long *yes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_set_nonblocking_post > 0) { + void (*postHookFunc) (int fd, unsigned long yes); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func; - postHookFunc(&fd, &yes); + postHookFunc(fd, yes); } } return; } void HP_sockt_set_defaultparse(ParseFunc defaultparse) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_pre > 0) { void (*preHookFunc) (ParseFunc *defaultparse); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func; preHookFunc(&defaultparse); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71169,11 +83563,11 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { { HPMHooks.source.sockt.set_defaultparse(defaultparse); } - if( HPMHooks.count.HP_sockt_set_defaultparse_post ) { - void (*postHookFunc) (ParseFunc *defaultparse); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_set_defaultparse_post > 0) { + void (*postHookFunc) (ParseFunc defaultparse); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func; - postHookFunc(&defaultparse); + postHookFunc(defaultparse); } } return; @@ -71181,14 +83575,14 @@ void HP_sockt_set_defaultparse(ParseFunc defaultparse) { uint32 HP_sockt_host2ip(const char *hostname) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_host2ip_pre ) { - uint32 (*preHookFunc) (const char *hostname); + if (HPMHooks.count.HP_sockt_host2ip_pre > 0) { + uint32 (*preHookFunc) (const char **hostname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func; - retVal___ = preHookFunc(hostname); + retVal___ = preHookFunc(&hostname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71196,9 +83590,9 @@ uint32 HP_sockt_host2ip(const char *hostname) { { retVal___ = HPMHooks.source.sockt.host2ip(hostname); } - if( HPMHooks.count.HP_sockt_host2ip_post ) { + if (HPMHooks.count.HP_sockt_host2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *hostname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, hostname); } @@ -71208,14 +83602,14 @@ uint32 HP_sockt_host2ip(const char *hostname) { const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sockt_ip2str_pre ) { - const char* (*preHookFunc) (uint32 *ip, char *ip_str); + if (HPMHooks.count.HP_sockt_ip2str_pre > 0) { + const char* (*preHookFunc) (uint32 *ip, char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func; - retVal___ = preHookFunc(&ip, ip_str); + retVal___ = preHookFunc(&ip, &ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71223,11 +83617,11 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { { retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str); } - if( HPMHooks.count.HP_sockt_ip2str_post ) { - const char* (*postHookFunc) (const char* retVal___, uint32 *ip, char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_ip2str_post > 0) { + const char* (*postHookFunc) (const char* retVal___, uint32 ip, char *ip_str); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, ip_str); + retVal___ = postHookFunc(retVal___, ip, ip_str); } } return retVal___; @@ -71235,14 +83629,14 @@ const char* HP_sockt_ip2str(uint32 ip, char *ip_str) { uint32 HP_sockt_str2ip(const char *ip_str) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_str2ip_pre ) { - uint32 (*preHookFunc) (const char *ip_str); + if (HPMHooks.count.HP_sockt_str2ip_pre > 0) { + uint32 (*preHookFunc) (const char **ip_str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func; - retVal___ = preHookFunc(ip_str); + retVal___ = preHookFunc(&ip_str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71250,9 +83644,9 @@ uint32 HP_sockt_str2ip(const char *ip_str) { { retVal___ = HPMHooks.source.sockt.str2ip(ip_str); } - if( HPMHooks.count.HP_sockt_str2ip_post ) { + if (HPMHooks.count.HP_sockt_str2ip_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func; retVal___ = postHookFunc(retVal___, ip_str); } @@ -71262,14 +83656,14 @@ uint32 HP_sockt_str2ip(const char *ip_str) { uint16 HP_sockt_ntows(uint16 netshort) { int hIndex = 0; uint16 retVal___ = 0; - if( HPMHooks.count.HP_sockt_ntows_pre ) { + if (HPMHooks.count.HP_sockt_ntows_pre > 0) { uint16 (*preHookFunc) (uint16 *netshort); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func; retVal___ = preHookFunc(&netshort); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71277,11 +83671,11 @@ uint16 HP_sockt_ntows(uint16 netshort) { { retVal___ = HPMHooks.source.sockt.ntows(netshort); } - if( HPMHooks.count.HP_sockt_ntows_post ) { - uint16 (*postHookFunc) (uint16 retVal___, uint16 *netshort); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_ntows_post > 0) { + uint16 (*postHookFunc) (uint16 retVal___, uint16 netshort); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &netshort); + retVal___ = postHookFunc(retVal___, netshort); } } return retVal___; @@ -71289,14 +83683,14 @@ uint16 HP_sockt_ntows(uint16 netshort) { int HP_sockt_getips(uint32 *ips, int max) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_getips_pre ) { - int (*preHookFunc) (uint32 *ips, int *max); + if (HPMHooks.count.HP_sockt_getips_pre > 0) { + int (*preHookFunc) (uint32 **ips, int *max); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func; - retVal___ = preHookFunc(ips, &max); + retVal___ = preHookFunc(&ips, &max); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71304,25 +83698,25 @@ int HP_sockt_getips(uint32 *ips, int max) { { retVal___ = HPMHooks.source.sockt.getips(ips, max); } - if( HPMHooks.count.HP_sockt_getips_post ) { - int (*postHookFunc) (int retVal___, uint32 *ips, int *max); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_getips_post > 0) { + int (*postHookFunc) (int retVal___, uint32 *ips, int max); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func; - retVal___ = postHookFunc(retVal___, ips, &max); + retVal___ = postHookFunc(retVal___, ips, max); } } return retVal___; } void HP_sockt_eof(int fd) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_eof_pre ) { + if (HPMHooks.count.HP_sockt_eof_pre > 0) { void (*preHookFunc) (int *fd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func; preHookFunc(&fd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71330,11 +83724,11 @@ void HP_sockt_eof(int fd) { { HPMHooks.source.sockt.eof(fd); } - if( HPMHooks.count.HP_sockt_eof_post ) { - void (*postHookFunc) (int *fd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_eof_post > 0) { + void (*postHookFunc) (int fd); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func; - postHookFunc(&fd); + postHookFunc(fd); } } return; @@ -71342,14 +83736,14 @@ void HP_sockt_eof(int fd) { uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) { - uint32 (*preHookFunc) (uint32 *ip, struct s_subnet *info); + if (HPMHooks.count.HP_sockt_lan_subnet_check_pre > 0) { + uint32 (*preHookFunc) (uint32 *ip, struct s_subnet **info); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func; - retVal___ = preHookFunc(&ip, info); + retVal___ = preHookFunc(&ip, &info); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71357,11 +83751,11 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { { retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info); } - if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) { - uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip, struct s_subnet *info); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_lan_subnet_check_post > 0) { + uint32 (*postHookFunc) (uint32 retVal___, uint32 ip, struct s_subnet *info); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip, info); + retVal___ = postHookFunc(retVal___, ip, info); } } return retVal___; @@ -71369,14 +83763,14 @@ uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) { bool HP_sockt_allowed_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71384,11 +83778,11 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip); } - if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) { - bool (*postHookFunc) (bool retVal___, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_allowed_ip_check_post > 0) { + bool (*postHookFunc) (bool retVal___, uint32 ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip); + retVal___ = postHookFunc(retVal___, ip); } } return retVal___; @@ -71396,14 +83790,14 @@ bool HP_sockt_allowed_ip_check(uint32 ip) { bool HP_sockt_trusted_ip_check(uint32 ip) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_pre > 0) { bool (*preHookFunc) (uint32 *ip); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func; retVal___ = preHookFunc(&ip); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71411,11 +83805,11 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { { retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip); } - if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) { - bool (*postHookFunc) (bool retVal___, uint32 *ip); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) { + if (HPMHooks.count.HP_sockt_trusted_ip_check_post > 0) { + bool (*postHookFunc) (bool retVal___, uint32 ip); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &ip); + retVal___ = postHookFunc(retVal___, ip); } } return retVal___; @@ -71423,14 +83817,14 @@ bool HP_sockt_trusted_ip_check(uint32 ip) { int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) { - int (*preHookFunc) (struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname); + if (HPMHooks.count.HP_sockt_net_config_read_sub_pre > 0) { + int (*preHookFunc) (struct config_setting_t **t, struct s_subnet_vector **list, const char **filename, const char **groupname); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func; - retVal___ = preHookFunc(t, list, filename, groupname); + retVal___ = preHookFunc(&t, &list, &filename, &groupname); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71438,9 +83832,9 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec { retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, filename, groupname); } - if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_sub_post > 0) { int (*postHookFunc) (int retVal___, struct config_setting_t *t, struct s_subnet_vector *list, const char *filename, const char *groupname); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, t, list, filename, groupname); } @@ -71449,14 +83843,14 @@ int HP_sockt_net_config_read_sub(struct config_setting_t *t, struct s_subnet_vec } void HP_sockt_net_config_read(const char *filename) { int hIndex = 0; - if( HPMHooks.count.HP_sockt_net_config_read_pre ) { - void (*preHookFunc) (const char *filename); + if (HPMHooks.count.HP_sockt_net_config_read_pre > 0) { + void (*preHookFunc) (const char **filename); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func; - preHookFunc(filename); + preHookFunc(&filename); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71464,27 +83858,27 @@ void HP_sockt_net_config_read(const char *filename) { { HPMHooks.source.sockt.net_config_read(filename); } - if( HPMHooks.count.HP_sockt_net_config_read_post ) { + if (HPMHooks.count.HP_sockt_net_config_read_post > 0) { void (*postHookFunc) (const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func; postHookFunc(filename); } } return; } -/* SQL */ +/* sql_interface */ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Connect_pre ) { - int (*preHookFunc) (struct Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); + if (HPMHooks.count.HP_SQL_Connect_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **user, const char **passwd, const char **host, uint16 *port, const char **db); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func; - retVal___ = preHookFunc(self, user, passwd, host, &port, db); + retVal___ = preHookFunc(&self, &user, &passwd, &host, &port, &db); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71492,11 +83886,11 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const { retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db); } - if( HPMHooks.count.HP_SQL_Connect_post ) { - int (*postHookFunc) (int retVal___, struct Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_Connect_post > 0) { + int (*postHookFunc) (int retVal___, struct Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, user, passwd, host, &port, db); + retVal___ = postHookFunc(retVal___, self, user, passwd, host, port, db); } } return retVal___; @@ -71504,14 +83898,14 @@ int HP_SQL_Connect(struct Sql *self, const char *user, const char *passwd, const int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetTimeout_pre ) { - int (*preHookFunc) (struct Sql *self, uint32 *out_timeout); + if (HPMHooks.count.HP_SQL_GetTimeout_pre > 0) { + int (*preHookFunc) (struct Sql **self, uint32 **out_timeout); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func; - retVal___ = preHookFunc(self, out_timeout); + retVal___ = preHookFunc(&self, &out_timeout); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71519,9 +83913,9 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { { retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout); } - if( HPMHooks.count.HP_SQL_GetTimeout_post ) { + if (HPMHooks.count.HP_SQL_GetTimeout_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, uint32 *out_timeout); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_timeout); } @@ -71531,14 +83925,14 @@ int HP_SQL_GetTimeout(struct Sql *self, uint32 *out_timeout) { int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) { - int (*preHookFunc) (struct Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); + if (HPMHooks.count.HP_SQL_GetColumnNames_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **table, char **out_buf, size_t *buf_len, char *sep); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func; - retVal___ = preHookFunc(self, table, out_buf, &buf_len, &sep); + retVal___ = preHookFunc(&self, &table, &out_buf, &buf_len, &sep); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71546,11 +83940,11 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si { retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep); } - if( HPMHooks.count.HP_SQL_GetColumnNames_post ) { - int (*postHookFunc) (int retVal___, struct Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_GetColumnNames_post > 0) { + int (*postHookFunc) (int retVal___, struct Sql *self, const char *table, char *out_buf, size_t buf_len, char sep); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, table, out_buf, &buf_len, &sep); + retVal___ = postHookFunc(retVal___, self, table, out_buf, buf_len, sep); } } return retVal___; @@ -71558,14 +83952,14 @@ int HP_SQL_GetColumnNames(struct Sql *self, const char *table, char *out_buf, si int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_SetEncoding_pre ) { - int (*preHookFunc) (struct Sql *self, const char *encoding); + if (HPMHooks.count.HP_SQL_SetEncoding_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **encoding); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func; - retVal___ = preHookFunc(self, encoding); + retVal___ = preHookFunc(&self, &encoding); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71573,9 +83967,9 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { { retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding); } - if( HPMHooks.count.HP_SQL_SetEncoding_post ) { + if (HPMHooks.count.HP_SQL_SetEncoding_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *encoding); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, encoding); } @@ -71585,14 +83979,14 @@ int HP_SQL_SetEncoding(struct Sql *self, const char *encoding) { int HP_SQL_Ping(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_Ping_pre ) { - int (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_Ping_pre > 0) { + int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71600,9 +83994,9 @@ int HP_SQL_Ping(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.Ping(self); } - if( HPMHooks.count.HP_SQL_Ping_post ) { + if (HPMHooks.count.HP_SQL_Ping_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -71612,14 +84006,14 @@ int HP_SQL_Ping(struct Sql *self) { size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeString_pre ) { - size_t (*preHookFunc) (struct Sql *self, char *out_to, const char *from); + if (HPMHooks.count.HP_SQL_EscapeString_pre > 0) { + size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func; - retVal___ = preHookFunc(self, out_to, from); + retVal___ = preHookFunc(&self, &out_to, &from); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71627,9 +84021,9 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { { retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from); } - if( HPMHooks.count.HP_SQL_EscapeString_post ) { + if (HPMHooks.count.HP_SQL_EscapeString_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, out_to, from); } @@ -71639,14 +84033,14 @@ size_t HP_SQL_EscapeString(struct Sql *self, char *out_to, const char *from) { size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, size_t from_len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) { - size_t (*preHookFunc) (struct Sql *self, char *out_to, const char *from, size_t *from_len); + if (HPMHooks.count.HP_SQL_EscapeStringLen_pre > 0) { + size_t (*preHookFunc) (struct Sql **self, char **out_to, const char **from, size_t *from_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func; - retVal___ = preHookFunc(self, out_to, from, &from_len); + retVal___ = preHookFunc(&self, &out_to, &from, &from_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71654,11 +84048,11 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, { retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len); } - if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) { - size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from, size_t *from_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_EscapeStringLen_post > 0) { + size_t (*postHookFunc) (size_t retVal___, struct Sql *self, char *out_to, const char *from, size_t from_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, out_to, from, &from_len); + retVal___ = postHookFunc(retVal___, self, out_to, from, from_len); } } return retVal___; @@ -71666,16 +84060,16 @@ size_t HP_SQL_EscapeStringLen(struct Sql *self, char *out_to, const char *from, int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryV_pre ) { - int (*preHookFunc) (struct Sql *self, const char *query, va_list args); + if (HPMHooks.count.HP_SQL_QueryV_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func; - retVal___ = preHookFunc(self, query, args___copy); + retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71685,9 +84079,9 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_QueryV_post ) { + if (HPMHooks.count.HP_SQL_QueryV_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -71699,14 +84093,14 @@ int HP_SQL_QueryV(struct Sql *self, const char *query, va_list args) { int HP_SQL_QueryStr(struct Sql *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_QueryStr_pre ) { - int (*preHookFunc) (struct Sql *self, const char *query); + if (HPMHooks.count.HP_SQL_QueryStr_pre > 0) { + int (*preHookFunc) (struct Sql **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func; - retVal___ = preHookFunc(self, query); + retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71714,9 +84108,9 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { { retVal___ = HPMHooks.source.SQL.QueryStr(self, query); } - if( HPMHooks.count.HP_SQL_QueryStr_post ) { + if (HPMHooks.count.HP_SQL_QueryStr_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -71726,14 +84120,14 @@ int HP_SQL_QueryStr(struct Sql *self, const char *query) { uint64 HP_SQL_LastInsertId(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_LastInsertId_pre ) { - uint64 (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_LastInsertId_pre > 0) { + uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71741,9 +84135,9 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.LastInsertId(self); } - if( HPMHooks.count.HP_SQL_LastInsertId_post ) { + if (HPMHooks.count.HP_SQL_LastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -71753,14 +84147,14 @@ uint64 HP_SQL_LastInsertId(struct Sql *self) { uint32 HP_SQL_NumColumns(struct Sql *self) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumColumns_pre ) { - uint32 (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_NumColumns_pre > 0) { + uint32 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71768,9 +84162,9 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumColumns(self); } - if( HPMHooks.count.HP_SQL_NumColumns_post ) { + if (HPMHooks.count.HP_SQL_NumColumns_post > 0) { uint32 (*postHookFunc) (uint32 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -71780,14 +84174,14 @@ uint32 HP_SQL_NumColumns(struct Sql *self) { uint64 HP_SQL_NumRows(struct Sql *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_NumRows_pre ) { - uint64 (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_NumRows_pre > 0) { + uint64 (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71795,9 +84189,9 @@ uint64 HP_SQL_NumRows(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NumRows(self); } - if( HPMHooks.count.HP_SQL_NumRows_post ) { + if (HPMHooks.count.HP_SQL_NumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -71807,14 +84201,14 @@ uint64 HP_SQL_NumRows(struct Sql *self) { int HP_SQL_NextRow(struct Sql *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_NextRow_pre ) { - int (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_NextRow_pre > 0) { + int (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71822,9 +84216,9 @@ int HP_SQL_NextRow(struct Sql *self) { { retVal___ = HPMHooks.source.SQL.NextRow(self); } - if( HPMHooks.count.HP_SQL_NextRow_post ) { + if (HPMHooks.count.HP_SQL_NextRow_post > 0) { int (*postHookFunc) (int retVal___, struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -71834,14 +84228,14 @@ int HP_SQL_NextRow(struct Sql *self) { int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_GetData_pre ) { - int (*preHookFunc) (struct Sql *self, size_t *col, char **out_buf, size_t *out_len); + if (HPMHooks.count.HP_SQL_GetData_pre > 0) { + int (*preHookFunc) (struct Sql **self, size_t *col, char ***out_buf, size_t **out_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func; - retVal___ = preHookFunc(self, &col, out_buf, out_len); + retVal___ = preHookFunc(&self, &col, &out_buf, &out_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71849,25 +84243,25 @@ int HP_SQL_GetData(struct Sql *self, size_t col, char **out_buf, size_t *out_len { retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len); } - if( HPMHooks.count.HP_SQL_GetData_post ) { - int (*postHookFunc) (int retVal___, struct Sql *self, size_t *col, char **out_buf, size_t *out_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_GetData_post > 0) { + int (*postHookFunc) (int retVal___, struct Sql *self, size_t col, char **out_buf, size_t *out_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, &col, out_buf, out_len); + retVal___ = postHookFunc(retVal___, self, col, out_buf, out_len); } } return retVal___; } void HP_SQL_FreeResult(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_FreeResult_pre ) { - void (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_FreeResult_pre > 0) { + void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71875,9 +84269,9 @@ void HP_SQL_FreeResult(struct Sql *self) { { HPMHooks.source.SQL.FreeResult(self); } - if( HPMHooks.count.HP_SQL_FreeResult_post ) { + if (HPMHooks.count.HP_SQL_FreeResult_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func; postHookFunc(self); } @@ -71886,14 +84280,14 @@ void HP_SQL_FreeResult(struct Sql *self) { } void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_ShowDebug__pre ) { - void (*preHookFunc) (struct Sql *self, const char *debug_file, const unsigned long *debug_line); + if (HPMHooks.count.HP_SQL_ShowDebug__pre > 0) { + void (*preHookFunc) (struct Sql **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func; - preHookFunc(self, debug_file, &debug_line); + preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71901,25 +84295,25 @@ void HP_SQL_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned { HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_ShowDebug__post ) { - void (*postHookFunc) (struct Sql *self, const char *debug_file, const unsigned long *debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_ShowDebug__post > 0) { + void (*postHookFunc) (struct Sql *self, const char *debug_file, const unsigned long debug_line); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func; - postHookFunc(self, debug_file, &debug_line); + postHookFunc(self, debug_file, debug_line); } } return; } void HP_SQL_Free(struct Sql *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_Free_pre ) { - void (*preHookFunc) (struct Sql *self); + if (HPMHooks.count.HP_SQL_Free_pre > 0) { + void (*preHookFunc) (struct Sql **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -71927,9 +84321,9 @@ void HP_SQL_Free(struct Sql *self) { { HPMHooks.source.SQL.Free(self); } - if( HPMHooks.count.HP_SQL_Free_post ) { + if (HPMHooks.count.HP_SQL_Free_post > 0) { void (*postHookFunc) (struct Sql *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func; postHookFunc(self); } @@ -71939,14 +84333,14 @@ void HP_SQL_Free(struct Sql *self) { struct Sql* HP_SQL_Malloc(void) { int hIndex = 0; struct Sql* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_Malloc_pre ) { + if (HPMHooks.count.HP_SQL_Malloc_pre > 0) { struct Sql* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71954,9 +84348,9 @@ struct Sql* HP_SQL_Malloc(void) { { retVal___ = HPMHooks.source.SQL.Malloc(); } - if( HPMHooks.count.HP_SQL_Malloc_post ) { + if (HPMHooks.count.HP_SQL_Malloc_post > 0) { struct Sql* (*postHookFunc) (struct Sql* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -71966,14 +84360,14 @@ struct Sql* HP_SQL_Malloc(void) { struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int hIndex = 0; struct SqlStmt* retVal___ = NULL; - if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) { - struct SqlStmt* (*preHookFunc) (struct Sql *sql); + if (HPMHooks.count.HP_SQL_StmtMalloc_pre > 0) { + struct SqlStmt* (*preHookFunc) (struct Sql **sql); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func; - retVal___ = preHookFunc(sql); + retVal___ = preHookFunc(&sql); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -71981,9 +84375,9 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { { retVal___ = HPMHooks.source.SQL.StmtMalloc(sql); } - if( HPMHooks.count.HP_SQL_StmtMalloc_post ) { + if (HPMHooks.count.HP_SQL_StmtMalloc_post > 0) { struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, struct Sql *sql); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func; retVal___ = postHookFunc(retVal___, sql); } @@ -71993,16 +84387,16 @@ struct SqlStmt* HP_SQL_StmtMalloc(struct Sql *sql) { int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) { - int (*preHookFunc) (struct SqlStmt *self, const char *query, va_list args); + if (HPMHooks.count.HP_SQL_StmtPrepareV_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, const char **query, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func; - retVal___ = preHookFunc(self, query, args___copy); + retVal___ = preHookFunc(&self, &query, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72012,9 +84406,9 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareV_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query, args___copy); @@ -72026,14 +84420,14 @@ int HP_SQL_StmtPrepareV(struct SqlStmt *self, const char *query, va_list args) { int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) { - int (*preHookFunc) (struct SqlStmt *self, const char *query); + if (HPMHooks.count.HP_SQL_StmtPrepareStr_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, const char **query); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func; - retVal___ = preHookFunc(self, query); + retVal___ = preHookFunc(&self, &query); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72041,9 +84435,9 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { { retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query); } - if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) { + if (HPMHooks.count.HP_SQL_StmtPrepareStr_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self, const char *query); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, query); } @@ -72053,14 +84447,14 @@ int HP_SQL_StmtPrepareStr(struct SqlStmt *self, const char *query) { size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) { - size_t (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNumParams_pre > 0) { + size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72068,9 +84462,9 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumParams(self); } - if( HPMHooks.count.HP_SQL_StmtNumParams_post ) { + if (HPMHooks.count.HP_SQL_StmtNumParams_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -72080,14 +84474,14 @@ size_t HP_SQL_StmtNumParams(struct SqlStmt *self) { int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) { - int (*preHookFunc) (struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, const void *buffer, size_t *buffer_len); + if (HPMHooks.count.HP_SQL_StmtBindParam_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, const void **buffer, size_t *buffer_len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func; - retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len); + retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72095,11 +84489,11 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff { retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len); } - if( HPMHooks.count.HP_SQL_StmtBindParam_post ) { - int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, const void *buffer, size_t *buffer_len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_StmtBindParam_post > 0) { + int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, const void *buffer, size_t buffer_len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len); + retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len); } } return retVal___; @@ -72107,14 +84501,14 @@ int HP_SQL_StmtBindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buff int HP_SQL_StmtExecute(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtExecute_pre ) { - int (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtExecute_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72122,9 +84516,9 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtExecute(self); } - if( HPMHooks.count.HP_SQL_StmtExecute_post ) { + if (HPMHooks.count.HP_SQL_StmtExecute_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -72134,14 +84528,14 @@ int HP_SQL_StmtExecute(struct SqlStmt *self) { uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) { - uint64 (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtLastInsertId_pre > 0) { + uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72149,9 +84543,9 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self); } - if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) { + if (HPMHooks.count.HP_SQL_StmtLastInsertId_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -72161,14 +84555,14 @@ uint64 HP_SQL_StmtLastInsertId(struct SqlStmt *self) { size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) { - size_t (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNumColumns_pre > 0) { + size_t (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72176,9 +84570,9 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumColumns(self); } - if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) { + if (HPMHooks.count.HP_SQL_StmtNumColumns_post > 0) { size_t (*postHookFunc) (size_t retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -72188,14 +84582,14 @@ size_t HP_SQL_StmtNumColumns(struct SqlStmt *self) { int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) { - int (*preHookFunc) (struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); + if (HPMHooks.count.HP_SQL_StmtBindColumn_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self, size_t *idx, enum SqlDataType *buffer_type, void **buffer, size_t *buffer_len, uint32 **out_length, int8 **out_is_null); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func; - retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); + retVal___ = preHookFunc(&self, &idx, &buffer_type, &buffer, &buffer_len, &out_length, &out_is_null); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72203,11 +84597,11 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf { retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } - if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) { - int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t *idx, enum SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_StmtBindColumn_post > 0) { + int (*postHookFunc) (int retVal___, struct SqlStmt *self, size_t idx, enum SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func; - retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null); + retVal___ = postHookFunc(retVal___, self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null); } } return retVal___; @@ -72215,14 +84609,14 @@ int HP_SQL_StmtBindColumn(struct SqlStmt *self, size_t idx, enum SqlDataType buf uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int hIndex = 0; uint64 retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) { - uint64 (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNumRows_pre > 0) { + uint64 (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72230,9 +84624,9 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNumRows(self); } - if( HPMHooks.count.HP_SQL_StmtNumRows_post ) { + if (HPMHooks.count.HP_SQL_StmtNumRows_post > 0) { uint64 (*postHookFunc) (uint64 retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -72242,14 +84636,14 @@ uint64 HP_SQL_StmtNumRows(struct SqlStmt *self) { int HP_SQL_StmtNextRow(struct SqlStmt *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) { - int (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtNextRow_pre > 0) { + int (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72257,9 +84651,9 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { { retVal___ = HPMHooks.source.SQL.StmtNextRow(self); } - if( HPMHooks.count.HP_SQL_StmtNextRow_post ) { + if (HPMHooks.count.HP_SQL_StmtNextRow_post > 0) { int (*postHookFunc) (int retVal___, struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -72268,14 +84662,14 @@ int HP_SQL_StmtNextRow(struct SqlStmt *self) { } void HP_SQL_StmtFreeResult(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) { - void (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtFreeResult_pre > 0) { + void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72283,9 +84677,9 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFreeResult(self); } - if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) { + if (HPMHooks.count.HP_SQL_StmtFreeResult_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func; postHookFunc(self); } @@ -72294,14 +84688,14 @@ void HP_SQL_StmtFreeResult(struct SqlStmt *self) { } void HP_SQL_StmtFree(struct SqlStmt *self) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtFree_pre ) { - void (*preHookFunc) (struct SqlStmt *self); + if (HPMHooks.count.HP_SQL_StmtFree_pre > 0) { + void (*preHookFunc) (struct SqlStmt **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72309,9 +84703,9 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { { HPMHooks.source.SQL.StmtFree(self); } - if( HPMHooks.count.HP_SQL_StmtFree_post ) { + if (HPMHooks.count.HP_SQL_StmtFree_post > 0) { void (*postHookFunc) (struct SqlStmt *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func; postHookFunc(self); } @@ -72320,14 +84714,14 @@ void HP_SQL_StmtFree(struct SqlStmt *self) { } void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const unsigned long debug_line) { int hIndex = 0; - if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) { - void (*preHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long *debug_line); + if (HPMHooks.count.HP_SQL_StmtShowDebug__pre > 0) { + void (*preHookFunc) (struct SqlStmt **self, const char **debug_file, const unsigned long *debug_line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func; - preHookFunc(self, debug_file, &debug_line); + preHookFunc(&self, &debug_file, &debug_line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72335,27 +84729,27 @@ void HP_SQL_StmtShowDebug_(struct SqlStmt *self, const char *debug_file, const u { HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line); } - if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) { - void (*postHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long *debug_line); - for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) { + if (HPMHooks.count.HP_SQL_StmtShowDebug__post > 0) { + void (*postHookFunc) (struct SqlStmt *self, const char *debug_file, const unsigned long debug_line); + for (hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++) { postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func; - postHookFunc(self, debug_file, &debug_line); + postHookFunc(self, debug_file, debug_line); } } return; } -/* status */ +/* status_interface */ int HP_status_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_init_pre ) { + if (HPMHooks.count.HP_status_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72363,25 +84757,25 @@ int HP_status_init(bool minimal) { { retVal___ = HPMHooks.source.status.init(minimal); } - if( HPMHooks.count.HP_status_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_init_post; hIndex++ ) { + if (HPMHooks.count.HP_status_init_post > 0) { + int (*postHookFunc) (int retVal___, bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + retVal___ = postHookFunc(retVal___, minimal); } } return retVal___; } void HP_status_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_final_pre ) { + if (HPMHooks.count.HP_status_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -72389,53 +84783,26 @@ void HP_status_final(void) { { HPMHooks.source.status.final(); } - if( HPMHooks.count.HP_status_final_post ) { + if (HPMHooks.count.HP_status_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_final_post; hIndex++ ) { + 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___ = 0; - if( HPMHooks.count.HP_status_get_refine_chance_pre ) { - int (*preHookFunc) (enum refine_type *wlv, int *refine); - *HPMforce_return = false; - 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___ = SC_NONE; - if( HPMHooks.count.HP_status_skill2sc_pre ) { + if (HPMHooks.count.HP_status_skill2sc_pre > 0) { sc_type (*preHookFunc) (int *skill_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_skill2sc_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72443,11 +84810,11 @@ sc_type HP_status_skill2sc(int skill_id) { { 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++ ) { + if (HPMHooks.count.HP_status_skill2sc_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, skill_id); } } return retVal___; @@ -72455,14 +84822,14 @@ sc_type HP_status_skill2sc(int skill_id) { int HP_status_sc2skill(sc_type sc) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_sc2skill_pre ) { + if (HPMHooks.count.HP_status_sc2skill_pre > 0) { int (*preHookFunc) (sc_type *sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2skill_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72470,11 +84837,11 @@ int HP_status_sc2skill(sc_type sc) { { 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++ ) { + if (HPMHooks.count.HP_status_sc2skill_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sc); } } return retVal___; @@ -72482,14 +84849,14 @@ int HP_status_sc2skill(sc_type sc) { unsigned int HP_status_sc2scb_flag(sc_type sc) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_sc2scb_flag_pre ) { + if (HPMHooks.count.HP_status_sc2scb_flag_pre > 0) { unsigned int (*preHookFunc) (sc_type *sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_sc2scb_flag_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72497,38 +84864,38 @@ unsigned int HP_status_sc2scb_flag(sc_type sc) { { 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++ ) { + if (HPMHooks.count.HP_status_sc2scb_flag_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sc); } } return retVal___; } -int HP_status_type2relevant_bl_types(int type) { +int HP_status_get_sc_relevant_bl_types(sc_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_type2relevant_bl_types_pre ) { - int (*preHookFunc) (int *type); + if (HPMHooks.count.HP_status_get_sc_relevant_bl_types_pre > 0) { + int (*preHookFunc) (sc_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_type2relevant_bl_types_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_type2relevant_bl_types_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_relevant_bl_types_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_sc_relevant_bl_types_pre[hIndex].func; retVal___ = preHookFunc(&type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.status.type2relevant_bl_types(type); + retVal___ = HPMHooks.source.status.get_sc_relevant_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); + if (HPMHooks.count.HP_status_get_sc_relevant_bl_types_post > 0) { + int (*postHookFunc) (int retVal___, sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_relevant_bl_types_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_sc_relevant_bl_types_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type); } } return retVal___; @@ -72536,14 +84903,14 @@ int HP_status_type2relevant_bl_types(int type) { int HP_status_get_sc_type(sc_type idx) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_sc_type_pre ) { + if (HPMHooks.count.HP_status_get_sc_type_pre > 0) { int (*preHookFunc) (sc_type *idx); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_type_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72551,11 +84918,38 @@ int HP_status_get_sc_type(sc_type idx) { { 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++ ) { + if (HPMHooks.count.HP_status_get_sc_type_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, idx); + } + } + return retVal___; +} +int HP_status_get_sc_icon(sc_type type) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_get_sc_icon_pre > 0) { + int (*preHookFunc) (sc_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_icon_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_sc_icon_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_sc_icon(type); + } + if (HPMHooks.count.HP_status_get_sc_icon_post > 0) { + int (*postHookFunc) (int retVal___, sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_icon_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_sc_icon_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type); } } return retVal___; @@ -72563,14 +84957,14 @@ int HP_status_get_sc_type(sc_type idx) { 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___ = 0; - 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); + if (HPMHooks.count.HP_status_damage_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **target, int64 *hp, int64 *sp, int *walkdelay, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_damage_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &hp, &sp, &walkdelay, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72578,11 +84972,11 @@ int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp { 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++ ) { + if (HPMHooks.count.HP_status_damage_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target, hp, sp, walkdelay, flag); } } return retVal___; @@ -72590,14 +84984,14 @@ int HP_status_damage(struct block_list *src, struct block_list *target, int64 hp int HP_status_charge(struct block_list *bl, int64 hp, int64 sp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_charge_pre ) { - int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp); + if (HPMHooks.count.HP_status_charge_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int64 *hp, int64 *sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_charge_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &hp, &sp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72605,11 +84999,11 @@ int HP_status_charge(struct block_list *bl, int64 hp, int64 sp) { { 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++ ) { + if (HPMHooks.count.HP_status_charge_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, hp, sp); } } return retVal___; @@ -72617,14 +85011,14 @@ int HP_status_charge(struct block_list *bl, int64 hp, int64 sp) { 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___ = 0; - 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); + if (HPMHooks.count.HP_status_percent_change_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **target, signed char *hp_rate, signed char *sp_rate, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_percent_change_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &hp_rate, &sp_rate, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72632,26 +85026,26 @@ int HP_status_percent_change(struct block_list *src, struct block_list *target, { 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++ ) { + if (HPMHooks.count.HP_status_percent_change_post > 0) { + 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); + 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 HP_status_set_hp(struct block_list *bl, unsigned int hp, enum status_heal_flag flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_set_hp_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned int *hp, int *flag); + if (HPMHooks.count.HP_status_set_hp_pre > 0) { + int (*preHookFunc) (struct block_list **bl, unsigned int *hp, enum status_heal_flag *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_hp_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &hp, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72659,26 +85053,26 @@ int HP_status_set_hp(struct block_list *bl, unsigned int hp, int flag) { { 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++ ) { + if (HPMHooks.count.HP_status_set_hp_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int hp, enum status_heal_flag 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); + retVal___ = postHookFunc(retVal___, bl, hp, flag); } } return retVal___; } -int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { +int HP_status_set_sp(struct block_list *bl, unsigned int sp, enum status_heal_flag flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_set_sp_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned int *sp, int *flag); + if (HPMHooks.count.HP_status_set_sp_pre > 0) { + int (*preHookFunc) (struct block_list **bl, unsigned int *sp, enum status_heal_flag *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sp_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sp, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72686,26 +85080,26 @@ int HP_status_set_sp(struct block_list *bl, unsigned int sp, int flag) { { 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++ ) { + if (HPMHooks.count.HP_status_set_sp_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int sp, enum status_heal_flag 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); + retVal___ = postHookFunc(retVal___, bl, sp, flag); } } return retVal___; } -int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { +int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, enum status_heal_flag flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_heal_pre ) { - int (*preHookFunc) (struct block_list *bl, int64 *hp, int64 *sp, int *flag); + if (HPMHooks.count.HP_status_heal_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int64 *hp, int64 *sp, enum status_heal_flag *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_heal_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &hp, &sp, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72713,11 +85107,11 @@ int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { { 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++ ) { + if (HPMHooks.count.HP_status_heal_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int64 hp, int64 sp, enum status_heal_flag 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); + retVal___ = postHookFunc(retVal___, bl, hp, sp, flag); } } return retVal___; @@ -72725,14 +85119,14 @@ int HP_status_heal(struct block_list *bl, int64 hp, int64 sp, int flag) { int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char per_sp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_revive_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned char *per_hp, unsigned char *per_sp); + if (HPMHooks.count.HP_status_revive_pre > 0) { + int (*preHookFunc) (struct block_list **bl, unsigned char *per_hp, unsigned char *per_sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_revive_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &per_hp, &per_sp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72740,11 +85134,11 @@ int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char { 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++ ) { + if (HPMHooks.count.HP_status_revive_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, per_hp, per_sp); } } return retVal___; @@ -72752,14 +85146,14 @@ int HP_status_revive(struct block_list *bl, unsigned char per_hp, unsigned char int HP_status_fixed_revive(struct block_list *bl, unsigned int per_hp, unsigned int per_sp) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_fixed_revive_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned int *per_hp, unsigned int *per_sp); + if (HPMHooks.count.HP_status_fixed_revive_pre > 0) { + int (*preHookFunc) (struct block_list **bl, unsigned int *per_hp, unsigned int *per_sp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_fixed_revive_pre[hIndex].func; - retVal___ = preHookFunc(bl, &per_hp, &per_sp); + retVal___ = preHookFunc(&bl, &per_hp, &per_sp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72767,11 +85161,11 @@ int HP_status_fixed_revive(struct block_list *bl, unsigned int per_hp, unsigned { retVal___ = HPMHooks.source.status.fixed_revive(bl, per_hp, per_sp); } - if( HPMHooks.count.HP_status_fixed_revive_post ) { - int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int *per_hp, unsigned int *per_sp); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_post; hIndex++ ) { + if (HPMHooks.count.HP_status_fixed_revive_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, unsigned int per_hp, unsigned int per_sp); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_fixed_revive_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_fixed_revive_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, &per_hp, &per_sp); + retVal___ = postHookFunc(retVal___, bl, per_hp, per_sp); } } return retVal___; @@ -72779,14 +85173,14 @@ int HP_status_fixed_revive(struct block_list *bl, unsigned int per_hp, unsigned 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); + if (HPMHooks.count.HP_status_get_regen_data_pre > 0) { + struct regen_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_regen_data_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72794,9 +85188,9 @@ struct regen_data* HP_status_get_regen_data(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_regen_data(bl); } - if( HPMHooks.count.HP_status_get_regen_data_post ) { + if (HPMHooks.count.HP_status_get_regen_data_post > 0) { 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++ ) { + 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); } @@ -72806,14 +85200,14 @@ struct regen_data* HP_status_get_regen_data(struct block_list *bl) { 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); + if (HPMHooks.count.HP_status_get_status_data_pre > 0) { + struct status_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_status_data_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72821,9 +85215,9 @@ struct status_data* HP_status_get_status_data(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_status_data(bl); } - if( HPMHooks.count.HP_status_get_status_data_post ) { + if (HPMHooks.count.HP_status_get_status_data_post > 0) { 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++ ) { + 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); } @@ -72833,14 +85227,14 @@ struct status_data* HP_status_get_status_data(struct block_list *bl) { 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); + if (HPMHooks.count.HP_status_get_base_status_pre > 0) { + struct status_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_status_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72848,9 +85242,9 @@ struct status_data* HP_status_get_base_status(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_base_status(bl); } - if( HPMHooks.count.HP_status_get_base_status_post ) { + if (HPMHooks.count.HP_status_get_base_status_post > 0) { 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++ ) { + 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); } @@ -72860,14 +85254,14 @@ struct status_data* HP_status_get_base_status(struct block_list *bl) { const char* HP_status_get_name(const struct block_list *bl) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_status_get_name_pre ) { - const char* (*preHookFunc) (const struct block_list *bl); + if (HPMHooks.count.HP_status_get_name_pre > 0) { + const char* (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72875,9 +85269,9 @@ const char* HP_status_get_name(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_name(bl); } - if( HPMHooks.count.HP_status_get_name_post ) { + if (HPMHooks.count.HP_status_get_name_post > 0) { const char* (*postHookFunc) (const char* retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_name_post; hIndex++ ) { + 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); } @@ -72887,14 +85281,14 @@ const char* HP_status_get_name(const struct block_list *bl) { int HP_status_get_class(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_class_pre ) { - int (*preHookFunc) (const struct block_list *bl); + if (HPMHooks.count.HP_status_get_class_pre > 0) { + int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72902,9 +85296,9 @@ int HP_status_get_class(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_class(bl); } - if( HPMHooks.count.HP_status_get_class_post ) { + if (HPMHooks.count.HP_status_get_class_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_class_post; hIndex++ ) { + 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); } @@ -72914,14 +85308,14 @@ int HP_status_get_class(const struct block_list *bl) { int HP_status_get_lv(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_lv_pre ) { - int (*preHookFunc) (const struct block_list *bl); + if (HPMHooks.count.HP_status_get_lv_pre > 0) { + int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72929,9 +85323,9 @@ int HP_status_get_lv(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_lv(bl); } - if( HPMHooks.count.HP_status_get_lv_post ) { + if (HPMHooks.count.HP_status_get_lv_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_lv_post; hIndex++ ) { + 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); } @@ -72941,14 +85335,14 @@ int HP_status_get_lv(const struct block_list *bl) { defType HP_status_get_def(struct block_list *bl) { int hIndex = 0; defType retVal___ = 0; - if( HPMHooks.count.HP_status_get_def_pre ) { - defType (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_status_get_def_pre > 0) { + defType (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72956,9 +85350,9 @@ defType HP_status_get_def(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_def(bl); } - if( HPMHooks.count.HP_status_get_def_post ) { + if (HPMHooks.count.HP_status_get_def_post > 0) { defType (*postHookFunc) (defType retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_def_post; hIndex++ ) { + 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); } @@ -72968,14 +85362,14 @@ defType HP_status_get_def(struct block_list *bl) { unsigned short HP_status_get_speed(struct block_list *bl) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_get_speed_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_status_get_speed_pre > 0) { + unsigned short (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -72983,9 +85377,9 @@ unsigned short HP_status_get_speed(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_speed(bl); } - if( HPMHooks.count.HP_status_get_speed_post ) { + if (HPMHooks.count.HP_status_get_speed_post > 0) { unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_speed_post; hIndex++ ) { + 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); } @@ -72995,14 +85389,14 @@ unsigned short HP_status_get_speed(struct block_list *bl) { unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status_change *sc, int element) { int hIndex = 0; unsigned char retVal___ = 0; - if( HPMHooks.count.HP_status_calc_attack_element_pre ) { - unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element); + if (HPMHooks.count.HP_status_calc_attack_element_pre > 0) { + unsigned char (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *element); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_attack_element_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &element); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73010,11 +85404,11 @@ unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status { 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++ ) { + if (HPMHooks.count.HP_status_calc_attack_element_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, element); } } return retVal___; @@ -73022,14 +85416,14 @@ unsigned char HP_status_calc_attack_element(struct block_list *bl, struct status int HP_status_get_party_id(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_party_id_pre ) { - int (*preHookFunc) (const struct block_list *bl); + if (HPMHooks.count.HP_status_get_party_id_pre > 0) { + int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73037,9 +85431,9 @@ int HP_status_get_party_id(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_party_id(bl); } - if( HPMHooks.count.HP_status_get_party_id_post ) { + if (HPMHooks.count.HP_status_get_party_id_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_party_id_post; hIndex++ ) { + 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); } @@ -73049,14 +85443,14 @@ int HP_status_get_party_id(const struct block_list *bl) { int HP_status_get_guild_id(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_guild_id_pre ) { - int (*preHookFunc) (const struct block_list *bl); + if (HPMHooks.count.HP_status_get_guild_id_pre > 0) { + int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73064,9 +85458,9 @@ int HP_status_get_guild_id(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_guild_id(bl); } - if( HPMHooks.count.HP_status_get_guild_id_post ) { + if (HPMHooks.count.HP_status_get_guild_id_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_guild_id_post; hIndex++ ) { + 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); } @@ -73076,14 +85470,14 @@ int HP_status_get_guild_id(const struct block_list *bl) { int HP_status_get_emblem_id(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_emblem_id_pre ) { - int (*preHookFunc) (const struct block_list *bl); + if (HPMHooks.count.HP_status_get_emblem_id_pre > 0) { + int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73091,9 +85485,9 @@ int HP_status_get_emblem_id(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_emblem_id(bl); } - if( HPMHooks.count.HP_status_get_emblem_id_post ) { + if (HPMHooks.count.HP_status_get_emblem_id_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_emblem_id_post; hIndex++ ) { + 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); } @@ -73103,14 +85497,14 @@ int HP_status_get_emblem_id(const struct block_list *bl) { int HP_status_get_mexp(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_mexp_pre ) { - int (*preHookFunc) (const struct block_list *bl); + if (HPMHooks.count.HP_status_get_mexp_pre > 0) { + int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73118,9 +85512,9 @@ int HP_status_get_mexp(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_mexp(bl); } - if( HPMHooks.count.HP_status_get_mexp_post ) { + if (HPMHooks.count.HP_status_get_mexp_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_mexp_post; hIndex++ ) { + 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); } @@ -73130,14 +85524,14 @@ int HP_status_get_mexp(const struct block_list *bl) { int HP_status_get_race2(const struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_race2_pre ) { - int (*preHookFunc) (const struct block_list *bl); + if (HPMHooks.count.HP_status_get_race2_pre > 0) { + int (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73145,9 +85539,9 @@ int HP_status_get_race2(const struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_race2(bl); } - if( HPMHooks.count.HP_status_get_race2_post ) { + if (HPMHooks.count.HP_status_get_race2_post > 0) { int (*postHookFunc) (int retVal___, const struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_race2_post; hIndex++ ) { + 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); } @@ -73157,14 +85551,14 @@ int HP_status_get_race2(const struct block_list *bl) { 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); + if (HPMHooks.count.HP_status_get_viewdata_pre > 0) { + struct view_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73172,9 +85566,9 @@ struct view_data* HP_status_get_viewdata(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_viewdata(bl); } - if( HPMHooks.count.HP_status_get_viewdata_post ) { + if (HPMHooks.count.HP_status_get_viewdata_post > 0) { struct view_data* (*postHookFunc) (struct view_data* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_viewdata_post; hIndex++ ) { + 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); } @@ -73183,14 +85577,14 @@ struct view_data* HP_status_get_viewdata(struct block_list *bl) { } 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_); + if (HPMHooks.count.HP_status_set_viewdata_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *class_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_set_viewdata_pre; hIndex++ ) { + 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_); + preHookFunc(&bl, &class_); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73198,25 +85592,25 @@ void HP_status_set_viewdata(struct block_list *bl, int class_) { { 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++ ) { + if (HPMHooks.count.HP_status_set_viewdata_post > 0) { + 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_); + 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); + if (HPMHooks.count.HP_status_change_init_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_change_init_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73224,9 +85618,9 @@ void HP_status_change_init(struct block_list *bl) { { HPMHooks.source.status.change_init(bl); } - if( HPMHooks.count.HP_status_change_init_post ) { + if (HPMHooks.count.HP_status_change_init_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_change_init_post[hIndex].func; postHookFunc(bl); } @@ -73236,14 +85630,14 @@ void HP_status_change_init(struct block_list *bl) { 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); + if (HPMHooks.count.HP_status_get_sc_pre > 0) { + struct status_change* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73251,9 +85645,9 @@ struct status_change* HP_status_get_sc(struct block_list *bl) { { retVal___ = HPMHooks.source.status.get_sc(bl); } - if( HPMHooks.count.HP_status_get_sc_post ) { + if (HPMHooks.count.HP_status_get_sc_post > 0) { struct status_change* (*postHookFunc) (struct status_change* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_post; hIndex++ ) { + 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); } @@ -73263,14 +85657,14 @@ struct status_change* HP_status_get_sc(struct block_list *bl) { int HP_status_isdead(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_isdead_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_status_isdead_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_isdead_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73278,9 +85672,9 @@ int HP_status_isdead(struct block_list *bl) { { retVal___ = HPMHooks.source.status.isdead(bl); } - if( HPMHooks.count.HP_status_isdead_post ) { + if (HPMHooks.count.HP_status_isdead_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_isdead_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_isdead_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -73290,14 +85684,14 @@ int HP_status_isdead(struct block_list *bl) { int HP_status_isimmune(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_isimmune_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_status_isimmune_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_isimmune_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73305,9 +85699,9 @@ int HP_status_isimmune(struct block_list *bl) { { retVal___ = HPMHooks.source.status.isimmune(bl); } - if( HPMHooks.count.HP_status_isimmune_post ) { + if (HPMHooks.count.HP_status_isimmune_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_isimmune_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_isimmune_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -73317,14 +85711,14 @@ int HP_status_isimmune(struct block_list *bl) { int HP_status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int tick, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_sc_def_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *tick, int *flag); + if (HPMHooks.count.HP_status_get_sc_def_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *rate, int *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_sc_def_pre; hIndex++ ) { + 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(src, bl, &type, &rate, &tick, &flag); + retVal___ = preHookFunc(&src, &bl, &type, &rate, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73332,11 +85726,11 @@ int HP_status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_ { retVal___ = HPMHooks.source.status.get_sc_def(src, bl, type, rate, tick, flag); } - if( HPMHooks.count.HP_status_get_sc_def_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, 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++ ) { + if (HPMHooks.count.HP_status_get_sc_def_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, 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___, src, bl, &type, &rate, &tick, &flag); + retVal___ = postHookFunc(retVal___, src, bl, type, rate, tick, flag); } } return retVal___; @@ -73344,14 +85738,14 @@ int HP_status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_ int HP_status_change_start(struct block_list *src, 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___ = 0; - if( HPMHooks.count.HP_status_change_start_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); + if (HPMHooks.count.HP_status_change_start_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_change_start_pre[hIndex].func; - retVal___ = preHookFunc(src, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); + retVal___ = preHookFunc(&src, &bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73359,11 +85753,38 @@ int HP_status_change_start(struct block_list *src, struct block_list *bl, enum s { retVal___ = HPMHooks.source.status.change_start(src, bl, type, rate, val1, val2, val3, val4, tick, flag); } - if( HPMHooks.count.HP_status_change_start_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, 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++ ) { + if (HPMHooks.count.HP_status_change_start_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, 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___, src, bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &flag); + retVal___ = postHookFunc(retVal___, src, bl, type, rate, val1, val2, val3, val4, tick, flag); + } + } + return retVal___; +} +int HP_status_change_start_sub(struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int total_tick, int flag) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_change_start_sub_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *rate, int *val1, int *val2, int *val3, int *val4, int *tick, int *total_tick, int *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_change_start_sub_pre[hIndex].func; + retVal___ = preHookFunc(&src, &bl, &type, &rate, &val1, &val2, &val3, &val4, &tick, &total_tick, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_start_sub(src, bl, type, rate, val1, val2, val3, val4, tick, total_tick, flag); + } + if (HPMHooks.count.HP_status_change_start_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int rate, int val1, int val2, int val3, int val4, int tick, int total_tick, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_change_start_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, type, rate, val1, val2, val3, val4, tick, total_tick, flag); } } return retVal___; @@ -73371,14 +85792,14 @@ int HP_status_change_start(struct block_list *src, struct block_list *bl, enum s 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___ = 0; - 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); + if (HPMHooks.count.HP_status_change_end__pre > 0) { + int (*preHookFunc) (struct block_list **bl, enum sc_type *type, int *tid, const char **file, int *line); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_end__pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &type, &tid, &file, &line); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73386,11 +85807,225 @@ int HP_status_change_end_(struct block_list *bl, enum sc_type type, int tid, con { 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++ ) { + if (HPMHooks.count.HP_status_change_end__post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, type, tid, file, line); + } + } + return retVal___; +} +bool HP_status_is_immune_to_status(struct status_change *sc, enum sc_type type) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_status_is_immune_to_status_pre > 0) { + bool (*preHookFunc) (struct status_change **sc, enum sc_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_immune_to_status_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_is_immune_to_status_pre[hIndex].func; + retVal___ = preHookFunc(&sc, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.is_immune_to_status(sc, type); + } + if (HPMHooks.count.HP_status_is_immune_to_status_post > 0) { + bool (*postHookFunc) (bool retVal___, struct status_change *sc, enum sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_immune_to_status_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_is_immune_to_status_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sc, type); + } + } + return retVal___; +} +bool HP_status_is_boss_resist_sc(enum sc_type type) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_status_is_boss_resist_sc_pre > 0) { + bool (*preHookFunc) (enum sc_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_boss_resist_sc_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_is_boss_resist_sc_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.is_boss_resist_sc(type); + } + if (HPMHooks.count.HP_status_is_boss_resist_sc_post > 0) { + bool (*postHookFunc) (bool retVal___, enum sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_is_boss_resist_sc_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_is_boss_resist_sc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type); + } + } + return retVal___; +} +bool HP_status_end_sc_before_start(struct block_list *bl, struct status_data *st, struct status_change *sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_status_end_sc_before_start_pre > 0) { + bool (*preHookFunc) (struct block_list **bl, struct status_data **st, struct status_change **sc, enum sc_type *type, int *undead_flag, int *val1, int *val2, int *val3, int *val4); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_end_sc_before_start_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_end_sc_before_start_pre[hIndex].func; + retVal___ = preHookFunc(&bl, &st, &sc, &type, &undead_flag, &val1, &val2, &val3, &val4); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.end_sc_before_start(bl, st, sc, type, undead_flag, val1, val2, val3, val4); + } + if (HPMHooks.count.HP_status_end_sc_before_start_post > 0) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct status_data *st, struct status_change *sc, enum sc_type type, int undead_flag, int val1, int val2, int val3, int val4); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_end_sc_before_start_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_end_sc_before_start_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, st, sc, type, undead_flag, val1, val2, val3, val4); + } + } + return retVal___; +} +void HP_status_change_start_stop_action(struct block_list *bl, enum sc_type type) { + int hIndex = 0; + if (HPMHooks.count.HP_status_change_start_stop_action_pre > 0) { + void (*preHookFunc) (struct block_list **bl, enum sc_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_stop_action_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_change_start_stop_action_pre[hIndex].func; + preHookFunc(&bl, &type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.change_start_stop_action(bl, type); + } + if (HPMHooks.count.HP_status_change_start_stop_action_post > 0) { + void (*postHookFunc) (struct block_list *bl, enum sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_stop_action_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_change_start_stop_action_post[hIndex].func; + postHookFunc(bl, type); + } + } + return; +} +int HP_status_change_start_set_option(struct block_list *bl, struct status_change *sc, enum sc_type type, int val1, int val2, int val3, int val4) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_change_start_set_option_pre > 0) { + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, enum sc_type *type, int *val1, int *val2, int *val3, int *val4); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_set_option_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_change_start_set_option_pre[hIndex].func; + retVal___ = preHookFunc(&bl, &sc, &type, &val1, &val2, &val3, &val4); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_start_set_option(bl, sc, type, val1, val2, val3, val4); + } + if (HPMHooks.count.HP_status_change_start_set_option_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, enum sc_type type, int val1, int val2, int val3, int val4); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_set_option_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_change_start_set_option_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc, type, val1, val2, val3, val4); + } + } + return retVal___; +} +int HP_status_get_val_flag(enum sc_type type) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_get_val_flag_pre > 0) { + int (*preHookFunc) (enum sc_type *type); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_val_flag_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_val_flag_pre[hIndex].func; + retVal___ = preHookFunc(&type); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_val_flag(type); + } + if (HPMHooks.count.HP_status_get_val_flag_post > 0) { + int (*postHookFunc) (int retVal___, enum sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_val_flag_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_val_flag_post[hIndex].func; + retVal___ = postHookFunc(retVal___, type); + } + } + return retVal___; +} +void HP_status_change_start_display(struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4) { + int hIndex = 0; + if (HPMHooks.count.HP_status_change_start_display_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum sc_type *type, int *val1, int *val2, int *val3, int *val4); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_display_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_change_start_display_pre[hIndex].func; + preHookFunc(&sd, &type, &val1, &val2, &val3, &val4); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.change_start_display(sd, type, val1, val2, val3, val4); + } + if (HPMHooks.count.HP_status_change_start_display_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum sc_type type, int val1, int val2, int val3, int val4); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_display_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_change_start_display_post[hIndex].func; + postHookFunc(sd, type, val1, val2, val3, val4); + } + } + return; +} +bool HP_status_change_start_unknown_sc(struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_status_change_start_unknown_sc_pre > 0) { + bool (*preHookFunc) (struct block_list **src, struct block_list **bl, enum sc_type *type, int *calc_flag, int *rate, int *val1, int *val2, int *val3, int *val4, int *total_tick, int *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_unknown_sc_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_change_start_unknown_sc_pre[hIndex].func; + retVal___ = preHookFunc(&src, &bl, &type, &calc_flag, &rate, &val1, &val2, &val3, &val4, &total_tick, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.change_start_unknown_sc(src, bl, type, calc_flag, rate, val1, val2, val3, val4, total_tick, flag); + } + if (HPMHooks.count.HP_status_change_start_unknown_sc_post > 0) { + bool (*postHookFunc) (bool retVal___, struct block_list *src, struct block_list *bl, enum sc_type type, int calc_flag, int rate, int val1, int val2, int val3, int val4, int total_tick, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_change_start_unknown_sc_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_change_start_unknown_sc_post[hIndex].func; + retVal___ = postHookFunc(retVal___, src, bl, type, calc_flag, rate, val1, val2, val3, val4, total_tick, flag); } } return retVal___; @@ -73398,14 +86033,14 @@ int HP_status_change_end_(struct block_list *bl, enum sc_type type, int tid, con int HP_status_kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_kaahi_heal_timer_pre ) { + if (HPMHooks.count.HP_status_kaahi_heal_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73413,11 +86048,11 @@ int HP_status_kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_kaahi_heal_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_status_kaahi_heal_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -73425,14 +86060,14 @@ int HP_status_kaahi_heal_timer(int tid, int64 tick, int id, intptr_t data) { int HP_status_change_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_change_timer_pre ) { + if (HPMHooks.count.HP_status_change_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73440,11 +86075,11 @@ int HP_status_change_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.status.change_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_status_change_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_status_change_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -73452,16 +86087,16 @@ int HP_status_change_timer(int tid, int64 tick, int id, intptr_t data) { int HP_status_change_timer_sub(struct block_list *bl, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_change_timer_sub_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list ap); + if (HPMHooks.count.HP_status_change_timer_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73471,9 +86106,9 @@ int HP_status_change_timer_sub(struct block_list *bl, va_list ap) { retVal___ = HPMHooks.source.status.change_timer_sub(bl, ap___copy); va_end(ap___copy); } - if( HPMHooks.count.HP_status_change_timer_sub_post ) { + if (HPMHooks.count.HP_status_change_timer_sub_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_timer_sub_post; hIndex++ ) { + 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); @@ -73485,14 +86120,14 @@ int HP_status_change_timer_sub(struct block_list *bl, va_list ap) { int HP_status_change_clear(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_change_clear_pre ) { - int (*preHookFunc) (struct block_list *bl, int *type); + if (HPMHooks.count.HP_status_change_clear_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73500,11 +86135,11 @@ int HP_status_change_clear(struct block_list *bl, int type) { { 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++ ) { + if (HPMHooks.count.HP_status_change_clear_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, type); } } return retVal___; @@ -73512,14 +86147,14 @@ int HP_status_change_clear(struct block_list *bl, int type) { int HP_status_change_clear_buffs(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_change_clear_buffs_pre ) { - int (*preHookFunc) (struct block_list *bl, int *type); + if (HPMHooks.count.HP_status_change_clear_buffs_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_clear_buffs_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73527,25 +86162,25 @@ int HP_status_change_clear_buffs(struct block_list *bl, int type) { { 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++ ) { + if (HPMHooks.count.HP_status_change_clear_buffs_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, type); } } return retVal___; } void HP_status_calc_bl_(struct block_list *bl, enum scb_flag flag, enum e_status_calc_opt opt) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_bl__pre ) { - void (*preHookFunc) (struct block_list *bl, enum scb_flag *flag, enum e_status_calc_opt *opt); + if (HPMHooks.count.HP_status_calc_bl__pre > 0) { + void (*preHookFunc) (struct block_list **bl, enum scb_flag *flag, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__pre; hIndex++ ) { + 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, &opt); + preHookFunc(&bl, &flag, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73553,11 +86188,11 @@ void HP_status_calc_bl_(struct block_list *bl, enum scb_flag flag, enum e_status { HPMHooks.source.status.calc_bl_(bl, flag, opt); } - if( HPMHooks.count.HP_status_calc_bl__post ) { - void (*postHookFunc) (struct block_list *bl, enum scb_flag *flag, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl__post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_bl__post > 0) { + void (*postHookFunc) (struct block_list *bl, enum scb_flag flag, enum e_status_calc_opt opt); + 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, &opt); + postHookFunc(bl, flag, opt); } } return; @@ -73565,14 +86200,14 @@ void HP_status_calc_bl_(struct block_list *bl, enum scb_flag flag, enum e_status int HP_status_calc_mob_(struct mob_data *md, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mob__pre ) { - int (*preHookFunc) (struct mob_data *md, enum e_status_calc_opt *opt); + if (HPMHooks.count.HP_status_calc_mob__pre > 0) { + int (*preHookFunc) (struct mob_data **md, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__pre; hIndex++ ) { + 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, &opt); + retVal___ = preHookFunc(&md, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73580,11 +86215,11 @@ int HP_status_calc_mob_(struct mob_data *md, enum e_status_calc_opt opt) { { retVal___ = HPMHooks.source.status.calc_mob_(md, opt); } - if( HPMHooks.count.HP_status_calc_mob__post ) { - int (*postHookFunc) (int retVal___, struct mob_data *md, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mob__post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_mob__post > 0) { + int (*postHookFunc) (int retVal___, struct mob_data *md, enum e_status_calc_opt opt); + 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, &opt); + retVal___ = postHookFunc(retVal___, md, opt); } } return retVal___; @@ -73592,14 +86227,14 @@ int HP_status_calc_mob_(struct mob_data *md, enum e_status_calc_opt opt) { int HP_status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_pet__pre ) { - int (*preHookFunc) (struct pet_data *pd, enum e_status_calc_opt *opt); + if (HPMHooks.count.HP_status_calc_pet__pre > 0) { + int (*preHookFunc) (struct pet_data **pd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__pre; hIndex++ ) { + 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, &opt); + retVal___ = preHookFunc(&pd, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73607,11 +86242,11 @@ int HP_status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt) { { retVal___ = HPMHooks.source.status.calc_pet_(pd, opt); } - if( HPMHooks.count.HP_status_calc_pet__post ) { - int (*postHookFunc) (int retVal___, struct pet_data *pd, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pet__post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_pet__post > 0) { + int (*postHookFunc) (int retVal___, struct pet_data *pd, enum e_status_calc_opt opt); + 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, &opt); + retVal___ = postHookFunc(retVal___, pd, opt); } } return retVal___; @@ -73619,14 +86254,14 @@ int HP_status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt) { int HP_status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_pc__pre ) { - int (*preHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt); + if (HPMHooks.count.HP_status_calc_pc__pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__pre; hIndex++ ) { + 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, &opt); + retVal___ = preHookFunc(&sd, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73634,25 +86269,25 @@ int HP_status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt opt) { retVal___ = HPMHooks.source.status.calc_pc_(sd, opt); } - if( HPMHooks.count.HP_status_calc_pc__post ) { - int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc__post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_pc__post > 0) { + int (*postHookFunc) (int retVal___, struct map_session_data *sd, enum e_status_calc_opt opt); + 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, &opt); + retVal___ = postHookFunc(retVal___, sd, opt); } } return retVal___; } void HP_status_calc_pc_additional(struct map_session_data *sd, enum e_status_calc_opt opt) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_pc_additional_pre ) { - void (*preHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt); + if (HPMHooks.count.HP_status_calc_pc_additional_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_pc_additional_pre[hIndex].func; - preHookFunc(sd, &opt); + preHookFunc(&sd, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73660,11 +86295,37 @@ void HP_status_calc_pc_additional(struct map_session_data *sd, enum e_status_cal { HPMHooks.source.status.calc_pc_additional(sd, opt); } - if( HPMHooks.count.HP_status_calc_pc_additional_post ) { - void (*postHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_pc_additional_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum e_status_calc_opt opt); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_pc_additional_post[hIndex].func; - postHookFunc(sd, &opt); + postHookFunc(sd, opt); + } + } + return; +} +void HP_status_calc_pc_recover_hp(struct map_session_data *sd, struct status_data *bstatus) { + int hIndex = 0; + if (HPMHooks.count.HP_status_calc_pc_recover_hp_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct status_data **bstatus); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_recover_hp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_calc_pc_recover_hp_pre[hIndex].func; + preHookFunc(&sd, &bstatus); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.calc_pc_recover_hp(sd, bstatus); + } + if (HPMHooks.count.HP_status_calc_pc_recover_hp_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, struct status_data *bstatus); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_recover_hp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_calc_pc_recover_hp_post[hIndex].func; + postHookFunc(sd, bstatus); } } return; @@ -73672,14 +86333,14 @@ void HP_status_calc_pc_additional(struct map_session_data *sd, enum e_status_cal int HP_status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_homunculus__pre ) { - int (*preHookFunc) (struct homun_data *hd, enum e_status_calc_opt *opt); + if (HPMHooks.count.HP_status_calc_homunculus__pre > 0) { + int (*preHookFunc) (struct homun_data **hd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__pre; hIndex++ ) { + 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, &opt); + retVal___ = preHookFunc(&hd, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73687,11 +86348,11 @@ int HP_status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt { retVal___ = HPMHooks.source.status.calc_homunculus_(hd, opt); } - if( HPMHooks.count.HP_status_calc_homunculus__post ) { - int (*postHookFunc) (int retVal___, struct homun_data *hd, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_homunculus__post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_homunculus__post > 0) { + int (*postHookFunc) (int retVal___, struct homun_data *hd, enum e_status_calc_opt opt); + 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, &opt); + retVal___ = postHookFunc(retVal___, hd, opt); } } return retVal___; @@ -73699,14 +86360,14 @@ int HP_status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt int HP_status_calc_mercenary_(struct mercenary_data *md, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mercenary__pre ) { - int (*preHookFunc) (struct mercenary_data *md, enum e_status_calc_opt *opt); + if (HPMHooks.count.HP_status_calc_mercenary__pre > 0) { + int (*preHookFunc) (struct mercenary_data **md, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__pre; hIndex++ ) { + 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, &opt); + retVal___ = preHookFunc(&md, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73714,11 +86375,11 @@ int HP_status_calc_mercenary_(struct mercenary_data *md, enum e_status_calc_opt { retVal___ = HPMHooks.source.status.calc_mercenary_(md, opt); } - if( HPMHooks.count.HP_status_calc_mercenary__post ) { - int (*postHookFunc) (int retVal___, struct mercenary_data *md, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mercenary__post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_mercenary__post > 0) { + int (*postHookFunc) (int retVal___, struct mercenary_data *md, enum e_status_calc_opt opt); + 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, &opt); + retVal___ = postHookFunc(retVal___, md, opt); } } return retVal___; @@ -73726,14 +86387,14 @@ int HP_status_calc_mercenary_(struct mercenary_data *md, enum e_status_calc_opt int HP_status_calc_elemental_(struct elemental_data *ed, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_elemental__pre ) { - int (*preHookFunc) (struct elemental_data *ed, enum e_status_calc_opt *opt); + if (HPMHooks.count.HP_status_calc_elemental__pre > 0) { + int (*preHookFunc) (struct elemental_data **ed, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__pre; hIndex++ ) { + 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, &opt); + retVal___ = preHookFunc(&ed, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73741,25 +86402,25 @@ int HP_status_calc_elemental_(struct elemental_data *ed, enum e_status_calc_opt { retVal___ = HPMHooks.source.status.calc_elemental_(ed, opt); } - if( HPMHooks.count.HP_status_calc_elemental__post ) { - int (*postHookFunc) (int retVal___, struct elemental_data *ed, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_elemental__post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_elemental__post > 0) { + int (*postHookFunc) (int retVal___, struct elemental_data *ed, enum e_status_calc_opt opt); + 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, &opt); + retVal___ = postHookFunc(retVal___, ed, opt); } } return retVal___; } void HP_status_calc_misc(struct block_list *bl, struct status_data *st, int level) { int hIndex = 0; - if( HPMHooks.count.HP_status_calc_misc_pre ) { - void (*preHookFunc) (struct block_list *bl, struct status_data *st, int *level); + if (HPMHooks.count.HP_status_calc_misc_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct status_data **st, int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_misc_pre[hIndex].func; - preHookFunc(bl, st, &level); + preHookFunc(&bl, &st, &level); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73767,25 +86428,25 @@ void HP_status_calc_misc(struct block_list *bl, struct status_data *st, int leve { HPMHooks.source.status.calc_misc(bl, st, level); } - if( HPMHooks.count.HP_status_calc_misc_post ) { - void (*postHookFunc) (struct block_list *bl, struct status_data *st, int *level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_misc_post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_misc_post > 0) { + void (*postHookFunc) (struct block_list *bl, struct status_data *st, 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, st, &level); + postHookFunc(bl, st, 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); + if (HPMHooks.count.HP_status_calc_regen_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct status_data **st, struct regen_data **regen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &st, ®en); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73793,9 +86454,9 @@ void HP_status_calc_regen(struct block_list *bl, struct status_data *st, struct { HPMHooks.source.status.calc_regen(bl, st, regen); } - if( HPMHooks.count.HP_status_calc_regen_post ) { + if (HPMHooks.count.HP_status_calc_regen_post > 0) { 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++ ) { + 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); } @@ -73804,14 +86465,14 @@ void HP_status_calc_regen(struct block_list *bl, struct status_data *st, struct } 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); + if (HPMHooks.count.HP_status_calc_regen_rate_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct regen_data **regen, struct status_change **sc); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_regen_rate_pre; hIndex++ ) { + 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); + preHookFunc(&bl, ®en, &sc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -73819,9 +86480,9 @@ void HP_status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, { HPMHooks.source.status.calc_regen_rate(bl, regen, sc); } - if( HPMHooks.count.HP_status_calc_regen_rate_post ) { + if (HPMHooks.count.HP_status_calc_regen_rate_post > 0) { 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++ ) { + 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); } @@ -73831,14 +86492,14 @@ void HP_status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, int HP_status_check_skilluse(struct block_list *src, struct block_list *target, uint16 skill_id, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_check_skilluse_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target, uint16 *skill_id, int *flag); + if (HPMHooks.count.HP_status_check_skilluse_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **target, uint16 *skill_id, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_skilluse_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target, &skill_id, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73846,11 +86507,11 @@ int HP_status_check_skilluse(struct block_list *src, struct block_list *target, { 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++ ) { + if (HPMHooks.count.HP_status_check_skilluse_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target, skill_id, flag); } } return retVal___; @@ -73858,14 +86519,14 @@ int HP_status_check_skilluse(struct block_list *src, struct block_list *target, int HP_status_check_visibility(struct block_list *src, struct block_list *target) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_check_visibility_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target); + if (HPMHooks.count.HP_status_check_visibility_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **target); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73873,9 +86534,9 @@ int HP_status_check_visibility(struct block_list *src, struct block_list *target { retVal___ = HPMHooks.source.status.check_visibility(src, target); } - if( HPMHooks.count.HP_status_check_visibility_post ) { + if (HPMHooks.count.HP_status_check_visibility_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_check_visibility_post; hIndex++ ) { + 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); } @@ -73885,14 +86546,14 @@ int HP_status_check_visibility(struct block_list *src, struct block_list *target int HP_status_change_spread(struct block_list *src, struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_change_spread_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *bl); + if (HPMHooks.count.HP_status_change_spread_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73900,9 +86561,9 @@ int HP_status_change_spread(struct block_list *src, struct block_list *bl) { { retVal___ = HPMHooks.source.status.change_spread(src, bl); } - if( HPMHooks.count.HP_status_change_spread_post ) { + if (HPMHooks.count.HP_status_change_spread_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_change_spread_post; hIndex++ ) { + 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); } @@ -73912,14 +86573,14 @@ int HP_status_change_spread(struct block_list *src, struct block_list *bl) { defType HP_status_calc_def(struct block_list *bl, struct status_change *sc, int def, bool viewable) { int hIndex = 0; defType retVal___ = 0; - if( HPMHooks.count.HP_status_calc_def_pre ) { - defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def, bool *viewable); + if (HPMHooks.count.HP_status_calc_def_pre > 0) { + defType (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *def, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &def, &viewable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73927,11 +86588,11 @@ defType HP_status_calc_def(struct block_list *bl, struct status_change *sc, int { 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++ ) { + if (HPMHooks.count.HP_status_calc_def_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, def, viewable); } } return retVal___; @@ -73939,14 +86600,14 @@ defType HP_status_calc_def(struct block_list *bl, struct status_change *sc, int short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int def2, bool viewable) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_def2_pre ) { - short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *def2, bool *viewable); + if (HPMHooks.count.HP_status_calc_def2_pre > 0) { + short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *def2, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_def2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &def2, &viewable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73954,11 +86615,11 @@ short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int d { 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++ ) { + if (HPMHooks.count.HP_status_calc_def2_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, def2, viewable); } } return retVal___; @@ -73966,14 +86627,14 @@ short HP_status_calc_def2(struct block_list *bl, struct status_change *sc, int d defType HP_status_calc_mdef(struct block_list *bl, struct status_change *sc, int mdef, bool viewable) { int hIndex = 0; defType retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mdef_pre ) { - defType (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef, bool *viewable); + if (HPMHooks.count.HP_status_calc_mdef_pre > 0) { + defType (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *mdef, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &mdef, &viewable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -73981,11 +86642,11 @@ defType HP_status_calc_mdef(struct block_list *bl, struct status_change *sc, int { 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++ ) { + if (HPMHooks.count.HP_status_calc_mdef_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, mdef, viewable); } } return retVal___; @@ -73993,14 +86654,14 @@ defType HP_status_calc_mdef(struct block_list *bl, struct status_change *sc, int short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int mdef2, bool viewable) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mdef2_pre ) { - short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *mdef2, bool *viewable); + if (HPMHooks.count.HP_status_calc_mdef2_pre > 0) { + short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *mdef2, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mdef2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &mdef2, &viewable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74008,26 +86669,26 @@ short HP_status_calc_mdef2(struct block_list *bl, struct status_change *sc, int { 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++ ) { + if (HPMHooks.count.HP_status_calc_mdef2_post > 0) { + 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); + 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 HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_batk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *batk, bool *viewable); + int retVal___ = 0; + if (HPMHooks.count.HP_status_calc_batk_pre > 0) { + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_batk_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &batk, &viewable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74035,26 +86696,26 @@ unsigned short HP_status_calc_batk(struct block_list *bl, struct status_change * { 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++ ) { + if (HPMHooks.count.HP_status_calc_batk_post > 0) { + int (*postHookFunc) (int 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); + retVal___ = postHookFunc(retVal___, bl, sc, batk, viewable); } } return retVal___; } -unsigned short HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) { +int HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_base_matk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, const struct status_data *st, int *level); + int retVal___ = 0; + if (HPMHooks.count.HP_status_base_matk_pre > 0) { + int (*preHookFunc) (struct block_list **bl, const struct status_data **st, int *level); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_base_matk_pre[hIndex].func; - retVal___ = preHookFunc(bl, st, &level); + retVal___ = preHookFunc(&bl, &st, &level); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74062,11 +86723,11 @@ unsigned short HP_status_base_matk(struct block_list *bl, const struct status_da { retVal___ = HPMHooks.source.status.base_matk(bl, st, level); } - if( HPMHooks.count.HP_status_base_matk_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, const struct status_data *st, int *level); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_post; hIndex++ ) { + if (HPMHooks.count.HP_status_base_matk_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, const struct status_data *st, int level); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_base_matk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, st, &level); + retVal___ = postHookFunc(retVal___, bl, st, level); } } return retVal___; @@ -74074,14 +86735,14 @@ unsigned short HP_status_base_matk(struct block_list *bl, const struct status_da int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_weapon_atk_pre ) { - int (*preHookFunc) (struct block_list *src, struct weapon_atk *watk, int *flag); + if (HPMHooks.count.HP_status_get_weapon_atk_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct weapon_atk **watk, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_get_weapon_atk_pre[hIndex].func; - retVal___ = preHookFunc(src, watk, &flag); + retVal___ = preHookFunc(&src, &watk, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74089,11 +86750,11 @@ int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, in { retVal___ = HPMHooks.source.status.get_weapon_atk(src, watk, flag); } - if( HPMHooks.count.HP_status_get_weapon_atk_post ) { - int (*postHookFunc) (int retVal___, struct block_list *src, struct weapon_atk *watk, int *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_post; hIndex++ ) { + if (HPMHooks.count.HP_status_get_weapon_atk_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct weapon_atk *watk, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_weapon_atk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_get_weapon_atk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, src, watk, &flag); + retVal___ = postHookFunc(retVal___, src, watk, flag); } } return retVal___; @@ -74101,14 +86762,14 @@ int HP_status_get_weapon_atk(struct block_list *src, struct weapon_atk *watk, in int HP_status_get_total_mdef(struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_total_mdef_pre ) { - int (*preHookFunc) (struct block_list *src); + if (HPMHooks.count.HP_status_get_total_mdef_pre > 0) { + int (*preHookFunc) (struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74116,9 +86777,9 @@ int HP_status_get_total_mdef(struct block_list *src) { { retVal___ = HPMHooks.source.status.get_total_mdef(src); } - if( HPMHooks.count.HP_status_get_total_mdef_post ) { + if (HPMHooks.count.HP_status_get_total_mdef_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_mdef_post; hIndex++ ) { + 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); } @@ -74128,14 +86789,14 @@ int HP_status_get_total_mdef(struct block_list *src) { int HP_status_get_total_def(struct block_list *src) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_total_def_pre ) { - int (*preHookFunc) (struct block_list *src); + if (HPMHooks.count.HP_status_get_total_def_pre > 0) { + int (*preHookFunc) (struct block_list **src); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74143,9 +86804,9 @@ int HP_status_get_total_def(struct block_list *src) { { retVal___ = HPMHooks.source.status.get_total_def(src); } - if( HPMHooks.count.HP_status_get_total_def_post ) { + if (HPMHooks.count.HP_status_get_total_def_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *src); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_total_def_post; hIndex++ ) { + 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); } @@ -74155,14 +86816,14 @@ int HP_status_get_total_def(struct block_list *src) { int HP_status_get_matk(struct block_list *src, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_get_matk_pre ) { - int (*preHookFunc) (struct block_list *src, int *flag); + if (HPMHooks.count.HP_status_get_matk_pre > 0) { + int (*preHookFunc) (struct block_list **src, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_matk_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74170,25 +86831,25 @@ int HP_status_get_matk(struct block_list *src, int flag) { { 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++ ) { + if (HPMHooks.count.HP_status_get_matk_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, flag); } } return retVal___; } void HP_status_update_matk(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_status_update_matk_pre ) { - void (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_status_update_matk_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_update_matk_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -74196,9 +86857,9 @@ void HP_status_update_matk(struct block_list *bl) { { HPMHooks.source.status.update_matk(bl); } - if( HPMHooks.count.HP_status_update_matk_post ) { + if (HPMHooks.count.HP_status_update_matk_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_update_matk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_update_matk_post[hIndex].func; postHookFunc(bl); } @@ -74208,14 +86869,14 @@ void HP_status_update_matk(struct block_list *bl) { int HP_status_readdb(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_readdb_pre ) { + if (HPMHooks.count.HP_status_readdb_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74223,9 +86884,9 @@ int HP_status_readdb(void) { { retVal___ = HPMHooks.source.status.readdb(); } - if( HPMHooks.count.HP_status_readdb_post ) { + if (HPMHooks.count.HP_status_readdb_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_readdb_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -74234,14 +86895,14 @@ int HP_status_readdb(void) { } void HP_status_initChangeTables(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_initChangeTables_pre ) { + if (HPMHooks.count.HP_status_initChangeTables_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_initChangeTables_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -74249,9 +86910,9 @@ void HP_status_initChangeTables(void) { { HPMHooks.source.status.initChangeTables(); } - if( HPMHooks.count.HP_status_initChangeTables_post ) { + if (HPMHooks.count.HP_status_initChangeTables_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_initChangeTables_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_initChangeTables_post[hIndex].func; postHookFunc(); } @@ -74260,14 +86921,14 @@ void HP_status_initChangeTables(void) { } void HP_status_initDummyData(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_initDummyData_pre ) { + if (HPMHooks.count.HP_status_initDummyData_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_initDummyData_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -74275,9 +86936,9 @@ void HP_status_initDummyData(void) { { HPMHooks.source.status.initDummyData(); } - if( HPMHooks.count.HP_status_initDummyData_post ) { + if (HPMHooks.count.HP_status_initDummyData_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_initDummyData_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_initDummyData_post[hIndex].func; postHookFunc(); } @@ -74287,14 +86948,14 @@ void HP_status_initDummyData(void) { int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *st) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_base_amotion_pc_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct status_data *st); + if (HPMHooks.count.HP_status_base_amotion_pc_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct status_data **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_amotion_pc_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74302,26 +86963,26 @@ int HP_status_base_amotion_pc(struct map_session_data *sd, struct status_data *s { retVal___ = HPMHooks.source.status.base_amotion_pc(sd, st); } - if( HPMHooks.count.HP_status_base_amotion_pc_post ) { + if (HPMHooks.count.HP_status_base_amotion_pc_post > 0) { 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++ ) { + 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 HP_status_base_atk(const struct block_list *bl, const struct status_data *st) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_base_atk_pre ) { - unsigned short (*preHookFunc) (const struct block_list *bl, const struct status_data *st); + int retVal___ = 0; + if (HPMHooks.count.HP_status_base_atk_pre > 0) { + int (*preHookFunc) (const struct block_list **bl, const struct status_data **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_base_atk_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74329,9 +86990,9 @@ unsigned short HP_status_base_atk(const struct block_list *bl, const struct stat { 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++ ) { + if (HPMHooks.count.HP_status_base_atk_post > 0) { + int (*postHookFunc) (int 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); } @@ -74341,14 +87002,14 @@ unsigned short HP_status_base_atk(const struct block_list *bl, const struct stat unsigned int HP_status_get_base_maxhp(const struct map_session_data *sd, const struct status_data *st) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_get_base_maxhp_pre ) { - unsigned int (*preHookFunc) (const struct map_session_data *sd, const struct status_data *st); + if (HPMHooks.count.HP_status_get_base_maxhp_pre > 0) { + unsigned int (*preHookFunc) (const struct map_session_data **sd, const struct status_data **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_get_base_maxhp_pre[hIndex].func; - retVal___ = preHookFunc(sd, st); + retVal___ = preHookFunc(&sd, &st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74356,9 +87017,9 @@ unsigned int HP_status_get_base_maxhp(const struct map_session_data *sd, const s { retVal___ = HPMHooks.source.status.get_base_maxhp(sd, st); } - if( HPMHooks.count.HP_status_get_base_maxhp_post ) { + if (HPMHooks.count.HP_status_get_base_maxhp_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxhp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_get_base_maxhp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, st); } @@ -74368,14 +87029,14 @@ unsigned int HP_status_get_base_maxhp(const struct map_session_data *sd, const s unsigned int HP_status_get_base_maxsp(const struct map_session_data *sd, const struct status_data *st) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_get_base_maxsp_pre ) { - unsigned int (*preHookFunc) (const struct map_session_data *sd, const struct status_data *st); + if (HPMHooks.count.HP_status_get_base_maxsp_pre > 0) { + unsigned int (*preHookFunc) (const struct map_session_data **sd, const struct status_data **st); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_get_base_maxsp_pre[hIndex].func; - retVal___ = preHookFunc(sd, st); + retVal___ = preHookFunc(&sd, &st); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74383,26 +87044,80 @@ unsigned int HP_status_get_base_maxsp(const struct map_session_data *sd, const s { retVal___ = HPMHooks.source.status.get_base_maxsp(sd, st); } - if( HPMHooks.count.HP_status_get_base_maxsp_post ) { + if (HPMHooks.count.HP_status_get_base_maxsp_post > 0) { unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_base_maxsp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_get_base_maxsp_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, st); } } return retVal___; } +unsigned int HP_status_get_restart_hp(const struct map_session_data *sd, const struct status_data *st) { + int hIndex = 0; + unsigned int retVal___ = 0; + if (HPMHooks.count.HP_status_get_restart_hp_pre > 0) { + unsigned int (*preHookFunc) (const struct map_session_data **sd, const struct status_data **st); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_hp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_restart_hp_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &st); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_restart_hp(sd, st); + } + if (HPMHooks.count.HP_status_get_restart_hp_post > 0) { + unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_hp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_restart_hp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); + } + } + return retVal___; +} +unsigned int HP_status_get_restart_sp(const struct map_session_data *sd, const struct status_data *st) { + int hIndex = 0; + unsigned int retVal___ = 0; + if (HPMHooks.count.HP_status_get_restart_sp_pre > 0) { + unsigned int (*preHookFunc) (const struct map_session_data **sd, const struct status_data **st); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_sp_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_get_restart_sp_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &st); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.get_restart_sp(sd, st); + } + if (HPMHooks.count.HP_status_get_restart_sp_post > 0) { + unsigned int (*postHookFunc) (unsigned int retVal___, const struct map_session_data *sd, const struct status_data *st); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_get_restart_sp_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_get_restart_sp_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, st); + } + } + return retVal___; +} int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_npc__pre ) { - int (*preHookFunc) (struct npc_data *nd, enum e_status_calc_opt *opt); + if (HPMHooks.count.HP_status_calc_npc__pre > 0) { + int (*preHookFunc) (struct npc_data **nd, enum e_status_calc_opt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__pre; hIndex++ ) { + 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, &opt); + retVal___ = preHookFunc(&nd, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74410,11 +87125,11 @@ int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) { { retVal___ = HPMHooks.source.status.calc_npc_(nd, opt); } - if( HPMHooks.count.HP_status_calc_npc__post ) { - int (*postHookFunc) (int retVal___, struct npc_data *nd, enum e_status_calc_opt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_npc__post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_npc__post > 0) { + int (*postHookFunc) (int retVal___, struct npc_data *nd, enum e_status_calc_opt opt); + 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, &opt); + retVal___ = postHookFunc(retVal___, nd, opt); } } return retVal___; @@ -74422,14 +87137,14 @@ int HP_status_calc_npc_(struct npc_data *nd, enum e_status_calc_opt opt) { unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *sc, int str) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_str_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *str); + if (HPMHooks.count.HP_status_calc_str_pre > 0) { + unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_str_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74437,11 +87152,11 @@ unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *s { 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++ ) { + if (HPMHooks.count.HP_status_calc_str_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, str); } } return retVal___; @@ -74449,14 +87164,14 @@ unsigned short HP_status_calc_str(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *sc, int agi) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_agi_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *agi); + if (HPMHooks.count.HP_status_calc_agi_pre > 0) { + unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *agi); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_agi_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &agi); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74464,11 +87179,11 @@ unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *s { 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++ ) { + if (HPMHooks.count.HP_status_calc_agi_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, agi); } } return retVal___; @@ -74476,14 +87191,14 @@ unsigned short HP_status_calc_agi(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *sc, int vit) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_vit_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *vit); + if (HPMHooks.count.HP_status_calc_vit_pre > 0) { + unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *vit); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_vit_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &vit); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74491,11 +87206,11 @@ unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *s { 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++ ) { + if (HPMHooks.count.HP_status_calc_vit_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, vit); } } return retVal___; @@ -74503,14 +87218,14 @@ unsigned short HP_status_calc_vit(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *sc, int int_) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_int_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *int_); + if (HPMHooks.count.HP_status_calc_int_pre > 0) { + unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *int_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_int_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&bl, &sc, &int_); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74518,11 +87233,11 @@ unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *s { 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++ ) { + if (HPMHooks.count.HP_status_calc_int_post > 0) { + 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_); + retVal___ = postHookFunc(retVal___, bl, sc, int_); } } return retVal___; @@ -74530,14 +87245,14 @@ unsigned short HP_status_calc_int(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *sc, int dex) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_dex_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dex); + if (HPMHooks.count.HP_status_calc_dex_pre > 0) { + unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *dex); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dex_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &dex); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74545,11 +87260,11 @@ unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *s { 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++ ) { + if (HPMHooks.count.HP_status_calc_dex_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, dex); } } return retVal___; @@ -74557,14 +87272,14 @@ unsigned short HP_status_calc_dex(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *sc, int luk) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_luk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *luk); + if (HPMHooks.count.HP_status_calc_luk_pre > 0) { + unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *luk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_luk_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &luk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74572,26 +87287,26 @@ unsigned short HP_status_calc_luk(struct block_list *bl, struct status_change *s { 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++ ) { + if (HPMHooks.count.HP_status_calc_luk_post > 0) { + 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); + 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 HP_status_calc_watk(struct block_list *bl, struct status_change *sc, int watk, bool viewable) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_watk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *watk, bool *viewable); + int retVal___ = 0; + if (HPMHooks.count.HP_status_calc_watk_pre > 0) { + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *watk, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_watk_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &watk, &viewable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74599,26 +87314,26 @@ unsigned short HP_status_calc_watk(struct block_list *bl, struct status_change * { 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++ ) { + if (HPMHooks.count.HP_status_calc_watk_post > 0) { + int (*postHookFunc) (int 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); + 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 HP_status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_matk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk, bool *viewable); + int retVal___ = 0; + if (HPMHooks.count.HP_status_calc_matk_pre > 0) { + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_matk_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &matk, &viewable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74626,26 +87341,26 @@ unsigned short HP_status_calc_matk(struct block_list *bl, struct status_change * { 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++ ) { + if (HPMHooks.count.HP_status_calc_matk_post > 0) { + int (*postHookFunc) (int 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); + 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) { +signed int HP_status_calc_hit(struct block_list *bl, struct status_change *sc, int hit, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_hit_pre ) { - signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *hit, bool *viewable); + signed int retVal___ = 0; + if (HPMHooks.count.HP_status_calc_hit_pre > 0) { + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *hit, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_hit_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &hit, &viewable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74653,26 +87368,26 @@ signed short HP_status_calc_hit(struct block_list *bl, struct status_change *sc, { 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++ ) { + if (HPMHooks.count.HP_status_calc_hit_post > 0) { + signed int (*postHookFunc) (signed int 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); + 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) { +signed int HP_status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_critical_pre ) { - signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *critical, bool *viewable); + signed int retVal___ = 0; + if (HPMHooks.count.HP_status_calc_critical_pre > 0) { + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *critical, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_critical_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &critical, &viewable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74680,26 +87395,26 @@ signed short HP_status_calc_critical(struct block_list *bl, struct status_change { 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++ ) { + if (HPMHooks.count.HP_status_calc_critical_post > 0) { + signed int (*postHookFunc) (signed int 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); + 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) { +signed int HP_status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_flee_pre ) { - signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee, bool *viewable); + signed int retVal___ = 0; + if (HPMHooks.count.HP_status_calc_flee_pre > 0) { + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &flee, &viewable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74707,26 +87422,26 @@ signed short HP_status_calc_flee(struct block_list *bl, struct status_change *sc { 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++ ) { + if (HPMHooks.count.HP_status_calc_flee_post > 0) { + signed int (*postHookFunc) (signed int 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); + 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) { +signed int HP_status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) { int hIndex = 0; - signed short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_flee2_pre ) { - signed short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *flee2, bool *viewable); + signed int retVal___ = 0; + if (HPMHooks.count.HP_status_calc_flee2_pre > 0) { + signed int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *flee2, bool *viewable); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_flee2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &flee2, &viewable); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74734,11 +87449,11 @@ signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *s { 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++ ) { + if (HPMHooks.count.HP_status_calc_flee2_post > 0) { + signed int (*postHookFunc) (signed int 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); + retVal___ = postHookFunc(retVal___, bl, sc, flee2, viewable); } } return retVal___; @@ -74746,14 +87461,14 @@ signed short HP_status_calc_flee2(struct block_list *bl, struct status_change *s unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change *sc, int speed) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_speed_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *speed); + if (HPMHooks.count.HP_status_calc_speed_pre > 0) { + unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *speed); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_speed_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &speed); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74761,11 +87476,11 @@ unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change { 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++ ) { + if (HPMHooks.count.HP_status_calc_speed_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, speed); } } return retVal___; @@ -74773,14 +87488,14 @@ unsigned short HP_status_calc_speed(struct block_list *bl, struct status_change short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int aspd_rate) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_aspd_rate_pre ) { - short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd_rate); + if (HPMHooks.count.HP_status_calc_aspd_rate_pre > 0) { + short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *aspd_rate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_rate_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &aspd_rate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74788,11 +87503,11 @@ short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, { 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++ ) { + if (HPMHooks.count.HP_status_calc_aspd_rate_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, aspd_rate); } } return retVal___; @@ -74800,14 +87515,14 @@ short HP_status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion) { int hIndex = 0; unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_dmotion_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *dmotion); + if (HPMHooks.count.HP_status_calc_dmotion_pre > 0) { + unsigned short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *dmotion); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_dmotion_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &dmotion); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74815,11 +87530,11 @@ unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_chang { 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++ ) { + if (HPMHooks.count.HP_status_calc_dmotion_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, dmotion); } } return retVal___; @@ -74827,14 +87542,14 @@ unsigned short HP_status_calc_dmotion(struct block_list *bl, struct status_chang short HP_status_calc_aspd(struct block_list *bl, struct status_change *sc, short flag) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_aspd_pre ) { - short (*preHookFunc) (struct block_list *bl, struct status_change *sc, short *flag); + if (HPMHooks.count.HP_status_calc_aspd_pre > 0) { + short (*preHookFunc) (struct block_list **bl, struct status_change **sc, short *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_aspd_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &flag); + retVal___ = preHookFunc(&bl, &sc, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74842,11 +87557,11 @@ short HP_status_calc_aspd(struct block_list *bl, struct status_change *sc, short { retVal___ = HPMHooks.source.status.calc_aspd(bl, sc, flag); } - if( HPMHooks.count.HP_status_calc_aspd_post ) { - short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, short *flag); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_aspd_post > 0) { + short (*postHookFunc) (short retVal___, struct block_list *bl, struct status_change *sc, short flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_aspd_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_aspd_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &flag); + retVal___ = postHookFunc(retVal___, bl, sc, flag); } } return retVal___; @@ -74854,14 +87569,14 @@ short HP_status_calc_aspd(struct block_list *bl, struct status_change *sc, short short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int aspd) { int hIndex = 0; short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_fix_aspd_pre ) { - short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *aspd); + if (HPMHooks.count.HP_status_calc_fix_aspd_pre > 0) { + short (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *aspd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_fix_aspd_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &aspd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74869,11 +87584,11 @@ short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, i { 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++ ) { + if (HPMHooks.count.HP_status_calc_fix_aspd_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, aspd); } } return retVal___; @@ -74881,14 +87596,14 @@ short HP_status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, i unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *sc, uint64 maxhp) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_maxhp_pre ) { - unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, uint64 *maxhp); + if (HPMHooks.count.HP_status_calc_maxhp_pre > 0) { + unsigned int (*preHookFunc) (struct block_list **bl, struct status_change **sc, uint64 *maxhp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxhp_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &maxhp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74896,11 +87611,11 @@ unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *s { 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++ ) { + if (HPMHooks.count.HP_status_calc_maxhp_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, maxhp); } } return retVal___; @@ -74908,14 +87623,14 @@ unsigned int HP_status_calc_maxhp(struct block_list *bl, struct status_change *s unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *sc, unsigned int maxsp) { int hIndex = 0; unsigned int retVal___ = 0; - if( HPMHooks.count.HP_status_calc_maxsp_pre ) { - unsigned int (*preHookFunc) (struct block_list *bl, struct status_change *sc, unsigned int *maxsp); + if (HPMHooks.count.HP_status_calc_maxsp_pre > 0) { + unsigned int (*preHookFunc) (struct block_list **bl, struct status_change **sc, unsigned int *maxsp); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_maxsp_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &maxsp); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74923,11 +87638,11 @@ unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *s { 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++ ) { + if (HPMHooks.count.HP_status_calc_maxsp_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, maxsp); } } return retVal___; @@ -74935,14 +87650,14 @@ unsigned int HP_status_calc_maxsp(struct block_list *bl, struct status_change *s unsigned char HP_status_calc_element(struct block_list *bl, struct status_change *sc, int element) { int hIndex = 0; unsigned char retVal___ = 0; - if( HPMHooks.count.HP_status_calc_element_pre ) { - unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *element); + if (HPMHooks.count.HP_status_calc_element_pre > 0) { + unsigned char (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *element); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &element); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74950,11 +87665,11 @@ unsigned char HP_status_calc_element(struct block_list *bl, struct status_change { 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++ ) { + if (HPMHooks.count.HP_status_calc_element_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, element); } } return retVal___; @@ -74962,14 +87677,14 @@ unsigned char HP_status_calc_element(struct block_list *bl, struct status_change unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_change *sc, int lv) { int hIndex = 0; unsigned char retVal___ = 0; - if( HPMHooks.count.HP_status_calc_element_lv_pre ) { - unsigned char (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *lv); + if (HPMHooks.count.HP_status_calc_element_lv_pre > 0) { + unsigned char (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_element_lv_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -74977,11 +87692,11 @@ unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_cha { 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++ ) { + if (HPMHooks.count.HP_status_calc_element_lv_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, sc, lv); } } return retVal___; @@ -74989,14 +87704,14 @@ unsigned char HP_status_calc_element_lv(struct block_list *bl, struct status_cha uint32 HP_status_calc_mode(const struct block_list *bl, const struct status_change *sc, uint32 mode) { int hIndex = 0; uint32 retVal___ = 0; - if( HPMHooks.count.HP_status_calc_mode_pre ) { - uint32 (*preHookFunc) (const struct block_list *bl, const struct status_change *sc, uint32 *mode); + if (HPMHooks.count.HP_status_calc_mode_pre > 0) { + uint32 (*preHookFunc) (const struct block_list **bl, const struct status_change **sc, uint32 *mode); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &sc, &mode); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75004,26 +87719,26 @@ uint32 HP_status_calc_mode(const struct block_list *bl, const struct status_chan { retVal___ = HPMHooks.source.status.calc_mode(bl, sc, mode); } - if( HPMHooks.count.HP_status_calc_mode_post ) { - uint32 (*postHookFunc) (uint32 retVal___, const struct block_list *bl, const struct status_change *sc, uint32 *mode); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_mode_post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_mode_post > 0) { + uint32 (*postHookFunc) (uint32 retVal___, const struct block_list *bl, const struct status_change *sc, uint32 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); + retVal___ = postHookFunc(retVal___, bl, sc, mode); } } return retVal___; } -unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) { +int HP_status_calc_ematk(struct block_list *bl, struct status_change *sc, int matk) { int hIndex = 0; - unsigned short retVal___ = 0; - if( HPMHooks.count.HP_status_calc_ematk_pre ) { - unsigned short (*preHookFunc) (struct block_list *bl, struct status_change *sc, int *matk); + int retVal___ = 0; + if (HPMHooks.count.HP_status_calc_ematk_pre > 0) { + int (*preHookFunc) (struct block_list **bl, struct status_change **sc, int *matk); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_calc_ematk_pre[hIndex].func; - retVal___ = preHookFunc(bl, sc, &matk); + retVal___ = preHookFunc(&bl, &sc, &matk); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75031,25 +87746,25 @@ unsigned short HP_status_calc_ematk(struct block_list *bl, struct status_change { retVal___ = HPMHooks.source.status.calc_ematk(bl, sc, matk); } - if( HPMHooks.count.HP_status_calc_ematk_post ) { - unsigned short (*postHookFunc) (unsigned short retVal___, struct block_list *bl, struct status_change *sc, int *matk); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_post; hIndex++ ) { + if (HPMHooks.count.HP_status_calc_ematk_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc, int matk); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_ematk_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_calc_ematk_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sc, &matk); + retVal___ = postHookFunc(retVal___, bl, sc, matk); } } 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); + if (HPMHooks.count.HP_status_calc_bl_main_pre > 0) { + void (*preHookFunc) (struct block_list **bl, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_bl_main_pre; hIndex++ ) { + 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); + preHookFunc(&bl, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75057,25 +87772,25 @@ void HP_status_calc_bl_main(struct block_list *bl, int flag) { { 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++ ) { + if (HPMHooks.count.HP_status_calc_bl_main_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_status_display_add_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum sc_type *type, int *dval1, int *dval2, int *dval3); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_add_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type, &dval1, &dval2, &dval3); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75083,25 +87798,25 @@ void HP_status_display_add(struct map_session_data *sd, enum sc_type type, int d { 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++ ) { + if (HPMHooks.count.HP_status_display_add_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_status_display_remove_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum sc_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_display_remove_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75109,11 +87824,11 @@ void HP_status_display_remove(struct map_session_data *sd, enum sc_type type) { { 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++ ) { + if (HPMHooks.count.HP_status_display_remove_post > 0) { + 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); + postHookFunc(sd, type); } } return; @@ -75121,16 +87836,16 @@ void HP_status_display_remove(struct map_session_data *sd, enum sc_type type) { int HP_status_natural_heal(struct block_list *bl, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_natural_heal_pre ) { - int (*preHookFunc) (struct block_list *bl, va_list args); + if (HPMHooks.count.HP_status_natural_heal_pre > 0) { + int (*preHookFunc) (struct block_list **bl, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75140,9 +87855,9 @@ int HP_status_natural_heal(struct block_list *bl, va_list args) { retVal___ = HPMHooks.source.status.natural_heal(bl, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_status_natural_heal_post ) { + if (HPMHooks.count.HP_status_natural_heal_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_post; hIndex++ ) { + 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); @@ -75154,14 +87869,14 @@ int HP_status_natural_heal(struct block_list *bl, va_list args) { int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_status_natural_heal_timer_pre ) { + if (HPMHooks.count.HP_status_natural_heal_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75169,11 +87884,11 @@ int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) { { 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, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_natural_heal_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_status_natural_heal_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -75181,14 +87896,14 @@ int HP_status_natural_heal_timer(int tid, int64 tick, int id, intptr_t data) { bool HP_status_readdb_job2(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_status_readdb_job2_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + if (HPMHooks.count.HP_status_readdb_job2_pre > 0) { + bool (*preHookFunc) (char **fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_job2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&fields, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75196,11 +87911,11 @@ bool HP_status_readdb_job2(char *fields[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_status_readdb_job2_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, fields, columns, current); } } return retVal___; @@ -75208,14 +87923,14 @@ bool HP_status_readdb_job2(char *fields[], int columns, int current) { bool HP_status_readdb_sizefix(char *fields[], int columns, int current) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_status_readdb_sizefix_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + if (HPMHooks.count.HP_status_readdb_sizefix_pre > 0) { + bool (*preHookFunc) (char **fields[], int *columns, int *current); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_sizefix_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&fields, &columns, ¤t); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75223,106 +87938,133 @@ bool HP_status_readdb_sizefix(char *fields[], int columns, int current) { { 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++ ) { + if (HPMHooks.count.HP_status_readdb_sizefix_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, fields, columns, current); } } return retVal___; } -int HP_status_readdb_refine_libconfig(const char *filename) { +bool HP_status_read_scdb_libconfig(void) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_readdb_refine_libconfig_pre ) { - int (*preHookFunc) (const char *filename); + bool retVal___ = false; + if (HPMHooks.count.HP_status_read_scdb_libconfig_pre > 0) { + bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_pre[hIndex].func; - retVal___ = preHookFunc(filename); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.status.readdb_refine_libconfig(filename); + retVal___ = HPMHooks.source.status.read_scdb_libconfig(); } - if( HPMHooks.count.HP_status_readdb_refine_libconfig_post ) { - int (*postHookFunc) (int retVal___, const char *filename); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_post[hIndex].func; - retVal___ = postHookFunc(retVal___, filename); + if (HPMHooks.count.HP_status_read_scdb_libconfig_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___); } } return retVal___; } -int HP_status_readdb_refine_libconfig_sub(struct config_setting_t *r, const char *name, const char *source) { +bool HP_status_read_scdb_libconfig_sub(struct config_setting_t *it, int idx, const char *source) { int hIndex = 0; - int retVal___ = 0; - if( HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre ) { - int (*preHookFunc) (struct config_setting_t *r, const char *name, const char *source); + bool retVal___ = false; + if (HPMHooks.count.HP_status_read_scdb_libconfig_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *idx, const char **source); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_sub_pre[hIndex].func; - retVal___ = preHookFunc(r, name, source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &idx, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.status.readdb_refine_libconfig_sub(r, name, source); + retVal___ = HPMHooks.source.status.read_scdb_libconfig_sub(it, idx, source); } - if( HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post ) { - int (*postHookFunc) (int retVal___, struct config_setting_t *r, const char *name, const char *source); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_readdb_refine_libconfig_sub_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_status_readdb_refine_libconfig_sub_post[hIndex].func; - retVal___ = postHookFunc(retVal___, r, name, source); + if (HPMHooks.count.HP_status_read_scdb_libconfig_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int idx, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, idx, source); } } return retVal___; } -bool HP_status_readdb_scconfig(char *fields[], int columns, int current) { +bool HP_status_read_scdb_libconfig_sub_flag(struct config_setting_t *it, int type, const char *source) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_status_readdb_scconfig_pre ) { - bool (*preHookFunc) (char *fields[], int *columns, int *current); + if (HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *type, const char **source); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_flag_pre[hIndex].func; + retVal___ = preHookFunc(&it, &type, &source); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.status.readdb_scconfig(fields, columns, current); + retVal___ = HPMHooks.source.status.read_scdb_libconfig_sub_flag(it, type, source); } - 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); + if (HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int type, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_flag_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, type, source); + } + } + return retVal___; +} +bool HP_status_read_scdb_libconfig_sub_flag_additional(struct config_setting_t *it, int type, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_additional_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *type, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_additional_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_flag_additional_pre[hIndex].func; + retVal___ = preHookFunc(&it, &type, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.read_scdb_libconfig_sub_flag_additional(it, type, source); + } + if (HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_additional_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int type, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_scdb_libconfig_sub_flag_additional_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_read_scdb_libconfig_sub_flag_additional_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, type, source); } } return retVal___; } void HP_status_read_job_db(void) { int hIndex = 0; - if( HPMHooks.count.HP_status_read_job_db_pre ) { + if (HPMHooks.count.HP_status_read_job_db_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_read_job_db_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75330,9 +88072,9 @@ void HP_status_read_job_db(void) { { HPMHooks.source.status.read_job_db(); } - if( HPMHooks.count.HP_status_read_job_db_post ) { + if (HPMHooks.count.HP_status_read_job_db_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_read_job_db_post[hIndex].func; postHookFunc(); } @@ -75341,14 +88083,14 @@ void HP_status_read_job_db(void) { } void HP_status_read_job_db_sub(int idx, const char *name, struct config_setting_t *jdb) { int hIndex = 0; - if( HPMHooks.count.HP_status_read_job_db_sub_pre ) { - void (*preHookFunc) (int *idx, const char *name, struct config_setting_t *jdb); + if (HPMHooks.count.HP_status_read_job_db_sub_pre > 0) { + void (*preHookFunc) (int *idx, const char **name, struct config_setting_t **jdb); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_status_read_job_db_sub_pre[hIndex].func; - preHookFunc(&idx, name, jdb); + preHookFunc(&idx, &name, &jdb); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75356,26 +88098,132 @@ void HP_status_read_job_db_sub(int idx, const char *name, struct config_setting_ { HPMHooks.source.status.read_job_db_sub(idx, name, jdb); } - if( HPMHooks.count.HP_status_read_job_db_sub_post ) { - void (*postHookFunc) (int *idx, const char *name, struct config_setting_t *jdb); - for(hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_status_read_job_db_sub_post > 0) { + void (*postHookFunc) (int idx, const char *name, struct config_setting_t *jdb); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_read_job_db_sub_post; hIndex++) { postHookFunc = HPMHooks.list.HP_status_read_job_db_sub_post[hIndex].func; - postHookFunc(&idx, name, jdb); + postHookFunc(idx, name, jdb); + } + } + return; +} +void HP_status_set_sc(uint16 skill_id, sc_type sc, unsigned int flag) { + int hIndex = 0; + if (HPMHooks.count.HP_status_set_sc_pre > 0) { + void (*preHookFunc) (uint16 *skill_id, sc_type *sc, unsigned int *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_set_sc_pre[hIndex].func; + preHookFunc(&skill_id, &sc, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.set_sc(skill_id, sc, flag); + } + if (HPMHooks.count.HP_status_set_sc_post > 0) { + void (*postHookFunc) (uint16 skill_id, sc_type sc, unsigned int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_set_sc_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_set_sc_post[hIndex].func; + postHookFunc(skill_id, sc, flag); } } return; } -/* storage */ +void HP_status_copy(struct status_data *a, const struct status_data *b) { + int hIndex = 0; + if (HPMHooks.count.HP_status_copy_pre > 0) { + void (*preHookFunc) (struct status_data **a, const struct status_data **b); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_copy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_copy_pre[hIndex].func; + preHookFunc(&a, &b); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.status.copy(a, b); + } + if (HPMHooks.count.HP_status_copy_post > 0) { + void (*postHookFunc) (struct status_data *a, const struct status_data *b); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_copy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_copy_post[hIndex].func; + postHookFunc(a, b); + } + } + return; +} +int HP_status_base_matk_min(const struct status_data *st) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_base_matk_min_pre > 0) { + int (*preHookFunc) (const struct status_data **st); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_base_matk_min_pre[hIndex].func; + retVal___ = preHookFunc(&st); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.base_matk_min(st); + } + if (HPMHooks.count.HP_status_base_matk_min_post > 0) { + int (*postHookFunc) (int retVal___, const struct status_data *st); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_min_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_base_matk_min_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st); + } + } + return retVal___; +} +int HP_status_base_matk_max(const struct status_data *st) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_base_matk_max_pre > 0) { + int (*preHookFunc) (const struct status_data **st); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_base_matk_max_pre[hIndex].func; + retVal___ = preHookFunc(&st); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.base_matk_max(st); + } + if (HPMHooks.count.HP_status_base_matk_max_post > 0) { + int (*postHookFunc) (int retVal___, const struct status_data *st); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_base_matk_max_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_base_matk_max_post[hIndex].func; + retVal___ = postHookFunc(retVal___, st); + } + } + return retVal___; +} +/* storage_interface */ void HP_storage_reconnect(void) { int hIndex = 0; - if( HPMHooks.count.HP_storage_reconnect_pre ) { + if (HPMHooks.count.HP_storage_reconnect_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_storage_reconnect_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75383,9 +88231,9 @@ void HP_storage_reconnect(void) { { HPMHooks.source.storage.reconnect(); } - if( HPMHooks.count.HP_storage_reconnect_post ) { + if (HPMHooks.count.HP_storage_reconnect_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_post; hIndex++) { postHookFunc = HPMHooks.list.HP_storage_reconnect_post[hIndex].func; postHookFunc(); } @@ -75395,14 +88243,14 @@ void HP_storage_reconnect(void) { int HP_storage_delitem(struct map_session_data *sd, int n, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_delitem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *n, int *amount); + if (HPMHooks.count.HP_storage_delitem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *n, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_delitem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &n, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75410,11 +88258,11 @@ int HP_storage_delitem(struct map_session_data *sd, int n, int amount) { { 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++ ) { + if (HPMHooks.count.HP_storage_delitem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, n, amount); } } return retVal___; @@ -75422,14 +88270,14 @@ int HP_storage_delitem(struct map_session_data *sd, int n, int amount) { int HP_storage_open(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_open_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_storage_open_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_storage_open_pre[hIndex].func; - retVal___ = preHookFunc(sd); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75437,9 +88285,9 @@ int HP_storage_open(struct map_session_data *sd) { { retVal___ = HPMHooks.source.storage.open(sd); } - if( HPMHooks.count.HP_storage_open_post ) { + if (HPMHooks.count.HP_storage_open_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_open_post; hIndex++) { postHookFunc = HPMHooks.list.HP_storage_open_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd); } @@ -75449,14 +88297,14 @@ int HP_storage_open(struct map_session_data *sd) { int HP_storage_add(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_add_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + if (HPMHooks.count.HP_storage_add_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_add_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75464,11 +88312,11 @@ int HP_storage_add(struct map_session_data *sd, int index, int amount) { { 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++ ) { + if (HPMHooks.count.HP_storage_add_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, index, amount); } } return retVal___; @@ -75476,14 +88324,14 @@ int HP_storage_add(struct map_session_data *sd, int index, int amount) { int HP_storage_get(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_get_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + if (HPMHooks.count.HP_storage_get_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_get_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75491,11 +88339,11 @@ int HP_storage_get(struct map_session_data *sd, int index, int amount) { { 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++ ) { + if (HPMHooks.count.HP_storage_get_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, index, amount); } } return retVal___; @@ -75503,14 +88351,14 @@ int HP_storage_get(struct map_session_data *sd, int index, int amount) { int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_additem_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct item *item_data, int *amount); + if (HPMHooks.count.HP_storage_additem_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct item **item_data, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_additem_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &item_data, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75518,11 +88366,11 @@ int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int { 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++ ) { + if (HPMHooks.count.HP_storage_additem_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, item_data, amount); } } return retVal___; @@ -75530,14 +88378,14 @@ int HP_storage_additem(struct map_session_data *sd, struct item *item_data, int int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_addfromcart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + if (HPMHooks.count.HP_storage_addfromcart_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_addfromcart_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75545,11 +88393,11 @@ int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) { { 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++ ) { + if (HPMHooks.count.HP_storage_addfromcart_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, sd, index, amount); } } return retVal___; @@ -75557,14 +88405,14 @@ int HP_storage_addfromcart(struct map_session_data *sd, int index, int amount) { int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_gettocart_pre ) { - int (*preHookFunc) (struct map_session_data *sd, int *index, int *amount); + if (HPMHooks.count.HP_storage_gettocart_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, int *index, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_gettocart_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75572,25 +88420,25 @@ int HP_storage_gettocart(struct map_session_data *sd, int index, int amount) { { 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++ ) { + if (HPMHooks.count.HP_storage_gettocart_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_storage_close_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_storage_close_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75598,9 +88446,9 @@ void HP_storage_close(struct map_session_data *sd) { { HPMHooks.source.storage.close(sd); } - if( HPMHooks.count.HP_storage_close_post ) { + if (HPMHooks.count.HP_storage_close_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_storage_close_post[hIndex].func; postHookFunc(sd); } @@ -75609,14 +88457,14 @@ void HP_storage_close(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_storage_pc_quit_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_pc_quit_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75624,11 +88472,11 @@ void HP_storage_pc_quit(struct map_session_data *sd, int flag) { { 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++ ) { + if (HPMHooks.count.HP_storage_pc_quit_post > 0) { + 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); + postHookFunc(sd, flag); } } return; @@ -75636,14 +88484,14 @@ void HP_storage_pc_quit(struct map_session_data *sd, int flag) { int HP_storage_comp_item(const void *i1_, const void *i2_) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_comp_item_pre ) { - int (*preHookFunc) (const void *i1_, const void *i2_); + if (HPMHooks.count.HP_storage_comp_item_pre > 0) { + int (*preHookFunc) (const void **i1_, const void **i2_); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_pre; hIndex++ ) { + 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_); + retVal___ = preHookFunc(&i1_, &i2_); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75651,9 +88499,9 @@ int HP_storage_comp_item(const void *i1_, const void *i2_) { { retVal___ = HPMHooks.source.storage.comp_item(i1_, i2_); } - if( HPMHooks.count.HP_storage_comp_item_post ) { + if (HPMHooks.count.HP_storage_comp_item_post > 0) { int (*postHookFunc) (int retVal___, const void *i1_, const void *i2_); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_comp_item_post; hIndex++ ) { + 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_); } @@ -75662,14 +88510,14 @@ int HP_storage_comp_item(const void *i1_, const void *i2_) { } 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); + if (HPMHooks.count.HP_storage_sortitem_pre > 0) { + void (*preHookFunc) (struct item **items, unsigned int *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_storage_sortitem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_storage_sortitem_pre[hIndex].func; - preHookFunc(items, &size); + preHookFunc(&items, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75677,11 +88525,11 @@ void HP_storage_sortitem(struct item *items, unsigned int size) { { 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++ ) { + if (HPMHooks.count.HP_storage_sortitem_post > 0) { + 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); + postHookFunc(items, size); } } return; @@ -75689,16 +88537,16 @@ void HP_storage_sortitem(struct item *items, unsigned int size) { int HP_storage_reconnect_sub(union DBKey key, struct DBData *data, va_list ap) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_storage_reconnect_sub_pre ) { - int (*preHookFunc) (union DBKey *key, struct DBData *data, va_list ap); + if (HPMHooks.count.HP_storage_reconnect_sub_pre > 0) { + int (*preHookFunc) (union DBKey *key, struct DBData **data, va_list ap); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&key, &data, ap___copy); va_end(ap___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75708,29 +88556,29 @@ int HP_storage_reconnect_sub(union DBKey key, struct DBData *data, va_list 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___, union DBKey *key, struct DBData *data, va_list ap); - for(hIndex = 0; hIndex < HPMHooks.count.HP_storage_reconnect_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_storage_reconnect_sub_post > 0) { + int (*postHookFunc) (int retVal___, union DBKey key, struct 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); + retVal___ = postHookFunc(retVal___, key, data, ap___copy); va_end(ap___copy); } } return retVal___; } -/* StrBuf */ +/* stringbuf_interface */ StringBuf* HP_StrBuf_Malloc(void) { int hIndex = 0; StringBuf* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Malloc_pre ) { + if (HPMHooks.count.HP_StrBuf_Malloc_pre > 0) { StringBuf* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75738,9 +88586,9 @@ StringBuf* HP_StrBuf_Malloc(void) { { retVal___ = HPMHooks.source.StrBuf.Malloc(); } - if( HPMHooks.count.HP_StrBuf_Malloc_post ) { + if (HPMHooks.count.HP_StrBuf_Malloc_post > 0) { StringBuf* (*postHookFunc) (StringBuf* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -75749,14 +88597,14 @@ StringBuf* HP_StrBuf_Malloc(void) { } void HP_StrBuf_Init(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Init_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Init_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75764,9 +88612,9 @@ void HP_StrBuf_Init(StringBuf *self) { { HPMHooks.source.StrBuf.Init(self); } - if( HPMHooks.count.HP_StrBuf_Init_post ) { + if (HPMHooks.count.HP_StrBuf_Init_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func; postHookFunc(self); } @@ -75776,16 +88624,16 @@ void HP_StrBuf_Init(StringBuf *self) { int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) { - int (*preHookFunc) (StringBuf *self, const char *fmt, va_list args); + if (HPMHooks.count.HP_StrBuf_Vprintf_pre > 0) { + int (*preHookFunc) (StringBuf **self, const char **fmt, va_list args); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++) { va_list args___copy; va_copy(args___copy, args); preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func; - retVal___ = preHookFunc(self, fmt, args___copy); + retVal___ = preHookFunc(&self, &fmt, args___copy); va_end(args___copy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75795,9 +88643,9 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy); va_end(args___copy); } - if( HPMHooks.count.HP_StrBuf_Vprintf_post ) { + if (HPMHooks.count.HP_StrBuf_Vprintf_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++) { va_list args___copy; va_copy(args___copy, args); postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, fmt, args___copy); @@ -75809,14 +88657,14 @@ int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) { int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Append_pre ) { - int (*preHookFunc) (StringBuf *self, const StringBuf *sbuf); + if (HPMHooks.count.HP_StrBuf_Append_pre > 0) { + int (*preHookFunc) (StringBuf **self, const StringBuf **sbuf); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func; - retVal___ = preHookFunc(self, sbuf); + retVal___ = preHookFunc(&self, &sbuf); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75824,9 +88672,9 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { { retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf); } - if( HPMHooks.count.HP_StrBuf_Append_post ) { + if (HPMHooks.count.HP_StrBuf_Append_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, sbuf); } @@ -75836,14 +88684,14 @@ int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) { int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) { - int (*preHookFunc) (StringBuf *self, const char *str); + if (HPMHooks.count.HP_StrBuf_AppendStr_pre > 0) { + int (*preHookFunc) (StringBuf **self, const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func; - retVal___ = preHookFunc(self, str); + retVal___ = preHookFunc(&self, &str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75851,9 +88699,9 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { { retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str); } - if( HPMHooks.count.HP_StrBuf_AppendStr_post ) { + if (HPMHooks.count.HP_StrBuf_AppendStr_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func; retVal___ = postHookFunc(retVal___, self, str); } @@ -75863,14 +88711,14 @@ int HP_StrBuf_AppendStr(StringBuf *self, const char *str) { int HP_StrBuf_Length(StringBuf *self) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_StrBuf_Length_pre ) { - int (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Length_pre > 0) { + int (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75878,9 +88726,9 @@ int HP_StrBuf_Length(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Length(self); } - if( HPMHooks.count.HP_StrBuf_Length_post ) { + if (HPMHooks.count.HP_StrBuf_Length_post > 0) { int (*postHookFunc) (int retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -75890,14 +88738,14 @@ int HP_StrBuf_Length(StringBuf *self) { char* HP_StrBuf_Value(StringBuf *self) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_StrBuf_Value_pre ) { - char* (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Value_pre > 0) { + char* (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func; - retVal___ = preHookFunc(self); + retVal___ = preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -75905,9 +88753,9 @@ char* HP_StrBuf_Value(StringBuf *self) { { retVal___ = HPMHooks.source.StrBuf.Value(self); } - if( HPMHooks.count.HP_StrBuf_Value_post ) { + if (HPMHooks.count.HP_StrBuf_Value_post > 0) { char* (*postHookFunc) (char* retVal___, StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func; retVal___ = postHookFunc(retVal___, self); } @@ -75916,14 +88764,14 @@ char* HP_StrBuf_Value(StringBuf *self) { } void HP_StrBuf_Clear(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Clear_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Clear_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75931,9 +88779,9 @@ void HP_StrBuf_Clear(StringBuf *self) { { HPMHooks.source.StrBuf.Clear(self); } - if( HPMHooks.count.HP_StrBuf_Clear_post ) { + if (HPMHooks.count.HP_StrBuf_Clear_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func; postHookFunc(self); } @@ -75942,14 +88790,14 @@ void HP_StrBuf_Clear(StringBuf *self) { } void HP_StrBuf_Destroy(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Destroy_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Destroy_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75957,9 +88805,9 @@ void HP_StrBuf_Destroy(StringBuf *self) { { HPMHooks.source.StrBuf.Destroy(self); } - if( HPMHooks.count.HP_StrBuf_Destroy_post ) { + if (HPMHooks.count.HP_StrBuf_Destroy_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func; postHookFunc(self); } @@ -75968,14 +88816,14 @@ void HP_StrBuf_Destroy(StringBuf *self) { } void HP_StrBuf_Free(StringBuf *self) { int hIndex = 0; - if( HPMHooks.count.HP_StrBuf_Free_pre ) { - void (*preHookFunc) (StringBuf *self); + if (HPMHooks.count.HP_StrBuf_Free_pre > 0) { + void (*preHookFunc) (StringBuf **self); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func; - preHookFunc(self); + preHookFunc(&self); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -75983,27 +88831,27 @@ void HP_StrBuf_Free(StringBuf *self) { { HPMHooks.source.StrBuf.Free(self); } - if( HPMHooks.count.HP_StrBuf_Free_post ) { + if (HPMHooks.count.HP_StrBuf_Free_post > 0) { void (*postHookFunc) (StringBuf *self); - for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++) { postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func; postHookFunc(self); } } return; } -/* strlib */ +/* strlib_interface */ char* HP_strlib_jstrescape(char *pt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescape_pre ) { - char* (*preHookFunc) (char *pt); + if (HPMHooks.count.HP_strlib_jstrescape_pre > 0) { + char* (*preHookFunc) (char **pt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func; - retVal___ = preHookFunc(pt); + retVal___ = preHookFunc(&pt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76011,9 +88859,9 @@ char* HP_strlib_jstrescape(char *pt) { { retVal___ = HPMHooks.source.strlib.jstrescape(pt); } - if( HPMHooks.count.HP_strlib_jstrescape_post ) { + if (HPMHooks.count.HP_strlib_jstrescape_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt); } @@ -76023,14 +88871,14 @@ char* HP_strlib_jstrescape(char *pt) { char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) { - char* (*preHookFunc) (char *pt, const char *spt); + if (HPMHooks.count.HP_strlib_jstrescapecpy_pre > 0) { + char* (*preHookFunc) (char **pt, const char **spt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func; - retVal___ = preHookFunc(pt, spt); + retVal___ = preHookFunc(&pt, &spt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76038,9 +88886,9 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { { retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt); } - if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) { + if (HPMHooks.count.HP_strlib_jstrescapecpy_post > 0) { char* (*postHookFunc) (char* retVal___, char *pt, const char *spt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func; retVal___ = postHookFunc(retVal___, pt, spt); } @@ -76050,14 +88898,14 @@ char* HP_strlib_jstrescapecpy(char *pt, const char *spt) { int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) { - int (*preHookFunc) (char *pt, const char *spt, int *size); + if (HPMHooks.count.HP_strlib_jmemescapecpy_pre > 0) { + int (*preHookFunc) (char **pt, const char **spt, int *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func; - retVal___ = preHookFunc(pt, spt, &size); + retVal___ = preHookFunc(&pt, &spt, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76065,11 +88913,11 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { { retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size); } - if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) { - int (*postHookFunc) (int retVal___, char *pt, const char *spt, int *size); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_jmemescapecpy_post > 0) { + int (*postHookFunc) (int retVal___, char *pt, const char *spt, int size); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func; - retVal___ = postHookFunc(retVal___, pt, spt, &size); + retVal___ = postHookFunc(retVal___, pt, spt, size); } } return retVal___; @@ -76077,14 +88925,14 @@ int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) { int HP_strlib_remove_control_chars_(char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) { - int (*preHookFunc) (char *str); + if (HPMHooks.count.HP_strlib_remove_control_chars__pre > 0) { + int (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76092,9 +88940,9 @@ int HP_strlib_remove_control_chars_(char *str) { { retVal___ = HPMHooks.source.strlib.remove_control_chars_(str); } - if( HPMHooks.count.HP_strlib_remove_control_chars__post ) { + if (HPMHooks.count.HP_strlib_remove_control_chars__post > 0) { int (*postHookFunc) (int retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -76104,14 +88952,14 @@ int HP_strlib_remove_control_chars_(char *str) { char* HP_strlib_trim_(char *str) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_trim__pre ) { - char* (*preHookFunc) (char *str); + if (HPMHooks.count.HP_strlib_trim__pre > 0) { + char* (*preHookFunc) (char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76119,9 +88967,9 @@ char* HP_strlib_trim_(char *str) { { retVal___ = HPMHooks.source.strlib.trim_(str); } - if( HPMHooks.count.HP_strlib_trim__post ) { + if (HPMHooks.count.HP_strlib_trim__post > 0) { char* (*postHookFunc) (char* retVal___, char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -76131,14 +88979,14 @@ char* HP_strlib_trim_(char *str) { char* HP_strlib_normalize_name_(char *str, const char *delims) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_normalize_name__pre ) { - char* (*preHookFunc) (char *str, const char *delims); + if (HPMHooks.count.HP_strlib_normalize_name__pre > 0) { + char* (*preHookFunc) (char **str, const char **delims); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func; - retVal___ = preHookFunc(str, delims); + retVal___ = preHookFunc(&str, &delims); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76146,9 +88994,9 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { { retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims); } - if( HPMHooks.count.HP_strlib_normalize_name__post ) { + if (HPMHooks.count.HP_strlib_normalize_name__post > 0) { char* (*postHookFunc) (char* retVal___, char *str, const char *delims); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func; retVal___ = postHookFunc(retVal___, str, delims); } @@ -76158,14 +89006,14 @@ char* HP_strlib_normalize_name_(char *str, const char *delims) { const char* HP_strlib_stristr_(const char *haystack, const char *needle) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_stristr__pre ) { - const char* (*preHookFunc) (const char *haystack, const char *needle); + if (HPMHooks.count.HP_strlib_stristr__pre > 0) { + const char* (*preHookFunc) (const char **haystack, const char **needle); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func; - retVal___ = preHookFunc(haystack, needle); + retVal___ = preHookFunc(&haystack, &needle); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76173,9 +89021,9 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { { retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle); } - if( HPMHooks.count.HP_strlib_stristr__post ) { + if (HPMHooks.count.HP_strlib_stristr__post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func; retVal___ = postHookFunc(retVal___, haystack, needle); } @@ -76185,14 +89033,14 @@ const char* HP_strlib_stristr_(const char *haystack, const char *needle) { size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_strnlen__pre ) { - size_t (*preHookFunc) (const char *string, size_t *maxlen); + if (HPMHooks.count.HP_strlib_strnlen__pre > 0) { + size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func; - retVal___ = preHookFunc(string, &maxlen); + retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76200,11 +89048,11 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_strnlen__post ) { - size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_strnlen__post > 0) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func; - retVal___ = postHookFunc(retVal___, string, &maxlen); + retVal___ = postHookFunc(retVal___, string, maxlen); } } return retVal___; @@ -76212,14 +89060,14 @@ size_t HP_strlib_strnlen_(const char *string, size_t maxlen) { char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_strtok_r__pre ) { - char* (*preHookFunc) (char *s1, const char *s2, char **lasts); + if (HPMHooks.count.HP_strlib_strtok_r__pre > 0) { + char* (*preHookFunc) (char **s1, const char **s2, char ***lasts); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func; - retVal___ = preHookFunc(s1, s2, lasts); + retVal___ = preHookFunc(&s1, &s2, &lasts); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76227,9 +89075,9 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { { retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts); } - if( HPMHooks.count.HP_strlib_strtok_r__post ) { + if (HPMHooks.count.HP_strlib_strtok_r__post > 0) { char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func; retVal___ = postHookFunc(retVal___, s1, s2, lasts); } @@ -76239,14 +89087,14 @@ char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) { int HP_strlib_e_mail_check_(char *email) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_e_mail_check__pre ) { - int (*preHookFunc) (char *email); + if (HPMHooks.count.HP_strlib_e_mail_check__pre > 0) { + int (*preHookFunc) (char **email); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func; - retVal___ = preHookFunc(email); + retVal___ = preHookFunc(&email); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76254,9 +89102,9 @@ int HP_strlib_e_mail_check_(char *email) { { retVal___ = HPMHooks.source.strlib.e_mail_check_(email); } - if( HPMHooks.count.HP_strlib_e_mail_check__post ) { + if (HPMHooks.count.HP_strlib_e_mail_check__post > 0) { int (*postHookFunc) (int retVal___, char *email); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func; retVal___ = postHookFunc(retVal___, email); } @@ -76266,14 +89114,14 @@ int HP_strlib_e_mail_check_(char *email) { int HP_strlib_config_switch_(const char *str) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_config_switch__pre ) { - int (*preHookFunc) (const char *str); + if (HPMHooks.count.HP_strlib_config_switch__pre > 0) { + int (*preHookFunc) (const char **str); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func; - retVal___ = preHookFunc(str); + retVal___ = preHookFunc(&str); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76281,9 +89129,9 @@ int HP_strlib_config_switch_(const char *str) { { retVal___ = HPMHooks.source.strlib.config_switch_(str); } - if( HPMHooks.count.HP_strlib_config_switch__post ) { + if (HPMHooks.count.HP_strlib_config_switch__post > 0) { int (*postHookFunc) (int retVal___, const char *str); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func; retVal___ = postHookFunc(retVal___, str); } @@ -76293,14 +89141,14 @@ int HP_strlib_config_switch_(const char *str) { char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { int hIndex = 0; char* retVal___ = NULL; - if( HPMHooks.count.HP_strlib_safestrncpy__pre ) { - char* (*preHookFunc) (char *dst, const char *src, size_t *n); + if (HPMHooks.count.HP_strlib_safestrncpy__pre > 0) { + char* (*preHookFunc) (char **dst, const char **src, size_t *n); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func; - retVal___ = preHookFunc(dst, src, &n); + retVal___ = preHookFunc(&dst, &src, &n); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76308,11 +89156,11 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { { retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n); } - if( HPMHooks.count.HP_strlib_safestrncpy__post ) { - char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t *n); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_safestrncpy__post > 0) { + char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t n); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func; - retVal___ = postHookFunc(retVal___, dst, src, &n); + retVal___ = postHookFunc(retVal___, dst, src, n); } } return retVal___; @@ -76320,14 +89168,14 @@ char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) { size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_strlib_safestrnlen__pre ) { - size_t (*preHookFunc) (const char *string, size_t *maxlen); + if (HPMHooks.count.HP_strlib_safestrnlen__pre > 0) { + size_t (*preHookFunc) (const char **string, size_t *maxlen); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func; - retVal___ = preHookFunc(string, &maxlen); + retVal___ = preHookFunc(&string, &maxlen); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76335,11 +89183,11 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { { retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen); } - if( HPMHooks.count.HP_strlib_safestrnlen__post ) { - size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_safestrnlen__post > 0) { + size_t (*postHookFunc) (size_t retVal___, const char *string, size_t maxlen); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func; - retVal___ = postHookFunc(retVal___, string, &maxlen); + retVal___ = postHookFunc(retVal___, string, maxlen); } } return retVal___; @@ -76347,14 +89195,14 @@ size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) { int HP_strlib_strline_(const char *str, size_t pos) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_strlib_strline__pre ) { - int (*preHookFunc) (const char *str, size_t *pos); + if (HPMHooks.count.HP_strlib_strline__pre > 0) { + int (*preHookFunc) (const char **str, size_t *pos); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func; - retVal___ = preHookFunc(str, &pos); + retVal___ = preHookFunc(&str, &pos); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76362,26 +89210,26 @@ int HP_strlib_strline_(const char *str, size_t pos) { { retVal___ = HPMHooks.source.strlib.strline_(str, pos); } - if( HPMHooks.count.HP_strlib_strline__post ) { - int (*postHookFunc) (int retVal___, const char *str, size_t *pos); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_strline__post > 0) { + int (*postHookFunc) (int retVal___, const char *str, size_t pos); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &pos); + retVal___ = postHookFunc(retVal___, str, pos); } } return retVal___; } -bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { +bool HP_strlib_bin2hex_(char *output, const unsigned char *input, size_t count) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_strlib_bin2hex__pre ) { - bool (*preHookFunc) (char *output, unsigned char *input, size_t *count); + if (HPMHooks.count.HP_strlib_bin2hex__pre > 0) { + bool (*preHookFunc) (char **output, const unsigned char **input, size_t *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++) { preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func; - retVal___ = preHookFunc(output, input, &count); + retVal___ = preHookFunc(&output, &input, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76389,27 +89237,265 @@ bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) { { retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count); } - if( HPMHooks.count.HP_strlib_bin2hex__post ) { - bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count); - for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) { + if (HPMHooks.count.HP_strlib_bin2hex__post > 0) { + bool (*postHookFunc) (bool retVal___, char *output, const unsigned char *input, size_t count); + for (hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++) { postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func; - retVal___ = postHookFunc(retVal___, output, input, &count); + retVal___ = postHookFunc(retVal___, output, input, count); } } return retVal___; } -/* sv */ +/* stylist_interface */ +void HP_stylist_init(bool minimal) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_init_pre > 0) { + void (*preHookFunc) (bool *minimal); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_init_pre[hIndex].func; + preHookFunc(&minimal); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.init(minimal); + } + if (HPMHooks.count.HP_stylist_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_init_post[hIndex].func; + postHookFunc(minimal); + } + } + return; +} +void HP_stylist_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.final(); + } + if (HPMHooks.count.HP_stylist_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_stylist_vector_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_vector_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_vector_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.vector_init(); + } + if (HPMHooks.count.HP_stylist_vector_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_vector_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_stylist_vector_clear(void) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_vector_clear_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_clear_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_vector_clear_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.vector_clear(); + } + if (HPMHooks.count.HP_stylist_vector_clear_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_vector_clear_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_vector_clear_post[hIndex].func; + postHookFunc(); + } + } + return; +} +bool HP_stylist_read_db_libconfig(void) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_stylist_read_db_libconfig_pre > 0) { + bool (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.stylist.read_db_libconfig(); + } + if (HPMHooks.count.HP_stylist_read_db_libconfig_post > 0) { + bool (*postHookFunc) (bool retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_stylist_read_db_libconfig_sub(struct config_setting_t *it, int idx, const char *source) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_stylist_read_db_libconfig_sub_pre > 0) { + bool (*preHookFunc) (struct config_setting_t **it, int *idx, const char **source); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_sub_pre[hIndex].func; + retVal___ = preHookFunc(&it, &idx, &source); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.stylist.read_db_libconfig_sub(it, idx, source); + } + if (HPMHooks.count.HP_stylist_read_db_libconfig_sub_post > 0) { + bool (*postHookFunc) (bool retVal___, struct config_setting_t *it, int idx, const char *source); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_read_db_libconfig_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_read_db_libconfig_sub_post[hIndex].func; + retVal___ = postHookFunc(retVal___, it, idx, source); + } + } + return retVal___; +} +void HP_stylist_request_style_change(struct map_session_data *sd, int type, int16 idx, bool isitem) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_request_style_change_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_request_style_change_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_request_style_change_pre[hIndex].func; + preHookFunc(&sd, &type, &idx, &isitem); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.request_style_change(sd, type, idx, isitem); + } + if (HPMHooks.count.HP_stylist_request_style_change_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int type, int16 idx, bool isitem); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_request_style_change_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_request_style_change_post[hIndex].func; + postHookFunc(sd, type, idx, isitem); + } + } + return; +} +bool HP_stylist_validate_requirements(struct map_session_data *sd, int type, int16 idx) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_stylist_validate_requirements_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *type, int16 *idx); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_validate_requirements_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_validate_requirements_pre[hIndex].func; + retVal___ = preHookFunc(&sd, &type, &idx); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.stylist.validate_requirements(sd, type, idx); + } + if (HPMHooks.count.HP_stylist_validate_requirements_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int type, int16 idx); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_validate_requirements_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_validate_requirements_post[hIndex].func; + retVal___ = postHookFunc(retVal___, sd, type, idx); + } + } + return retVal___; +} +void HP_stylist_send_rodexitem(struct map_session_data *sd, int itemid) { + int hIndex = 0; + if (HPMHooks.count.HP_stylist_send_rodexitem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *itemid); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_send_rodexitem_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_stylist_send_rodexitem_pre[hIndex].func; + preHookFunc(&sd, &itemid); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.stylist.send_rodexitem(sd, itemid); + } + if (HPMHooks.count.HP_stylist_send_rodexitem_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, int itemid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_stylist_send_rodexitem_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_stylist_send_rodexitem_post[hIndex].func; + postHookFunc(sd, itemid); + } + } + return; +} +/* sv_interface */ int HP_sv_parse_next(struct s_svstate *svstate) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_next_pre ) { - int (*preHookFunc) (struct s_svstate *svstate); + if (HPMHooks.count.HP_sv_parse_next_pre > 0) { + int (*preHookFunc) (struct s_svstate **svstate); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func; - retVal___ = preHookFunc(svstate); + retVal___ = preHookFunc(&svstate); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76417,9 +89503,9 @@ int HP_sv_parse_next(struct s_svstate *svstate) { { retVal___ = HPMHooks.source.sv.parse_next(svstate); } - if( HPMHooks.count.HP_sv_parse_next_post ) { + if (HPMHooks.count.HP_sv_parse_next_post > 0) { int (*postHookFunc) (int retVal___, struct s_svstate *svstate); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func; retVal___ = postHookFunc(retVal___, svstate); } @@ -76429,14 +89515,14 @@ int HP_sv_parse_next(struct s_svstate *svstate) { int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_parse_pre ) { - int (*preHookFunc) (const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); + if (HPMHooks.count.HP_sv_parse_pre > 0) { + int (*preHookFunc) (const char **str, int *len, int *startoff, char *delim, int **out_pos, int *npos, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func; - retVal___ = preHookFunc(str, &len, &startoff, &delim, out_pos, &npos, &opt); + retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_pos, &npos, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76444,11 +89530,11 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos { retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt); } - if( HPMHooks.count.HP_sv_parse_post ) { - int (*postHookFunc) (int retVal___, const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_parse_post > 0) { + int (*postHookFunc) (int retVal___, const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_pos, &npos, &opt); + retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_pos, npos, opt); } } return retVal___; @@ -76456,14 +89542,14 @@ int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sv_split_pre ) { - int (*preHookFunc) (char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); + if (HPMHooks.count.HP_sv_split_pre > 0) { + int (*preHookFunc) (char **str, int *len, int *startoff, char *delim, char ***out_fields, int *nfields, enum e_svopt *opt); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func; - retVal___ = preHookFunc(str, &len, &startoff, &delim, out_fields, &nfields, &opt); + retVal___ = preHookFunc(&str, &len, &startoff, &delim, &out_fields, &nfields, &opt); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76471,11 +89557,11 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, { retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt); } - if( HPMHooks.count.HP_sv_split_post ) { - int (*postHookFunc) (int retVal___, char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_split_post > 0) { + int (*postHookFunc) (int retVal___, char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func; - retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_fields, &nfields, &opt); + retVal___ = postHookFunc(retVal___, str, len, startoff, delim, out_fields, nfields, opt); } } return retVal___; @@ -76483,14 +89569,14 @@ int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_escape_c_pre ) { - size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len, const char *escapes); + if (HPMHooks.count.HP_sv_escape_c_pre > 0) { + size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len, const char **escapes); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func; - retVal___ = preHookFunc(out_dest, src, &len, escapes); + retVal___ = preHookFunc(&out_dest, &src, &len, &escapes); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76498,11 +89584,11 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e { retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes); } - if( HPMHooks.count.HP_sv_escape_c_post ) { - size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len, const char *escapes); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_escape_c_post > 0) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len, const char *escapes); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func; - retVal___ = postHookFunc(retVal___, out_dest, src, &len, escapes); + retVal___ = postHookFunc(retVal___, out_dest, src, len, escapes); } } return retVal___; @@ -76510,14 +89596,14 @@ size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *e size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { int hIndex = 0; size_t retVal___ = 0; - if( HPMHooks.count.HP_sv_unescape_c_pre ) { - size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len); + if (HPMHooks.count.HP_sv_unescape_c_pre > 0) { + size_t (*preHookFunc) (char **out_dest, const char **src, size_t *len); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func; - retVal___ = preHookFunc(out_dest, src, &len); + retVal___ = preHookFunc(&out_dest, &src, &len); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76525,11 +89611,11 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { { retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len); } - if( HPMHooks.count.HP_sv_unescape_c_post ) { - size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_unescape_c_post > 0) { + size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t len); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func; - retVal___ = postHookFunc(retVal___, out_dest, src, &len); + retVal___ = postHookFunc(retVal___, out_dest, src, len); } } return retVal___; @@ -76537,14 +89623,14 @@ size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) { const char* HP_sv_skip_escaped_c(const char *p) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) { - const char* (*preHookFunc) (const char *p); + if (HPMHooks.count.HP_sv_skip_escaped_c_pre > 0) { + const char* (*preHookFunc) (const char **p); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func; - retVal___ = preHookFunc(p); + retVal___ = preHookFunc(&p); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76552,9 +89638,9 @@ const char* HP_sv_skip_escaped_c(const char *p) { { retVal___ = HPMHooks.source.sv.skip_escaped_c(p); } - if( HPMHooks.count.HP_sv_skip_escaped_c_post ) { + if (HPMHooks.count.HP_sv_skip_escaped_c_post > 0) { const char* (*postHookFunc) (const char* retVal___, const char *p); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func; retVal___ = postHookFunc(retVal___, p); } @@ -76564,14 +89650,14 @@ const char* HP_sv_skip_escaped_c(const char *p) { bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sv_readdb_pre ) { - bool (*preHookFunc) (const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); + if (HPMHooks.count.HP_sv_readdb_pre > 0) { + bool (*preHookFunc) (const char **directory, const char **filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( **parseproc ) (char *fields[], int columns, int current)); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func; - retVal___ = preHookFunc(directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); + retVal___ = preHookFunc(&directory, &filename, &delim, &mincols, &maxcols, &maxrows, &parseproc); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76579,27 +89665,27 @@ bool HP_sv_readdb(const char *directory, const char *filename, char delim, int m { retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc); } - if( HPMHooks.count.HP_sv_readdb_post ) { - bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) { + if (HPMHooks.count.HP_sv_readdb_post > 0) { + bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)); + for (hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func; - retVal___ = postHookFunc(retVal___, directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc); + retVal___ = postHookFunc(retVal___, directory, filename, delim, mincols, maxcols, maxrows, parseproc); } } return retVal___; } -/* sysinfo */ +/* sysinfo_interface */ int HP_sysinfo_getpagesize(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76607,9 +89693,9 @@ int HP_sysinfo_getpagesize(void) { { retVal___ = HPMHooks.source.sysinfo.getpagesize(); } - if( HPMHooks.count.HP_sysinfo_getpagesize_post ) { + if (HPMHooks.count.HP_sysinfo_getpagesize_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76619,14 +89705,14 @@ int HP_sysinfo_getpagesize(void) { const char* HP_sysinfo_platform(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_platform_pre ) { + if (HPMHooks.count.HP_sysinfo_platform_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76634,9 +89720,9 @@ const char* HP_sysinfo_platform(void) { { retVal___ = HPMHooks.source.sysinfo.platform(); } - if( HPMHooks.count.HP_sysinfo_platform_post ) { + if (HPMHooks.count.HP_sysinfo_platform_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76646,14 +89732,14 @@ const char* HP_sysinfo_platform(void) { const char* HP_sysinfo_osversion(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_osversion_pre ) { + if (HPMHooks.count.HP_sysinfo_osversion_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76661,9 +89747,9 @@ const char* HP_sysinfo_osversion(void) { { retVal___ = HPMHooks.source.sysinfo.osversion(); } - if( HPMHooks.count.HP_sysinfo_osversion_post ) { + if (HPMHooks.count.HP_sysinfo_osversion_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76673,14 +89759,14 @@ const char* HP_sysinfo_osversion(void) { const char* HP_sysinfo_cpu(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cpu_pre ) { + if (HPMHooks.count.HP_sysinfo_cpu_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76688,9 +89774,9 @@ const char* HP_sysinfo_cpu(void) { { retVal___ = HPMHooks.source.sysinfo.cpu(); } - if( HPMHooks.count.HP_sysinfo_cpu_post ) { + if (HPMHooks.count.HP_sysinfo_cpu_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76700,14 +89786,14 @@ const char* HP_sysinfo_cpu(void) { int HP_sysinfo_cpucores(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_cpucores_pre ) { + if (HPMHooks.count.HP_sysinfo_cpucores_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76715,9 +89801,9 @@ int HP_sysinfo_cpucores(void) { { retVal___ = HPMHooks.source.sysinfo.cpucores(); } - if( HPMHooks.count.HP_sysinfo_cpucores_post ) { + if (HPMHooks.count.HP_sysinfo_cpucores_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76727,14 +89813,14 @@ int HP_sysinfo_cpucores(void) { const char* HP_sysinfo_arch(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_arch_pre ) { + if (HPMHooks.count.HP_sysinfo_arch_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76742,9 +89828,9 @@ const char* HP_sysinfo_arch(void) { { retVal___ = HPMHooks.source.sysinfo.arch(); } - if( HPMHooks.count.HP_sysinfo_arch_post ) { + if (HPMHooks.count.HP_sysinfo_arch_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76754,14 +89840,14 @@ const char* HP_sysinfo_arch(void) { bool HP_sysinfo_is64bit(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is64bit_pre ) { + if (HPMHooks.count.HP_sysinfo_is64bit_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76769,9 +89855,9 @@ bool HP_sysinfo_is64bit(void) { { retVal___ = HPMHooks.source.sysinfo.is64bit(); } - if( HPMHooks.count.HP_sysinfo_is64bit_post ) { + if (HPMHooks.count.HP_sysinfo_is64bit_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76781,14 +89867,14 @@ bool HP_sysinfo_is64bit(void) { const char* HP_sysinfo_compiler(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_compiler_pre ) { + if (HPMHooks.count.HP_sysinfo_compiler_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76796,9 +89882,9 @@ const char* HP_sysinfo_compiler(void) { { retVal___ = HPMHooks.source.sysinfo.compiler(); } - if( HPMHooks.count.HP_sysinfo_compiler_post ) { + if (HPMHooks.count.HP_sysinfo_compiler_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76808,14 +89894,14 @@ const char* HP_sysinfo_compiler(void) { const char* HP_sysinfo_cflags(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_cflags_pre ) { + if (HPMHooks.count.HP_sysinfo_cflags_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76823,9 +89909,9 @@ const char* HP_sysinfo_cflags(void) { { retVal___ = HPMHooks.source.sysinfo.cflags(); } - if( HPMHooks.count.HP_sysinfo_cflags_post ) { + if (HPMHooks.count.HP_sysinfo_cflags_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76835,14 +89921,14 @@ const char* HP_sysinfo_cflags(void) { const char* HP_sysinfo_time(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_time_pre ) { + if (HPMHooks.count.HP_sysinfo_time_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_time_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76850,9 +89936,9 @@ const char* HP_sysinfo_time(void) { { retVal___ = HPMHooks.source.sysinfo.time(); } - if( HPMHooks.count.HP_sysinfo_time_post ) { + if (HPMHooks.count.HP_sysinfo_time_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_time_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_time_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76862,14 +89948,14 @@ const char* HP_sysinfo_time(void) { const char* HP_sysinfo_vcstype(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcstype_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstype_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76877,9 +89963,9 @@ const char* HP_sysinfo_vcstype(void) { { retVal___ = HPMHooks.source.sysinfo.vcstype(); } - if( HPMHooks.count.HP_sysinfo_vcstype_post ) { + if (HPMHooks.count.HP_sysinfo_vcstype_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76889,14 +89975,14 @@ const char* HP_sysinfo_vcstype(void) { int HP_sysinfo_vcstypeid(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76904,9 +89990,9 @@ int HP_sysinfo_vcstypeid(void) { { retVal___ = HPMHooks.source.sysinfo.vcstypeid(); } - if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) { + if (HPMHooks.count.HP_sysinfo_vcstypeid_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76916,14 +90002,14 @@ int HP_sysinfo_vcstypeid(void) { const char* HP_sysinfo_vcsrevision_src(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76931,9 +90017,9 @@ const char* HP_sysinfo_vcsrevision_src(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_src(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_src_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76943,14 +90029,14 @@ const char* HP_sysinfo_vcsrevision_src(void) { const char* HP_sysinfo_vcsrevision_scripts(void) { int hIndex = 0; const char* retVal___ = NULL; - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre > 0) { const char* (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -76958,9 +90044,9 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { { retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post > 0) { const char* (*postHookFunc) (const char* retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -76969,14 +90055,14 @@ const char* HP_sysinfo_vcsrevision_scripts(void) { } void HP_sysinfo_vcsrevision_reload(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -76984,9 +90070,9 @@ void HP_sysinfo_vcsrevision_reload(void) { { HPMHooks.source.sysinfo.vcsrevision_reload(); } - if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) { + if (HPMHooks.count.HP_sysinfo_vcsrevision_reload_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func; postHookFunc(); } @@ -76996,14 +90082,14 @@ void HP_sysinfo_vcsrevision_reload(void) { bool HP_sysinfo_is_superuser(void) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_pre > 0) { bool (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77011,9 +90097,9 @@ bool HP_sysinfo_is_superuser(void) { { retVal___ = HPMHooks.source.sysinfo.is_superuser(); } - if( HPMHooks.count.HP_sysinfo_is_superuser_post ) { + if (HPMHooks.count.HP_sysinfo_is_superuser_post > 0) { bool (*postHookFunc) (bool retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -77022,14 +90108,14 @@ bool HP_sysinfo_is_superuser(void) { } void HP_sysinfo_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_init_pre ) { + if (HPMHooks.count.HP_sysinfo_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77037,9 +90123,9 @@ void HP_sysinfo_init(void) { { HPMHooks.source.sysinfo.init(); } - if( HPMHooks.count.HP_sysinfo_init_post ) { + if (HPMHooks.count.HP_sysinfo_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func; postHookFunc(); } @@ -77048,14 +90134,14 @@ void HP_sysinfo_init(void) { } void HP_sysinfo_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_sysinfo_final_pre ) { + if (HPMHooks.count.HP_sysinfo_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77063,27 +90149,320 @@ void HP_sysinfo_final(void) { { HPMHooks.source.sysinfo.final(); } - if( HPMHooks.count.HP_sysinfo_final_post ) { + if (HPMHooks.count.HP_sysinfo_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func; postHookFunc(); } } return; } -/* timer */ +/* thread_interface */ +void HP_thread_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.init(); + } + if (HPMHooks.count.HP_thread_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_thread_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.final(); + } + if (HPMHooks.count.HP_thread_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} +struct thread_handle* HP_thread_create(threadFunc entry_point, void *param) { + int hIndex = 0; + struct thread_handle* retVal___ = NULL; + if (HPMHooks.count.HP_thread_create_pre > 0) { + struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_create_pre[hIndex].func; + retVal___ = preHookFunc(&entry_point, ¶m); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.create(entry_point, param); + } + if (HPMHooks.count.HP_thread_create_post > 0) { + struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_create_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry_point, param); + } + } + return retVal___; +} +struct thread_handle* HP_thread_create_opt(threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio) { + int hIndex = 0; + struct thread_handle* retVal___ = NULL; + if (HPMHooks.count.HP_thread_create_opt_pre > 0) { + struct thread_handle* (*preHookFunc) (threadFunc *entry_point, void **param, size_t *stack_size, enum thread_priority *prio); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_create_opt_pre[hIndex].func; + retVal___ = preHookFunc(&entry_point, ¶m, &stack_size, &prio); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.create_opt(entry_point, param, stack_size, prio); + } + if (HPMHooks.count.HP_thread_create_opt_post > 0) { + struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___, threadFunc entry_point, void *param, size_t stack_size, enum thread_priority prio); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_create_opt_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_create_opt_post[hIndex].func; + retVal___ = postHookFunc(retVal___, entry_point, param, stack_size, prio); + } + } + return retVal___; +} +void HP_thread_destroy(struct thread_handle *handle) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_destroy_pre > 0) { + void (*preHookFunc) (struct thread_handle **handle); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_destroy_pre[hIndex].func; + preHookFunc(&handle); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.destroy(handle); + } + if (HPMHooks.count.HP_thread_destroy_post > 0) { + void (*postHookFunc) (struct thread_handle *handle); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_destroy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_destroy_post[hIndex].func; + postHookFunc(handle); + } + } + return; +} +struct thread_handle* HP_thread_self(void) { + int hIndex = 0; + struct thread_handle* retVal___ = NULL; + if (HPMHooks.count.HP_thread_self_pre > 0) { + struct thread_handle* (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_self_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.self(); + } + if (HPMHooks.count.HP_thread_self_post > 0) { + struct thread_handle* (*postHookFunc) (struct thread_handle* retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_self_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_self_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +int HP_thread_get_tid(void) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_thread_get_tid_pre > 0) { + int (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_get_tid_pre[hIndex].func; + retVal___ = preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.get_tid(); + } + if (HPMHooks.count.HP_thread_get_tid_post > 0) { + int (*postHookFunc) (int retVal___); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_get_tid_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_get_tid_post[hIndex].func; + retVal___ = postHookFunc(retVal___); + } + } + return retVal___; +} +bool HP_thread_wait(struct thread_handle *handle, void **out_exit_code) { + int hIndex = 0; + bool retVal___ = false; + if (HPMHooks.count.HP_thread_wait_pre > 0) { + bool (*preHookFunc) (struct thread_handle **handle, void ***out_exit_code); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_wait_pre[hIndex].func; + retVal___ = preHookFunc(&handle, &out_exit_code); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.wait(handle, out_exit_code); + } + if (HPMHooks.count.HP_thread_wait_post > 0) { + bool (*postHookFunc) (bool retVal___, struct thread_handle *handle, void **out_exit_code); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_wait_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_wait_post[hIndex].func; + retVal___ = postHookFunc(retVal___, handle, out_exit_code); + } + } + return retVal___; +} +void HP_thread_prio_set(struct thread_handle *handle, enum thread_priority prio) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_prio_set_pre > 0) { + void (*preHookFunc) (struct thread_handle **handle, enum thread_priority *prio); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_prio_set_pre[hIndex].func; + preHookFunc(&handle, &prio); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.prio_set(handle, prio); + } + if (HPMHooks.count.HP_thread_prio_set_post > 0) { + void (*postHookFunc) (struct thread_handle *handle, enum thread_priority prio); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_set_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_prio_set_post[hIndex].func; + postHookFunc(handle, prio); + } + } + return; +} +enum thread_priority HP_thread_prio_get(struct thread_handle *handle) { + int hIndex = 0; + enum thread_priority retVal___ = THREADPRIO_NORMAL; + if (HPMHooks.count.HP_thread_prio_get_pre > 0) { + enum thread_priority (*preHookFunc) (struct thread_handle **handle); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_prio_get_pre[hIndex].func; + retVal___ = preHookFunc(&handle); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.thread.prio_get(handle); + } + if (HPMHooks.count.HP_thread_prio_get_post > 0) { + enum thread_priority (*postHookFunc) (enum thread_priority retVal___, struct thread_handle *handle); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_prio_get_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_prio_get_post[hIndex].func; + retVal___ = postHookFunc(retVal___, handle); + } + } + return retVal___; +} +void HP_thread_yield(void) { + int hIndex = 0; + if (HPMHooks.count.HP_thread_yield_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_thread_yield_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.thread.yield(); + } + if (HPMHooks.count.HP_thread_yield_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_thread_yield_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_thread_yield_post[hIndex].func; + postHookFunc(); + } + } + return; +} +/* timer_interface */ int64 HP_timer_gettick(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_pre ) { + if (HPMHooks.count.HP_timer_gettick_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77091,9 +90470,9 @@ int64 HP_timer_gettick(void) { { retVal___ = HPMHooks.source.timer.gettick(); } - if( HPMHooks.count.HP_timer_gettick_post ) { + if (HPMHooks.count.HP_timer_gettick_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -77103,14 +90482,14 @@ int64 HP_timer_gettick(void) { int64 HP_timer_gettick_nocache(void) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_gettick_nocache_pre ) { + if (HPMHooks.count.HP_timer_gettick_nocache_pre > 0) { int64 (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77118,9 +90497,9 @@ int64 HP_timer_gettick_nocache(void) { { retVal___ = HPMHooks.source.timer.gettick_nocache(); } - if( HPMHooks.count.HP_timer_gettick_nocache_post ) { + if (HPMHooks.count.HP_timer_gettick_nocache_post > 0) { int64 (*postHookFunc) (int64 retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -77130,14 +90509,14 @@ int64 HP_timer_gettick_nocache(void) { int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_pre ) { + if (HPMHooks.count.HP_timer_add_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77145,11 +90524,11 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { { retVal___ = HPMHooks.source.timer.add(tick, func, id, data); } - if( HPMHooks.count.HP_timer_add_post ) { - int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_add_post > 0) { + int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data); + retVal___ = postHookFunc(retVal___, tick, func, id, data); } } return retVal___; @@ -77157,14 +90536,14 @@ int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) { int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_interval_pre ) { + if (HPMHooks.count.HP_timer_add_interval_pre > 0) { int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func; retVal___ = preHookFunc(&tick, &func, &id, &data, &interval); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77172,11 +90551,11 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int { retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval); } - if( HPMHooks.count.HP_timer_add_interval_post ) { - int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_add_interval_post > 0) { + int (*postHookFunc) (int retVal___, int64 tick, TimerFunc func, int id, intptr_t data, int interval); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data, &interval); + retVal___ = postHookFunc(retVal___, tick, func, id, data, interval); } } return retVal___; @@ -77184,14 +90563,14 @@ int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int const struct TimerData* HP_timer_get(int tid) { int hIndex = 0; const struct TimerData* retVal___ = NULL; - if( HPMHooks.count.HP_timer_get_pre ) { + if (HPMHooks.count.HP_timer_get_pre > 0) { const struct TimerData* (*preHookFunc) (int *tid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func; retVal___ = preHookFunc(&tid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77199,11 +90578,11 @@ const struct TimerData* HP_timer_get(int tid) { { retVal___ = HPMHooks.source.timer.get(tid); } - if( HPMHooks.count.HP_timer_get_post ) { - const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int *tid); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_get_post > 0) { + const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int tid); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid); + retVal___ = postHookFunc(retVal___, tid); } } return retVal___; @@ -77211,14 +90590,14 @@ const struct TimerData* HP_timer_get(int tid) { int HP_timer_delete(int tid, TimerFunc func) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_delete_pre ) { + if (HPMHooks.count.HP_timer_delete_pre > 0) { int (*preHookFunc) (int *tid, TimerFunc *func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func; retVal___ = preHookFunc(&tid, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77226,11 +90605,11 @@ int HP_timer_delete(int tid, TimerFunc func) { { retVal___ = HPMHooks.source.timer.delete(tid, func); } - if( HPMHooks.count.HP_timer_delete_post ) { - int (*postHookFunc) (int retVal___, int *tid, TimerFunc *func); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_delete_post > 0) { + int (*postHookFunc) (int retVal___, int tid, TimerFunc func); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &func); + retVal___ = postHookFunc(retVal___, tid, func); } } return retVal___; @@ -77238,14 +90617,14 @@ int HP_timer_delete(int tid, TimerFunc func) { int64 HP_timer_addtick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_addtick_pre ) { + if (HPMHooks.count.HP_timer_addtick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77253,11 +90632,11 @@ int64 HP_timer_addtick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.addtick(tid, tick); } - if( HPMHooks.count.HP_timer_addtick_post ) { - int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_addtick_post > 0) { + int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick); + retVal___ = postHookFunc(retVal___, tid, tick); } } return retVal___; @@ -77265,14 +90644,14 @@ int64 HP_timer_addtick(int tid, int64 tick) { int64 HP_timer_settick(int tid, int64 tick) { int hIndex = 0; int64 retVal___ = 0; - if( HPMHooks.count.HP_timer_settick_pre ) { + if (HPMHooks.count.HP_timer_settick_pre > 0) { int64 (*preHookFunc) (int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77280,11 +90659,11 @@ int64 HP_timer_settick(int tid, int64 tick) { { retVal___ = HPMHooks.source.timer.settick(tid, tick); } - if( HPMHooks.count.HP_timer_settick_post ) { - int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_settick_post > 0) { + int64 (*postHookFunc) (int64 retVal___, int tid, int64 tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick); + retVal___ = postHookFunc(retVal___, tid, tick); } } return retVal___; @@ -77292,14 +90671,14 @@ int64 HP_timer_settick(int tid, int64 tick) { int HP_timer_add_func_list(TimerFunc func, char *name) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_add_func_list_pre ) { - int (*preHookFunc) (TimerFunc *func, char *name); + if (HPMHooks.count.HP_timer_add_func_list_pre > 0) { + int (*preHookFunc) (TimerFunc *func, char **name); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func; - retVal___ = preHookFunc(&func, name); + retVal___ = preHookFunc(&func, &name); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77307,11 +90686,11 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { { retVal___ = HPMHooks.source.timer.add_func_list(func, name); } - if( HPMHooks.count.HP_timer_add_func_list_post ) { - int (*postHookFunc) (int retVal___, TimerFunc *func, char *name); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_add_func_list_post > 0) { + int (*postHookFunc) (int retVal___, TimerFunc func, char *name); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &func, name); + retVal___ = postHookFunc(retVal___, func, name); } } return retVal___; @@ -77319,14 +90698,14 @@ int HP_timer_add_func_list(TimerFunc func, char *name) { unsigned long HP_timer_get_uptime(void) { int hIndex = 0; unsigned long retVal___ = 0; - if( HPMHooks.count.HP_timer_get_uptime_pre ) { + if (HPMHooks.count.HP_timer_get_uptime_pre > 0) { unsigned long (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func; retVal___ = preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77334,9 +90713,9 @@ unsigned long HP_timer_get_uptime(void) { { retVal___ = HPMHooks.source.timer.get_uptime(); } - if( HPMHooks.count.HP_timer_get_uptime_post ) { + if (HPMHooks.count.HP_timer_get_uptime_post > 0) { unsigned long (*postHookFunc) (unsigned long retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -77346,14 +90725,14 @@ unsigned long HP_timer_get_uptime(void) { int HP_timer_perform(int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_timer_perform_pre ) { + if (HPMHooks.count.HP_timer_perform_pre > 0) { int (*preHookFunc) (int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func; retVal___ = preHookFunc(&tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77361,25 +90740,25 @@ int HP_timer_perform(int64 tick) { { retVal___ = HPMHooks.source.timer.perform(tick); } - if( HPMHooks.count.HP_timer_perform_post ) { - int (*postHookFunc) (int retVal___, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) { + if (HPMHooks.count.HP_timer_perform_post > 0) { + int (*postHookFunc) (int retVal___, int64 tick); + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tick); + retVal___ = postHookFunc(retVal___, tick); } } return retVal___; } void HP_timer_init(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_init_pre ) { + if (HPMHooks.count.HP_timer_init_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77387,9 +90766,9 @@ void HP_timer_init(void) { { HPMHooks.source.timer.init(); } - if( HPMHooks.count.HP_timer_init_post ) { + if (HPMHooks.count.HP_timer_init_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func; postHookFunc(); } @@ -77398,14 +90777,14 @@ void HP_timer_init(void) { } void HP_timer_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_timer_final_pre ) { + if (HPMHooks.count.HP_timer_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77413,26 +90792,26 @@ void HP_timer_final(void) { { HPMHooks.source.timer.final(); } - if( HPMHooks.count.HP_timer_final_post ) { + if (HPMHooks.count.HP_timer_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func; postHookFunc(); } } return; } -/* trade */ +/* trade_interface */ 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); + if (HPMHooks.count.HP_trade_request_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, struct map_session_data **target_sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_trade_request_pre[hIndex].func; - preHookFunc(sd, target_sd); + preHookFunc(&sd, &target_sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77440,9 +90819,9 @@ void HP_trade_request(struct map_session_data *sd, struct map_session_data *targ { HPMHooks.source.trade.request(sd, target_sd); } - if( HPMHooks.count.HP_trade_request_post ) { + if (HPMHooks.count.HP_trade_request_post > 0) { void (*postHookFunc) (struct map_session_data *sd, struct map_session_data *target_sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_request_post; hIndex++) { postHookFunc = HPMHooks.list.HP_trade_request_post[hIndex].func; postHookFunc(sd, target_sd); } @@ -77451,14 +90830,14 @@ void HP_trade_request(struct map_session_data *sd, struct map_session_data *targ } 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); + if (HPMHooks.count.HP_trade_ack_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_ack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_trade_ack_pre[hIndex].func; - preHookFunc(sd, &type); + preHookFunc(&sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77466,11 +90845,11 @@ void HP_trade_ack(struct map_session_data *sd, int type) { { 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++ ) { + if (HPMHooks.count.HP_trade_ack_post > 0) { + 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); + postHookFunc(sd, type); } } return; @@ -77478,14 +90857,14 @@ void HP_trade_ack(struct map_session_data *sd, int type) { int HP_trade_check_impossible(struct map_session_data *sd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_trade_check_impossible_pre ) { - int (*preHookFunc) (struct map_session_data *sd); + if (HPMHooks.count.HP_trade_check_impossible_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_impossible_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77493,9 +90872,9 @@ int HP_trade_check_impossible(struct map_session_data *sd) { { retVal___ = HPMHooks.source.trade.check_impossible(sd); } - if( HPMHooks.count.HP_trade_check_impossible_post ) { + if (HPMHooks.count.HP_trade_check_impossible_post > 0) { int (*postHookFunc) (int retVal___, struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_impossible_post; hIndex++ ) { + 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); } @@ -77505,14 +90884,14 @@ int HP_trade_check_impossible(struct map_session_data *sd) { int HP_trade_check(struct map_session_data *sd, struct map_session_data *tsd) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_trade_check_pre ) { - int (*preHookFunc) (struct map_session_data *sd, struct map_session_data *tsd); + if (HPMHooks.count.HP_trade_check_pre > 0) { + int (*preHookFunc) (struct map_session_data **sd, struct map_session_data **tsd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_check_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_trade_check_pre[hIndex].func; - retVal___ = preHookFunc(sd, tsd); + retVal___ = preHookFunc(&sd, &tsd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77520,9 +90899,9 @@ int HP_trade_check(struct map_session_data *sd, struct map_session_data *tsd) { { retVal___ = HPMHooks.source.trade.check(sd, tsd); } - if( HPMHooks.count.HP_trade_check_post ) { + if (HPMHooks.count.HP_trade_check_post > 0) { 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++ ) { + 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); } @@ -77531,14 +90910,14 @@ int HP_trade_check(struct map_session_data *sd, struct map_session_data *tsd) { } 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); + if (HPMHooks.count.HP_trade_additem_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, short *index, short *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_additem_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_additem_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_trade_additem_pre[hIndex].func; - preHookFunc(sd, &index, &amount); + preHookFunc(&sd, &index, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77546,25 +90925,25 @@ void HP_trade_additem(struct map_session_data *sd, short index, short amount) { { 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++ ) { + if (HPMHooks.count.HP_trade_additem_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_trade_addzeny_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *amount); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_addzeny_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_addzeny_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_trade_addzeny_pre[hIndex].func; - preHookFunc(sd, &amount); + preHookFunc(&sd, &amount); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77572,25 +90951,25 @@ void HP_trade_addzeny(struct map_session_data *sd, int amount) { { 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++ ) { + if (HPMHooks.count.HP_trade_addzeny_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_trade_ok_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_trade_ok_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77598,9 +90977,9 @@ void HP_trade_ok(struct map_session_data *sd) { { HPMHooks.source.trade.ok(sd); } - if( HPMHooks.count.HP_trade_ok_post ) { + if (HPMHooks.count.HP_trade_ok_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_ok_post; hIndex++) { postHookFunc = HPMHooks.list.HP_trade_ok_post[hIndex].func; postHookFunc(sd); } @@ -77609,14 +90988,14 @@ void HP_trade_ok(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_trade_cancel_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_trade_cancel_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77624,9 +91003,9 @@ void HP_trade_cancel(struct map_session_data *sd) { { HPMHooks.source.trade.cancel(sd); } - if( HPMHooks.count.HP_trade_cancel_post ) { + if (HPMHooks.count.HP_trade_cancel_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_cancel_post; hIndex++) { postHookFunc = HPMHooks.list.HP_trade_cancel_post[hIndex].func; postHookFunc(sd); } @@ -77635,14 +91014,14 @@ void HP_trade_cancel(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_trade_commit_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_trade_commit_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -77650,27 +91029,27 @@ void HP_trade_commit(struct map_session_data *sd) { { HPMHooks.source.trade.commit(sd); } - if( HPMHooks.count.HP_trade_commit_post ) { + if (HPMHooks.count.HP_trade_commit_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_trade_commit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_trade_commit_post[hIndex].func; postHookFunc(sd); } } return; } -/* unit */ +/* unit_interface */ int HP_unit_init(bool minimal) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_init_pre ) { + if (HPMHooks.count.HP_unit_init_pre > 0) { int (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_init_pre[hIndex].func; retVal___ = preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77678,11 +91057,11 @@ int HP_unit_init(bool minimal) { { retVal___ = HPMHooks.source.unit.init(minimal); } - if( HPMHooks.count.HP_unit_init_post ) { - int (*postHookFunc) (int retVal___, bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_post; hIndex++ ) { + if (HPMHooks.count.HP_unit_init_post > 0) { + int (*postHookFunc) (int retVal___, bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_init_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &minimal); + retVal___ = postHookFunc(retVal___, minimal); } } return retVal___; @@ -77690,14 +91069,14 @@ int HP_unit_init(bool minimal) { int HP_unit_final(void) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_final_pre ) { + if (HPMHooks.count.HP_unit_final_pre > 0) { int (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_final_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77705,9 +91084,9 @@ int HP_unit_final(void) { { retVal___ = HPMHooks.source.unit.final(); } - if( HPMHooks.count.HP_unit_final_post ) { + if (HPMHooks.count.HP_unit_final_post > 0) { int (*postHookFunc) (int retVal___); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_final_post[hIndex].func; retVal___ = postHookFunc(retVal___); } @@ -77717,14 +91096,14 @@ int HP_unit_final(void) { 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); + if (HPMHooks.count.HP_unit_bl2ud_pre > 0) { + struct unit_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_bl2ud_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77732,26 +91111,53 @@ struct unit_data* HP_unit_bl2ud(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.bl2ud(bl); } - if( HPMHooks.count.HP_unit_bl2ud_post ) { + if (HPMHooks.count.HP_unit_bl2ud_post > 0) { struct unit_data* (*postHookFunc) (struct unit_data* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud_post; hIndex++ ) { + 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___; } +const struct unit_data* HP_unit_cbl2ud(const struct block_list *bl) { + int hIndex = 0; + const struct unit_data* retVal___ = NULL; + if (HPMHooks.count.HP_unit_cbl2ud_pre > 0) { + const struct unit_data* (*preHookFunc) (const struct block_list **bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_cbl2ud_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_cbl2ud_pre[hIndex].func; + retVal___ = preHookFunc(&bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.cbl2ud(bl); + } + if (HPMHooks.count.HP_unit_cbl2ud_post > 0) { + const struct unit_data* (*postHookFunc) (const struct unit_data* retVal___, const struct block_list *bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_cbl2ud_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_cbl2ud_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); + if (HPMHooks.count.HP_unit_bl2ud2_pre > 0) { + struct unit_data* (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud2_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud2_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_bl2ud2_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77759,26 +91165,52 @@ struct unit_data* HP_unit_bl2ud2(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.bl2ud2(bl); } - if( HPMHooks.count.HP_unit_bl2ud2_post ) { + if (HPMHooks.count.HP_unit_bl2ud2_post > 0) { struct unit_data* (*postHookFunc) (struct unit_data* retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_bl2ud2_post; hIndex++ ) { + 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___; } +void HP_unit_init_ud(struct unit_data *ud) { + int hIndex = 0; + if (HPMHooks.count.HP_unit_init_ud_pre > 0) { + void (*preHookFunc) (struct unit_data **ud); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_ud_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_init_ud_pre[hIndex].func; + preHookFunc(&ud); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.unit.init_ud(ud); + } + if (HPMHooks.count.HP_unit_init_ud_post > 0) { + void (*postHookFunc) (struct unit_data *ud); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_init_ud_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_init_ud_post[hIndex].func; + postHookFunc(ud); + } + } + return; +} int HP_unit_attack_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_attack_timer_pre ) { + if (HPMHooks.count.HP_unit_attack_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77786,146 +91218,146 @@ int HP_unit_attack_timer(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.unit.attack_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_attack_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_post; hIndex++ ) { + if (HPMHooks.count.HP_unit_attack_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } -int HP_unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_unit_walk_toxy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_walktoxy_timer_pre ) { + if (HPMHooks.count.HP_unit_walk_toxy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktoxy_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_unit_walktoxy_timer_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_timer_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_walk_toxy_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.unit.walktoxy_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.unit.walk_toxy_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_walktoxy_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *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); + if (HPMHooks.count.HP_unit_walk_toxy_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_timer_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_walk_toxy_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } -int HP_unit_walktoxy_sub(struct block_list *bl) { +int HP_unit_walk_toxy_sub(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_walktoxy_sub_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_unit_walk_toxy_sub_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_sub_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_walk_toxy_sub_pre[hIndex].func; + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.unit.walktoxy_sub(bl); + retVal___ = HPMHooks.source.unit.walk_toxy_sub(bl); } - if( HPMHooks.count.HP_unit_walktoxy_sub_post ) { + if (HPMHooks.count.HP_unit_walk_toxy_sub_post > 0) { 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; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_sub_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_walk_toxy_sub_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } } return retVal___; } -int HP_unit_delay_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_unit_delay_walk_toxy_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_delay_walktoxy_timer_pre ) { + if (HPMHooks.count.HP_unit_delay_walk_toxy_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walktoxy_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_unit_delay_walktoxy_timer_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walk_toxy_timer_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_delay_walk_toxy_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.unit.delay_walktoxy_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.unit.delay_walk_toxy_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_delay_walktoxy_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *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); + if (HPMHooks.count.HP_unit_delay_walk_toxy_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_delay_walk_toxy_timer_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_delay_walk_toxy_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 HP_unit_walk_toxy(struct block_list *bl, short x, short y, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_walktoxy_pre ) { - int (*preHookFunc) (struct block_list *bl, short *x, short *y, int *flag); + if (HPMHooks.count.HP_unit_walk_toxy_pre > 0) { + int (*preHookFunc) (struct block_list **bl, short *x, short *y, int *flag); *HPMforce_return = false; - 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); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_walk_toxy_pre[hIndex].func; + retVal___ = preHookFunc(&bl, &x, &y, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.unit.walktoxy(bl, x, y, flag); + retVal___ = HPMHooks.source.unit.walk_toxy(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); + if (HPMHooks.count.HP_unit_walk_toxy_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, short x, short y, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walk_toxy_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_walk_toxy_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, x, y, flag); } } return retVal___; } -int HP_unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) { +int HP_unit_walktobl_timer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_walktobl_sub_pre ) { + if (HPMHooks.count.HP_unit_walktobl_timer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_sub_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_unit_walktobl_sub_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_timer_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_walktobl_timer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.unit.walktobl_sub(tid, tick, id, data); + retVal___ = HPMHooks.source.unit.walktobl_timer(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_walktobl_sub_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *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); + if (HPMHooks.count.HP_unit_walktobl_timer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_timer_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_walktobl_timer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -77933,14 +91365,14 @@ int HP_unit_walktobl_sub(int tid, int64 tick, int id, intptr_t data) { int HP_unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_walktobl_pre ) { - int (*preHookFunc) (struct block_list *bl, struct block_list *tbl, int *range, int *flag); + if (HPMHooks.count.HP_unit_walktobl_pre > 0) { + int (*preHookFunc) (struct block_list **bl, struct block_list **tbl, int *range, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_walktobl_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &tbl, &range, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77948,11 +91380,11 @@ int HP_unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, i { 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++ ) { + if (HPMHooks.count.HP_unit_walktobl_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, tbl, range, flag); } } return retVal___; @@ -77960,14 +91392,14 @@ int HP_unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, i bool HP_unit_run(struct block_list *bl, struct map_session_data *sd, enum sc_type type) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_unit_run_pre ) { - bool (*preHookFunc) (struct block_list *bl, struct map_session_data *sd, enum sc_type *type); + if (HPMHooks.count.HP_unit_run_pre > 0) { + bool (*preHookFunc) (struct block_list **bl, struct map_session_data **sd, enum sc_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_run_pre[hIndex].func; - retVal___ = preHookFunc(bl, sd, &type); + retVal___ = preHookFunc(&bl, &sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -77975,25 +91407,25 @@ bool HP_unit_run(struct block_list *bl, struct map_session_data *sd, enum sc_typ { retVal___ = HPMHooks.source.unit.run(bl, sd, type); } - if( HPMHooks.count.HP_unit_run_post ) { - bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct map_session_data *sd, enum sc_type *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_post; hIndex++ ) { + if (HPMHooks.count.HP_unit_run_post > 0) { + bool (*postHookFunc) (bool retVal___, struct block_list *bl, struct map_session_data *sd, enum sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_run_post[hIndex].func; - retVal___ = postHookFunc(retVal___, bl, sd, &type); + retVal___ = postHookFunc(retVal___, bl, sd, type); } } return retVal___; } void HP_unit_run_hit(struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type type) { int hIndex = 0; - if( HPMHooks.count.HP_unit_run_hit_pre ) { - void (*preHookFunc) (struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type *type); + if (HPMHooks.count.HP_unit_run_hit_pre > 0) { + void (*preHookFunc) (struct block_list **bl, struct status_change **sc, struct map_session_data **sd, enum sc_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_hit_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_hit_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_run_hit_pre[hIndex].func; - preHookFunc(bl, sc, sd, &type); + preHookFunc(&bl, &sc, &sd, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -78001,11 +91433,11 @@ void HP_unit_run_hit(struct block_list *bl, struct status_change *sc, struct map { HPMHooks.source.unit.run_hit(bl, sc, sd, type); } - if( HPMHooks.count.HP_unit_run_hit_post ) { - void (*postHookFunc) (struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_hit_post; hIndex++ ) { + if (HPMHooks.count.HP_unit_run_hit_post > 0) { + void (*postHookFunc) (struct block_list *bl, struct status_change *sc, struct map_session_data *sd, enum sc_type type); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_run_hit_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_run_hit_post[hIndex].func; - postHookFunc(bl, sc, sd, &type); + postHookFunc(bl, sc, sd, type); } } return; @@ -78013,14 +91445,14 @@ void HP_unit_run_hit(struct block_list *bl, struct status_change *sc, struct map int HP_unit_escape(struct block_list *bl, struct block_list *target, short dist) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_escape_pre ) { - int (*preHookFunc) (struct block_list *bl, struct block_list *target, short *dist); + if (HPMHooks.count.HP_unit_escape_pre > 0) { + int (*preHookFunc) (struct block_list **bl, struct block_list **target, short *dist); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_escape_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &target, &dist); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78028,11 +91460,11 @@ int HP_unit_escape(struct block_list *bl, struct block_list *target, short dist) { 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++ ) { + if (HPMHooks.count.HP_unit_escape_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, target, dist); } } return retVal___; @@ -78040,14 +91472,14 @@ int HP_unit_escape(struct block_list *bl, struct block_list *target, short dist) int HP_unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool checkpath) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_movepos_pre ) { - int (*preHookFunc) (struct block_list *bl, short *dst_x, short *dst_y, int *easy, bool *checkpath); + if (HPMHooks.count.HP_unit_movepos_pre > 0) { + int (*preHookFunc) (struct block_list **bl, short *dst_x, short *dst_y, int *easy, bool *checkpath); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_movepos_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &dst_x, &dst_y, &easy, &checkpath); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78055,53 +91487,53 @@ int HP_unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, b { 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++ ) { + if (HPMHooks.count.HP_unit_movepos_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, dst_x, dst_y, easy, checkpath); } } return retVal___; } -int HP_unit_setdir(struct block_list *bl, unsigned char dir) { +int HP_unit_set_dir(struct block_list *bl, enum unit_dir dir) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_setdir_pre ) { - int (*preHookFunc) (struct block_list *bl, unsigned char *dir); + if (HPMHooks.count.HP_unit_set_dir_pre > 0) { + int (*preHookFunc) (struct block_list **bl, enum unit_dir *dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_setdir_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_unit_setdir_pre[hIndex].func; - retVal___ = preHookFunc(bl, &dir); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_dir_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_set_dir_pre[hIndex].func; + retVal___ = preHookFunc(&bl, &dir); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.unit.setdir(bl, dir); + retVal___ = HPMHooks.source.unit.set_dir(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); + if (HPMHooks.count.HP_unit_set_dir_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, enum unit_dir dir); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_dir_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_set_dir_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, dir); } } return retVal___; } -uint8 HP_unit_getdir(struct block_list *bl) { +enum unit_dir HP_unit_getdir(const struct block_list *bl) { int hIndex = 0; - uint8 retVal___ = 0; - if( HPMHooks.count.HP_unit_getdir_pre ) { - uint8 (*preHookFunc) (struct block_list *bl); + enum unit_dir retVal___ = UNIT_DIR_UNDEFINED; + if (HPMHooks.count.HP_unit_getdir_pre > 0) { + enum unit_dir (*preHookFunc) (const struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_getdir_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_getdir_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78109,9 +91541,9 @@ uint8 HP_unit_getdir(struct block_list *bl) { { 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++ ) { + if (HPMHooks.count.HP_unit_getdir_post > 0) { + enum unit_dir (*postHookFunc) (enum unit_dir retVal___, const 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); } @@ -78121,14 +91553,14 @@ uint8 HP_unit_getdir(struct block_list *bl) { int HP_unit_blown(struct block_list *bl, int dx, int dy, int count, int flag) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_blown_pre ) { - int (*preHookFunc) (struct block_list *bl, int *dx, int *dy, int *count, int *flag); + if (HPMHooks.count.HP_unit_blown_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *dx, int *dy, int *count, int *flag); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_blown_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &dx, &dy, &count, &flag); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78136,26 +91568,26 @@ int HP_unit_blown(struct block_list *bl, int dx, int dy, int count, int flag) { { 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++ ) { + if (HPMHooks.count.HP_unit_blown_post > 0) { + 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); + 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 HP_unit_warp(struct block_list *bl, short m, short x, short y, enum clr_type type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_warp_pre ) { - int (*preHookFunc) (struct block_list *bl, short *m, short *x, short *y, clr_type *type); + if (HPMHooks.count.HP_unit_warp_pre > 0) { + int (*preHookFunc) (struct block_list **bl, short *m, short *x, short *y, enum clr_type *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_warp_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &m, &x, &y, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78163,11 +91595,38 @@ int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type { 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++ ) { + if (HPMHooks.count.HP_unit_warp_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, short m, short x, short y, enum 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); + retVal___ = postHookFunc(retVal___, bl, m, x, y, type); + } + } + return retVal___; +} +int HP_unit_warpto_master(struct block_list *master_bl, struct block_list *slave_bl) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_unit_warpto_master_pre > 0) { + int (*preHookFunc) (struct block_list **master_bl, struct block_list **slave_bl); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_warpto_master_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_warpto_master_pre[hIndex].func; + retVal___ = preHookFunc(&master_bl, &slave_bl); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.unit.warpto_master(master_bl, slave_bl); + } + if (HPMHooks.count.HP_unit_warpto_master_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *master_bl, struct block_list *slave_bl); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_warpto_master_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_warpto_master_post[hIndex].func; + retVal___ = postHookFunc(retVal___, master_bl, slave_bl); } } return retVal___; @@ -78175,14 +91634,14 @@ int HP_unit_warp(struct block_list *bl, short m, short x, short y, clr_type type int HP_unit_stop_walking(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_stop_walking_pre ) { - int (*preHookFunc) (struct block_list *bl, int *type); + if (HPMHooks.count.HP_unit_stop_walking_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_walking_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78190,11 +91649,11 @@ int HP_unit_stop_walking(struct block_list *bl, int type) { { 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++ ) { + if (HPMHooks.count.HP_unit_stop_walking_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, type); } } return retVal___; @@ -78202,14 +91661,14 @@ int HP_unit_stop_walking(struct block_list *bl, int type) { int HP_unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_skilluse_id_pre ) { - int (*preHookFunc) (struct block_list *src, int *target_id, uint16 *skill_id, uint16 *skill_lv); + if (HPMHooks.count.HP_unit_skilluse_id_pre > 0) { + int (*preHookFunc) (struct block_list **src, int *target_id, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target_id, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78217,52 +91676,52 @@ int HP_unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id, { 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++ ) { + if (HPMHooks.count.HP_unit_skilluse_id_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target_id, skill_id, skill_lv); } } return retVal___; } -int HP_unit_step_timer(int tid, int64 tick, int id, intptr_t data) { +int HP_unit_steptimer(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_step_timer_pre ) { + if (HPMHooks.count.HP_unit_steptimer_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_pre; hIndex++ ) { - preHookFunc = HPMHooks.list.HP_unit_step_timer_pre[hIndex].func; + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_steptimer_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_unit_steptimer_pre[hIndex].func; retVal___ = preHookFunc(&tid, &tick, &id, &data); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } } { - retVal___ = HPMHooks.source.unit.step_timer(tid, tick, id, data); + retVal___ = HPMHooks.source.unit.steptimer(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_step_timer_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_step_timer_post; hIndex++ ) { - postHookFunc = HPMHooks.list.HP_unit_step_timer_post[hIndex].func; - retVal___ = postHookFunc(retVal___, &tid, &tick, &id, &data); + if (HPMHooks.count.HP_unit_steptimer_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 tick, int id, intptr_t data); + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_steptimer_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_unit_steptimer_post[hIndex].func; + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; } void HP_unit_stop_stepaction(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_unit_stop_stepaction_pre ) { - void (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_unit_stop_stepaction_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_stop_stepaction_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -78270,9 +91729,9 @@ void HP_unit_stop_stepaction(struct block_list *bl) { { HPMHooks.source.unit.stop_stepaction(bl); } - if( HPMHooks.count.HP_unit_stop_stepaction_post ) { + if (HPMHooks.count.HP_unit_stop_stepaction_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_stepaction_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_stop_stepaction_post[hIndex].func; postHookFunc(bl); } @@ -78282,14 +91741,14 @@ void HP_unit_stop_stepaction(struct block_list *bl) { int HP_unit_is_walking(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_is_walking_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_unit_is_walking_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_is_walking_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78297,9 +91756,9 @@ int HP_unit_is_walking(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.is_walking(bl); } - if( HPMHooks.count.HP_unit_is_walking_post ) { + if (HPMHooks.count.HP_unit_is_walking_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_is_walking_post; hIndex++ ) { + 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); } @@ -78309,14 +91768,14 @@ int HP_unit_is_walking(struct block_list *bl) { int HP_unit_can_move(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_can_move_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_unit_can_move_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_move_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78324,9 +91783,9 @@ int HP_unit_can_move(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.can_move(bl); } - if( HPMHooks.count.HP_unit_can_move_post ) { + if (HPMHooks.count.HP_unit_can_move_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_move_post; hIndex++ ) { + 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); } @@ -78336,14 +91795,14 @@ int HP_unit_can_move(struct block_list *bl) { int HP_unit_resume_running(int tid, int64 tick, int id, intptr_t data) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_resume_running_pre ) { + if (HPMHooks.count.HP_unit_resume_running_pre > 0) { int (*preHookFunc) (int *tid, int64 *tick, int *id, intptr_t *data); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_resume_running_pre; hIndex++ ) { + 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 ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78351,11 +91810,11 @@ int HP_unit_resume_running(int tid, int64 tick, int id, intptr_t data) { { retVal___ = HPMHooks.source.unit.resume_running(tid, tick, id, data); } - if( HPMHooks.count.HP_unit_resume_running_post ) { - int (*postHookFunc) (int retVal___, int *tid, int64 *tick, int *id, intptr_t *data); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_resume_running_post; hIndex++ ) { + if (HPMHooks.count.HP_unit_resume_running_post > 0) { + int (*postHookFunc) (int retVal___, int tid, int64 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); + retVal___ = postHookFunc(retVal___, tid, tick, id, data); } } return retVal___; @@ -78363,14 +91822,14 @@ int HP_unit_resume_running(int tid, int64 tick, int id, intptr_t data) { int HP_unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_set_walkdelay_pre ) { - int (*preHookFunc) (struct block_list *bl, int64 *tick, int *delay, int *type); + if (HPMHooks.count.HP_unit_set_walkdelay_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int64 *tick, int *delay, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &tick, &delay, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78378,11 +91837,11 @@ int HP_unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int type { 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, int64 *tick, int *delay, int *type); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_walkdelay_post; hIndex++ ) { + if (HPMHooks.count.HP_unit_set_walkdelay_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int64 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); + retVal___ = postHookFunc(retVal___, bl, tick, delay, type); } } return retVal___; @@ -78390,14 +91849,14 @@ int HP_unit_set_walkdelay(struct block_list *bl, int64 tick, int delay, int type 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___ = 0; - 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); + if (HPMHooks.count.HP_unit_skilluse_id2_pre > 0) { + int (*preHookFunc) (struct block_list **src, int *target_id, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_id2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target_id, &skill_id, &skill_lv, &casttime, &castcancel); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78405,11 +91864,11 @@ int HP_unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, { 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++ ) { + if (HPMHooks.count.HP_unit_skilluse_id2_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target_id, skill_id, skill_lv, casttime, castcancel); } } return retVal___; @@ -78417,14 +91876,14 @@ int HP_unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, 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___ = 0; - 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); + if (HPMHooks.count.HP_unit_skilluse_pos_pre > 0) { + int (*preHookFunc) (struct block_list **src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &skill_x, &skill_y, &skill_id, &skill_lv); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78432,11 +91891,11 @@ int HP_unit_skilluse_pos(struct block_list *src, short skill_x, short skill_y, u { 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++ ) { + if (HPMHooks.count.HP_unit_skilluse_pos_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, skill_x, skill_y, skill_id, skill_lv); } } return retVal___; @@ -78444,14 +91903,14 @@ int HP_unit_skilluse_pos(struct block_list *src, short skill_x, short skill_y, u 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___ = 0; - 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); + if (HPMHooks.count.HP_unit_skilluse_pos2_pre > 0) { + int (*preHookFunc) (struct block_list **src, short *skill_x, short *skill_y, uint16 *skill_id, uint16 *skill_lv, int *casttime, int *castcancel); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skilluse_pos2_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &skill_x, &skill_y, &skill_id, &skill_lv, &casttime, &castcancel); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78459,11 +91918,11 @@ int HP_unit_skilluse_pos2(struct block_list *src, short skill_x, short skill_y, { 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++ ) { + if (HPMHooks.count.HP_unit_skilluse_pos2_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, skill_x, skill_y, skill_id, skill_lv, casttime, castcancel); } } return retVal___; @@ -78471,14 +91930,14 @@ int HP_unit_skilluse_pos2(struct block_list *src, short skill_x, short skill_y, int HP_unit_set_target(struct unit_data *ud, int target_id) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_set_target_pre ) { - int (*preHookFunc) (struct unit_data *ud, int *target_id); + if (HPMHooks.count.HP_unit_set_target_pre > 0) { + int (*preHookFunc) (struct unit_data **ud, int *target_id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_set_target_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&ud, &target_id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78486,25 +91945,25 @@ int HP_unit_set_target(struct unit_data *ud, int target_id) { { 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++ ) { + if (HPMHooks.count.HP_unit_set_target_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, ud, target_id); } } return retVal___; } void HP_unit_stop_attack(struct block_list *bl) { int hIndex = 0; - if( HPMHooks.count.HP_unit_stop_attack_pre ) { - void (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_unit_stop_attack_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_stop_attack_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -78512,9 +91971,9 @@ void HP_unit_stop_attack(struct block_list *bl) { { HPMHooks.source.unit.stop_attack(bl); } - if( HPMHooks.count.HP_unit_stop_attack_post ) { + if (HPMHooks.count.HP_unit_stop_attack_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_stop_attack_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_stop_attack_post[hIndex].func; postHookFunc(bl); } @@ -78524,14 +91983,14 @@ void HP_unit_stop_attack(struct block_list *bl) { int HP_unit_unattackable(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_unattackable_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_unit_unattackable_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_unattackable_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78539,9 +91998,9 @@ int HP_unit_unattackable(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.unattackable(bl); } - if( HPMHooks.count.HP_unit_unattackable_post ) { + if (HPMHooks.count.HP_unit_unattackable_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_unattackable_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_unattackable_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -78551,14 +92010,14 @@ int HP_unit_unattackable(struct block_list *bl) { int HP_unit_attack(struct block_list *src, int target_id, int continuous) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_attack_pre ) { - int (*preHookFunc) (struct block_list *src, int *target_id, int *continuous); + if (HPMHooks.count.HP_unit_attack_pre > 0) { + int (*preHookFunc) (struct block_list **src, int *target_id, int *continuous); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &target_id, &continuous); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78566,11 +92025,11 @@ int HP_unit_attack(struct block_list *src, int target_id, int continuous) { { 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++ ) { + if (HPMHooks.count.HP_unit_attack_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, src, target_id, continuous); } } return retVal___; @@ -78578,14 +92037,14 @@ int HP_unit_attack(struct block_list *src, int target_id, int continuous) { int HP_unit_cancel_combo(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_cancel_combo_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_unit_cancel_combo_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_cancel_combo_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78593,9 +92052,9 @@ int HP_unit_cancel_combo(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.cancel_combo(bl); } - if( HPMHooks.count.HP_unit_cancel_combo_post ) { + if (HPMHooks.count.HP_unit_cancel_combo_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_cancel_combo_post; hIndex++ ) { + 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); } @@ -78605,14 +92064,14 @@ int HP_unit_cancel_combo(struct block_list *bl) { bool HP_unit_can_reach_pos(struct block_list *bl, int x, int y, int easy) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_unit_can_reach_pos_pre ) { - bool (*preHookFunc) (struct block_list *bl, int *x, int *y, int *easy); + if (HPMHooks.count.HP_unit_can_reach_pos_pre > 0) { + bool (*preHookFunc) (struct block_list **bl, int *x, int *y, int *easy); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_pos_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &x, &y, &easy); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78620,11 +92079,11 @@ bool HP_unit_can_reach_pos(struct block_list *bl, int x, int y, int easy) { { 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++ ) { + if (HPMHooks.count.HP_unit_can_reach_pos_post > 0) { + 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); + retVal___ = postHookFunc(retVal___, bl, x, y, easy); } } return retVal___; @@ -78632,14 +92091,14 @@ bool HP_unit_can_reach_pos(struct block_list *bl, int x, int y, int easy) { 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___ = false; - 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); + if (HPMHooks.count.HP_unit_can_reach_bl_pre > 0) { + bool (*preHookFunc) (struct block_list **bl, struct block_list **tbl, int *range, int *easy, short **x, short **y); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_can_reach_bl_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &tbl, &range, &easy, &x, &y); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78647,26 +92106,26 @@ bool HP_unit_can_reach_bl(struct block_list *bl, struct block_list *tbl, int ran { 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++ ) { + if (HPMHooks.count.HP_unit_can_reach_bl_post > 0) { + 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); + 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 HP_unit_calc_pos(struct block_list *bl, int tx, int ty, enum unit_dir dir) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_calc_pos_pre ) { - int (*preHookFunc) (struct block_list *bl, int *tx, int *ty, uint8 *dir); + if (HPMHooks.count.HP_unit_calc_pos_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *tx, int *ty, enum unit_dir *dir); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_calc_pos_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &tx, &ty, &dir); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78674,11 +92133,11 @@ int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) { { 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++ ) { + if (HPMHooks.count.HP_unit_calc_pos_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, int tx, int ty, enum unit_dir 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); + retVal___ = postHookFunc(retVal___, bl, tx, ty, dir); } } return retVal___; @@ -78686,14 +92145,14 @@ int HP_unit_calc_pos(struct block_list *bl, int tx, int ty, uint8 dir) { int HP_unit_attack_timer_sub(struct block_list *src, int tid, int64 tick) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_attack_timer_sub_pre ) { - int (*preHookFunc) (struct block_list *src, int *tid, int64 *tick); + if (HPMHooks.count.HP_unit_attack_timer_sub_pre > 0) { + int (*preHookFunc) (struct block_list **src, int *tid, int64 *tick); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_sub_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&src, &tid, &tick); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78701,11 +92160,11 @@ int HP_unit_attack_timer_sub(struct block_list *src, int tid, int64 tick) { { 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, int64 *tick); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_attack_timer_sub_post; hIndex++ ) { + if (HPMHooks.count.HP_unit_attack_timer_sub_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, int tid, int64 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); + retVal___ = postHookFunc(retVal___, src, tid, tick); } } return retVal___; @@ -78713,14 +92172,14 @@ int HP_unit_attack_timer_sub(struct block_list *src, int tid, int64 tick) { int HP_unit_skillcastcancel(struct block_list *bl, int type) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_skillcastcancel_pre ) { - int (*preHookFunc) (struct block_list *bl, int *type); + if (HPMHooks.count.HP_unit_skillcastcancel_pre > 0) { + int (*preHookFunc) (struct block_list **bl, int *type); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_skillcastcancel_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_skillcastcancel_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_skillcastcancel_pre[hIndex].func; - retVal___ = preHookFunc(bl, &type); + retVal___ = preHookFunc(&bl, &type); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78728,25 +92187,25 @@ int HP_unit_skillcastcancel(struct block_list *bl, int type) { { 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++ ) { + if (HPMHooks.count.HP_unit_skillcastcancel_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_unit_dataset_pre > 0) { + void (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_dataset_pre[hIndex].func; - preHookFunc(bl); + preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -78754,9 +92213,9 @@ void HP_unit_dataset(struct block_list *bl) { { HPMHooks.source.unit.dataset(bl); } - if( HPMHooks.count.HP_unit_dataset_post ) { + if (HPMHooks.count.HP_unit_dataset_post > 0) { void (*postHookFunc) (struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_dataset_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_dataset_post[hIndex].func; postHookFunc(bl); } @@ -78766,14 +92225,14 @@ void HP_unit_dataset(struct block_list *bl) { int HP_unit_counttargeted(struct block_list *bl) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_counttargeted_pre ) { - int (*preHookFunc) (struct block_list *bl); + if (HPMHooks.count.HP_unit_counttargeted_pre > 0) { + int (*preHookFunc) (struct block_list **bl); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_counttargeted_pre[hIndex].func; - retVal___ = preHookFunc(bl); + retVal___ = preHookFunc(&bl); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78781,9 +92240,9 @@ int HP_unit_counttargeted(struct block_list *bl) { { retVal___ = HPMHooks.source.unit.counttargeted(bl); } - if( HPMHooks.count.HP_unit_counttargeted_post ) { + if (HPMHooks.count.HP_unit_counttargeted_post > 0) { int (*postHookFunc) (int retVal___, struct block_list *bl); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_counttargeted_post; hIndex++) { postHookFunc = HPMHooks.list.HP_unit_counttargeted_post[hIndex].func; retVal___ = postHookFunc(retVal___, bl); } @@ -78793,14 +92252,14 @@ int HP_unit_counttargeted(struct block_list *bl) { int HP_unit_fixdamage(struct block_list *src, struct block_list *target, int sdelay, int ddelay, int64 damage, short div, unsigned char type, int64 damage2) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_fixdamage_pre ) { - int (*preHookFunc) (struct block_list *src, struct block_list *target, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2); + if (HPMHooks.count.HP_unit_fixdamage_pre > 0) { + int (*preHookFunc) (struct block_list **src, struct block_list **target, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_fixdamage_pre[hIndex].func; - retVal___ = preHookFunc(src, target, &sdelay, &ddelay, &damage, &div, &type, &damage2); + retVal___ = preHookFunc(&src, &target, &sdelay, &ddelay, &damage, &div, &type, &damage2); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78808,11 +92267,11 @@ int HP_unit_fixdamage(struct block_list *src, struct block_list *target, int sde { retVal___ = HPMHooks.source.unit.fixdamage(src, target, 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, int *sdelay, int *ddelay, int64 *damage, short *div, unsigned char *type, int64 *damage2); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_fixdamage_post; hIndex++ ) { + if (HPMHooks.count.HP_unit_fixdamage_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *src, struct block_list *target, int sdelay, int ddelay, int64 damage, short div, unsigned char 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, &sdelay, &ddelay, &damage, &div, &type, &damage2); + retVal___ = postHookFunc(retVal___, src, target, sdelay, ddelay, damage, div, type, damage2); } } return retVal___; @@ -78820,14 +92279,14 @@ int HP_unit_fixdamage(struct block_list *src, struct block_list *target, int sde int HP_unit_changeviewsize(struct block_list *bl, short size) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_changeviewsize_pre ) { - int (*preHookFunc) (struct block_list *bl, short *size); + if (HPMHooks.count.HP_unit_changeviewsize_pre > 0) { + int (*preHookFunc) (struct block_list **bl, short *size); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_changeviewsize_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_changeviewsize_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_changeviewsize_pre[hIndex].func; - retVal___ = preHookFunc(bl, &size); + retVal___ = preHookFunc(&bl, &size); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78835,26 +92294,26 @@ int HP_unit_changeviewsize(struct block_list *bl, short size) { { 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++ ) { + if (HPMHooks.count.HP_unit_changeviewsize_post > 0) { + 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); + 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 HP_unit_remove_map(struct block_list *bl, enum clr_type clrtype, const char *file, int line, const char *func) { int hIndex = 0; int retVal___ = 0; - 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); + if (HPMHooks.count.HP_unit_remove_map_pre > 0) { + int (*preHookFunc) (struct block_list **bl, enum clr_type *clrtype, const char **file, int *line, const char **func); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pre; hIndex++ ) { + 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); + retVal___ = preHookFunc(&bl, &clrtype, &file, &line, &func); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78862,25 +92321,25 @@ int HP_unit_remove_map(struct block_list *bl, clr_type clrtype, const char *file { 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++ ) { + if (HPMHooks.count.HP_unit_remove_map_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, enum 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); + retVal___ = postHookFunc(retVal___, bl, clrtype, file, line, func); } } return retVal___; } -void HP_unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) { +void HP_unit_remove_map_pc(struct map_session_data *sd, enum 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); + if (HPMHooks.count.HP_unit_remove_map_pc_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, enum clr_type *clrtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_remove_map_pc_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &clrtype); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -78888,25 +92347,25 @@ void HP_unit_remove_map_pc(struct map_session_data *sd, clr_type clrtype) { { 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++ ) { + if (HPMHooks.count.HP_unit_remove_map_pc_post > 0) { + void (*postHookFunc) (struct map_session_data *sd, enum 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); + 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); + if (HPMHooks.count.HP_unit_free_pc_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pc_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_free_pc_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -78914,26 +92373,26 @@ void HP_unit_free_pc(struct map_session_data *sd) { { HPMHooks.source.unit.free_pc(sd); } - if( HPMHooks.count.HP_unit_free_pc_post ) { + if (HPMHooks.count.HP_unit_free_pc_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pc_post; hIndex++ ) { + 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 HP_unit_free(struct block_list *bl, enum clr_type clrtype) { int hIndex = 0; int retVal___ = 0; - if( HPMHooks.count.HP_unit_free_pre ) { - int (*preHookFunc) (struct block_list *bl, clr_type *clrtype); + if (HPMHooks.count.HP_unit_free_pre > 0) { + int (*preHookFunc) (struct block_list **bl, enum clr_type *clrtype); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_unit_free_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_unit_free_pre[hIndex].func; - retVal___ = preHookFunc(bl, &clrtype); + retVal___ = preHookFunc(&bl, &clrtype); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -78941,26 +92400,26 @@ int HP_unit_free(struct block_list *bl, clr_type clrtype) { { 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++ ) { + if (HPMHooks.count.HP_unit_free_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, enum 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); + retVal___ = postHookFunc(retVal___, bl, clrtype); } } return retVal___; } -/* vending */ +/* vending_interface */ void HP_vending_init(bool minimal) { int hIndex = 0; - if( HPMHooks.count.HP_vending_init_pre ) { + if (HPMHooks.count.HP_vending_init_pre > 0) { void (*preHookFunc) (bool *minimal); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_vending_init_pre[hIndex].func; preHookFunc(&minimal); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -78968,25 +92427,25 @@ void HP_vending_init(bool minimal) { { HPMHooks.source.vending.init(minimal); } - if( HPMHooks.count.HP_vending_init_post ) { - void (*postHookFunc) (bool *minimal); - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_post; hIndex++ ) { + if (HPMHooks.count.HP_vending_init_post > 0) { + void (*postHookFunc) (bool minimal); + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_init_post; hIndex++) { postHookFunc = HPMHooks.list.HP_vending_init_post[hIndex].func; - postHookFunc(&minimal); + postHookFunc(minimal); } } return; } void HP_vending_final(void) { int hIndex = 0; - if( HPMHooks.count.HP_vending_final_pre ) { + if (HPMHooks.count.HP_vending_final_pre > 0) { void (*preHookFunc) (void); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_vending_final_pre[hIndex].func; preHookFunc(); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -78994,9 +92453,9 @@ void HP_vending_final(void) { { HPMHooks.source.vending.final(); } - if( HPMHooks.count.HP_vending_final_post ) { + if (HPMHooks.count.HP_vending_final_post > 0) { void (*postHookFunc) (void); - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_final_post; hIndex++) { postHookFunc = HPMHooks.list.HP_vending_final_post[hIndex].func; postHookFunc(); } @@ -79005,14 +92464,14 @@ void HP_vending_final(void) { } 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); + if (HPMHooks.count.HP_vending_close_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_vending_close_pre[hIndex].func; - preHookFunc(sd); + preHookFunc(&sd); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79020,9 +92479,9 @@ void HP_vending_close(struct map_session_data *sd) { { HPMHooks.source.vending.close(sd); } - if( HPMHooks.count.HP_vending_close_post ) { + if (HPMHooks.count.HP_vending_close_post > 0) { void (*postHookFunc) (struct map_session_data *sd); - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_post; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_close_post; hIndex++) { postHookFunc = HPMHooks.list.HP_vending_close_post[hIndex].func; postHookFunc(sd); } @@ -79031,14 +92490,14 @@ void HP_vending_close(struct map_session_data *sd) { } 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); + if (HPMHooks.count.HP_vending_open_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, const char **message, const uint8 **data, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_open_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &message, &data, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79046,25 +92505,25 @@ void HP_vending_open(struct map_session_data *sd, const char *message, const uin { 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++ ) { + if (HPMHooks.count.HP_vending_open_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_vending_list_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, unsigned int *id); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_list_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_list_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_vending_list_pre[hIndex].func; - preHookFunc(sd, &id); + preHookFunc(&sd, &id); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79072,25 +92531,25 @@ void HP_vending_list(struct map_session_data *sd, unsigned int id) { { 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++ ) { + if (HPMHooks.count.HP_vending_list_post > 0) { + 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); + 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); + if (HPMHooks.count.HP_vending_purchase_pre > 0) { + void (*preHookFunc) (struct map_session_data **sd, int *aid, unsigned int *uid, const uint8 **data, int *count); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_purchase_pre; hIndex++ ) { + 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); + preHookFunc(&sd, &aid, &uid, &data, &count); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return; } @@ -79098,26 +92557,26 @@ void HP_vending_purchase(struct map_session_data *sd, int aid, unsigned int uid, { 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++ ) { + if (HPMHooks.count.HP_vending_purchase_post > 0) { + 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); + postHookFunc(sd, aid, uid, data, count); } } return; } -bool HP_vending_search(struct map_session_data *sd, unsigned short nameid) { +bool HP_vending_search(struct map_session_data *sd, int nameid) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_vending_search_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, unsigned short *nameid); + if (HPMHooks.count.HP_vending_search_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, int *nameid); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_search_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_search_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_vending_search_pre[hIndex].func; - retVal___ = preHookFunc(sd, &nameid); + retVal___ = preHookFunc(&sd, &nameid); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79125,11 +92584,11 @@ bool HP_vending_search(struct map_session_data *sd, unsigned short nameid) { { 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++ ) { + if (HPMHooks.count.HP_vending_search_post > 0) { + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int 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); + retVal___ = postHookFunc(retVal___, sd, nameid); } } return retVal___; @@ -79137,14 +92596,14 @@ bool HP_vending_search(struct map_session_data *sd, unsigned short nameid) { bool HP_vending_searchall(struct map_session_data *sd, const struct s_search_store_search *s) { int hIndex = 0; bool retVal___ = false; - if( HPMHooks.count.HP_vending_searchall_pre ) { - bool (*preHookFunc) (struct map_session_data *sd, const struct s_search_store_search *s); + if (HPMHooks.count.HP_vending_searchall_pre > 0) { + bool (*preHookFunc) (struct map_session_data **sd, const struct s_search_store_search **s); *HPMforce_return = false; - for(hIndex = 0; hIndex < HPMHooks.count.HP_vending_searchall_pre; hIndex++ ) { + for (hIndex = 0; hIndex < HPMHooks.count.HP_vending_searchall_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_vending_searchall_pre[hIndex].func; - retVal___ = preHookFunc(sd, s); + retVal___ = preHookFunc(&sd, &s); } - if( *HPMforce_return ) { + if (*HPMforce_return) { *HPMforce_return = false; return retVal___; } @@ -79152,9 +92611,9 @@ bool HP_vending_searchall(struct map_session_data *sd, const struct s_search_sto { retVal___ = HPMHooks.source.vending.searchall(sd, s); } - if( HPMHooks.count.HP_vending_searchall_post ) { + if (HPMHooks.count.HP_vending_searchall_post > 0) { 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++ ) { + 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); } diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc index 1af35ab21..e49a6b166 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2016 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,61 +23,75 @@ * as it will get overwritten. */ -memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface)); -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.channel, channel, sizeof(struct channel_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.cmdline, cmdline, sizeof(struct cmdline_interface)); -memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface)); -memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface)); -memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_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.libconfig, libconfig, sizeof(struct libconfig_interface)); -memcpy(&HPMHooks.source.logs, logs, sizeof(struct log_interface)); -memcpy(&HPMHooks.source.mail, mail, sizeof(struct mail_interface)); -memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface)); -memcpy(&HPMHooks.source.map, map, sizeof(struct map_interface)); -memcpy(&HPMHooks.source.mapindex, mapindex, sizeof(struct mapindex_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_chat, npc_chat, sizeof(struct npc_chat_interface)); -memcpy(&HPMHooks.source.npc, npc, sizeof(struct npc_interface)); -memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface)); -memcpy(&HPMHooks.source.party, party, sizeof(struct party_interface)); -memcpy(&HPMHooks.source.path, path, sizeof(struct path_interface)); -memcpy(&HPMHooks.source.pcg, pcg, sizeof(struct pc_groups_interface)); -memcpy(&HPMHooks.source.pc, pc, sizeof(struct pc_interface)); -memcpy(&HPMHooks.source.libpcre, libpcre, sizeof(struct pcre_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.showmsg, showmsg, sizeof(struct showmsg_interface)); -memcpy(&HPMHooks.source.skill, skill, sizeof(struct skill_interface)); -memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface)); -memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface)); -memcpy(&HPMHooks.source.status, status, sizeof(struct status_interface)); -memcpy(&HPMHooks.source.storage, storage, sizeof(struct storage_interface)); -memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface)); -memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface)); -memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface)); -memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface)); -memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_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)); +/* GENERATED FILE DO NOT EDIT */ + +HPMHooks.source.HCache = *HCache; +HPMHooks.source.achievement = *achievement; +HPMHooks.source.atcommand = *atcommand; +HPMHooks.source.battle = *battle; +HPMHooks.source.bg = *bg; +HPMHooks.source.buyingstore = *buyingstore; +HPMHooks.source.channel = *channel; +HPMHooks.source.chat = *chat; +HPMHooks.source.chrif = *chrif; +HPMHooks.source.clan = *clan; +HPMHooks.source.clif = *clif; +HPMHooks.source.cmdline = *cmdline; +HPMHooks.source.console = *console; +HPMHooks.source.core = *core; +HPMHooks.source.DB = *DB; +HPMHooks.source.des = *des; +HPMHooks.source.duel = *duel; +HPMHooks.source.elemental = *elemental; +HPMHooks.source.grfio = *grfio; +HPMHooks.source.guild = *guild; +HPMHooks.source.gstorage = *gstorage; +HPMHooks.source.homun = *homun; +HPMHooks.source.instance = *instance; +HPMHooks.source.intif = *intif; +HPMHooks.source.ircbot = *ircbot; +HPMHooks.source.itemdb = *itemdb; +HPMHooks.source.libconfig = *libconfig; +HPMHooks.source.logs = *logs; +HPMHooks.source.mail = *mail; +HPMHooks.source.map = *map; +HPMHooks.source.mapindex = *mapindex; +HPMHooks.source.mapit = *mapit; +HPMHooks.source.mapreg = *mapreg; +HPMHooks.source.md5 = *md5; +HPMHooks.source.mercenary = *mercenary; +HPMHooks.source.mob = *mob; +HPMHooks.source.mutex = *mutex; +HPMHooks.source.npc_chat = *npc_chat; +HPMHooks.source.npc = *npc; +HPMHooks.source.nullpo = *nullpo; +HPMHooks.source.packets = *packets; +HPMHooks.source.party = *party; +HPMHooks.source.path = *path; +HPMHooks.source.pcg = *pcg; +HPMHooks.source.pc = *pc; +HPMHooks.source.libpcre = *libpcre; +HPMHooks.source.pet = *pet; +HPMHooks.source.quest = *quest; +HPMHooks.source.refine = *refine; +HPMHooks.source.PRIV__refine = *refine->p; +HPMHooks.source.rnd = *rnd; +HPMHooks.source.rodex = *rodex; +HPMHooks.source.script = *script; +HPMHooks.source.searchstore = *searchstore; +HPMHooks.source.showmsg = *showmsg; +HPMHooks.source.skill = *skill; +HPMHooks.source.sockt = *sockt; +HPMHooks.source.SQL = *SQL; +HPMHooks.source.status = *status; +HPMHooks.source.storage = *storage; +HPMHooks.source.StrBuf = *StrBuf; +HPMHooks.source.strlib = *strlib; +HPMHooks.source.stylist = *stylist; +HPMHooks.source.sv = *sv; +HPMHooks.source.sysinfo = *sysinfo; +HPMHooks.source.thread = *thread; +HPMHooks.source.timer = *timer; +HPMHooks.source.trade = *trade; +HPMHooks.source.unit = *unit; +HPMHooks.source.vending = *vending; diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 3fe38b6bc..e44412bfa 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -1,7 +1,7 @@ # This file is part of Hercules. # http://herc.ws - http://github.com/HerculesWS/Hercules # -# Copyright (C) 2013-2015 Hercules Dev Team +# Copyright (C) 2013-2020 Hercules Dev Team # # Hercules is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ # # # Note: DO NOT include the .c extension!!! # -MYPLUGINS = +MYPLUGINS := $(MYPLUGINS) # # ######### DO NOT EDIT ANYTHING BELOW THIS LINE!!! ################## @@ -46,7 +46,8 @@ ALLPLUGINS = $(filter-out HPMHooking, $(basename $(wildcard *.c))) $(HPMHOOKING) PLUGINS = sample db2sql HPMHooking_char HPMHooking_login HPMHooking_map $(MYPLUGINS) COMMON_D = ../common -COMMON_H = $(wildcard $(COMMON_D)/*.h) +# Includes private headers (plugins might need them) +COMMON_H = $(wildcard $(COMMON_D)/*.h) ../plugins/HPMHooking.h COMMON_INCLUDE = -I.. THIRDPARTY_INCLUDE = -I../../3rdparty @@ -102,7 +103,7 @@ Makefile: Makefile.in ../../plugins/%@DLLEXT@: %.c $(ALL_H) $$(shell ls %/* 2>/dev/null) @echo " CC $<" - @$(CC) $(COMMON_INCLUDE) $(THIRDPARTY_INCLUDE) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ -o $@ $< + @$(CC) $(COMMON_INCLUDE) $(THIRDPARTY_INCLUDE) @PLUGINSTATIC@ @DEFS@ @CFLAGS@ @CPPFLAGS@ @LDFLAGS@ @SOFLAGS@ @LIBS@ @MYSQL_LIBS@ -o $@ $< ../../plugins/HPMHooking_login@DLLEXT@: HPMHOOKINGTYPE = LOGIN ../../plugins/HPMHooking_char@DLLEXT@: HPMHOOKINGTYPE = CHAR diff --git a/src/plugins/constdb2doc.c b/src/plugins/constdb2doc.c index cb0b82278..5d01aa360 100644 --- a/src/plugins/constdb2doc.c +++ b/src/plugins/constdb2doc.c @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2016 Hercules Dev Team - * Copyright (C) 2016 Haru <haru@dotalux.com> + * Copyright (C) 2016-2020 Hercules Dev Team + * Copyright (C) 2016 Haru <haru@dotalux.com> * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +22,8 @@ /// db/constants.conf -> doc/constants.md generator plugin #include "common/hercules.h" -//#include "common/memmgr.h" +#include "common/db.h" +#include "common/memmgr.h" #include "common/nullpo.h" #include "common/strlib.h" #include "map/itemdb.h" @@ -86,7 +87,7 @@ void constdb2doc_constdb(void) /* Run */ fprintf(out_fp, "## Constants (db/constants.conf)\n\n"); - script->read_constdb(); + script->read_constdb(false); fprintf(out_fp, "\n"); fprintf(out_fp, "## Hardcoded Constants (source)\n\n"); @@ -143,17 +144,26 @@ struct item_data *constdb2doc_itemdb_search(int nameid) void constdb2doc_itemdb(void) { - int i; - nullpo_retv(out_fp); fprintf(out_fp, "## Items (db/"DBPATH"item_db.conf)\n"); - for (i = 0; i < ARRAYLENGTH(itemdb->array); i++) { + for (int i = 0; i < ARRAYLENGTH(itemdb->array); i++) { struct item_data *id = constdb2doc_itemdb_search(i); if (id == NULL || id->name[0] == '\0') continue; fprintf(out_fp, "- `%s`: %d\n", id->name, id->nameid); } + + if (db_size(itemdb->other) > 0) { + struct DBIterator *iter = db_iterator(itemdb->other); + for (struct item_data *itd = dbi_first(iter); dbi_exists(iter); itd = dbi_next(iter)) { + if (itd == &itemdb->dummy) + continue; + fprintf(out_fp, "- `%s`: %d\n", itd->name, itd->nameid); + } + dbi_destroy(iter); + } + fprintf(out_fp, "\n"); } @@ -177,7 +187,8 @@ void do_constdb2doc(void) constdb2doc_itemdb(); - fprintf(out_fp, "> End of list\n"); + fprintf(out_fp, "> End of list\n\n"); + fprintf(out_fp, "<!--GENERATED FILE DO NOT EDIT-->\n"); fclose(out_fp); } diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index 510a56e2c..6ca52a593 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2015 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -70,6 +70,10 @@ bool mobdb2sql_torun = false; int (*itemdb_readdb_libconfig_sub) (struct config_setting_t *it, int n, const char *source); /// Backup of the original mob_db parser function pointer. int (*mob_read_db_sub) (struct config_setting_t *it, int n, const char *source); +bool (*mob_skill_db_libconfig_sub_skill) (struct config_setting_t *it, int n, int mob_id); + +// +void do_mobskilldb2sql(void); /** * Normalizes and appends a string to the output buffer. @@ -78,6 +82,7 @@ int (*mob_read_db_sub) (struct config_setting_t *it, int n, const char *source); */ void hstr(const char *str) { + nullpo_retv(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); @@ -99,7 +104,7 @@ void db2sql_fileheader(void) "-- This file is part of Hercules.\n" "-- http://herc.ws - http://github.com/HerculesWS/Hercules\n" "--\n" - "-- Copyright (C) 2013-%d Hercules Dev Team\n" + "-- Copyright (C) 2013-%d Hercules Dev Team\n" "--\n" "-- Hercules is free software: you can redistribute it and/or modify\n" "-- it under the terms of the GNU General Public License as published by\n" @@ -117,7 +122,9 @@ void db2sql_fileheader(void) "-- NOTE: This file was auto-generated and should never be manually edited,\n" "-- as it will get overwritten. If you need to modify this file,\n" "-- please consider modifying the corresponding .conf file inside\n" - "-- the db folder, and then re-run the db2sql plugin.\n" + "-- the db folder, and then re-run the db2sql plugin.\n\n" + + "-- GENERATED FILE DO NOT EDIT --\n" "\n", year); } @@ -239,7 +246,7 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) StrBuf->Init(&buf); // id - StrBuf->Printf(&buf, "'%u',", it->nameid); + StrBuf->Printf(&buf, "'%u',", (uint32)it->nameid); // name_english SQL->EscapeString(NULL, e_name, it->name); @@ -252,6 +259,9 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) // type StrBuf->Printf(&buf, "'%d',", it->flag.delay_consume ? IT_DELAYCONSUME : it->type); + // subtype + StrBuf->Printf(&buf, "'%d',", it->subtype); + // price_buy StrBuf->Printf(&buf, "'%d',", it->value_buy); @@ -288,13 +298,14 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) } else { ui64 = UINT64_MAX; } - StrBuf->Printf(&buf, "'0x%"PRIX64"',", ui64); + StrBuf->Printf(&buf, "'%"PRIu64"',", ui64); // equip_upper - if (libconfig->setting_lookup_int(entry, "Upper", &i32) && i32 >= 0) + if (itemdb->lookup_const_mask(entry, "Upper", &i32) && i32 >= 0) ui32 = (uint32)i32; else ui32 = ITEMUPPER_ALL; + StrBuf->Printf(&buf, "'%u',", ui32); // equip_genders @@ -318,8 +329,11 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) // refineable StrBuf->Printf(&buf, "'%d',", it->flag.no_refine?0:1); - // view - StrBuf->Printf(&buf, "'%d',", it->look); + // disable_options + StrBuf->Printf(&buf, "'%d',", it->flag.no_options?1:0); + + // view_sprite + StrBuf->Printf(&buf, "'%d',", it->view_sprite); // bindonequip StrBuf->Printf(&buf, "'%d',", it->flag.bindonequip?1:0); @@ -376,8 +390,7 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) } // script - if (it->script) { - libconfig->setting_lookup_string(entry, "Script", &bonus); + if (it->script && libconfig->setting_lookup_string(entry, "Script", &bonus)) { hstr(bonus); str = tosql.buf[3].p; if (strlen(str) > tosql.buf[0].len) { @@ -385,12 +398,13 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) RECREATE(tosql.buf[0].p,char,tosql.buf[0].len); } SQL->EscapeString(NULL, tosql.buf[0].p, str); + StrBuf->Printf(&buf, "'%s',", tosql.buf[0].p); + } else { + StrBuf->AppendStr(&buf, "'',"); } - StrBuf->Printf(&buf, "'%s',", it->script?tosql.buf[0].p:""); // equip_script - if (it->equip_script) { - libconfig->setting_lookup_string(entry, "OnEquipScript", &bonus); + 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) { @@ -398,12 +412,13 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) RECREATE(tosql.buf[1].p,char,tosql.buf[1].len); } SQL->EscapeString(NULL, tosql.buf[1].p, str); + StrBuf->Printf(&buf, "'%s',", tosql.buf[1].p); + } else { + StrBuf->AppendStr(&buf, "'',"); } - StrBuf->Printf(&buf, "'%s',", it->equip_script?tosql.buf[1].p:""); // unequip_script - if (it->unequip_script) { - libconfig->setting_lookup_string(entry, "OnUnequipScript", &bonus); + 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) { @@ -411,8 +426,10 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source) RECREATE(tosql.buf[2].p,char,tosql.buf[2].len); } SQL->EscapeString(NULL, tosql.buf[2].p, str); + StrBuf->Printf(&buf, "'%s'", tosql.buf[2].p); + } else { + StrBuf->AppendStr(&buf, "''"); } - StrBuf->Printf(&buf, "'%s'", it->unequip_script?tosql.buf[2].p:""); fprintf(tosql.fp, "REPLACE INTO `%s` VALUES (%s);\n", tosql.db_name, StrBuf->Value(&buf)); @@ -436,10 +453,11 @@ void itemdb2sql_tableheader(void) "\n" "DROP TABLE IF EXISTS `%s`;\n" "CREATE TABLE `%s` (\n" - " `id` smallint(5) UNSIGNED NOT NULL DEFAULT '0',\n" + " `id` int(11) 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" + " `subtype` tinyint(2) UNSIGNED DEFAULT NULL,\n" " `price_buy` mediumint(10) DEFAULT NULL,\n" " `price_sell` mediumint(10) DEFAULT NULL,\n" " `weight` smallint(5) UNSIGNED DEFAULT NULL,\n" @@ -451,12 +469,13 @@ void itemdb2sql_tableheader(void) " `equip_jobs` bigint(20) 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" + " `equip_locations` mediumint(8) 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" + " `disable_options` tinyint(1) UNSIGNED DEFAULT NULL,\n" + " `view_sprite` smallint(3) UNSIGNED DEFAULT NULL,\n" " `bindonequip` tinyint(1) UNSIGNED DEFAULT NULL,\n" " `forceserial` tinyint(1) UNSIGNED DEFAULT NULL,\n" " `buyingstore` tinyint(1) UNSIGNED DEFAULT NULL,\n" @@ -619,7 +638,7 @@ int mobdb2sql_sub(struct config_setting_t *mobt, int n, const char *source) StrBuf->Printf(&buf, "%d,", md->status.def_ele + 20 * md->status.ele_lv); // Mode - StrBuf->Printf(&buf, "0x%X,", md->status.mode); + StrBuf->Printf(&buf, "%u,", md->status.mode); // Speed StrBuf->Printf(&buf, "%u,", md->status.speed); @@ -796,6 +815,332 @@ void do_mobdb2sql(void) if (tosql.buf[i].p) aFree(tosql.buf[i].p); } + + // Run mob_skill_db converter + do_mobskilldb2sql(); +} + +/** + * Converts Mob Skill State constant to string + */ +const char* mob_skill_state_tostring(enum MobSkillState mss) +{ + switch(mss) { + case MSS_ANY: + return "any"; + case MSS_IDLE: + return "idle"; + case MSS_WALK: + return "walk"; + case MSS_LOOT: + return "loot"; + case MSS_DEAD: + return "dead"; + case MSS_BERSERK: + return "attack"; + case MSS_ANGRY: + return "angry"; + case MSS_RUSH: + return "chase"; + case MSS_FOLLOW: + return "follow"; + case MSS_ANYTARGET: + return "anytarget"; + } + + return "unknown"; +} + +/** + * Converts Mob Skill Target constant to string + */ +const char* mob_skill_target_tostring(int target) +{ + switch(target) { + case MST_TARGET: + return "target"; + case MST_RANDOM: + return "randomtarget"; + case MST_SELF: + return "self"; + case MST_FRIEND: + return "friend"; + case MST_MASTER: + return "master"; + case MST_AROUND1: + return "around1"; + case MST_AROUND2: + return "around2"; + case MST_AROUND3: + return "around3"; + //case MST_AROUND: // same value as MST_AROUND4 + case MST_AROUND4: + return "around4"; + case MST_AROUND5: + return "around5"; + case MST_AROUND6: + return "around6"; + case MST_AROUND7: + return "around7"; + case MST_AROUND8: + return "around8"; + } + return "unknown"; +} + +/** + * Converts Mob Skill Condition constant to string + */ +const char* mob_skill_condition_tostring(int condition) +{ + switch(condition) { + case MSC_ALWAYS: + return "always"; + case MSC_MYHPLTMAXRATE: + return "myhpltmaxrate"; + case MSC_MYHPINRATE: + return "myhpinrate"; + case MSC_FRIENDHPLTMAXRATE: + return "friendhpltmaxrate"; + case MSC_FRIENDHPINRATE: + return "friendhpinrate"; + case MSC_MYSTATUSON: + return "mystatuson"; + case MSC_MYSTATUSOFF: + return "mystatusoff"; + case MSC_FRIENDSTATUSON: + return "friendstatuson"; + case MSC_FRIENDSTATUSOFF: + return "friendstatusoff"; + case MSC_ATTACKPCGT: + return "attackpcgt"; + case MSC_ATTACKPCGE: + return "attackpcge"; + case MSC_SLAVELT: + return "slavelt"; + case MSC_SLAVELE: + return "slavele"; + case MSC_CLOSEDATTACKED: + return "closedattacked"; + case MSC_LONGRANGEATTACKED: + return "longrangeattacked"; + case MSC_AFTERSKILL: + return "afterskill"; + case MSC_SKILLUSED: + return "skillused"; + case MSC_CASTTARGETED: + return "casttargeted"; + case MSC_RUDEATTACKED: + return "rudeattacked"; + case MSC_MASTERHPLTMAXRATE: + return "masterhpltmaxrate"; + case MSC_MASTERATTACKED: + return "masterattacked"; + case MSC_ALCHEMIST: + return "alchemist"; + case MSC_SPAWN: + return "onspawn"; + } + return "unknown"; +} + +/** + * Converts a Mob Skill DB entry to SQL. + * + * @see mob_skill_db_libconfig_sub_skill. + */ +bool mobskilldb2sql_sub(struct config_setting_t *it, int n, int mob_id) +{ + int i32 = 0, i; + StringBuf buf; + struct mob_db *md = mob->db(mob_id); + char valname[15]; + const char *name = config_setting_name(it); + char e_name[NAME_LENGTH*2+1]; + + nullpo_retr(false, it); + Assert_retr(false, mob_id <= 0 || md != mob->dummy); + + StrBuf->Init(&buf); + + // MonsterID + StrBuf->Printf(&buf, "%d,", mob_id); + + // Info + SQL->EscapeString(NULL, e_name, md->name); + StrBuf->Printf(&buf, "'%s@%s',", e_name, name); + + if (mob->lookup_const(it, "SkillState", &i32) && (i32 < MSS_ANY || i32 > MSS_ANYTARGET)) { + ShowWarning("mob_skill_db_libconfig_sub_skill: Invalid skill state %d for skill '%s' in monster %d, defaulting to MSS_ANY.\n", i32, name, mob_id); + i32 = MSS_ANY; + } + // State + StrBuf->Printf(&buf, "'%s',", mob_skill_state_tostring(i32)); + + // SkillID + if (!(i32 = skill->name2id(name))) { + ShowWarning("mob_skill_db_libconfig_sub_skill: Non existant skill id %d in monster %d, skipping.\n", i32, mob_id); + return false; + } + StrBuf->Printf(&buf, "%d,", i32); + + // SkillLv + if (!libconfig->setting_lookup_int(it, "SkillLevel", &i32) || i32 <= 0) + i32 = 1; + StrBuf->Printf(&buf, "%d,", i32); + + // Rate + i32 = 0; + libconfig->setting_lookup_int(it, "Rate", &i32); + StrBuf->Printf(&buf, "%d,", i32); + + // CastTime + i32 = 0; + libconfig->setting_lookup_int(it, "CastTime", &i32); + StrBuf->Printf(&buf, "%d,", i32); + + // Delay + i32 = 0; + libconfig->setting_lookup_int(it, "Delay", &i32); + StrBuf->Printf(&buf, "%d,", i32); + + // Cancelable + if (libconfig->setting_lookup_bool(it, "Cancelable", &i32)) { + StrBuf->Printf(&buf, "'%s',", ((i32 == 0) ? "no" : "yes")); + } else { + StrBuf->Printf(&buf, "'no',"); + } + + // Target + if (mob->lookup_const(it, "SkillTarget", &i32) && (i32 < MST_TARGET || i32 > MST_AROUND)) { + i32 = MST_TARGET; + } + StrBuf->Printf(&buf, "'%s',", mob_skill_target_tostring(i32)); + + // Condition + if (mob->lookup_const(it, "CastCondition", &i32) && (i32 < MSC_ALWAYS || i32 > MSC_SPAWN)) { + i32 = MSC_ALWAYS; + } + StrBuf->Printf(&buf, "'%s',", mob_skill_condition_tostring(i32)); + + // ConditionValue + i32 = 0; + if (mob->lookup_const(it, "ConditionData", &i32)) { + StrBuf->Printf(&buf, "'%d',", i32); + } else { + StrBuf->Printf(&buf, "NULL,"); + } + + // Val1-Val5 + for (i = 0; i < 5; i++) { + sprintf(valname, "val%1d", i); + if (libconfig->setting_lookup_int(it, valname, &i32)) { + StrBuf->Printf(&buf, "%d,", i32); + } else { + StrBuf->Printf(&buf, "NULL,"); + } + } + + // Emotion + if (libconfig->setting_lookup_int(it, "Emotion", &i32)) { + StrBuf->Printf(&buf, "'%d',", i32); + } else { + StrBuf->Printf(&buf, "NULL,"); + } + + if (libconfig->setting_lookup_int(it, "ChatMsgID", &i32) && i32 > 0 && i32 <= MAX_MOB_CHAT) { + StrBuf->Printf(&buf, "'%d'", i32); + } else { + StrBuf->Printf(&buf, "NULL"); + } + + fprintf(tosql.fp, "REPLACE INTO `%s` VALUES (%s);\n", tosql.db_name, StrBuf->Value(&buf)); + + StrBuf->Destroy(&buf); + + return true; + +} + + +/** + * Prints a SQL table header for the current mob_skill_db table. + */ +void mobskilldb2sql_tableheader(void) +{ + db2sql_fileheader(); + + fprintf(tosql.fp, + "--\n" + "-- Table structure for table `%s`\n" + "--\n" + "\n" + "DROP TABLE IF EXISTS `%s`;\n" + "CREATE TABLE `%s` (\n" + " `MOB_ID` SMALLINT(6) NOT NULL,\n" + " `INFO` TEXT NOT NULL,\n" + " `STATE` TEXT NOT NULL,\n" + " `SKILL_ID` SMALLINT(6) NOT NULL,\n" + " `SKILL_LV` TINYINT(4) NOT NULL,\n" + " `RATE` SMALLINT(4) NOT NULL,\n" + " `CASTTIME` MEDIUMINT(9) NOT NULL,\n" + " `DELAY` INT(9) NOT NULL,\n" + " `CANCELABLE` TEXT NOT NULL,\n" + " `TARGET` TEXT NOT NULL,\n" + " `CONDITION` TEXT NOT NULL,\n" + " `CONDITION_VALUE` TEXT,\n" + " `VAL1` INT(11) DEFAULT NULL,\n" + " `VAL2` INT(11) DEFAULT NULL,\n" + " `VAL3` INT(11) DEFAULT NULL,\n" + " `VAL4` INT(11) DEFAULT NULL,\n" + " `VAL5` INT(11) DEFAULT NULL,\n" + " `EMOTION` TEXT,\n" + " `CHAT` TEXT\n" + ") ENGINE=MyISAM;\n" + "\n", tosql.db_name, tosql.db_name, tosql.db_name); +} + +/** + * Mob Skill DB Conversion + */ +void do_mobskilldb2sql(void) +{ + int i; + struct convert_db_files { + const char *name; + const char *source; + const char *destination; + } files[] = { + {"mob_skill_db", DBPATH"mob_skill_db.conf", "sql-files/mob_skill_db" DBSUFFIX ".sql"}, + {"mob_skill_db2", "mob_skill_db2.conf", "sql-files/mob_skill_db2.sql"}, + }; + + /* link */ + mob_skill_db_libconfig_sub_skill = mob->skill_db_libconfig_sub_skill; + mob->skill_db_libconfig_sub_skill = mobskilldb2sql_sub; + + memset(&tosql.buf, 0, sizeof(tosql.buf)); + for (i = 0; i < ARRAYLENGTH(files); i++) { + if ((tosql.fp = fopen(files[i].destination, "wt+")) == NULL) { + ShowError("do_mobskilldb2sql: File not found \"%s\".\n", files[i].destination); + return; + } + + tosql.db_name = files[i].name; + mobskilldb2sql_tableheader(); + + mob->skill_db_libconfig(files[i].source, false); + + fclose(tosql.fp); + } + + /* unlink */ + mob->skill_db_libconfig_sub_skill = mob_skill_db_libconfig_sub_skill; + + for (i = 0; i < ARRAYLENGTH(tosql.buf); i++) { + if (tosql.buf[i].p) + aFree(tosql.buf[i].p); + } } /** diff --git a/src/plugins/dbghelpplug.c b/src/plugins/dbghelpplug.c index 6c02b1a12..ab6b5fc76 100644 --- a/src/plugins/dbghelpplug.c +++ b/src/plugins/dbghelpplug.c @@ -2,8 +2,8 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2015 Hercules Dev Team - * Copyright (C) Athena Dev Teams + * Copyright (C) 2012-2020 Hercules Dev Team + * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -446,17 +446,17 @@ 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->EFlags >> 12) & 3, // IOPL level value - context->EFlags & 0x00100000 ? "vip" : " ", // VIP (virtual interrupt pending) - context->EFlags & 0x00080000 ? "vif" : " ", // VIF (virtual interrupt flag) - context->EFlags & 0x00000800 ? "ov" : "nv", // VIF (virtual interrupt flag) - context->EFlags & 0x00000400 ? "dn" : "up", // OF (overflow flag) - context->EFlags & 0x00000200 ? "ei" : "di", // IF (interrupt enable flag) - context->EFlags & 0x00000080 ? "ng" : "pl", // SF (sign flag) - context->EFlags & 0x00000040 ? "zr" : "nz", // ZF (zero flag) - context->EFlags & 0x00000010 ? "ac" : "na", // AF (aux carry flag) - context->EFlags & 0x00000004 ? "po" : "pe", // PF (parity flag) - context->EFlags & 0x00000001 ? "cy" : "nc"); // CF (carry flag) + (context->EFlags >> 12) & 3, // IOPL level value + (context->EFlags & 0x00100000) ? "vip" : " ", // VIP (virtual interrupt pending) + (context->EFlags & 0x00080000) ? "vif" : " ", // VIF (virtual interrupt flag) + (context->EFlags & 0x00000800) ? "ov" : "nv", // VIF (virtual interrupt flag) + (context->EFlags & 0x00000400) ? "dn" : "up", // OF (overflow flag) + (context->EFlags & 0x00000200) ? "ei" : "di", // IF (interrupt enable flag) + (context->EFlags & 0x00000080) ? "ng" : "pl", // SF (sign flag) + (context->EFlags & 0x00000040) ? "zr" : "nz", // ZF (zero flag) + (context->EFlags & 0x00000010) ? "ac" : "na", // AF (aux carry flag) + (context->EFlags & 0x00000004) ? "po" : "pe", // PF (parity flag) + (context->EFlags & 0x00000001) ? "cy" : "nc"); // CF (carry flag) } if( context->ContextFlags & CONTEXT_SEGMENTS ) { @@ -467,8 +467,7 @@ Dhp__PrintProcessInfo( context->SegDs, context->SegEs, context->SegFs, - context->SegGs, - context->EFlags); + context->SegGs); if( context->ContextFlags & CONTEXT_CONTROL ) fprintf(log_file, " efl=%08x", @@ -951,7 +950,6 @@ Dhp__PrintDataValue( // ULONG64 length = 0; DWORD basetype; - BOOL isValid = TRUE; assert( pInterData != NULL ); log_file = pInterData->log_file; @@ -1260,7 +1258,7 @@ Dhp__PrintDataInfo( } else if( pSymInfo->Flags & SYMFLAG_REGISTER ) { - scope = ( pSymInfo->Flags & SYMFLAG_PARAMETER ? PARAM : LOCAL ); // register, optimized out(?) + scope = (pSymInfo->Flags & SYMFLAG_PARAMETER) ? PARAM : LOCAL; // register, optimized out(?) } else { diff --git a/src/plugins/generate-translations.c b/src/plugins/generate-translations.c new file mode 100644 index 000000000..7aeae0c96 --- /dev/null +++ b/src/plugins/generate-translations.c @@ -0,0 +1,395 @@ +/** + * This file is part of Hercules. + * http://herc.ws - http://github.com/HerculesWS/Hercules + * + * Copyright (C) 2016-2020 Hercules Dev Team + * + * Hercules is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "config/core.h" + +#include "common/hercules.h" +#include "common/cbasetypes.h" +#include "common/memmgr.h" +#include "common/nullpo.h" +#include "common/showmsg.h" +#include "common/strlib.h" +#include "common/sysinfo.h" +#include "map/atcommand.h" +#include "map/map.h" +#include "map/npc.h" +#include "map/script.h" + +#include "plugins/HPMHooking.h" +#include "common/HPMDataCheck.h" + +#include <stdio.h> +#include <stdlib.h> +#include <sys/stat.h> +#include <time.h> + +HPExport struct hplugin_info pinfo = { + "generate-translations", // 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) +}; + +struct DBMap *translatable_strings; // string map parsed (used when exporting strings only) +/* Set during startup when attempting to export the lang, unset after server initialization is over */ +FILE *lang_export_fp; +char *lang_export_filepath; +#define DIRECTORYNAME "generated_translations" +struct script_string_buf lang_export_line_buf; +struct script_string_buf lang_export_escaped_buf; +int lang_export_stringcount_total; +int lang_export_stringcount_current; + +/// Whether the translations template generator will automatically run. +bool generating_translations = false; + +bool createdirectory(const char *dirname) +{ +#ifdef WIN32 + if (!CreateDirectory(dirname, NULL)) { + if (ERROR_ALREADY_EXISTS != GetLastError()) + return false; + } +#else /* Not WIN32 */ + struct stat st = { 0 }; + if (stat(dirname, &st) == -1 ) { + if (mkdir(dirname, 0755) != 0) + return false; + } +#endif // WIN32 check + return true; +} + +/** + * --generate-translations + * + * Creates "./generated_translations.pot" + * @see cmdline->exec + */ +CMDLINEARG(generatetranslations) +{ + if (!createdirectory(DIRECTORYNAME)) { + ShowError("generatetranslations: Unable to create output directory '%s'.\n", DIRECTORYNAME); + return false; + } + generating_translations = true; + return true; +} + +void script_add_translatable_string_posthook(const struct script_string_buf *string, const char *start_point) +{ + bool duplicate = true; + bool is_translatable_string = false; + bool is_translatable_fmtstring = false; + + if (!generating_translations || lang_export_fp == NULL) + return; + + /* When exporting we don't know what is a translation and what isn't */ + if (VECTOR_LENGTH(*string) > 1) { + // The length of *string will always be at least 1 because of the '\0' + if (translatable_strings == NULL) { + translatable_strings = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_ALLOW_NULL_DATA, 0); + } + + if (!strdb_exists(translatable_strings, VECTOR_DATA(*string))) { + strdb_put(translatable_strings, VECTOR_DATA(*string), NULL); + duplicate = false; + } + } + + if (!duplicate) { + if (script->syntax.last_func == script->buildin_mes_offset + || script->syntax.last_func == script->buildin_select_offset + || script->syntax.lang_macro_active + ) { + is_translatable_string = true; + } else if (script->syntax.last_func == script->buildin_mesf_offset + || script->syntax.lang_macro_fmtstring_active + ) { + is_translatable_fmtstring = true; + } + } + + if (is_translatable_string || is_translatable_fmtstring) { + const char *line_start = start_point; + const char *line_end = start_point; + int line_length; + bool has_percent_sign = false; + + if (!is_translatable_fmtstring && strchr(VECTOR_DATA(*string), '%') != NULL) { + has_percent_sign = true; + } + + while (line_start > script->parser_current_src && *line_start != '\n') + line_start--; + + while (*line_end != '\n' && *line_end != '\0') + line_end++; + + line_length = (int)(line_end - line_start); + if (line_length > 0) { + VECTOR_ENSURE(lang_export_line_buf, line_length + 1, 512); + VECTOR_PUSHARRAY(lang_export_line_buf, line_start, line_length); + VECTOR_PUSH(lang_export_line_buf, '\0'); + + normalize_name(VECTOR_DATA(lang_export_line_buf), "\r\n\t "); // [!] Note: VECTOR_LENGTH() will lie. + } + + VECTOR_ENSURE(lang_export_escaped_buf, 4*VECTOR_LENGTH(*string)+1, 1); + VECTOR_LENGTH(lang_export_escaped_buf) = (int)sv->escape_c(VECTOR_DATA(lang_export_escaped_buf), + VECTOR_DATA(*string), + VECTOR_LENGTH(*string)-1, /* exclude null terminator */ + "\""); + VECTOR_PUSH(lang_export_escaped_buf, '\0'); + + fprintf(lang_export_fp, "\n#: %s\n" + "# %s\n" + "%s" + "msgctxt \"%s\"\n" + "msgid \"%s\"\n" + "msgstr \"\"\n", + script->parser_current_file ? script->parser_current_file : "Unknown File", + VECTOR_DATA(lang_export_line_buf), + is_translatable_fmtstring ? "#, c-format\n" : (has_percent_sign ? "#, no-c-format\n" : ""), + script->parser_current_npc_name ? script->parser_current_npc_name : "Unknown NPC", + VECTOR_DATA(lang_export_escaped_buf) + ); + lang_export_stringcount_total++; + lang_export_stringcount_current++; + VECTOR_TRUNCATE(lang_export_line_buf); + VECTOR_TRUNCATE(lang_export_escaped_buf); + } +} + +struct script_code *parse_script_prehook(const char **src, const char **file, int *line, int *options, int **retval) +{ + if (translatable_strings != NULL) { + db_destroy(translatable_strings); + translatable_strings = NULL; + } + return NULL; +} + +void script_parser_clean_leftovers_posthook(void) +{ + if (translatable_strings != NULL) { + db_destroy(translatable_strings); + translatable_strings = NULL; + } + + VECTOR_CLEAR(lang_export_line_buf); + VECTOR_CLEAR(lang_export_escaped_buf); +} + +bool translations_enter_file(const char *filepath) +{ + const char *p = NULL; + int len, i; + + if (!generating_translations) + return false; + + p = filepath; + len = (int)strlen(filepath) + (int)strlen(DIRECTORYNAME) + (int)strlen(PATHSEP_STR); + lang_export_filepath = aCalloc(len + 4 + 1, sizeof(char)); // + ".pot" + strncat(lang_export_filepath, DIRECTORYNAME PATHSEP_STR, len); + lang_export_stringcount_current = 0; + + i = (int)strlen(lang_export_filepath); + while (*p != '\0') { + if (Assert_chk(i < len)) { + aFree(lang_export_filepath); + lang_export_filepath = NULL; + return false; + } + if (*p == '.') { + lang_export_filepath[i] = '_'; + } else if (*p == PATHSEP) { + if (!createdirectory(lang_export_filepath)) { + ShowError("generatetranslations: Unable to create output directory '%s'.\n", lang_export_filepath); + aFree(lang_export_filepath); + lang_export_filepath = NULL; + return false; + } + lang_export_filepath[i] = PATHSEP; + } else { + lang_export_filepath[i] = *p; + } + i++; + p++; + } + strncat(lang_export_filepath, ".pot", len + 4); + + if ((lang_export_fp = fopen(lang_export_filepath, "wb")) == NULL) { + ShowError("export-dialog: failed to open '%s' for writing\n", lang_export_filepath); + aFree(lang_export_filepath); + lang_export_filepath = NULL; + return false; + } + + { + time_t t = time(NULL); + struct tm *lt = localtime(&t); + int year = lt->tm_year+1900; + char timestring[128] = ""; + strftime(timestring, sizeof(timestring), "%Y-%m-%d %H:%M:%S%z", lt); + fprintf(lang_export_fp, + "# This file is part of Hercules.\n" + "# http://herc.ws - http://github.com/HerculesWS/Hercules\n" + "#\n" + "# Copyright (C) 2013-%d Hercules Dev Team\n" + "#\n" + "# Hercules is free software: you can redistribute it and/or modify\n" + "# it under the terms of the GNU General Public License as published by\n" + "# the Free Software Foundation, either version 3 of the License, or\n" + "# (at your option) any later version.\n" + "#\n" + "# This program is distributed in the hope that it will be useful,\n" + "# but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "# GNU General Public License for more details.\n" + "#\n" + "# You should have received a copy of the GNU General Public License\n" + "# along with this program. If not, see <http://www.gnu.org/licenses/>.\n\n" + + "#,fuzzy\n" + "msgid \"\"\n" + "msgstr \"\"\n" + "\"Project-Id-Version: %s\\n\"\n" + "\"Report-Msgid-Bugs-To: dev@herc.ws\\n\"\n" + "\"POT-Creation-Date: %s\\n\"\n" + "\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n" + "\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n" + "\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n" + "\"Language: \\n\"\n" + "\"MIME-Version: 1.0\\n\"\n" + "\"Content-Type: text/plain; charset=ISO-8859-1\\n\"\n" + "\"Content-Transfer-Encoding: 8bit\\n\"\n\n", + year, sysinfo->vcsrevision_scripts(), timestring); + } + return true; +} + +bool translations_leave_file(const char *filepath) +{ + if (lang_export_fp != NULL) { + fclose(lang_export_fp); + lang_export_fp = NULL; + } + if (lang_export_filepath != NULL) { + if (lang_export_stringcount_current == 0) { + remove(lang_export_filepath); + } else { + ShowMessage("\r"); + ShowInfo("%s => %s (%d strings)\n", filepath, lang_export_filepath, lang_export_stringcount_current); + } + aFree(lang_export_filepath); + lang_export_filepath = NULL; + } + lang_export_stringcount_current = 0; + return true; +} + +bool msg_config_read_prehook(const char **cfg_name, bool *allow_override) +{ + if (*allow_override) // allow_override is true in nested calls + return false; + + translations_enter_file(*cfg_name); + return true; +} + +bool msg_config_read_posthook(bool retVal, const char *cfg_name, bool allow_override) +{ + int i; + + if (!generating_translations || lang_export_fp == NULL) + return retVal; + + if (allow_override) // allow_override is true in nested calls + return retVal; + + if (retVal) { + for (i = 0; i < MAX_MSG; i++) { + if (atcommand->msg_table[0][i] == NULL) + continue; + fprintf(lang_export_fp, "\n#: conf/messages.conf\n" + "# %d: %s\n" + "#, c-format\n" + "msgctxt \"messages.conf\"\n" + "msgid \"%s\"\n" + "msgstr \"\"\n", + i, atcommand->msg_table[0][i], + atcommand->msg_table[0][i] + ); + lang_export_stringcount_total++; + lang_export_stringcount_current++; + } + } + + translations_leave_file(cfg_name); + + return retVal; +} + +int npc_parsesrcfile_prehook(const char **filepath, bool *runOnInit) +{ + translations_enter_file(*filepath); + return 0; +} + +int npc_parsesrcfile_posthook(int retVal, const char *filepath, bool runOnInit) +{ + translations_leave_file(filepath); + return retVal; +} + +HPExport void server_preinit(void) +{ + addArg("--generate-translations", false, generatetranslations, + "Creates 'generated_translations/**/*.pot' file with all translateable strings from scripts, server terminates afterwards."); + VECTOR_INIT(lang_export_line_buf); + VECTOR_INIT(lang_export_escaped_buf); + addHookPost(script, add_translatable_string, script_add_translatable_string_posthook); + addHookPre(script, parse, parse_script_prehook); + addHookPost(script, parser_clean_leftovers, script_parser_clean_leftovers_posthook); + addHookPre(atcommand, msg_read, msg_config_read_prehook); + addHookPost(atcommand, msg_read, msg_config_read_posthook); + addHookPre(npc, parsesrcfile, npc_parsesrcfile_prehook); + addHookPost(npc, parsesrcfile, npc_parsesrcfile_posthook); + lang_export_stringcount_total = 0; + lang_export_stringcount_current = 0; +} + +HPExport void plugin_init(void) +{ +} + +HPExport void server_online(void) +{ + if (generating_translations) { + ShowInfo("Translations template exported to '%s' with %d strings.\n", DIRECTORYNAME, lang_export_stringcount_total); + } + core->runflag = CORE_ST_STOP; +} + +HPExport void plugin_final(void) +{ +} diff --git a/src/plugins/mapcache.c b/src/plugins/mapcache.c new file mode 100644 index 000000000..3dc6e3b34 --- /dev/null +++ b/src/plugins/mapcache.c @@ -0,0 +1,511 @@ +/** +* This file is part of Hercules. +* http://herc.ws - http://github.com/HerculesWS/Hercules +* +* Copyright (C) 2013-2020 Hercules Dev Team +* +* Hercules is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +/** + * Mapcache Plugin + * This Plugin is made to handle the creation and update the new format of mapcache + * it also handles the convertion from the old to the new mapcache format + **/ + +#include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */ + +#include "common/memmgr.h" +#include "common/md5calc.h" +#include "common/nullpo.h" +#include "common/grfio.h" +#include "common/utils.h" +#include "map/map.h" + +#include "common/HPMDataCheck.h" /* should always be the last Hercules file included! (if you don't make it last, it'll intentionally break compile time) */ + +#include <stdio.h> +#include <string.h> + +HPExport struct hplugin_info pinfo = { + "Mapcache", ///< Plugin name + SERVER_TYPE_MAP, ///< Which server types this plugin works with? + "1.0.0", ///< Plugin version + HPM_VERSION, ///< HPM Version (don't change, macro is automatically updated) +}; + +/** + * Yes.. old mapcache was never packed, and we loaded and wrote a compiler paded structs + * DON'T BLAME IF SOMETHING EXPLODED [hemagx] + **/ +// This is the main header found at the very beginning of the map cache +struct old_mapcache_main_header { + uint32 file_size; + uint16 map_count; +}; + +// This is the header appended before every compressed map cells info in the map cache +struct old_mapcache_map_info { + char name[MAP_NAME_LENGTH]; + int16 xs; + int16 ys; + int32 len; +}; + +/** + * + */ + +#define NO_WATER 1000000 + +VECTOR_DECL(char *) maplist; +bool needs_grfio; + + +/** + * code from utlis.c until it's interfaced + **/ + +#ifdef WIN32 +# ifndef F_OK +# define F_OK 0x0 +# endif /* F_OK */ +#else +# include <unistd.h> +#endif + + +// Reads an uint32 in little-endian from the buffer +uint32 GetULong(const unsigned char* buf) +{ + return (((uint32)(buf[0]))) + | (((uint32)(buf[1])) << 0x08) + | (((uint32)(buf[2])) << 0x10) + | (((uint32)(buf[3])) << 0x18); +} + +// Reads a float (32 bits) from the buffer +float GetFloat(const unsigned char* buf) +{ + uint32 val = GetULong(buf); + return *((float*)(void*)&val); +} + +bool write_mapcache(const uint8 *buf, int32 buf_len, bool is_compressed, const char *mapname, int16 xs, int16 ys) +{ + struct map_cache_header header = { 0 }; + char file_path[255]; + int mapname_len; + unsigned long compressed_buf_len; + uint8 *compressed_buf = NULL; + FILE *new_mapcache_fp; + + nullpo_retr(false, buf); + nullpo_retr(false, mapname); + + mapname_len = (int)strlen(mapname); + + if (mapname_len > MAP_NAME_LENGTH || mapname_len < 1) { + ShowError("write_mapcache: A map with invalid name length has beed passed '%s' size (%d)\n", mapname, mapname_len); + return false; + } + + if ((xs < 0 || ys < 0)) { + ShowError("write_mapcache: '%s' given with invalid coords xs = %d, ys = %d\n", mapname, xs, ys); + return false; + } + + if (((int)xs * ys) > MAX_MAP_SIZE) { + ShowError("write_mapcache: map '%s' exceeded MAX_MAP_SIZE of %d\n", mapname, MAX_MAP_SIZE); + return false; + } + + + + snprintf(file_path, sizeof(file_path), "%s%s%s.%s", "maps/", DBPATH, mapname, "mcache"); + new_mapcache_fp = fopen(file_path, "wb"); + + if (new_mapcache_fp == NULL) { + ShowWarning("Could not open file '%s', map cache creating failed.\n", file_path); + return false; + } + + header.version = 0x1; + header.xs = xs; + header.ys = ys; + + if (is_compressed == false) { + compressed_buf_len = buf_len * 2; //Creating big enough buffer to ensure ability to hold compressed data + CREATE(compressed_buf, uint8, compressed_buf_len); + grfio->encode_zip(compressed_buf, &compressed_buf_len, buf, buf_len); + + header.len = (int)compressed_buf_len; + md5->binary(compressed_buf, (int)compressed_buf_len, header.md5_checksum); + } else { + header.len = buf_len; + md5->binary(buf, buf_len, header.md5_checksum); + } + + + fwrite(&header, sizeof(header), 1, new_mapcache_fp); + if (is_compressed == false) + fwrite(compressed_buf, compressed_buf_len, 1, new_mapcache_fp); + else + fwrite(buf, buf_len, 1, new_mapcache_fp); + + fclose(new_mapcache_fp); + if (compressed_buf != NULL) + aFree(compressed_buf); + + return true; +} + +bool convert_old_mapcache(void) +{ + const char *path = "db/"DBPATH"map_cache.dat"; + FILE *mapcache_fp = fopen(path, "rb"); + struct old_mapcache_main_header header = { 0 }; + uint8 *p, *cursor; + uint32 file_size; + int i; + + if (mapcache_fp == NULL) { + ShowError("Could not open mapcache file in the following path '%s' \n", path); + return false; + } + + if (fread(&header, sizeof(header), 1, mapcache_fp) != 1) { + ShowError("Failed to read mapcache header \n"); + fclose(mapcache_fp); + return false; + } + + fseek(mapcache_fp, 0, SEEK_END); + file_size = (int)ftell(mapcache_fp); + fseek(mapcache_fp, 0, SEEK_SET); + + if (file_size != header.file_size) { + ShowError("File size in mapcache header doesn't match actual mapcache file size \n"); + fclose(mapcache_fp); + return false; + } + + CREATE(p, uint8, header.file_size); + cursor = p + sizeof(header); + + if (fread(p, header.file_size, 1, mapcache_fp) != 1) { + ShowError("Could not load mapcache file into memory, fread failed.\n"); + aFree(p); + fclose(mapcache_fp); + return false; + } + + for (i = 0; i < header.map_count; ++i) { + struct old_mapcache_map_info *info = (struct old_mapcache_map_info *)cursor; + + ShowStatus("Creating mapcache: %s"CL_CLL"\n", info->name); + + if (write_mapcache((uint8 *)info + sizeof(*info), info->len, true, info->name, info->xs, info->ys) == false) { + ShowError("failed To convert map '%s'\n", info->name); + } + + cursor += sizeof(*info) + info->len; + } + + aFree(p); + fclose(mapcache_fp); + return true; +} + +bool mapcache_read_maplist(const char *filepath) +{ + char line[4096] = { 0 }; + FILE *fp; + + nullpo_retr(false, filepath); + + fp = fopen(filepath, "r"); + + if (fp == NULL) + return false; + + while (fgets(line, sizeof(line), fp)) { + char map_name[MAP_NAME_LENGTH]; + if (line[0] == '/' && line[1] == '/') + continue; + + if (sscanf(line, "%11s", map_name) == 1) { + VECTOR_ENSURE(maplist, 1, 1); + VECTOR_PUSH(maplist, aStrdup(map_name)); + } + } + + ShowStatus("%d map loaded from map_index.txt\n", VECTOR_LENGTH(maplist)); + fclose(fp); + return true; +} + +bool mapcache_cache_map(const char *mapname) +{ + char filepath[255] = { 0 }; + uint8 *gat, *rsw, *gat_cursor; + uint8 *cells; + int water_height, map_size, xy; + int16 xs, ys; + + nullpo_retr(false, mapname); + + snprintf(filepath, sizeof(filepath), "data\\%s.gat", mapname); + gat = grfio_read(filepath); + + if (gat == NULL) { + ShowError("mapcache_cache_map: Could not read %s, aborting caching map %s\n", filepath, mapname); + return false; + } + + snprintf(filepath, sizeof(filepath), "data\\%s.rsw", mapname); + + rsw = grfio_read(filepath); + + if (rsw == NULL) { + water_height = NO_WATER; + } else { + if (memcmp(rsw, "GRSW", 4) != 0) { + ShowError("mapcache_cache_map: file %s is not in rsw format\n", filepath); + aFree(rsw); + return false; + } + int major_version = rsw[4]; + int minor_version = rsw[5]; + if (major_version > 2 || (major_version == 2 && minor_version > 2)) { + ShowError("mapcache_cache_map: Unsupported version %d.%d for rsw file %s\n", major_version, minor_version, filepath); + aFree(rsw); + return false; + } + if (major_version < 1 || (major_version == 1 && minor_version <= 4)) { + ShowError("mapcache_cache_map: Unsupported version %d.%d for rsw file %s\n", major_version, minor_version, filepath); + aFree(rsw); + return false; + } + int offset = 166; + if (major_version == 2 && minor_version >= 2) { + offset = 167; + } + water_height = (int)GetFloat(rsw + offset); + aFree(rsw); + } + + xs = (int16)GetULong(gat + 6); + ys = (int16)GetULong(gat + 10); + + if (xs <= 0 || ys <= 0) { + ShowError("mapcache_cache_map: map '%s' doesn't have valid size xs = %d, ys = %d\n", mapname, xs, ys); + aFree(gat); + return false; + } + + map_size = xs * ys; + CREATE(cells, uint8, map_size); + + gat_cursor = gat; + for (xy = 0; xy < map_size; ++xy) { + float height = GetFloat(gat_cursor + 14); + uint32 type = GetULong(gat_cursor + 30); + gat_cursor += 20; + + if (type == 0 && water_height != NO_WATER && height > water_height) + type = 3; + + cells[xy] = (uint8)type; + } + + write_mapcache(cells, map_size, false, mapname, xs, ys); + + aFree(gat); + aFree(cells); + return true; +} + +bool mapcache_rebuild(void) +{ + int i; + char file_path[255]; + + if (mapcache_read_maplist("db/map_index.txt") == false) { + ShowError("mapcache_rebuild: Could not read maplist, aborting\n"); + return false; + } + + for (i = 0; i < VECTOR_LENGTH(maplist); ++i) { + snprintf(file_path, sizeof(file_path), "%s%s%s.%s", "maps/", DBPATH, VECTOR_INDEX(maplist, i), "mcache"); + if (access(file_path, F_OK) == 0 && remove(file_path) != 0) { + ShowWarning("mapcache_rebuild: Could not remove file '%s' \n", file_path); + } + } + + for (i = 0; i < VECTOR_LENGTH(maplist); ++i) { + ShowStatus("Creating mapcache: %s"CL_CLL"\r", VECTOR_INDEX(maplist, i)); + mapcache_cache_map(VECTOR_INDEX(maplist, i)); + } + + return true; +} + +bool fix_md5_truncation_sub(FILE *fp, const char *map_name) +{ + unsigned int file_size; + struct map_cache_header mheader = { 0 }; + uint8 *buf = NULL; + + nullpo_retr(false, fp); + nullpo_retr(false, map_name); + + fseek(fp, 0, SEEK_END); + file_size = (unsigned int)ftell(fp); + fseek(fp, 0, SEEK_SET); // Rewind file pointer before passing it to the read function. + + if (file_size <= sizeof(mheader) || fread(&mheader, sizeof(mheader), 1, fp) < 1) { + ShowError("fix_md5_truncation: Failed to read cache header for map '%s'.\n", map_name); + return false; + } + + if (mheader.len <= 0) { + ShowError("fix_md5_truncation: A file with negative or zero compressed length passed '%d'.\n", mheader.len); + return false; + } + + if (file_size < sizeof(mheader) + mheader.len) { + ShowError("fix_md5_truncation: An incomplete file passed for map '%s'.\n", map_name); + return false; + } + + CREATE(buf, uint8, mheader.len); + if (fread(buf, mheader.len, 1, fp) < 1) { + ShowError("fix_md5_truncation: Could not load the compressed cell data for map '%s'.\n", map_name); + aFree(buf); + return false; + } + + md5->binary(buf, mheader.len, mheader.md5_checksum); + aFree(buf); + + fseek(fp, 0, SEEK_SET); + fwrite(&mheader, sizeof(mheader), 1, fp); + fclose(fp); + + return true; +} + +bool fix_md5_truncation(void) +{ + int i; + bool retval = true; + + if (mapcache_read_maplist("db/map_index.txt") == false) { + ShowError("mapcache_rebuild: Could not read maplist, aborting\n"); + return false; + } + + for (i = 0; i < VECTOR_LENGTH(maplist); ++i) { + const char *map_name = VECTOR_INDEX(maplist, i); + char file_path[255]; + FILE *fp = NULL; + int16 version; + + snprintf(file_path, sizeof(file_path), "%s%s%s.%s", "maps/", DBPATH, map_name, "mcache"); + + fp = fopen(file_path, "r+b"); + + if (fp == NULL) { + ShowWarning("fix_md5_truncation: Could not open the mapcache file for map '%s' at path '%s'.\n", map_name, file_path); + retval = false; + continue; + } + + if (fread(&version, sizeof(version), 1, fp) < 1) { + ShowError("fix_md5_truncation: Could not read file version for map '%s'.\n", map_name); + fclose(fp); + retval = false; + continue; + } + + if (version != 1) { + ShowError("fix_md5_truncation: Mapcache for map '%s' has version %d. The update is only applied to version 1.\n", map_name, version); + fclose(fp); + continue; + } + + ShowStatus("Updating mapcache: %s'\n", map_name); + if (!fix_md5_truncation_sub(fp, map_name)) + retval = false; + + fclose(fp); + } + + return retval; +} + +CMDLINEARG(convertmapcache) +{ + map->minimal = true; + return convert_old_mapcache(); +} + +CMDLINEARG(rebuild) +{ + needs_grfio = true; + grfio->init("conf/grf-files.txt"); + map->minimal = true; + return mapcache_rebuild(); +} + +CMDLINEARG(cachemap) +{ + needs_grfio = true; + grfio->init("conf/grf-files.txt"); + map->minimal = true; + return mapcache_cache_map(params); +} + +CMDLINEARG(fixmd5) +{ + map->minimal = true; + return fix_md5_truncation(); +} + +HPExport void server_preinit(void) +{ + addArg("--convert-old-mapcache", false, convertmapcache, + "Converts an old db/"DBPATH"map_cache.dat file to the new format."); + addArg("--rebuild-mapcache", false, rebuild, + "Rebuilds the entire mapcache folder (maps/"DBPATH"), using db/map_index.txt as index."); + addArg("--map", true, cachemap, + "Rebuilds an individual map's cache into maps/"DBPATH" (usage: --map <map_name_without_extension>)."); + addArg("--fix-md5", false, fixmd5, + "Updates the checksum for the files in maps/"DBPATH", using db/map_index.txt as index (see PR #1981)."); + + needs_grfio = false; + VECTOR_INIT(maplist); +} + +HPExport void plugin_final(void) +{ + while (VECTOR_LENGTH(maplist) > 0) { + char *name = VECTOR_POP(maplist); + aFree(name); + } + VECTOR_CLEAR(maplist); + if (needs_grfio) + grfio->final(); +} diff --git a/src/plugins/sample.c b/src/plugins/sample.c index 8fba2f4df..41f9517b5 100644 --- a/src/plugins/sample.c +++ b/src/plugins/sample.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2013-2015 Hercules Dev Team + * Copyright (C) 2013-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,12 +23,16 @@ #include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */ #include "common/memmgr.h" #include "common/mmo.h" +#include "common/random.h" #include "common/socket.h" #include "common/strlib.h" +#include "login/login.h" +#include "login/lclif.p.h" #include "map/clif.h" #include "map/pc.h" #include "map/script.h" +#include "plugins/HPMHooking.h" #include "common/HPMDataCheck.h" /* should always be the last Hercules file included! (if you don't make it last, it'll intentionally break compile time) */ #include <stdio.h> @@ -78,13 +82,13 @@ void sample_packet0f3(int fd) { 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; + data->someNumber = rnd()%777; ShowInfo("Created Appended sockt->session[] data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); addToSession(sockt->session[fd],data,0,true); } else { ShowInfo("Existent Appended sockt->session[] data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); - if( rand()%4 == 2 ) { + if (rnd()%4 == 2) { ShowInfo("Removing Appended sockt->session[] data\n"); removeFromSession(sockt->session[fd],0); } @@ -97,13 +101,13 @@ void sample_packet0f3(int fd) { 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; + data->someNumber = rnd()%777; ShowInfo("Created Appended map_session_data data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); addToMSD(sd,data,0,true); } else { ShowInfo("Existent Appended map_session_data data, %d %d %d %u\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber); - if( rand()%4 == 2 ) { + if (rnd()%4 == 2) { ShowInfo("Removing Appended map_session_data data\n"); removeFromMSD(sd,0); } @@ -113,24 +117,40 @@ void sample_packet0f3(int fd) { } 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) { +int my_pc_dropitem_pre(struct map_session_data **sd, int *n, int *amount) +{ my_pc_dropitem_storage = 0; - if( *amount > 1 ) { + 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 */ +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]; - safesnprintf(output,99,"[ Warning ] you can only drop 1 item at a time, capped from %d to 1",my_pc_dropitem_storage); + safesnprintf(output, 99, "[ Warning ] you can only drop 1 item at a time, capped from %d to 1", my_pc_dropitem_storage); clif->messagecolor_self(sd->fd, COLOR_RED, output); } return 1; } + + /** + * pre-hook for lclif->p->parse_CA_CONNECT_INFO_CHANGED this is a private interface function and while in source it cannot be used + * outside of lclif.c since it's private, plugin can use it and hook to private interface functions if needed + * the pre-hook takes this currently unused packet and show a notice whenver a player sends it + **/ +enum parsefunc_rcode my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre(int *fd, struct login_session_data **sd) __attribute__((nonnull(2))); +enum parsefunc_rcode my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre(int *fd, struct login_session_data **sd) +{ + ShowNotice("Player (AID: %d) has sent CA_CONNECT_INFO_CHANGED packet\n", (*sd)->account_id); + return PACKET_VALID; +} + /* * Key is the setting name in our example it's 'my_setting' while val is the value of it. * this way you can manage more than one setting in one function instead of define multiable ones @@ -199,21 +219,30 @@ HPExport void plugin_init (void) { /* 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); + 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); + addHookPost(pc, dropitem, my_pc_dropitem_post); + } + + if (SERVER_TYPE == SERVER_TYPE_LOGIN) { + /** + * In this example we add a pre-hook to lclif->p->parse_CA_CONNECT_INFO_CHANGED + * It's similar to nomral hooks except it have it own hooking macros which ends with Priv + **/ + addHookPrePriv(lclif, parse_CA_CONNECT_INFO_CHANGED, my_lclif_parse_CA_CONNECT_INFO_CHANGED_pre); } } /* triggered when server starts loading, before any server-specific data is set */ -HPExport void server_preinit (void) { +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 *, * however for battle config to be returned to our script engine we need it to be number (int) so keep use it as int only */ - addBattleConf("my_setting",parse_my_setting,return_my_setting); + addBattleConf("my_setting", parse_my_setting, return_my_setting, false); } /* run when server is ready (online) */ HPExport void server_online (void) { diff --git a/src/plugins/script_mapquit.c b/src/plugins/script_mapquit.c index 767292f2d..af53dc00c 100644 --- a/src/plugins/script_mapquit.c +++ b/src/plugins/script_mapquit.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2014-2015 Hercules Dev Team + * Copyright (C) 2014-2020 Hercules Dev Team * * Hercules is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by |